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