1 |
- import{_ as Y,d as ee,w as c,Z as le,aQ as ae,W as oe,r as u,aC as te,o as n,G as m,C as o,j as a,l as p,bx as ue,c as B,F as S,D as U,M as v,H as ne,bp as se,by as pe,L as F,h as L,a$ as re}from"./index.js";import{c as ie}from"./_details.bcb4ed9e.js";import{C as M,G as O,r as de}from"./status.642bba24.js";import{a as me}from"./index.8bfbec6d.js";import{D as P}from"./date-range.835c5d8f.js";const ce={key:3},_e={flex:""},fe={"w-full":"",flex:"","justify-end":"","mt-2":""},ve=ee({__name:"choose-modal",emits:["choose"],setup(ge,{expose:j,emit:H}){const b=c(!1),T=c([]),x=c([]),i=le({total:0,size:15,page:1,background:!0}),t=c({is_comon:"0",apply_name:"",currentValue:"",checkApi:"",timer:[],openTimer:[],companyNo:""}),w=c(null),z=c("hpNo"),E=c(!1),G=ae(),{currentCompany:Q}=oe();async function k(){const{size:s,page:e}=i;E.value=!0;const{currentValue:_,timer:f,openTimer:g,...y}=t.value,{code:r,message:V,data:D}=await me({status:"4",[z.value]:_,supplierNo:Q.value.companyNo,open_start:g[0],open_end:g[1],start:f[0],end:f[1],noRela:!0,...y,page:e,size:s});G({code:r,message:V,handler:()=>{i.total=D.count,T.value=D.list}}),E.value=!1}function q(){const[s]=x.value;if(!s)return re.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");H("choose",p(s.hpNo)),b.value=!1}function I(s){if(s.length>1){const e=s.pop();w.value.clearSelection(),w.value.toggleRowSelection(e,!0),x.value=[e]}else x.value=[s[0]]}function K(){i.page=1,k()}function N(s){s&&(t.value={is_comon:"0",companyNo:"",apply_name:"",currentValue:"",checkApi:"",openTimer:[],timer:[]}),i.page=1,k()}return j({onDisplay:()=>b.value=!0}),(s,e)=>{const _=u("el-option"),f=u("el-select"),g=u("el-input"),y=u("el-form-item"),r=u("el-col"),V=u("el-button"),D=u("el-row"),W=u("el-form"),R=u("el-table-column"),A=u("el-tag"),Z=u("el-pagination"),$=u("el-dialog"),J=te("loading");return n(),m($,{"close-on-click-modal":!1,modelValue:b.value,"onUpdate:modelValue":e[13]||(e[13]=l=>b.value=l),title:"\u91C7\u8D2D\u56DE\u7968",center:"",width:"1040px",onOpen:e[14]||(e[14]=()=>k())},{default:o(()=>[a(W,{size:"small"},{default:o(()=>[a(D,{gutter:10},{default:o(()=>[a(r,{span:8},{default:o(()=>[a(y,null,{default:o(()=>[a(g,{clearable:"",modelValue:t.value.currentValue,"onUpdate:modelValue":e[1]||(e[1]=l=>t.value.currentValue=l),placeholder:"\u5173\u952E\u5B57"},{prepend:o(()=>[a(f,{modelValue:z.value,"onUpdate:modelValue":e[0]||(e[0]=l=>z.value=l),style:{width:"140px"}},{default:o(()=>[a(_,{label:"\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7\u7F16\u7801",value:"hpNo"}),a(_,{label:"\u5BF9\u8D26\u7F16\u7801",value:"payNo"})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(r,{span:8},{default:o(()=>[a(p(P),{prefix:"\u7533\u8BF7",modelValue:t.value.timer,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.timer=l)},null,8,["modelValue"])]),_:1}),a(r,{span:8},{default:o(()=>[a(p(P),{prefix:"\u5F00\u7968",modelValue:t.value.openTimer,"onUpdate:modelValue":e[3]||(e[3]=l=>t.value.openTimer=l)},null,8,["modelValue"])]),_:1}),a(r,{span:8},{default:o(()=>[a(p(ue),{modelValue:t.value.companyNo,"onUpdate:modelValue":e[4]||(e[4]=l=>t.value.companyNo=l),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),a(r,{span:6},{default:o(()=>[a(f,{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(()=>[(n(!0),B(S,null,U(p(M),l=>(n(),m(_,{key:l.value,value:l.value,label:l.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(r,{span:4},{default:o(()=>[a(y,null,{default:o(()=>[a(g,{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(r,{span:6},{default:o(()=>[a(f,{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]=()=>N(!1))},{default:o(()=>[(n(!0),B(S,null,U(p(O),l=>(n(),m(_,{label:l.label,value:l.value},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1}),a(r,{span:4},{default:o(()=>[a(y,null,{default:o(()=>[a(V,{type:"primary",onClick:e[9]||(e[9]=()=>N())},{default:o(()=>[v("\u641C\u7D22")]),_:1}),a(V,{onClick:e[10]||(e[10]=()=>N(!0))},{default:o(()=>[v("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),ne((n(),m(p(se),{border:"",ref_key:"tableRef",ref:w,data:T.value,size:"small","row-key":"id",onSelectionChange:I,"mb-2":"","max-height":"520px"},{default:o(()=>[a(R,{type:"selection",align:"center",width:"40"}),(n(!0),B(S,null,U(p(ie),(l,X)=>(n(),m(R,pe({key:X},l,{"show-overflow-tooltip":""}),{default:o(({row:h})=>[l.prop==="pay_status"?(n(),m(A,{key:0},{default:o(()=>{var d;return[v(F((d=p(de).find(C=>C.value===String(h.pay_status)))==null?void 0:d.label),1)]}),_:2},1024)):l.prop==="checkApi"?(n(),m(A,{key:1},{default:o(()=>{var d;return[v(F((d=p(M).find(C=>C.value===String(h.checkApi)))==null?void 0:d.label),1)]}),_:2},1024)):l.prop==="is_comon"?(n(),m(A,{key:2},{default:o(()=>{var d;return[v(F((d=p(O).find(C=>C.value===h.is_comon))==null?void 0:d.label),1)]}),_:2},1024)):(n(),B("span",ce,F(h[l.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[J,E.value]]),L("div",_e,[a(Z,{"current-page":i.page,"onUpdate:currentPage":e[11]||(e[11]=l=>i.page=l),"page-size":i.size,"onUpdate:pageSize":e[12]||(e[12]=l=>i.size=l),total:i.total,onCurrentChange:k,"page-sizes":[15,50,100],onSizeChange:K,layout:"sizes, prev, pager, next"},null,8,["current-page","page-size","total"]),L("div",fe,[a(V,{type:"primary",onClick:q},{default:o(()=>[v("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var De=Y(ve,[["__scopeId","data-v-6b70c452"],["__file","C:/Users/63107/Desktop/projects/settle-vue3/src/views/supply/ticketReturnRelive/components/choose-modal.vue"]]);export{De as default};
|