search-batch-main.447a41.js 3.0 KB

12
  1. import{_ as P,d as V,w as I,x as m,Z as R,aP as q,r,aD as M,o as E,c as y,l,m as c,ar as $,aY as K,H as O,D as v,M as x,L as H,bP as L,h as U,aZ as i,cR as W,bx as Z}from"./index.js";import{useColumns as Y}from"./columns.17ba95.js";const G={relative:""},J={class:"flex justify-end mt-10px"},Q=V({__name:"search-batch-main",props:{payload:{type:Object,required:!0}},emits:["reload","confirm"],setup(b,{emit:C}){const w=b,{columns:p}=Y();p.value=p.value.slice(1);const{logout:B}=I(),d=m(!1),a=m([]),D=m(),A=R({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]}),n=q("");async function S(t=[]){d.value=!0;const{currentPage:e,pageSize:u}=A,{code:o,data:s,message:_}=await W({...w.payload,cxCode:t.join(","),is_comon:"0",inv_is:"1",cat_status:"2",inv_status:"0",status:"3",page:e,size:u});Z({code:o,message:_,logout:B,handler:()=>{a.value=s!=null?s:[],n.value=""}}),d.value=!1}const h=" ",g=`
  2. `,k=function(t=""){if(!t)return"";let e=t;const u=e.includes(h),o=e.includes(g);return u&&(e=e.split(h).join("")),o&&(e=e.split(g).join("")),e};function N(){const t=k(n.value);if(t.length===0){i.warning("\u4E0D\u80FD\u89E3\u6790\u7A7A\u6587\u672C"),n.value=t;return}const u=t.replace(/[,。;、; .]/g,",").split(",");S(u)}function T(){if(a.value.length===0)return i.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 i.error(`\u9500\u552E\u8BA2\u5355 ${t[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`);C("confirm",c(a))}return(t,e)=>{const u=r("ElInput"),o=r("el-tag"),s=r("PureTable"),_=r("el-button"),j=M("loading");return E(),y("div",G,[l(u,{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\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(N,["enter"])},null,8,["modelValue","onKeydown"]),O((E(),y("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(f=>[l(o,null,{default:v(()=>{var F;return[x(H(((F=c(L).find(({value:z})=>z===f.row.platform_type))==null?void 0:F.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns"])])),[[j,d.value]]),U("div",J,[l(_,{type:"primary",onClick:T,size:"small"},{default:v(()=>[x("\u4FDD\u5B58")]),_:1})])])}}});var te=P(Q,[["__scopeId","data-v-f9546a88"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/invoiceApply/components/add-edit-form/search-batch-main.vue"]]);export{te as default};