1 |
- import{_ as O,d as T,w as r,Z as W,aL as G,W as K,r as u,aC as Q,o as p,G as f,C as o,b as _,l as t,M as g,H as Z,u as y,bn as J,c as x,F as X,D as Y,bw as $,L as N,aW as ee}from"./index.0bc83371.js";import{e as ae}from"./index.a6946a3d.js";import{c as te}from"./_details.0f4a1772.js";import{q as le}from"./status.d6b2a53d.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=T({__name:"choose-modal",emits:["choose"],setup(pe,{expose:S,emit:z}){const m=r(!1),h=r([]),b=r([]),n=W({total:0,size:10,page:1,background:!0}),i=r({pay_status:"",currentValue:""}),C=r(null),D=r("payNo"),V=r(!1),L=G(),{currentCompany:U}=K();async function B(){const{size:l,page:e}=n;V.value=!0;const{currentValue:s,...v}=i.value,{code:w,message:c,data:d}=await ae({pay_status:"0",status:"3",[D.value]:s,companyNo:U.value.companyNo,...v,page:e,size:l});L({code:w,message:c,handler:()=>{n.total=d.count,h.value=d.list}}),V.value=!1}function M(){const[l]=b.value;if(!l)return ee.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();C.value.clearSelection(),C.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"),w=u("el-input"),c=u("el-button"),d=u("el-table-column"),R=u("el-tag"),j=u("el-pagination"),A=u("el-dialog"),H=Q("loading");return p(),f(A,{"close-on-click-modal":!1,modelValue:m.value,"onUpdate:modelValue":e[6]||(e[6]=a=>m.value=a),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[7]||(e[7]=()=>B())},{default:o(()=>[_("div",oe,[_("div",ue,[t(w,{clearable:"",modelValue:i.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=a=>i.value.currentValue=a),placeholder:"\u5BF9\u8D26\u7F16\u7801"},{prepend:o(()=>[t(v,{modelValue:D.value,"onUpdate:modelValue":e[0]||(e[0]=a=>D.value=a),style:{width:"130px"}},{default:o(()=>[t(s,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"}),t(s,{label:"\u5356\u65B9\u516C\u53F8\u7F16\u7801",value:"supplierNo"}),t(s,{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",value:"supplierName"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),t(v,{clearable:"","w-80":"",modelValue:i.value.pay_status,"onUpdate:modelValue":e[2]||(e[2]=a=>i.value.pay_status=a),placeholder:"\u4ED8\u6B3E\u72B6\u6001"},{default:o(()=>[t(s,{value:"1",label:"\u672A\u4ED8\u6B3E"}),t(s,{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"})]),_:1},8,["modelValue"])]),_("div",null,[t(c,{type:"primary",onClick:e[3]||(e[3]=()=>F())},{default:o(()=>[g("\u641C\u7D22")]),_:1}),t(c,{onClick:e[4]||(e[4]=()=>F(!0))},{default:o(()=>[g("\u91CD\u7F6E")]),_:1})])]),Z((p(),f(y(J),{border:"",ref_key:"tableRef",ref:C,data:h.value,size:"small","row-key":"id",onSelectionChange:P,"mb-2":""},{default:o(()=>[t(d,{type:"selection",align:"center",width:"40"}),(p(!0),x(X,null,Y(y(te),(a,q)=>(p(),f(d,$({key:q},a,{"show-overflow-tooltip":""}),{default:o(({row:k})=>[a.prop==="pay_status"?(p(),f(R,{key:0},{default:o(()=>{var E;return[g(N((E=y(le).find(I=>I.value===String(k.pay_status)))==null?void 0:E.label),1)]}),_:2},1024)):(p(),x("span",ne,N(k[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[H,V.value]]),_("div",se,[t(j,{"current-page":n.page,"onUpdate:currentPage":e[5]||(e[5]=a=>n.page=a),"page-size":n.size,total:n.total,onCurrentChange:B},null,8,["current-page","page-size","total"]),_("div",re,[t(c,{type:"primary",onClick:M},{default:o(()=>[g("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var ve=O(ie,[["__scopeId","data-v-3c16b6c4"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supply/sellInvoiceQuery/components/choose-modal.vue"]]);export{ve as default};
|