12 |
- import{_ as q,d as z,v as I,w as m,Z as P,b1 as R,r,aC as $,o as y,c as E,l,u as c,aq as K,aV as O,H as W,C as v,M as b,L as H,b as L,aW as i,bm as M}from"./index.3f1ca816.js";import{i as U}from"./index.db675051.js";import{useColumns as Z}from"./columns.81e9b6b8.js";import{u as G}from"./status.d6b2a53d.js";const J={relative:""},Q={class:"flex justify-end mt-10px"},X=z({__name:"search-batch",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(C,{emit:x}){const w=C,{columns:p}=Z();p.value=p.value.slice(1);const{logout:B}=I(),d=m(!1),a=m([]),D=m(),A=P({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),n=R("");async function S(u=[]){d.value=!0;const{currentPage:e,pageSize:t}=A,{code:o,data:s,message:f}=await U({...w.payload,sequenceNo:u.join(","),inv_is:"1",cat_status:"1",inv_status:"0",page:e,size:t});M({code:o,message:f,logout:B,handler:()=>{a.value=s!=null?s:[],n.value=""}}),d.value=!1}const g=" ",h=`
- `,N=function(u=""){if(!u)return"";let e=u;const t=e.includes(g),o=e.includes(h);return t&&(e=e.split(g).join("")),o&&(e=e.split(h).join("")),e};function k(){const u=N(n.value);if(u.length===0){i.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),n.value=u;return}const t=u.replace(/[,。;、; .]/g,",").split(",");S(t)}function T(){if(a.value.length===0)return i.error("\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const u=a.value.filter(t=>t.winv_fee==="0.00"),e=a.value.filter(t=>String(t.winv_num)==="0");if(u.length!==0)return i.error(`\u9500\u552E\u8BA2\u5355 ${u[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(e.length!==0)return i.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);x("confirm",c(a))}return(u,e)=>{const t=r("ElInput"),o=r("el-tag"),s=r("PureTable"),f=r("el-button"),V=$("loading");return y(),E("div",J,[l(t,{rows:4,modelValue:c(n),"onUpdate:modelValue":e[0]||(e[0]=_=>K(n)?n.value=_:null),style:{"margin-bottom":"10px"},placeholder:"\u8F93\u5165\u9500\u552E\u5355\u7F16\u7801(\u5C0F\u4E8E100\u6761)\uFF0C\u7CFB\u7EDF\u652F\u6301\u7684\u5206\u5272\u7B26\u4E3A\u9017\u53F7(,)\u3001\u53E5\u53F7(.)\u3001\u5206\u53F7(;)\u3001\u987F\u53F7(\u3001)\uFF0C\u56DE\u8F66\u540E\u5F00\u59CB\u89E3\u6790\u3002",type:"textarea",onKeydown:O(k,["enter"])},null,8,["modelValue","onKeydown"]),W((y(),E("div",null,[l(s,{ref_key:"tableRef",ref:D,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:a.value,columns:c(p),"max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"}},{platform_type:v(_=>[l(o,null,{default:v(()=>{var F;return[b(H(((F=c(G).find(({value:j})=>j===_.row.platform_type))==null?void 0:F.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[V,d.value]]),L("div",Q,[l(f,{type:"primary",onClick:T,size:"small"},{default:v(()=>[b("\u4FDD\u5B58")]),_:1})])])}}});var ae=q(X,[["__scopeId","data-v-4a667fcc"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/components/add-edit-form/search-batch.vue"]]);export{ae as default};
|