choose-modal.f2991dfd.js 5.0 KB

1
  1. import{_ as Z,d as J,w as d,W as X,Z as $,aO as ee,r as u,aC as le,o as i,G as f,C as t,l,u as m,cb as ae,c as B,F as N,D as S,M as V,H as te,bo as oe,bw as ue,L as U,b as R,aY as ne}from"./index.fd765376.js";import{c as se}from"./_details.70698317.js";import{e as re}from"./index.8444c556.js";import{o as ie}from"./status.0f05917e.js";import{D as pe}from"./date-range.03e0d64c.js";import{i as de}from"./_options.b664a184.js";const me={key:1},_e={flex:""},ce={"w-full":"",flex:"","justify-end":"","mt-2":""},ve=J({__name:"choose-modal",emits:["choose"],setup(fe,{expose:A,emit:L}){const g=d(!1),z=d([]),b=d([]),{currentCompany:M}=X(),s=$({total:0,size:15,page:1,background:!0}),o=d({inv_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),C=d(null),D=d("payNo"),w=d(!1),O=ee();async function y(){const{size:n,page:e}=s;w.value=!0;const{currentValue:p,timer:_,...k}=o.value,{code:c,message:r,data:v}=await re({inv_status:"0",status:"2",[D.value]:p,companyNo:M.value.companyNo,startTime:_[0],endTime:_[1],...k,page:e,size:n});O({code:c,message:r,handler:()=>{s.total=v.count,z.value=v.list}}),w.value=!1}function P(){const[n]=b.value;if(!n)return ne.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");L("choose",m(n.payNo)),g.value=!1}function T(n){if(n.length>1){const e=n.pop();C.value.clearSelection(),C.value.toggleRowSelection(e,!0),b.value=[e]}else b.value=[n[0]]}function H(){s.page=1,y()}function E(n){n&&(o.value={inv_status:"0",supplierNo:"",currentValue:"",tag_id:"",timer:[]}),s.page=1,y()}return A({onDisplay:()=>g.value=!0}),(n,e)=>{const p=u("el-option"),_=u("el-select"),k=u("el-input"),c=u("el-form-item"),r=u("el-col"),v=u("el-button"),j=u("el-row"),q=u("el-form"),F=u("el-table-column"),G=u("el-tag"),I=u("el-pagination"),K=u("el-dialog"),Q=le("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(q,{size:"small"},{default:t(()=>[l(j,{gutter:8},{default:t(()=>[l(r,{span:8},{default:t(()=>[l(c,null,{default:t(()=>[l(k,{clearable:"",modelValue:o.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=a=>o.value.currentValue=a),placeholder:"\u8BF7\u8F93\u5165"},{prepend:t(()=>[l(_,{modelValue:D.value,"onUpdate:modelValue":e[0]||(e[0]=a=>D.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(m(pe),{modelValue:o.value.timer,"onUpdate:modelValue":e[2]||(e[2]=a=>o.value.timer=a)},null,8,["modelValue"])]),_:1}),l(r,{span:8},{default:t(()=>[l(m(ae),{modelValue:o.value.supplierNo,"onUpdate:modelValue":e[3]||(e[3]=a=>o.value.supplierNo=a),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(r,{span:6},{default:t(()=>[l(c,null,{default:t(()=>[l(_,{"w-80":"",modelValue:o.value.inv_status,"onUpdate:modelValue":e[4]||(e[4]=a=>o.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(c,null,{default:t(()=>[l(_,{"w-80":"",modelValue:o.value.tag_id,"onUpdate:modelValue":e[5]||(e[5]=a=>o.value.tag_id=a),placeholder:"\u6807\u7B7E\u72B6\u6001"},{default:t(()=>[(i(!0),B(N,null,S(m(ie),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(c,null,{default:t(()=>[l(v,{type:"primary",onClick:e[6]||(e[6]=()=>E())},{default:t(()=>[V("\u641C\u7D22")]),_:1}),l(v,{onClick:e[7]||(e[7]=()=>E(!0))},{default:t(()=>[V("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),te((i(),f(m(oe),{border:"",ref_key:"tableRef",ref:C,data:z.value,size:"small","row-key":"id",onSelectionChange:T,"mb-2":"","max-height":"520px"},{default:t(()=>[l(F,{type:"selection",align:"center",width:"40"}),(i(!0),B(N,null,S(m(se),(a,W)=>(i(),f(F,ue({key:W},a,{"show-overflow-tooltip":""}),{default:t(({row:h})=>[a.prop==="inv_status"?(i(),f(G,{key:0},{default:t(()=>{var x;return[V(U((x=m(de).find(Y=>Y.value===String(h.inv_status)))==null?void 0:x.label),1)]}),_:2},1024)):(i(),B("span",me,U(h[a.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[Q,w.value]]),R("div",_e,[l(I,{"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:H},null,8,["current-page","page-size","total"]),R("div",ce,[l(v,{type:"primary",size:"small",onClick:P},{default:t(()=>[V("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var we=Z(ve,[["__scopeId","data-v-46832b41"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/ticketReturn/components/choose-modal.vue"]]);export{we as default};