1 |
- import{_ as R,d as T,D as L,E as n,a7 as O,x as m,aA as q,o as y,N as U,K as S,b as M,y as g,u as c,a_ as $,O as j,c as H,W as K,ba as W,aS as _}from"./index.1417328f.js";import{g as G}from"./index.cc00443d.js";import{u as J}from"./use-page-search.7e7b4728.js";import{a as Q}from"./inv-open.516190c3.js";import{useColumns as X}from"./columns.db7de4f0.js";import"./tootip.8c37fa8a.js";import"./status.727086c1.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=K("\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 P=n({}),C=n(""),{handleSearchClick:x,handleResetClick:N}=J(e=>(p=e,a.currentPage=1,s(),{result:{},deleteProps:[]}),()=>{p={},s()}),D=e=>{a.currentPage=e,s()};function w(){a.currentPage=1,a.pageSize=15,N()}async function A(e){i.value=!0,C.value=e,await s()}function z(e){v.value=e}async function s(){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,...P.value});W({code:u,message:f,logout:E,handler:()=>{const{list:l,count:r}=o!=null?o:{};h.value=l!=null?l:[],a.total=r!=null?r:0}}),d.value=!1}function V(e){a.pageSize=e,a.currentPage=1,s()}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"),l=q("loading");return y(),U(f,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=r=>i.value=r),"close-on-press-escape":!1,center:"","append-to-body":"","destroy-on-close":"",top:"5vh",title:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355",width:"1040px"},{default:S(()=>[M("div",Z,[g(c($),{class:"search",onResetBtnClick:w,onSearchBtnClick:c(x),"form-config":c(Y)},null,8,["onSearchBtnClick","form-config"]),j((y(),H("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:D,onSizeChange:V},null,8,["data","columns","pagination"])])),[[l,d.value]]),g(o,{absolute:"","bottom-0px":"",right:"20px",type:"primary",onClick:I,size:"small"},{default:S(()=>[ee]),_:1})])]),_:1},8,["modelValue"])}}});var ie=R(ae,[["__scopeId","data-v-f1a07e28"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/components/add-edit-form/order-dialog.vue"]]);export{ie as default};
|