"use strict";const e=require("../../../../common/vendor.js"),l=require("../../../../gen/Enums.js"),o=require("../model.js"),i=require("../method.js");if(require("../../../../common/libraries/day.js"),require("../../../../common/libraries/request.js"),require("../../../../common/store/useWeAppAuthStore.js"),require("../../../../gen/Apis.js"),require("../../../../common/store/useWatermarkStore.js"),require("../../../../common/store/useWorkStore.js"),require("../../../../common/libraries/apiLoading.js"),require("../../../../common/libraries/naviHelper.js"),require("../../../../common/libraries/sendWxWork.js"),!Array){(e.resolveComponent("uni-icons")+e.resolveComponent("hs-enum-tag"))()}Math||((()=>"../../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js")+(()=>"../../../../components/hs-enum-tag/hs-enum-tag.js"))();const n=e.defineComponent({__name:"BillItem",props:["item","index"],setup(n){const u=n,s=e.ref(!1),r=()=>{var e,l,n,s,r,d;let t=null==(e=null==u?void 0:u.item)?void 0:e.checked;o.useModel.houseBillsData.value[null==u?void 0:u.index].checked=!t,null==(r=null==(s=null==(n=null==(l=o.useModel)?void 0:l.houseBillsData)?void 0:n.value[null==u?void 0:u.index])?void 0:s.bills)||r.map(e=>{e.checked=!t}),null==(d=i.method)||d.setCalculateTotalPrice()};return(n,d)=>{var t,c,a,m,v;return e.e({a:null==(t=null==u?void 0:u.item)?void 0:t.checked},(null==(c=null==u?void 0:u.item)?void 0:c.checked)?{b:e.p({type:"checkbox-filled",size:"20",color:"#2A7EFB"})}:{c:e.p({type:"circle",size:"20",color:"#888"})},{d:e.t(null==(a=null==u?void 0:u.item)?void 0:a.display_text),e:e.o(r),f:e.t(null==(m=null==u?void 0:u.item)?void 0:m.pending_amount),g:e.p({type:"down",size:"15",color:"#666"}),h:e.o(e=>s.value=!s.value),i:s.value},s.value?{j:e.f(null==(v=null==u?void 0:u.item)?void 0:v.bills,(n,s,r)=>e.e({a:null==n?void 0:n.checked},(null==n?void 0:n.checked)?{b:"8b74a834-3-"+r,c:e.p({type:"checkbox-filled",size:"20",color:"#2A7EFB"})}:{d:"8b74a834-4-"+r,e:e.p({type:"circle",size:"20",color:"#888"})},{f:"8b74a834-5-"+r,g:e.p({value:null==n?void 0:n.type,Enums:e.unref(l.HouseBillsTypeEnum)}),h:e.o(e=>((e,l)=>{var n,s;let r=null==e?void 0:e.checked;if(o.useModel.houseBillsData.value[null==u?void 0:u.index].bills[l].checked=!r,r)o.useModel.houseBillsData.value[null==u?void 0:u.index].checked=!1;else{let e=null==(n=o.useModel.houseBillsData.value[null==u?void 0:u.index].bills)?void 0:n.every(e=>null==e?void 0:e.checked);o.useModel.houseBillsData.value[null==u?void 0:u.index].checked=e,console.log(e)}null==(s=i.method)||s.setCalculateTotalPrice()})(n,s),`fid_items_${s}`),i:e.t(null==n?void 0:n.total_payable_amount),j:`fid_items_${s}`}))}:{})}}}),u=e._export_sfc(n,[["__scopeId","data-v-8b74a834"]]);wx.createComponent(u);
