choose-modal.9e60b2b9.js 3.9 KB

1
  1. import{_ as T,r as I,D as r,ak as J,aB as W,a5 as G,v as n,as as Q,o as i,M as g,J as l,q as _,w as a,N as X,x as y,bm as Y,p as w,L as Z,K as $,W as b,aO as ee,br as te,R as z}from"./index.464e6a83.js";import{c as ae}from"./_details.a0fd23d3.js";import{p as oe}from"./reconciliation.b1951dfe.js";import{d as le}from"./index.b06d6778.js";import"./_opitons.f1de5cb6.js";import"./tootip.21434d18.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),B=r([]),h=r([]),u=J({total:0,size:15,page:1,background:!0}),p=r({pay_status:"",currentValue:""}),C=r(null),V=r("payNo"),D=r(!1),U=W(),{currentCompany:R}=G();async function v(){const{size:o,page:e}=u;D.value=!0;const{currentValue:s,...f}=p.value,{code:F,message:d,data:c}=await le({pay_status:"0",status:"2",[V.value]:s,supplierNo:R.value.companyNo,...f,page:e,size:o});U({code:F,message:d,handler:()=>{u.total=c.count,B.value=c.list}}),D.value=!1}function A(){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 L(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={}),u.page=1,v()}return N({onDisplay:()=>m.value=!0}),(o,e)=>{const s=n("el-option"),f=n("el-select"),F=n("el-input"),d=n("el-button"),c=n("el-table-column"),j=n("el-tag"),P=n("el-pagination"),q=n("el-dialog"),H=Q("loading");return i(),g(q,{modelValue:m.value,"onUpdate:modelValue":e[7]||(e[7]=t=>m.value=t),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[8]||(e[8]=()=>v())},{default:l(()=>[_("div",ue,[_("div",ne,[a(F,{clearable:"",modelValue:p.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=t=>p.value.currentValue=t),placeholder:"\u5BF9\u8D26\u7F16\u53F7"},{prepend:l(()=>[a(f,{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:"\u4E1A\u52A1\u516C\u53F8\u7F16\u53F7",value:"companyNo"}),a(s,{label:"\u4F9B\u5E94\u5546\u7F16\u53F7",value:"supplierNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),a(f,{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]=()=>x())},{default:l(()=>[se]),_:1}),a(d,{onClick:e[4]||(e[4]=()=>x(!0))},{default:l(()=>[re]),_:1})])]),X((i(),g(y(Y),{border:"",ref_key:"tableRef",ref:C,data:B.value,size:"small","row-key":"id",onSelectionChange:L,"mb-2":"","max-height":"520px"},{default:l(()=>[a(c,{type:"selection",width:"55"}),(i(!0),w($,null,Z(y(ae),(t,K)=>(i(),g(c,te({key:K},t,{"show-overflow-tooltip":""}),{default:l(({row:E})=>[t.prop==="pay_status"?(i(),g(j,{key:0},{default:l(()=>{var k;return[b(z((k=y(oe).find(O=>O.value===E.pay_status))==null?void 0:k.label),1)]}),_:2},1024)):(i(),w("span",pe,z(E[t.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[H,D.value]]),_("div",ie,[a(P,{"current-page":u.page,"onUpdate:current-page":e[5]||(e[5]=t=>u.page=t),"page-size":u.size,"onUpdate:page-size":e[6]||(e[6]=t=>u.size=t),total:u.total,onCurrentChange:v,"page-sizes":[15,50,100],onSizeChange:M,layout:"sizes, prev, pager, next"},null,8,["current-page","page-size","total"]),_("div",de,[a(d,{type:"primary",onClick:A},{default:l(()=>[ce]),_:1})])])]),_:1},8,["modelValue"])}}});var Ce=T(_e,[["__scopeId","data-v-7166bada"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supply/ticketReturn/components/choose-modal.vue"]]);export{Ce as default};