1 |
- import{_ as X,d as $,w as d,Z as ee,aO as le,W as ae,r as n,aC as oe,o as r,G as c,C as o,l as a,u as i,cu as te,c as z,F as R,D as T,M as y,H as ne,bo as ue,bw as se,L as E,b as O,aY as pe}from"./index.88f7d256.js";import{c as re}from"./_details.7c6ddbaa.js";import{B as L,q as ie}from"./status.2df4810d.js";import{a as de}from"./index.3ab8ac20.js";import{D as M}from"./date-range.b361462b.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),N=d([]),h=d([]),s=ee({total:0,size:15,page:1,background:!0}),t=d({apply_name:"",currentValue:"",companyNo:"",checkApi:"",timer:[],openTimer:[],pay_type:"2"}),D=d(null),F=d("hpNo"),w=d(!1),q=le(),{currentCompany:I}=ae();async function b(){const{size:u,page:e}=s;w.value=!0;const{currentValue:p,timer:m,openTimer:_,...k}=t.value,{code:f,message:v,data:C}=await de({status:"4",is_comon:"0",[F.value]:p,open_start:_[0],open_end:_[1],start:m[0],end:m[1],noRela:!0,...k,supplierNo:I.value.companyNo,noRela:!0,page:e,size:u});q({code:f,message:v,handler:()=>{s.total=C.count,N.value=C.list}}),w.value=!1}function j(){const[u]=h.value;if(!u)return pe.warning("\u8BF7\u9009\u62E9\u4E00\u4E2A\u5BF9\u8D26\u5355");H("choose",i(u.hpNo)),V.value=!1}function G(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,b()}function S(u){u&&(t.value={apply_name:"",pay_type:"2",currentValue:"",companyNo:"",checkApi:"",openTimer:[],timer:[]}),s.page=1,b()}return P({onDisplay:()=>V.value=!0}),(u,e)=>{const p=n("el-col"),m=n("el-option"),_=n("el-select"),k=n("el-input"),f=n("el-form-item"),v=n("el-button"),C=n("el-row"),Q=n("el-form"),A=n("el-table-column"),U=n("el-tag"),W=n("el-pagination"),Y=n("el-dialog"),Z=oe("loading");return r(),c(Y,{"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]=()=>b())},{default:o(()=>[a(Q,{size:"small"},{default:o(()=>[a(C,{gutter:10},{default:o(()=>[a(p,{span:8},{default:o(()=>[a(i(M),{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(M),{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(te),{modelValue:t.value.companyNo,"onUpdate:modelValue":e[2]||(e[2]=l=>t.value.companyNo=l),placeholder:"\u4E1A\u52A1\u516C\u53F8"},null,8,["modelValue"])]),_:1}),a(p,{span:8},{default:o(()=>[a(f,null,{default:o(()=>[a(k,{clearable:"",modelValue:t.value.currentValue,"onUpdate:modelValue":e[4]||(e[4]=l=>t.value.currentValue=l),placeholder:"\u5173\u952E\u5B57"},{prepend:o(()=>[a(_,{modelValue:F.value,"onUpdate:modelValue":e[3]||(e[3]=l=>F.value=l),style:{width:"140px"}},{default:o(()=>[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:o(()=>[a(_,{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(()=>[(r(!0),z(R,null,T(i(L),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:o(()=>[a(f,null,{default:o(()=>[a(k,{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:4},{default:o(()=>[a(f,null,{default:o(()=>[a(v,{type:"primary",onClick:e[7]||(e[7]=()=>S())},{default:o(()=>[y("\u641C\u7D22")]),_:1}),a(v,{onClick:e[8]||(e[8]=()=>S(!0))},{default:o(()=>[y("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),ne((r(),c(i(ue),{border:"",ref_key:"tableRef",ref:D,data:N.value,size:"small","row-key":"id",onSelectionChange:G,"mb-2":"","max-height":"520px"},{default:o(()=>[a(A,{type:"selection",width:"40",align:"center"}),(r(!0),z(R,null,T(i(re),(l,J)=>(r(),c(A,se({key:J},l,{"show-overflow-tooltip":""}),{default:o(({row:B})=>[l.prop==="pay_status"?(r(),c(U,{key:0,size:"small"},{default:o(()=>{var g;return[y(E((g=i(ie).find(x=>x.value===String(B.pay_status)))==null?void 0:g.label),1)]}),_:2},1024)):l.prop==="checkApi"?(r(),c(U,{key:1,size:"small"},{default:o(()=>{var g;return[y(E((g=i(L).find(x=>x.value===String(B.checkApi)))==null?void 0:g.label),1)]}),_:2},1024)):(r(),z("span",me,E(B[l.prop]),1))]),_:2},1040))),128))]),_:1},8,["data"])),[[Z,w.value]]),O("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:b,"page-sizes":[15,50,100],onSizeChange:K,layout:"sizes, prev, pager, next"},null,8,["current-page","page-size","total"]),O("div",_e,[a(v,{type:"primary",onClick:j},{default:o(()=>[y("\u4FDD\u5B58")]),_:1})])])]),_:1},8,["modelValue"])}}});var Ce=X(fe,[["__scopeId","data-v-7abb52ce"],["__file","D:/work/accout-vue3-ui2/settle-vue3/src/views/supplierOrder/sendOrderInvoiceRelive/components/choose-modal.vue"]]);export{Ce as default};
|