import{e as t,r as e,a9 as s,h as a,w as l,z as i,o as c,i as d,a as n,k as u,l as _,F as o,N as f,j as m,t as r,m as x,_ as k}from"./index-B3cqKsI_.js";import{d as h}from"./index.CL60Q41z.js";import{c as p,O as y}from"./customer.Crnb53sL.js";import{_ as w}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-nav-bar.xE5Um1Eb.js";import"./uni-icons.EqO7jntL.js";/* empty css                                                                  *//* empty css                                                                    *//* empty css                                                              */const b=w({__name:"checkPayment",setup(w){const b=t({defaultTitle:"选择付款单",isShowTitle:!0,checkTitle:"全选",checkShow:!0,ids:[],id:0,eid:"",cid:"",name:"",list:[],newtol:[],num:"",buildData:[],current:0});e(),s((t=>{t.cid&&(b.cid=t.cid),t.id&&(b.id=t.id),b.eid=t.eid,b.name=t.name,T(t.eid),b.list.forEach((t=>{t.show=!1})),j()}));const g=()=>{x(`/pages/users/examine/default?id=${b.id}&bill_id=${b.ids}&eid=${b.eid}`)},j=()=>{p().then((t=>{b.buildData=t.data}))},v=()=>{k()},T=t=>{y({eid:t}).then((t=>{b.list=t.data}))},C=(t,e)=>{b.ids.indexOf(t.id)<0?(b.ids.push(t.id),b.newtol.push(Number(t.num))):(b.newtol=b.newtol.filter((e=>e!==Number(t.num))),b.ids=b.ids.filter((e=>e!==t.id))),b.num=b.newtol.reduce(((t,e)=>t+e)).toFixed(2)},S=t=>{b.ids=[],"全选"===t?(b.checkShow=!1,b.checkTitle="取消全选",b.list.map((t=>{b.ids.push(t.id)}))):"取消全选"===t&&(b.checkShow=!0,b.checkTitle="全选",b.ids=[])};return(t,e)=>{const s=i;return c(),a(s,{class:"content"},{default:l((()=>[d(s,{class:"cr-position-header"},{default:l((()=>[d(s,{class:"status_bar"}),d(n(h),{"is-right":!0,"default-title":b.defaultTitle},null,8,["default-title"])])),_:1}),d(s,{class:"examine-content m10"},{default:l((()=>[(c(!0),u(o,null,_(b.list,((t,e)=>(c(),a(s,{class:"item",key:e},{default:l((()=>[b.ids.indexOf(t.id)<0?(c(),a(s,{key:0,class:"iconfont icon-xuanzeanniu-weixuan",onClick:e=>C(t)},null,8,["onClick"])):(c(),a(s,{key:1,class:"iconfont icon-denglu-tongyi",onClick:e=>C(t)},null,8,["onClick"])),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 付款单号")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(t.bill_no),1)])),_:2},1024)])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 合同名称 ")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(t.treaty?t.treaty.contract_name:"--"),1)])),_:2},1024)])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 业务类型 ")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(0==t.types?"回款记录":"续费记录-"+t.renew.title),1)])),_:2},1024)])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 付款金额 ")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(t.num?t.num:"--"),1)])),_:2},1024)])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 发票状态 ")])),_:1}),-1==t.status?(c(),a(s,{key:0,class:"list-text"},{default:l((()=>[m("开票撤回")])),_:1})):f("",!0),0==t.status?(c(),a(s,{key:1,class:"list-text"},{default:l((()=>[m("待开票")])),_:1})):f("",!0),1==t.status?(c(),a(s,{key:2,class:"list-text"},{default:l((()=>[m("已开票")])),_:1})):f("",!0),2==t.status?(c(),a(s,{key:3,class:"list-text"},{default:l((()=>[m("已拒绝")])),_:1})):f("",!0),3==t.status?(c(),a(s,{key:4,class:"list-text"},{default:l((()=>[m("申请作废")])),_:1})):f("",!0),4==t.status?(c(),a(s,{key:5,class:"list-text"},{default:l((()=>[m("同意作废")])),_:1})):f("",!0),5==t.status?(c(),a(s,{key:6,class:"list-text"},{default:l((()=>[m("拒绝作废")])),_:1})):f("",!0),6==t.status?(c(),a(s,{key:7,class:"list-text"},{default:l((()=>[m("作废撤回")])),_:1})):f("",!0),t.status?f("",!0):(c(),a(s,{key:8,class:"list-text"},{default:l((()=>[m("--")])),_:1}))])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 创建人 ")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(t.card?t.card.name:"--"),1)])),_:2},1024)])),_:2},1024),d(s,{class:"list-item"},{default:l((()=>[d(s,{class:"name"},{default:l((()=>[m(" 创建时间 ")])),_:1}),d(s,{class:"list-text"},{default:l((()=>[m(r(t.created_at),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),d(s,{class:"footer"},{default:l((()=>[d(s,{class:"flex"},{default:l((()=>[b.checkShow?(c(),a(s,{key:0,class:"iconfont icon-xuanzeanniu-weixuan",onClick:e[0]||(e[0]=t=>S(b.checkTitle))})):f("",!0),b.checkShow?f("",!0):(c(),a(s,{key:1,class:"iconfont icon-denglu-tongyi",onClick:e[1]||(e[1]=t=>S(b.checkTitle))})),d(s,{class:"text"},{default:l((()=>[m(r(b.checkTitle)+"（"+r(b.ids.length)+"/"+r(b.list.length)+"） ",1)])),_:1})])),_:1}),d(s,{class:"flex"},{default:l((()=>[d(s,{class:"btn cancel",onClick:v},{default:l((()=>[m(" 取消 ")])),_:1}),d(s,{class:"btn next",onClick:g},{default:l((()=>[m(" 下一步 ")])),_:1})])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-8c1e76a7"]]);export{b as default};
