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 t,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 ae,aZ as te}from"./index.js";import{c as le}from"./_details.f90e1169.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 h(){const{size:l,page:e}=n;V.value=!0;const{currentValue:s,...v}=i.value,{code:B,message:d,data:c}=await ae({pay_status:"0",status:"3",[C.value]:s,companyNo:L.value.companyNo,...v,page:e,size:l});U({code:B,message:d,handler:()=>{n.total=c.count,E.value=c.list}}),V.value=!1}function M(){const[l]=b.value;if(!l)return te.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,h()}return S({onDisplay:()=>m.value=!0}),(l,e)=>{const s=u("el-option"),v=u("el-select"),B=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,{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]=()=>h()),"close-on-click-modal":!1,"close-on-press-escape":!1},{default:o(()=>[_("div",oe,[_("div",ue,[t(B,{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:C.value,"onUpdate:modelValue":e[0]||(e[0]=a=>C.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(d,{type:"primary",onClick:e[3]||(e[3]=()=>F())},{default:o(()=>[g("\u641C\u7D22")]),_:1}),t(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(()=>[t(c,{type:"selection",align:"center",width:"40",fixed:"left"}),(p(!0),x(X,null,Y(y(le),(a,O)=>(p(),f(c,$({key:O},a,{"show-overflow-tooltip":""}),{default:o(({row:k})=>[a.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[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:h},null,8,["current-page","page-size","total"]),_("div",re,[t(d,{type:"primary",onClick:M},{default:o(()=>[g("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var _e=T(ie,[["__scopeId","data-v-ea7f0fe4"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/buyInvoiceQuery/components/choose-modal.vue"]]);export{_e as default};
|