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