choose-modal.806c4066.js 3.8 KB

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