choose-modal.6a231a.js 5.0 KB

1
  1. import{_ as J,d as K,x as i,Z as Q,aO as X,W as Y,r as o,aD as $,o as d,G as y,D as a,l,m,cS as ee,h as V,M as D,H as le,bz as te,c as k,F as ae,E as oe,bJ as ue,L as S,d5 as ne,aZ as se}from"./index.js";import{e as ie}from"./index.5f728d54.js";import{D as pe}from"./date-range.4010f801.js";const re=[{label:"\u5BF9\u8D26\u4ED8\u6B3E\u7F16\u7801",prop:"dzNo",minWidth:160,align:"left"},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",minWidth:160,align:"left"},{label:"\u5356\u65B9\u516C\u53F8\u7F16\u7801",prop:"supplierNo",minWidth:150,align:"left"},{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",minWidth:150,align:"left"},{label:"\u4E70\u65B9\u516C\u53F8\u7F16\u7801",prop:"companyNo",minWidth:150},{label:"\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",minWidth:180},{label:"\u603B\u989D\u6B3E",prop:"total_fee",minWidth:110,align:"total_fee"},{label:"\u672C\u6B21\u4ED8\u6B3E\u91D1\u989D",prop:"dpay_fee",minWidth:110,align:"left"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",minWidth:90},{label:"\u7533\u8BF7\u65F6\u95F4",prop:"addtime",minWidth:120}];const de={"w-full":"",flex:"","justify-end":""},me={key:1},ce={flex:""},_e={"w-full":"",flex:"","justify-end":"","mt-2":""},fe=K({__name:"choose-modal",emits:["choose"],setup(ge,{expose:W,emit:U}){const c=i(!1),E=i([]),F=i([]),n=Q({total:0,size:15,page:1,background:!0}),s=i({pay_status:"",currentValue:"",supplierNo:"",timer:[]}),b=i(null),C=i("dzNo"),h=i(!1),R=X(),{currentCompany:L}=Y();async function _(){const{size:u,page:e}=n;h.value=!0;const{currentValue:f,timer:g,...B}=s.value,{code:v,message:p,data:r}=await ie({status:"4",is_comon:"1",[C.value]:f,companyNo:L.value.companyNo,startTime:g[0],endTime:g[1],noRela:!0,...B,page:e,size:u});R({code:v,message:p,handler:()=>{n.total=r.count,E.value=r.list}}),h.value=!1}function P(){const[u]=F.value;if(!u)return se.warning("\u9009\u62E9\u4E00\u6761\u91C7\u8D2D\u4ED8\u6B3E");U("choose",m(u.dzNo)),c.value=!1}function M(u){if(u.length>1){const e=u.pop();b.value.clearSelection(),b.value.toggleRowSelection(e,!0),F.value=[e]}else F.value=[u[0]]}function T(){n.page=1,_()}function z(u){u&&(s.value={pay_status:"",currentValue:"",supplierNo:"",timer:[]}),n.page=1,_()}return W({onDisplay:()=>c.value=!0}),(u,e)=>{const f=o("el-option"),g=o("el-select"),B=o("el-input"),v=o("el-form-item"),p=o("el-col"),r=o("el-button"),j=o("el-row"),H=o("el-form"),N=o("el-table-column"),O=o("el-tag"),A=o("el-pagination"),I=o("el-dialog"),Z=$("loading");return d(),y(I,{"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:c.value,"onUpdate:modelValue":e[8]||(e[8]=t=>c.value=t),title:"\u91C7\u8D2D\u4ED8\u6B3E",center:"",width:"1040px",onOpen:e[9]||(e[9]=()=>_())},{default:a(()=>[l(H,{size:"small"},{default:a(()=>[l(j,{gutter:10},{default:a(()=>[l(p,{span:8},{default:a(()=>[l(v,null,{default:a(()=>[l(B,{clearable:"",modelValue:s.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=t=>s.value.currentValue=t),placeholder:"\u5BF9\u8D26\u7F16\u7801"},{prepend:a(()=>[l(g,{modelValue:C.value,"onUpdate:modelValue":e[0]||(e[0]=t=>C.value=t),style:{width:"135px"}},{default:a(()=>[l(f,{label:"\u5BF9\u8D26\u4ED8\u6B3E\u7F16\u7801",value:"dzNo"}),l(f,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:8},{default:a(()=>[l(m(pe),{modelValue:s.value.timer,"onUpdate:modelValue":e[2]||(e[2]=t=>s.value.timer=t)},null,8,["modelValue"])]),_:1}),l(p,{span:8},{default:a(()=>[l(m(ee),{modelValue:s.value.supplierNo,"onUpdate:modelValue":e[3]||(e[3]=t=>s.value.supplierNo=t),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(p,{span:24},{default:a(()=>[V("div",de,[l(v,null,{default:a(()=>[l(r,{size:"small",type:"primary",onClick:e[4]||(e[4]=()=>z())},{default:a(()=>[D("\u641C\u7D22")]),_:1}),l(r,{size:"small",onClick:e[5]||(e[5]=()=>z(!0))},{default:a(()=>[D("\u91CD\u7F6E")]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1}),le((d(),y(m(te),{border:"",ref_key:"tableRef",ref:b,data:E.value,size:"small","row-key":"id",onSelectionChange:M,"mb-2":"","max-height":"520px"},{default:a(()=>[l(N,{type:"selection",align:"center",width:"40",fixed:"left"}),(d(!0),k(ae,null,oe(m(re),(t,q)=>(d(),y(N,ue({key:q},t,{"show-overflow-tooltip":""}),{default:a(({row:x})=>[t.prop==="pay_status"?(d(),y(O,{key:0},{default:a(()=>{var w;return[D(S((w=m(ne).find(G=>G.value===x.pay_status))==null?void 0:w.label),1)]}),_:2},1024)):(d(),k("span",me,S(x[t.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[Z,h.value]]),V("div",ce,[l(A,{"current-page":n.page,"onUpdate:currentPage":e[6]||(e[6]=t=>n.page=t),"page-size":n.size,"onUpdate:pageSize":e[7]||(e[7]=t=>n.size=t),total:n.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:_,onSizeChange:T},null,8,["current-page","page-size","total"]),V("div",_e,[l(r,{type:"primary",onClick:P},{default:a(()=>[D("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var Fe=J(fe,[["__scopeId","data-v-249f147a"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/supplierPayRelive/component/choose-modal.vue"]]);export{Fe as default};