1 |
- import{_ as L,d as O,v as V,w as i,Z as H,r as _,aC as M,o as y,c as S,l as p,u as n,bt as $,H as j,C as h,M as k,L as U,bn as Y,aY as g}from"./index.88f7d256.js";import{i as Z}from"./index.3cc65789.js";import{u as G}from"./use-page-search.63ad89ed.js";import{a as J}from"./inv-open.1238e839.js";import{useColumns as K}from"./columns.46bdf7aa.js";import{u as Q}from"./status.2df4810d.js";import"./tootip.514b092e.js";const W={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:J}]};const X={relative:""},ee=O({__name:"search-check",props:{payload:{type:Object,required:!0}},emits:["confirm"],setup(b,{emit:B}){const F=b,{columns:E}=K(),{logout:P}=V(),f=i(!1),v=i([]),o=i([]),A=i(),t=H({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]});let d={};const x=i({}),{handleSearchClick:w,handleResetClick:z}=G(e=>(d=e,t.currentPage=1,u(),{result:{},deleteProps:[]}),()=>{d={},u()}),D=e=>{t.currentPage=e,u()};function N(){t.currentPage=1,t.pageSize=15,z()}function T(e){o.value=e}async function u(){f.value=!0;const{currentPage:e,pageSize:r}=t,{code:a,data:s,message:m}=await Z({...F.payload,inv_is:"1",cat_status:"2",inv_status:"0",...d,page:e,size:r,...x.value});Y({code:a,message:m,logout:P,handler:()=>{const{list:c,count:l}=s!=null?s:{};v.value=c!=null?c:[],t.total=l!=null?l:0}}),f.value=!1}function I(e){t.pageSize=e,t.currentPage=1,u()}function R(){if(o.value.length===0)return g.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 g.error(`\u9500\u552E\u8BA2\u5355 ${e[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(r.length!==0)return g.error(`\u9500\u552E\u8BA2\u5355 ${r[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);B("confirm",n(o))}return u(),(e,r)=>{const a=_("el-tag"),s=_("PureTable"),m=_("el-button"),c=M("loading");return y(),S("div",X,[p(n($),{class:"search",onResetBtnClick:N,onSearchBtnClick:n(w),"form-config":n(W)},null,8,["onSearchBtnClick","form-config"]),j((y(),S("div",null,[p(s,{ref_key:"tableRef",ref:A,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:D,onSizeChange:I},{platform_type:h(l=>[p(a,null,{default:h(()=>{var C;return[k(U(((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,f.value]]),p(m,{absolute:"","bottom-0px":"",right:"20px",type:"primary",onClick:R,size:"small"},{default:h(()=>[k("\u4FDD\u5B58")]),_:1})])}}});var ce=L(ee,[["__scopeId","data-v-0558fde2"],["__file","D:/work/accout-vue3-ui2/settle-vue3/src/views/InvoiceSales/invoiceApply/components/currentcy-form/search-check.vue"]]);export{ce as default};
|