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