choose-modal.c62a8f90.js 5.2 KB

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