import{r as d,c as r,C as Y,d as c,e as K,f as e,h as t,D as b,G as h,E as P,v as G,F as J,J as z,m,k as $,l as B}from"./index-BrMZ2dIo.js";import{d as A,e as H,f as O}from"./bill-BfIO8lh8.js";const W={class:"billDetails"},X={style:{position:"relative"}},Z={class:"dialog-footer"},oe={__name:"details",setup(ee){const{proxy:g}=G(),w=d([]),y=d(!1),I=d([]),C=d(0),u=d({billDate:g.$route.query.billDate,proId:"",page:1,limit:10,baseCode:g.$route.query.baseCode}),V=d([]),D=d(!1),_=d(0),o=d({page:1,limit:10,name:"",idNo:"",proId:"",billDate:"",baseCode:""}),f=d(!1);function F(n){f.value=!0,D.value=!0,o.value.proId=n.proId,o.value.billDate=n.billYM,o.value.baseCode=n.baseCode,o.value.name="",o.value.idNo="",_.value=0,V.value=[],p()}function p(){O(o.value).then(n=>{D.value=!1,_.value=n.count,V.value=n.data})}function N(){u.value.page=1,u.value.limit=10,k()}function Q(){u.value={billDate:g.$route.query.billDate,proId:"",page:1,limit:10},N()}function E(){o.value.name="",o.value.idNo="",p()}function k(){y.value=!0,A(u.value).then(n=>{w.value=n.data,C.value=n.count,y.value=!1})}function M(){H().then(n=>{n.data=n.data||[],I.value=n.data.map(a=>({value:a.pro_id,label:a.project}))})}return M(),k(),(n,a)=>{const R=r("el-option"),S=r("el-select"),v=r("el-form-item"),s=r("el-button"),x=r("el-form"),i=r("el-table-column"),U=r("el-table"),q=r("pagination"),L=r("el-input"),T=r("el-dialog"),j=Y("loading");return c(),K("div",W,[e(x,{model:u.value,ref:"queryRef",inline:!0},{default:t(()=>[e(v,{label:"项目",prop:"proId"},{default:t(()=>[e(S,{modelValue:u.value.proId,"onUpdate:modelValue":a[0]||(a[0]=l=>u.value.proId=l),placeholder:"请选择",style:{width:"240px"},filterable:""},{default:t(()=>[(c(!0),K(J,null,z(I.value,l=>(c(),h(R,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(v,null,{default:t(()=>[e(s,{type:"primary",icon:"Search",onClick:N},{default:t(()=>[m("搜索")]),_:1}),e(s,{icon:"Refresh",onClick:Q},{default:t(()=>[m("重置")]),_:1})]),_:1})]),_:1},8,["model"]),b((c(),h(U,{data:w.value},{default:t(()=>[e(i,{label:"账单年月",prop:"billYM"}),e(i,{label:"项目",prop:"project"}),e(i,{label:"累计发放金额",prop:"totalMoney"}),e(i,{label:"累计发放次数",prop:"totalTimes"}),e(i,{label:"手续费总额",prop:"totalFee"}),e(i,{label:"操作"},{default:t(({row:l})=>[e(s,{link:"",type:"primary",icon:"Edit",onClick:le=>F(l)},{default:t(()=>[m("明细")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[j,y.value]]),b(e(q,{total:C.value,page:u.value.page,"onUpdate:page":a[1]||(a[1]=l=>u.value.page=l),limit:u.value.limit,"onUpdate:limit":a[2]||(a[2]=l=>u.value.limit=l),onPagination:k},null,8,["total","page","limit"]),[[P,C.value>0]]),e(T,{modelValue:f.value,"onUpdate:modelValue":a[8]||(a[8]=l=>f.value=l),title:"明细",width:"1000"},{footer:t(()=>[$("div",Z,[e(s,{type:"primary",onClick:a[7]||(a[7]=l=>f.value=!1)},{default:t(()=>[m("确定")]),_:1})])]),default:t(()=>[e(x,{inline:!0},{default:t(()=>[e(v,{label:"姓名",prop:"name"},{default:t(()=>[e(L,{modelValue:o.value.name,"onUpdate:modelValue":a[3]||(a[3]=l=>o.value.name=l),placeholder:"请输入姓名",style:{width:"220px"},onKeyup:B(p,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(v,{label:"证件号码",prop:"idNo"},{default:t(()=>[e(L,{modelValue:o.value.idNo,"onUpdate:modelValue":a[4]||(a[4]=l=>o.value.idNo=l),placeholder:"请输入证件号码",style:{width:"220px"},onKeyup:B(p,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(v,null,{default:t(()=>[e(s,{type:"primary",icon:"Search",onClick:p},{default:t(()=>[m("搜索")]),_:1}),e(s,{icon:"Refresh",onClick:E},{default:t(()=>[m("重置")]),_:1})]),_:1})]),_:1}),b((c(),h(U,{data:V.value},{default:t(()=>[e(i,{label:"姓名",align:"left",prop:"name",width:"140"}),e(i,{label:"证件号码",align:"center",prop:"id_no"}),e(i,{label:"申请金额",align:"center",prop:"money",width:"140"}),e(i,{label:"实发金额",align:"center",prop:"actual_money",width:"140"}),e(i,{label:"手续费",align:"center",prop:"service_fee",width:"140"}),e(i,{label:"支付时间",align:"center",prop:"paid_time"})]),_:1},8,["data"])),[[j,D.value]]),$("div",X,[b(e(q,{total:_.value,page:o.value.page,"onUpdate:page":a[5]||(a[5]=l=>o.value.page=l),limit:o.value.limit,"onUpdate:limit":a[6]||(a[6]=l=>o.value.limit=l),onPagination:p},null,8,["total","page","limit"]),[[P,_.value>0]])])]),_:1},8,["modelValue"])])}}};export{oe as default};
