choose-modal.7936b19e.js 5.7 KB

1
  1. import{_ as Z,d as J,w as d,W as X,Z as $,aO as ee,r as o,aC as le,o as i,G as v,C as t,l,u as m,c5 as ae,c as h,F as x,D as S,M as b,H as te,bo as ue,bw as oe,L as W,b as A,aY as ne}from"./index.42bf163d.js";import{e as se}from"./index.e0b507e8.js";import{o as pe,q as ie}from"./status.d6b2a53d.js";import{D as re}from"./date-range.26f9b7e9.js";const de=[{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",minWidth:160,align:"left"},{label:"\u4F9B\u5E94\u5546\u7F16\u7801",prop:"supplierNo",minWidth:150,align:"left"},{label:"\u4F9B\u5E94\u5546\u540D\u79F0",prop:"supplierName",minWidth:180,align:"left"},{label:"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801",prop:"companyNo",minWidth:150},{label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",prop:"companyName",minWidth:180},{label:"\u4ED8\u6B3E\u72B6\u6001",prop:"pay_status",minWidth:100},{label:"\u603B\u989D\u6B3E",prop:"total_fee",minWidth:110,align:"total_fee"},{label:"\u4ED8\u6B3E\u6807\u7B7E\u91D1\u989D",prop:"pay_tag_fee",minWidth:110,align:"left"},{label:"\u5DF2\u4ED8\u6B3E\u91D1\u989D",prop:"apay_fee",minWidth:110,align:"left"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",minWidth:90},{label:"\u7533\u8BF7\u65F6\u95F4",prop:"addtime",minWidth:120}];const me={key:1},_e={flex:""},ce={"w-full":"",flex:"","justify-end":"","mt-2":""},fe=J({__name:"choose-modal",emits:["choose"],setup(ve,{expose:U,emit:L}){const g=d(!1),C=d([]),B=d([]),{currentCompany:P}=X(),s=$({total:0,size:15,page:1,background:!0}),u=d({pay_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),D=d(null),E=d("payNo"),V=d(!1),R=ee();async function y(){const{size:n,page:e}=s;V.value=!0;const{currentValue:r,timer:_,...F}=u.value,{code:c,message:p,data:f}=await se({pay_status:"0",status:"2",[E.value]:r,companyNo:P.value.companyNo,startTime:_[0],endTime:_[1],...F,page:e,size:n});R({code:c,message:p,handler:()=>{s.total=f.count,C.value=f.list}}),V.value=!1}function M(){const[n]=B.value;if(!n)return ne.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");L("choose",m(n.payNo)),g.value=!1}function O(n){if(n.length>1){const e=n.pop();D.value.clearSelection(),D.value.toggleRowSelection(e,!0),B.value=[e]}else B.value=[n[0]]}function T(){s.page=1,y()}function w(n){n&&(u.value={pay_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),s.page=1,y()}return U({onDisplay:()=>g.value=!0}),(n,e)=>{const r=o("el-option"),_=o("el-select"),F=o("el-input"),c=o("el-form-item"),p=o("el-col"),f=o("el-button"),H=o("el-row"),j=o("el-form"),N=o("el-table-column"),q=o("el-tag"),G=o("el-pagination"),I=o("el-dialog"),K=le("loading");return i(),v(I,{"close-on-click-modal":!1,modelValue:g.value,"onUpdate:modelValue":e[10]||(e[10]=a=>g.value=a),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[11]||(e[11]=()=>y())},{default:t(()=>[l(j,{size:"small"},{default:t(()=>[l(H,{gutter:8},{default:t(()=>[l(p,{span:8},{default:t(()=>[l(c,null,{default:t(()=>[l(F,{clearable:"",modelValue:u.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=a=>u.value.currentValue=a),placeholder:"\u8BF7\u8F93\u5165"},{prepend:t(()=>[l(_,{modelValue:E.value,"onUpdate:modelValue":e[0]||(e[0]=a=>E.value=a),style:{width:"130px"}},{default:t(()=>[l(r,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:8},{default:t(()=>[l(m(re),{modelValue:u.value.timer,"onUpdate:modelValue":e[2]||(e[2]=a=>u.value.timer=a)},null,8,["modelValue"])]),_:1}),l(p,{span:8},{default:t(()=>[l(m(ae),{modelValue:u.value.supplierNo,"onUpdate:modelValue":e[3]||(e[3]=a=>u.value.supplierNo=a),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(p,{span:6},{default:t(()=>[l(c,null,{default:t(()=>[l(_,{"w-80":"",modelValue:u.value.pay_status,"onUpdate:modelValue":e[4]||(e[4]=a=>u.value.pay_status=a),placeholder:"\u4ED8\u6B3E\u72B6\u6001"},{default:t(()=>[l(r,{value:"0",label:"\u672A\u4ED8\u6B3E\u6216\u90E8\u5206\u4ED8\u6B3E"}),l(r,{value:"1",label:"\u672A\u4ED8\u6B3E"}),l(r,{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:6},{default:t(()=>[l(c,null,{default:t(()=>[l(_,{"w-80":"",modelValue:u.value.tag_id,"onUpdate:modelValue":e[5]||(e[5]=a=>u.value.tag_id=a),placeholder:"\u6807\u7B7E\u72B6\u6001"},{default:t(()=>[(i(!0),h(x,null,S(m(pe),a=>(i(),v(r,{key:a.value,value:a.value,label:a.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(p,{span:12},{default:t(()=>[l(c,null,{default:t(()=>[l(f,{type:"primary",onClick:e[6]||(e[6]=()=>w())},{default:t(()=>[b("\u641C\u7D22")]),_:1}),l(f,{onClick:e[7]||(e[7]=()=>w(!0))},{default:t(()=>[b("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),te((i(),v(m(ue),{border:"",ref_key:"tableRef",ref:D,data:C.value,size:"small","row-key":"id",onSelectionChange:O,"mb-2":"","max-height":"520px"},{default:t(()=>[l(N,{type:"selection",align:"center",width:"40"}),(i(!0),h(x,null,S(m(de),(a,Q)=>(i(),v(N,oe({key:Q},a,{"show-overflow-tooltip":""}),{default:t(({row:k})=>[a.prop==="pay_status"?(i(),v(q,{key:0,size:"small"},{default:t(()=>{var z;return[b(W((z=m(ie).find(Y=>Y.value===String(k.pay_status)))==null?void 0:z.label),1)]}),_:2},1024)):(i(),h("span",me,W(k[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[K,V.value]]),A("div",_e,[l(G,{"current-page":s.page,"onUpdate:currentPage":e[8]||(e[8]=a=>s.page=a),"page-size":s.size,"onUpdate:pageSize":e[9]||(e[9]=a=>s.size=a),total:s.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:y,onSizeChange:T},null,8,["current-page","page-size","total"]),A("div",ce,[l(f,{type:"primary",size:"small",onClick:M},{default:t(()=>[b("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var De=Z(fe,[["__scopeId","data-v-a54e4524"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/purchPay/component/choose-modal.vue"]]);export{De as default};