search-batch.5a6083.js 2.9 KB

12
  1. import{_ as j,d as q,w as I,x as m,Z as K,aG as P,r,aD as R,o as y,c as E,l,m as c,ar as $,aZ as M,H as O,D as v,M as x,L as H,bM as L,h as U,a_ as i,cK as W,bx as Z}from"./index.js";import{useColumns as G}from"./columns.d95d09.js";const J={relative:""},Q={class:"flex justify-end mt-10px"},X=q({__name:"search-batch",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(b,{emit:w}){const C=b,{columns:p}=G();p.value=p.value.slice(1);const{logout:D}=I(),d=m(!1),a=m([]),B=m(),A=K({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),n=P("");async function S(u=[]){d.value=!0;const{currentPage:e,pageSize:t}=A,{code:o,data:s,message:_}=await W({...C.payload,sequenceNo:u.join(","),inv_is:"1",cat_status:"2",inv_status:"0",page:e,size:t});Z({code:o,message:_,logout:D,handler:()=>{a.value=s!=null?s:[],n.value=""}}),d.value=!1}const h=" ",g=`
  2. `,N=function(u=""){if(!u)return"";let e=u;const t=e.includes(h),o=e.includes(g);return t&&(e=e.split(h).join("")),o&&(e=e.split(g).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`);w("confirm",c(a))}return(u,e)=>{const t=r("ElInput"),o=r("el-tag"),s=r("PureTable"),_=r("el-button"),z=R("loading");return y(),E("div",J,[l(t,{rows:4,modelValue:c(n),"onUpdate:modelValue":e[0]||(e[0]=f=>$(n)?n.value=f: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:M(k,["enter"])},null,8,["modelValue","onKeydown"]),O((y(),E("div",null,[l(s,{ref_key:"tableRef",ref:B,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(f=>[l(o,null,{default:v(()=>{var F;return[x(H(((F=c(L).find(({value:V})=>V===f.row.platform_type))==null?void 0:F.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[z,d.value]]),U("div",Q,[l(_,{type:"primary",onClick:T,size:"small"},{default:v(()=>[x("\u4FDD\u5B58")]),_:1})])])}}});var ue=j(X,[["__scopeId","data-v-52db8c24"],["__file","C:/Users/63107/Desktop/mine/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form-wanyu/search-batch.vue"]]);export{ue as default};