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