search-batch-main.5b8e8c.js 3.1 KB

12
  1. import{_ as z,d as V,w as I,x as m,Z as O,aP as R,r as l,aD as q,o as E,c as y,l as c,m as i,ar as M,aY as $,H as K,D as _,M as x,L as H,bP as L,h as U,aZ as p,cR as W,bx as Z}from"./index.js";import{useColumns as Y}from"./columns.88d7302.js";import{c as G}from"./content.config.3f80c9db.js";import"./index.142d2268.js";const J={relative:""},Q={class:"flex justify-end mt-10px"},X=V({__name:"search-batch-main",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(C,{emit:b}){const w=C,{columns:v}=Y();v.value=v.value.slice(1);const{logout:B}=I(),d=m(!1),a=m([]),D=m(),A=O({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),o=R("");async function S(t=[]){d.value=!0;const{currentPage:e,pageSize:u}=A,{code:n,data:s,message:f}=await W({...w.payload,cxCode:t.join(","),page:e,size:u});Z({code:n,message:f,logout:B,handler:()=>{a.value=s!=null?s:[],o.value=""}}),d.value=!1}const h=" ",g=`
  2. `,T=function(t=""){if(!t)return"";let e=t;const u=e.includes(h),n=e.includes(g);return u&&(e=e.split(h).join("")),n&&(e=e.split(g).join("")),e};function k(){const t=T(o.value);if(t.length===0){p.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),o.value=t;return}const u=t.replace(/[,。;、; .]/g,",").split(",");S(u)}function N(){if(a.value.length===0)return p.error("\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const t=a.value.filter(u=>u.winv_fee==="0.00"),e=a.value.filter(u=>String(u.winv_num)==="0");if(t.length!==0)return p.error(`\u9500\u552E\u8BA2\u5355 ${t[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(e.length!==0)return p.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);b("confirm",i(a))}return(t,e)=>{const u=l("ElInput"),n=l("el-tag"),s=l("PureTable"),f=l("el-button"),P=q("loading");return E(),y("div",J,[c(u,{rows:4,modelValue:i(o),"onUpdate:modelValue":e[0]||(e[0]=r=>M(o)?o.value=r:null),style:{"margin-bottom":"10px"},placeholder:"\u8F93\u5165\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7(\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:$(k,["enter"])},null,8,["modelValue","onKeydown"]),K((E(),y("div",null,[c(s,{ref_key:"tableRef",ref:D,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:a.value,columns:i(G).columns.filter(r=>r.label!=="\u64CD\u4F5C"),"max-height":"560px",showOverflowTooltip:"","header-cell-style":{background:"#fafafa",color:"#606266"}},{platform_type:_(r=>[c(n,null,{default:_(()=>{var F;return[x(H(((F=i(L).find(({value:j})=>j===r.row.platform_type))==null?void 0:F.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[P,d.value]]),U("div",Q,[c(f,{type:"primary",onClick:N,size:"small"},{default:_(()=>[x("\u4FDD\u5B58")]),_:1})])])}}});var oe=z(X,[["__scopeId","data-v-66dea4a6"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/sheetOrderPool/components/search-batch-main.vue"]]);export{oe as default};