choose-modal.983cc398.js 3.8 KB

1
  1. import{_ as O,d as q,E as r,a7 as I,aC as W,a5 as G,x as u,aA as J,o as i,N as f,K as l,b as _,y as a,O as Q,u as y,b5 as X,c as x,M as Y,L as Z,W as g,aS as $,b4 as ee,T as N}from"./index.1417328f.js";import{p as te}from"./reconciliation.53461462.js";import{d as ae}from"./index.08fe6875.js";import{c as oe}from"./_details.019d6a4a.js";import"./tootip.8c37fa8a.js";import"./_opitons.689eae18.js";import"./status.727086c1.js";const le={flex:"","justify-between":"","mb-2":""},ue={flex:"","gap-2":""},ne=g("\u641C\u7D22"),se=g("\u91CD\u7F6E"),re={key:1},pe={flex:""},ie={"w-full":"",flex:"","justify-end":"","mt-2":""},de=g("\u4FDD\u5B58"),ce=q({__name:"choose-modal",emits:["choose"],setup(_e,{expose:S,emit:z}){const m=r(!1),F=r([]),b=r([]),n=I({total:0,size:10,page:1,background:!0}),p=r({pay_status:"",currentValue:""}),C=r(null),h=r("payNo"),V=r(!1),U=W(),{currentCompany:L}=G();async function D(){const{size:o,page:e}=n;V.value=!0;const{currentValue:s,...v}=p.value,{code:B,message:d,data:c}=await ae({pay_status:"0",status:"3",[h.value]:s,companyNo:L.value.companyNo,...v,page:e,size:o});U({code:B,message:d,handler:()=>{n.total=c.count,F.value=c.list}}),V.value=!1}function R(){const[o]=b.value;if(!o)return $.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");z("choose",y(o.payNo)),m.value=!1}function A(o){if(o.length>1){const e=o.pop();C.value.clearSelection(),C.value.toggleRowSelection(e,!0),b.value=[e]}else b.value=[o[0]]}function E(o){o&&(p.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"),P=u("el-pagination"),j=u("el-dialog"),T=J("loading");return i(),f(j,{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:p.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=t=>p.value.currentValue=t),placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{prepend:l(()=>[a(v,{modelValue:h.value,"onUpdate:modelValue":e[0]||(e[0]=t=>h.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:p.value.pay_status,"onUpdate:modelValue":e[2]||(e[2]=t=>p.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]=()=>E())},{default:l(()=>[ne]),_:1}),a(d,{onClick:e[4]||(e[4]=()=>E(!0))},{default:l(()=>[se]),_:1})])]),Q((i(),f(y(X),{border:"",ref_key:"tableRef",ref:C,data:F.value,size:"small","row-key":"id",onSelectionChange:A,"mb-2":""},{default:l(()=>[a(c,{type:"selection",width:"55"}),(i(!0),x(Z,null,Y(y(oe),(t,H)=>(i(),f(c,ee({key:H},t,{"show-overflow-tooltip":""}),{default:l(({row:k})=>[t.prop==="pay_status"?(i(),f(M,{key:0},{default:l(()=>{var w;return[g(N((w=y(te).find(K=>K.value===String(k.pay_status)))==null?void 0:w.label),1)]}),_:2},1024)):(i(),x("span",re,N(k[t.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[T,V.value]]),_("div",pe,[a(P,{"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",ie,[a(d,{type:"primary",onClick:R},{default:l(()=>[de]),_:1})])])]),_:1},8,["modelValue"])}}});var he=O(ce,[["__scopeId","data-v-46832b41"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/purchase/ticketReturn/components/choose-modal.vue"]]);export{he as default};