"use strict";const e=require("../../common/vendor.js"),o=require("../../hooks/useNav.js"),l=require("../../api/api.js");if(!Array){(e.resolveComponent("up-icon")+e.resolveComponent("up-checkbox")+e.resolveComponent("up-checkbox-group")+e.resolveComponent("z-paging")+e.resolveComponent("up-button"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-icon/u-icon.js")+(()=>"../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js")+(()=>"../../uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js")+(()=>"../../uni_modules/uview-plus/components/u-button/u-button.js"))();const n={__name:"applyFor",setup(n){const{nav:u,navTo:a}=o.useNav();let c=e.ref([]);const t=e.ref([]),r=e.ref(null);let s=e.ref(!1);const p=e=>{c.value=e?t.value.map(((e,o)=>e.id)):[],s.value=e,console.log(e)},i=async(o,n)=>{const u={current:o,pageSize:n};l.orderList(u).then((o=>{r.value.complete(o),e.index.hideLoading()})).catch((o=>{r.value.complete(!1),e.index.hideLoading()}))},m=e=>{e.length==t.value.length?s.value=!0:s.value=!1,console.log(e)};let v=()=>!r.value;return e.onPullDownRefresh((()=>{v()||r.value.reload().catch((()=>{}))})),e.onPageScroll((e=>{v()||(r.value.updatePageScrollTop(e.scrollTop),e.scrollTop<10&&r.value.doChatRecordLoadMore())})),e.onReachBottom((()=>{v()||r.value.pageReachBottom()})),(o,l)=>({a:e.p({name:"error-circle-fill",color:"#3c9cff"}),b:e.f(t.value,((o,l,n)=>({a:"8baf785a-3-"+n+",8baf785a-2",b:e.p({shape:"circle",customStyle:{margin:"0"},name:o.id}),c:e.t(o.orderNo),d:e.t(o.electricityAmount),e:e.t(o.serviceAmount),f:e.t(o.actuallyAmount),g:l}))),c:e.o(m),d:e.o((o=>e.isRef(c)?c.value=o:c=o)),e:e.p({placement:"column",modelValue:e.unref(c)}),f:e.sr(r,"8baf785a-1",{k:"paging"}),g:e.o(i),h:e.o((e=>t.value=e)),i:e.p({"use-page-scroll":!0,modelValue:t.value}),j:e.o(p),k:e.o((o=>e.isRef(s)?s.value=o:s=o)),l:e.p({label:"本页全选",shape:"circle",usedAlone:!0,customStyle:{margin:"0 10rpx 0 0"},checked:e.unref(s)}),m:e.o((o=>e.unref(a)(`/pageMake/invoice/applyForDay?list=${encodeURIComponent(JSON.stringify(e.unref(c)))}`))),n:e.p({customStyle:{height:"80rpx",width:"230rpx"},color:"#4879e6",text:"下一步",shape:"circle",disabled:0==e.unref(c).length})})}},u=e._export_sfc(n,[["__scopeId","data-v-8baf785a"]]);n.__runtimeHooks=1,wx.createPage(u);
