choose-modal.c0d8c1.js 5.7 KB

1
  1. import{_ as Q,d as X,x as d,W as Y,Z as $,aO as ee,r as o,aD as le,o as i,G as v,D as t,l,m,cS as ae,c as h,F as x,E as S,cT as te,M as D,H as ue,bz as oe,bJ as ne,L as W,d5 as se,h as U,cU as pe,aZ as ie}from"./index.js";import{D as re}from"./date-range.4010f801.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=X({__name:"choose-modal",emits:["choose"],setup(ve,{expose:A,emit:O}){const g=d(!1),C=d([]),E=d([]),{currentCompany:L}=Y(),s=$({total:0,size:15,page:1,background:!0}),u=d({pay_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),b=d(null),B=d("payNo"),V=d(!1),P=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 pe({status:"2",pay_type:"2",pay_status:"0",[B.value]:r,companyNo:L.value.companyNo,startTime:_[0],endTime:_[1],...F,page:e,size:n});P({code:c,message:p,handler:()=>{s.total=f.count,C.value=f.list}}),V.value=!1}function R(){const[n]=E.value;if(!n)return ie.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");O("choose",m(n.payNo)),g.value=!1}function T(n){if(n.length>1){const e=n.pop();b.value.clearSelection(),b.value.toggleRowSelection(e,!0),E.value=[e]}else E.value=[n[0]]}function M(){s.page=1,y()}function N(n){n&&(u.value={pay_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[],pay_type:"2"}),s.page=1,y()}return A({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"),w=o("el-table-column"),Z=o("el-tag"),q=o("el-pagination"),G=o("el-dialog"),I=le("loading");return i(),v(G,{top:"10vh","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:B.value,"onUpdate:modelValue":e[0]||(e[0]=a=>B.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(te),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]=()=>N())},{default:t(()=>[D("\u641C\u7D22")]),_:1}),l(f,{onClick:e[7]||(e[7]=()=>N(!0))},{default:t(()=>[D("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),ue((i(),v(m(oe),{border:"",ref_key:"tableRef",ref:b,data:C.value,size:"small","row-key":"id",onSelectionChange:T,"mb-2":"","max-height":"520px"},{default:t(()=>[l(w,{type:"selection",align:"center",width:"40",fixed:"left"}),(i(!0),h(x,null,S(m(de),(a,J)=>(i(),v(w,ne({key:J},a,{"show-overflow-tooltip":""}),{default:t(({row:z})=>[a.prop==="pay_status"?(i(),v(Z,{key:0,size:"small"},{default:t(()=>{var k;return[D(W((k=m(se).find(K=>K.value===String(z.pay_status)))==null?void 0:k.label),1)]}),_:2},1024)):(i(),h("span",me,W(z[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[I,V.value]]),U("div",_e,[l(q,{"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:M},null,8,["current-page","page-size","total"]),U("div",ce,[l(f,{type:"primary",size:"small",onClick:R},{default:t(()=>[D(" \u4FDD\u5B58 ")]),_:1})])])]),_:1},8,["modelValue"])}}});var De=Q(fe,[["__scopeId","data-v-69d5983f"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/postSupplierOrder/sendOrderPay/component/choose-modal.vue"]]);export{De as default};