1 |
- import{_ as X,d as Y,x as d,W as $,Z as ee,aO as le,r as o,aD as ae,o as i,G as f,D as t,l,m as v,cS as te,c as k,F as h,E as N,cT as ue,M as V,H as oe,bz as ne,bJ as se,L as U,h as O,cU as re,aZ as ie}from"./index.js";import{c as pe}from"./_details.810a642a.js";import{D as de}from"./date-range.4010f801.js";const me={key:1},_e={flex:""},ce={"w-full":"",flex:"","justify-end":"","mt-2":""},ve=Y({__name:"choose-modal",emits:["choose"],setup(fe,{expose:A,emit:L}){const R=[{value:"1",label:"\u672A\u56DE\u7968"},{value:"2",label:"\u90E8\u5206\u56DE\u7968"},{value:"3",label:"\u5DF2\u56DE\u7968"}],g=d(!1),b=d([]),x=d([]),{currentCompany:T}=$(),s=ee({background:!0,total:0,size:15,page:1}),u=d({currentValue:"",inv_status:"0",supplierNo:"",pay_type:"2",tag_id:"",timer:[]}),D=d(!1),C=d("payNo"),M=le(),E=d(null);async function y(){const{size:n,page:e}=s;D.value=!0;const{currentValue:p,timer:m,...w}=u.value,{code:_,message:r,data:c}=await re({status:"2",inv_status:"0",[C.value]:p,companyNo:T.value.companyNo,startTime:m[0],endTime:m[1],...w,page:e,size:n});M({code:_,message:r,handler:()=>{s.total=c.count,x.value=c.list}}),D.value=!1}function P(){const[n]=b.value;if(!n)return ie.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");L("choose",v(n.payNo)),g.value=!1}function H(n){if(n.length>1){const e=n.pop();E.value.clearSelection(),E.value.toggleRowSelection(e,!0),b.value=[e]}else b.value=[n[0]]}function j(){s.page=1,y()}function z(n){n&&(u.value={inv_status:"0",supplierNo:"",currentValue:"",pay_type:"2",tag_id:"",timer:[]}),s.page=1,y()}return A({onDisplay:()=>g.value=!0}),(n,e)=>{const p=o("el-option"),m=o("el-select"),w=o("el-input"),_=o("el-form-item"),r=o("el-col"),c=o("el-button"),I=o("el-row"),Z=o("el-form"),B=o("el-table-column"),q=o("el-tag"),G=o("el-pagination"),J=o("el-dialog"),K=ae("loading");return i(),f(J,{"close-on-click-modal":!1,"close-on-press-escape":!1,modelValue:g.value,"onUpdate:modelValue":e[10]||(e[10]=a=>g.value=a),title:"\u8BA2\u5355\u5BF9\u8D26",center:"",width:"1040px",onOpen:e[11]||(e[11]=()=>y())},{default:t(()=>[l(Z,{size:"small"},{default:t(()=>[l(I,{gutter:8},{default:t(()=>[l(r,{span:8},{default:t(()=>[l(_,null,{default:t(()=>[l(w,{clearable:"",modelValue:u.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=a=>u.value.currentValue=a),placeholder:"\u8BF7\u8F93\u5165"},{prepend:t(()=>[l(m,{modelValue:C.value,"onUpdate:modelValue":e[0]||(e[0]=a=>C.value=a),style:{width:"130px"}},{default:t(()=>[l(p,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(r,{span:8},{default:t(()=>[l(v(de),{modelValue:u.value.timer,"onUpdate:modelValue":e[2]||(e[2]=a=>u.value.timer=a)},null,8,["modelValue"])]),_:1}),l(r,{span:8},{default:t(()=>[l(v(te),{modelValue:u.value.supplierNo,"onUpdate:modelValue":e[3]||(e[3]=a=>u.value.supplierNo=a),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(r,{span:6},{default:t(()=>[l(_,null,{default:t(()=>[l(m,{"w-80":"",modelValue:u.value.inv_status,"onUpdate:modelValue":e[4]||(e[4]=a=>u.value.inv_status=a),placeholder:"\u5F00\u7968\u72B6\u6001"},{default:t(()=>[l(p,{value:"0",label:"\u672A\u56DE\u7968\u6216\u90E8\u5206\u56DE\u7968"}),l(p,{value:"1",label:"\u672A\u56DE\u7968"}),l(p,{value:"2",label:"\u90E8\u5206\u56DE\u7968"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(r,{span:6},{default:t(()=>[l(_,null,{default:t(()=>[l(m,{"w-80":"",modelValue:u.value.tag_id,"onUpdate:modelValue":e[5]||(e[5]=a=>u.value.tag_id=a),placeholder:"\u6807\u7B7E\u72B6\u6001"},{default:t(()=>[(i(!0),k(h,null,N(v(ue),a=>(i(),f(p,{key:a.value,value:a.value,label:a.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),l(r,{span:12},{default:t(()=>[l(_,null,{default:t(()=>[l(c,{type:"primary",onClick:e[6]||(e[6]=()=>z())},{default:t(()=>[V("\u641C\u7D22")]),_:1}),l(c,{onClick:e[7]||(e[7]=()=>z(!0))},{default:t(()=>[V("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),oe((i(),f(v(ne),{border:"",ref_key:"tableRef",ref:E,data:x.value,size:"small","row-key":"id",onSelectionChange:H,"mb-2":"","max-height":"520px"},{default:t(()=>[l(B,{type:"selection",align:"center",width:"40",fixed:"left"}),(i(!0),k(h,null,N(v(pe),(a,Q)=>(i(),f(B,se({key:Q},a,{"show-overflow-tooltip":""}),{default:t(({row:F})=>[a.prop==="inv_status"?(i(),f(q,{key:0},{default:t(()=>{var S;return[V(U((S=R.find(W=>W.value===String(F.inv_status)))==null?void 0:S.label),1)]}),_:2},1024)):(i(),k("span",me,U(F[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[K,D.value]]),O("div",_e,[l(G,{"current-page":s.page,"onUpdate:currentPage":e[8]||(e[8]=a=>s.page=a),"page-size":s.size,"onUpdate:pageSize":e[9]||(e[9]=a=>s.size=a),total:s.total,"page-sizes":[15,50,100],layout:"sizes, prev, pager, next",onCurrentChange:y,onSizeChange:j},null,8,["current-page","page-size","total"]),O("div",ce,[l(c,{type:"primary",size:"small",onClick:P},{default:t(()=>[V("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var be=X(ve,[["__scopeId","data-v-31d2cc62"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/postSupplierOrder/sendOrderInvoice/components/choose-modal.vue"]]);export{be as default};
|