order-dialog.3aa43f14.js 3.3 KB

1
  1. import{_ as R,d as T,D as L,E as n,a7 as O,x as m,aA as q,o as S,N as M,K as y,b as U,y as g,u as c,bp as $,O as H,c as K,W,bi as j,aS as _}from"./index.743f0c80.js";import{g as G}from"./index.8212cab4.js";import{u as J}from"./use-page-search.a895acdb.js";import{I as Q}from"./inv-open.a0819b58.js";import{useColumns as X}from"./columns.e5addeb3.js";import"./tootip.48acd346.js";import"./status.868e86c0.js";const Y={colLayout:{span:8},formItems:[{field:"customer",type:"input",placeholder:"\u5BA2\u6237\u540D\u79F0"},{field:"sequenceNo",type:"input",placeholder:"\u9500\u552E\u5355\u7F16\u53F7"},{field:"cxCode",type:"input",placeholder:"\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7"},{field:"status",type:"select",placeholder:"\u72B6\u6001",span:4,options:Q}]};const Z={relative:""},ee=W("\u4FDD\u5B58"),ae=T({__name:"order-dialog",emits:["reload","save-btn-click"],setup(oe,{expose:b,emit:F}){const{columns:k}=X(),{logout:E}=L(),i=n(!1),d=n(!1),h=n([]),B=n(),v=n([]),a=O({total:0,pageSize:15,currentPage:1,background:!0,pageSizes:[15,50,100]});let p={};const x=n({}),C=n(""),{handleSearchClick:N,handleResetClick:P}=J(e=>(p=e,a.currentPage=1,l(),{result:{},deleteProps:[]}),()=>{p={},l()}),w=e=>{a.currentPage=e,l()};function D(){a.currentPage=1,a.pageSize=15,P()}async function A(e){i.value=!0,C.value=e,await l()}function z(e){v.value=e}async function l(){d.value=!0;const{currentPage:e,pageSize:t}=a,{code:u,data:o,message:f}=await G({companyNo:C.value,inv_is:"1",cat_status:"1",inv_status:"0",...p,page:e,size:t,...x.value});j({code:u,message:f,logout:E,handler:()=>{const{list:r,count:s}=o!=null?o:{};h.value=r!=null?r:[],a.total=s!=null?s:0}}),d.value=!1}function V(e){a.pageSize=e,a.currentPage=1,l()}function I(){const e=c(v);if(e.length===0)return _.error("\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u9500\u552E\u8BA2\u5355\uFF01");const t=e.filter(o=>o.winv_fee==="0.00"),u=e.filter(o=>String(o.winv_num)==="0");if(t.length!==0)return _.error(`\u9500\u552E\u5355 ${t[0].sequenceNo} \u5F00\u7968\u91D1\u989D\u4E3A\u96F6`);if(u.length!==0)return _.error(`\u9500\u552E\u5355 ${u[0].sequenceNo} \u5F00\u7968\u6570\u91CF\u4E3A\u96F6`);F("save-btn-click",e),i.value=!1}return b({show:A}),(e,t)=>{const u=m("PureTable"),o=m("el-button"),f=m("el-dialog"),r=q("loading");return S(),M(f,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=s=>i.value=s),"close-on-press-escape":!1,center:"","append-to-body":"","destroy-on-close":"",top:"5vh",title:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355",width:"1040px"},{default:y(()=>[U("div",Z,[g(c($),{class:"search",onResetBtnClick:D,onSearchBtnClick:c(N),"form-config":c(Y)},null,8,["onSearchBtnClick","form-config"]),H((S(),K("div",null,[g(u,{ref_key:"tableRef",ref:B,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:h.value,columns:c(k),pagination:a,paginationSmall:!0,"max-height":"560px","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:z,onCurrentChange:w,onSizeChange:V},null,8,["data","columns","pagination"])])),[[r,d.value]]),g(o,{absolute:"","bottom-0px":"",right:"20px",type:"primary",onClick:I,size:"small"},{default:y(()=>[ee]),_:1})])]),_:1},8,["modelValue"])}}});var ie=R(ae,[["__scopeId","data-v-f1a07e28"],["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/components/add-edit-form/order-dialog.vue"]]);export{ie as default};