1 |
- import{_ as L,d as O,w as V,x as i,Z as j,bd as H,r as h,aD as M,o as y,c as b,l as p,m as n,bE as U,H as Z,D as g,M as S,L as $,bP as Q,cQ as G,bx as J,aZ as m}from"./index.js";import{a as K}from"./inv-open.a495ad22.js";import{useColumns as W}from"./columns.d95d09.js";const X={colLayout:{span:8},formItems:[{field:"customer",type:"input",placeholder:"\u5BA2\u6237\u540D\u79F0"},{field:"sequenceNo",type:"input",placeholder:"\u9500\u552E\u8BA2\u5355\u7F16\u7801"},{field:"cxCode",type:"input",placeholder:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u7801"},{field:"status",type:"select",placeholder:"\u72B6\u6001",span:4,options:K}]};const Y={relative:""},ee=O({__name:"search-check",props:{payload:{type:Object,required:!0}},emits:["confirm"],setup(k,{emit:B}){const F=k,{columns:E}=W(),{logout:P}=V(),d=i(!1),v=i([]),o=i([]),x=i(),t=j({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]});let f={};const A=i({}),{handleSearchClick:D,handleResetClick:w}=H(e=>(f=e,t.currentPage=1,u(),{result:{},deleteProps:[]}),()=>{f={},u()}),z=e=>{t.currentPage=e,u()};function N(){t.currentPage=1,t.pageSize=15,w()}function T(e){o.value=e}async function u(){d.value=!0;const{currentPage:e,pageSize:r}=t,{code:a,data:s,message:_}=await G({...F.payload,inv_is:"1",cat_status:"2",inv_status:"0",...f,page:e,size:r,...A.value});J({code:a,message:_,logout:P,handler:()=>{const{list:c,count:l}=s!=null?s:{};v.value=c!=null?c:[],t.total=l!=null?l:0}}),d.value=!1}function I(e){t.pageSize=e,t.currentPage=1,u()}function R(){if(o.value.length===0)return m.error("\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const e=o.value.filter(a=>a.winv_fee==="0.00"),r=o.value.filter(a=>String(a.winv_num)==="0");if(e.length!==0)return m.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(r.length!==0)return m.error(`\u9500\u552E\u8BA2\u5355 ${r[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);B("confirm",n(o))}return u(),(e,r)=>{const a=h("el-tag"),s=h("PureTable"),_=h("el-button"),c=M("loading");return y(),b("div",Y,[p(n(U),{class:"search",onResetBtnClick:N,onSearchBtnClick:n(D),"form-config":n(X)},null,8,["onSearchBtnClick","form-config"]),Z((y(),b("div",null,[p(s,{ref_key:"tableRef",ref:x,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:v.value,columns:n(E),pagination:t,paginationSmall:!0,"max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:T,onCurrentChange:z,onSizeChange:I},{platform_type:g(l=>[p(a,null,{default:g(()=>{var C;return[S($(((C=n(Q).find(({value:q})=>q===l.row.platform_type))==null?void 0:C.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns","pagination"])])),[[c,d.value]]),p(_,{absolute:"","bottom-0px":"",right:"20px",type:"primary",onClick:R,size:"small"},{default:g(()=>[S("\u4FDD\u5B58")]),_:1})])}}});var oe=L(ee,[["__scopeId","data-v-28abb0bc"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form-wanyu/search-check.vue"]]);export{oe as default};
|