1 |
- import{_ as q,d as I,E as r,a5 as W,a7 as G,aC as J,x as s,aA as Q,o as i,N as g,K as l,b as _,y as t,O as X,u as y,b5 as Y,c as k,M as Z,L as $,W as b,aS as ee,b4 as ae,T as z}from"./index.1417328f.js";import{c as te}from"./_details.1899f29a.js";import{p as oe}from"./reconciliation.53461462.js";import{d as le}from"./index.08fe6875.js";import"./_options.d0ef3218.js";import"./tootip.8c37fa8a.js";const ue={flex:"","justify-between":"","mb-2":""},ne={flex:"","gap-2":""},se=b("\u641C\u7D22"),re=b("\u91CD\u7F6E"),pe={key:1},ie={flex:""},de={"w-full":"",flex:"","justify-end":"","mt-2":""},ce=b("\u4FDD\u5B58"),_e=I({__name:"choose-modal",emits:["choose"],setup(me,{expose:N,emit:S}){const m=r(!1),D=r([]),h=r([]),{currentCompany:U}=W(),u=G({total:0,size:15,page:1,background:!0}),p=r({pay_status:"0",currentValue:""}),C=r(null),E=r("payNo"),V=r(!1),A=J();async function v(){const{size:o,page:e}=u;V.value=!0;const{currentValue:n,...f}=p.value,{code:B,message:d,data:c}=await le({pay_status:"0",status:"2",[E.value]:n,companyNo:U.value.companyNo,...f,page:e,size:o});A({code:B,message:d,handler:()=>{u.total=c.count,D.value=c.list}}),V.value=!1}function L(){const[o]=h.value;if(!o)return ee.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");S("choose",y(o.payNo)),m.value=!1}function P(o){if(o.length>1){const e=o.pop();C.value.clearSelection(),C.value.toggleRowSelection(e,!0),h.value=[e]}else h.value=[o[0]]}function M(){u.page=1,v()}function x(o){o&&(p.value={pay_status:"0",currentValue:""}),u.page=1,v()}return N({onDisplay:()=>m.value=!0}),(o,e)=>{const n=s("el-option"),f=s("el-select"),B=s("el-input"),d=s("el-button"),c=s("el-table-column"),R=s("el-tag"),j=s("el-pagination"),T=s("el-dialog"),H=Q("loading");return i(),g(T,{modelValue:m.value,"onUpdate:modelValue":e[7]||(e[7]=a=>m.value=a),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>v())},{default:l(()=>[_("div",ue,[_("div",ne,[t(B,{clearable:"",modelValue:p.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=a=>p.value.currentValue=a),placeholder:"\u8BF7\u8F93\u5165"},{prepend:l(()=>[t(f,{modelValue:E.value,"onUpdate:modelValue":e[0]||(e[0]=a=>E.value=a),style:{width:"130px"}},{default:l(()=>[t(n,{label:"\u5BF9\u8D26\u7F16\u53F7",value:"payNo"}),t(n,{label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7",value:"supplierNo"}),t(n,{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",value:"supplierName"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),t(f,{"w-80":"",modelValue:p.value.pay_status,"onUpdate:modelValue":e[2]||(e[2]=a=>p.value.pay_status=a),placeholder:"\u4ED8\u6B3E\u72B6\u6001"},{default:l(()=>[t(n,{value:"0",label:"\u672A\u4ED8\u6B3E\u6216\u90E8\u5206\u4ED8\u6B3E"}),t(n,{value:"1",label:"\u672A\u4ED8\u6B3E"}),t(n,{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"})]),_:1},8,["modelValue"])]),_("div",null,[t(d,{type:"primary",onClick:e[3]||(e[3]=()=>x())},{default:l(()=>[se]),_:1}),t(d,{onClick:e[4]||(e[4]=()=>x(!0))},{default:l(()=>[re]),_:1})])]),X((i(),g(y(Y),{border:"",ref_key:"tableRef",ref:C,data:D.value,size:"small","row-key":"id",onSelectionChange:P,"mb-2":"","max-height":"520px"},{default:l(()=>[t(c,{type:"selection",width:"55"}),(i(!0),k($,null,Z(y(te),(a,K)=>(i(),g(c,ae({key:K},a,{"show-overflow-tooltip":""}),{default:l(({row:F})=>[a.prop==="pay_status"?(i(),g(R,{key:0},{default:l(()=>{var w;return[b(z((w=y(oe).find(O=>O.value===String(F.pay_status)))==null?void 0:w.label),1)]}),_:2},1024)):(i(),k("span",pe,z(F[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[H,V.value]]),_("div",ie,[t(j,{"current-page":u.page,"onUpdate:current-page":e[5]||(e[5]=a=>u.page=a),"page-size":u.size,"onUpdate:page-size":e[6]||(e[6]=a=>u.size=a),total:u.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:v,onSizeChange:M},null,8,["current-page","page-size","total"]),_("div",de,[t(d,{type:"primary",onClick:L},{default:l(()=>[ce]),_:1})])])]),_:1},8,["modelValue"])}}});var Ce=q(_e,[["__scopeId","data-v-a54e4524"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/purchase/purchPay/component/choose-modal.vue"]]);export{Ce as default};
|