choose-modal.d1fd62.js 5.3 KB

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