1 |
- import{_ as M,d as H,v as U,w as n,b8 as $,Z as G,r as p,aw as Q,o as k,G as Z,C as d,b as j,l as f,u,bn as J,H as K,c as W,M as w,L as X,bg as Y,aQ as h}from"./index.7fe3185d.js";import{g as ee}from"./index.6332d2cd.js";import{u as ae}from"./use-page-search.83587669.js";import{a as oe}from"./inv-open.560851c7.js";import{useColumns as te}from"./columns.4575c236.js";import{u as ne}from"./status.92aec598.js";import"./tootip.33ef012b.js";const le={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:oe}]};const ue={relative:""},se=H({__name:"order-dialog",emits:["reload","save-btn-click"],setup(re,{expose:E,emit:F}){const{columns:A}=te(),{logout:P}=U(),i=n(!1),m=n(!1),y=n([]),x=n(),C=n([]),S=$(""),a=G({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]});let g={};const D=n({}),b=n(""),{handleSearchClick:N,handleResetClick:z}=ae(e=>(g=e,a.currentPage=1,s(),{result:{},deleteProps:[]}),()=>{g={},s()}),V=e=>{a.currentPage=e,s()};function R(){a.currentPage=1,a.pageSize=15,z()}async function T(e,o){i.value=!0,b.value=e,S.value=o,await s()}function I(e){C.value=e}async function s(){m.value=!0;const{currentPage:e,pageSize:o}=a,{code:l,data:t,message:_}=await ee({companyNo:b.value,platform_type:S.value,inv_is:"1",cat_status:"1",inv_status:"0",...g,page:e,size:o,...D.value});Y({code:l,message:_,logout:P,handler:()=>{const{list:r,count:c}=t!=null?t:{};y.value=r!=null?r:[],a.total=c!=null?c:0}}),m.value=!1}function L(e){a.pageSize=e,a.currentPage=1,s()}function O(){const e=u(C);if(e.length===0)return h.error("\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const o=e.filter(t=>t.winv_fee==="0.00"),l=e.filter(t=>String(t.winv_num)==="0");if(o.length!==0)return h.error(`\u9500\u552E\u8BA2\u5355 ${o[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(l.length!==0)return h.error(`\u9500\u552E\u8BA2\u5355 ${l[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);F("save-btn-click",e),i.value=!1}return E({show:T}),(e,o)=>{const l=p("el-tag"),t=p("PureTable"),_=p("el-button"),r=p("el-dialog"),c=Q("loading");return k(),Z(r,{modelValue:i.value,"onUpdate:modelValue":o[0]||(o[0]=v=>i.value=v),"close-on-click-modal":!1,"close-on-press-escape":!1,center:"","append-to-body":"","destroy-on-close":"",top:"5vh",title:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355",width:"1040px"},{default:d(()=>[j("div",ue,[f(u(J),{class:"search",onResetBtnClick:R,onSearchBtnClick:u(N),"form-config":u(le)},null,8,["onSearchBtnClick","form-config"]),K((k(),W("div",null,[f(t,{ref_key:"tableRef",ref:x,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:y.value,columns:u(A),pagination:a,paginationSmall:!0,"max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:I,onCurrentChange:V,onSizeChange:L},{platform_type:d(v=>[f(l,null,{default:d(()=>{var B;return[w(X(((B=u(ne).find(({value:q})=>q===v.row.platform_type))==null?void 0:B.label)||"--"),1)]}),_:2},1024)]),_:1},8,["data","columns","pagination"])])),[[c,m.value]]),f(_,{absolute:"","bottom-0px":"",right:"20px",type:"primary",onClick:O,size:"small"},{default:d(()=>[w("\u4FDD\u5B58")]),_:1})])]),_:1},8,["modelValue"])}}});var _e=M(se,[["__scopeId","data-v-f1a07e28"],["__file","D:/work/accout-vue3-ui1/src/views/InvoiceSales/invoiceApply/components/add-edit-form/order-dialog.vue"]]);export{_e as default};
|