choose-modal.ce55e47a.js 5.1 KB

1
  1. import{_ as J,d as X,w as d,W as $,Z as ee,aO as le,r as o,aC as ae,o as i,G as f,C as t,l,u as v,bY as te,c as k,F as h,D as N,M as V,H as ue,bo as oe,bw as ne,L as U,b as A,aY as se}from"./index.56c69f5a.js";import{c as re}from"./_details.fe0966e2.js";import{e as ie}from"./index.2e257471.js";import{k as pe}from"./status.2df4810d.js";import{D as de}from"./date-range.c3f1dbd6.js";const me={key:1},_e={flex:""},ce={"w-full":"",flex:"","justify-end":"","mt-2":""},ve=X({__name:"choose-modal",emits:["choose"],setup(fe,{expose:R,emit:L}){const T=[{value:"1",label:"\u672A\u56DE\u7968"},{value:"2",label:"\u90E8\u5206\u56DE\u7968"},{value:"3",label:"\u5DF2\u56DE\u7968"}],g=d(!1),B=d([]),b=d([]),{currentCompany:M}=$(),s=ee({total:0,size:15,page:1,background:!0}),u=d({inv_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),D=d(null),C=d("payNo"),w=d(!1),O=le();async function y(){const{size:n,page:e}=s;w.value=!0;const{currentValue:p,timer:m,...E}=u.value,{code:_,message:r,data:c}=await ie({inv_status:"0",status:"2",[C.value]:p,companyNo:M.value.companyNo,startTime:m[0],endTime:m[1],...E,page:e,size:n});O({code:_,message:r,handler:()=>{s.total=c.count,B.value=c.list}}),w.value=!1}function P(){const[n]=b.value;if(!n)return se.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();D.value.clearSelection(),D.value.toggleRowSelection(e,!0),b.value=[e]}else b.value=[n[0]]}function j(){s.page=1,y()}function F(n){n&&(u.value={inv_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),s.page=1,y()}return R({onDisplay:()=>g.value=!0}),(n,e)=>{const p=o("el-option"),m=o("el-select"),E=o("el-input"),_=o("el-form-item"),r=o("el-col"),c=o("el-button"),I=o("el-row"),Y=o("el-form"),z=o("el-table-column"),q=o("el-tag"),G=o("el-pagination"),K=o("el-dialog"),Q=ae("loading");return i(),f(K,{"close-on-click-modal":!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(Y,{size:"small"},{default:t(()=>[l(I,{gutter:8},{default:t(()=>[l(r,{span:8},{default:t(()=>[l(_,null,{default:t(()=>[l(E,{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(pe),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]=()=>F())},{default:t(()=>[V("\u641C\u7D22")]),_:1}),l(c,{onClick:e[7]||(e[7]=()=>F(!0))},{default:t(()=>[V("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),ue((i(),f(v(oe),{border:"",ref_key:"tableRef",ref:D,data:B.value,size:"small","row-key":"id",onSelectionChange:H,"mb-2":"","max-height":"520px"},{default:t(()=>[l(z,{type:"selection",align:"center",width:"40"}),(i(!0),k(h,null,N(v(re),(a,W)=>(i(),f(z,ne({key:W},a,{"show-overflow-tooltip":""}),{default:t(({row:x})=>[a.prop==="inv_status"?(i(),f(q,{key:0},{default:t(()=>{var S;return[V(U((S=T.find(Z=>Z.value===String(x.inv_status)))==null?void 0:S.label),1)]}),_:2},1024)):(i(),k("span",me,U(x[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[Q,w.value]]),A("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"]),A("div",ce,[l(c,{type:"primary",size:"small",onClick:P},{default:t(()=>[V("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var Ce=J(ve,[["__scopeId","data-v-5fe62622"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/supplierTicketReturn/components/choose-modal.vue"]]);export{Ce as default};