choose-modal.c5c6d0.js 3.7 KB

1
  1. import{_ as T,d as Z,x as r,Z as q,aO as G,W as J,r as u,aD as K,o as p,G as f,D as o,h as _,l as a,M as g,H as Q,m as y,bz as W,c as x,F as X,E as Y,bJ as $,L as N,d5 as ee,d6 as te,aZ as ae}from"./index.js";import{c as le}from"./_details.0f4a1772.js";const oe={flex:"","justify-between":"","mb-2":""},ue={flex:"","gap-2":""},ne={key:1},se={flex:""},re={"w-full":"",flex:"","justify-end":"","mt-2":""},ie=Z({__name:"choose-modal",emits:["choose"],setup(pe,{expose:S,emit:z}){const m=r(!1),E=r([]),b=r([]),n=q({total:0,size:10,page:1,background:!0}),i=r({pay_status:"",currentValue:""}),D=r(null),C=r("payNo"),V=r(!1),U=G(),{currentCompany:L}=J();async function B(){const{size:l,page:e}=n;V.value=!0;const{currentValue:s,...v}=i.value,{code:h,message:d,data:c}=await te({pay_status:"0",status:"3",[C.value]:s,companyNo:L.value.companyNo,...v,page:e,size:l});U({code:h,message:d,handler:()=>{n.total=c.count,E.value=c.list}}),V.value=!1}function M(){const[l]=b.value;if(!l)return ae.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");z("choose",y(l.payNo)),m.value=!1}function P(l){if(l.length>1){const e=l.pop();D.value.clearSelection(),D.value.toggleRowSelection(e,!0),b.value=[e]}else b.value=[l[0]]}function F(l){l&&(i.value={}),n.page=1,B()}return S({onDisplay:()=>m.value=!0}),(l,e)=>{const s=u("el-option"),v=u("el-select"),h=u("el-input"),d=u("el-button"),c=u("el-table-column"),R=u("el-tag"),j=u("el-pagination"),A=u("el-dialog"),H=K("loading");return p(),f(A,{"close-on-click-modal":!1,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]=()=>B())},{default:o(()=>[_("div",oe,[_("div",ue,[a(h,{clearable:"",modelValue:i.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=t=>i.value.currentValue=t),placeholder:"\u5BF9\u8D26\u7F16\u7801"},{prepend:o(()=>[a(v,{modelValue:C.value,"onUpdate:modelValue":e[0]||(e[0]=t=>C.value=t),style:{width:"130px"}},{default:o(()=>[a(s,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"}),a(s,{label:"\u5356\u65B9\u516C\u53F8\u7F16\u7801",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:o(()=>[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]=()=>F())},{default:o(()=>[g("\u641C\u7D22")]),_:1}),a(d,{onClick:e[4]||(e[4]=()=>F(!0))},{default:o(()=>[g("\u91CD\u7F6E")]),_:1})])]),Q((p(),f(y(W),{border:"",ref_key:"tableRef",ref:D,data:E.value,size:"small","row-key":"id",onSelectionChange:P,"mb-2":""},{default:o(()=>[a(c,{type:"selection",align:"center",width:"40",fixed:"left"}),(p(!0),x(X,null,Y(y(le),(t,O)=>(p(),f(c,$({key:O},t,{"show-overflow-tooltip":""}),{default:o(({row:k})=>[t.prop==="pay_status"?(p(),f(R,{key:0},{default:o(()=>{var w;return[g(N((w=y(ee).find(I=>I.value===String(k.pay_status)))==null?void 0:w.label),1)]}),_:2},1024)):(p(),x("span",ne,N(k[t.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[H,V.value]]),_("div",se,[a(j,{"current-page":n.page,"onUpdate:currentPage":e[5]||(e[5]=t=>n.page=t),"page-size":n.size,total:n.total,onCurrentChange:B},null,8,["current-page","page-size","total"]),_("div",re,[a(d,{type:"primary",onClick:M},{default:o(()=>[g("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var _e=T(ie,[["__scopeId","data-v-3c16b6c4"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/sellInvoiceQuery/components/choose-modal.vue"]]);export{_e as default};