import{h as A}from"./index.5399d1bf.js";import{r as E}from"./responseHandle.6edfaed2.js";import{q as M,B as r,A as T,a4 as q,r as i,as as L,o as _,n as P,L as R,K as O,H as u,t as l,v as f,S as H}from"./index.7a111e62.js";import{useColumns as I}from"./columns.4798c3c7.js";import{h as K}from"./index.23c2a1ed.js";import{R as $}from"./remote-select.58cc39a6.js";import"./status.8b8d6c88.js";import"./use-response-handle.f995d678.js";const j=H(" 111 "),ne=M({__name:"order-dialog",emits:["reload"],setup(G,{expose:h,emit:J}){r();const{columns:F}=I(),{logout:y}=T(),m=r(!1),c=r(!1),g=r([]),V=r(),C=r([]),p=q({total:0,pageSize:15,currentPage:1,background:!0}),a=r({...{page:1,size:10,start:"",end:"",total_min:"",total_max:"",inv_status:"3",pay_status:"",sequenceNo:"",customerNo:"",customer:"",platName:"",status:"0"}});async function b(){m.value=!0,await v()}const w=t=>{const{end:e}=a;if(e!=null&&e)return t.getTime()>Date.now(e).valueOf()},D=t=>{const{start:e}=a;if(e!=null&&e)return t.getTime()<Date.now(e).valueOf()};async function N(t){a.value.page=t,await v()}async function B(t){a.value.size=t,a.value.page=1,await v()}function S(t){C.value=t}async function v(){c.value=!0;const{code:t,data:e,message:n}=await A(a);E({code:t,message:n,logout:y,handler:()=>{const{list:s,count:d}=e!=null?e:{};g.value=s!=null?s:[],p.total=d!=null?d:0,p.pageSize=a.value.size,p.currentPage=a.value.page}}),c.value=!1}async function k(t){a.value}return h({show:b}),(t,e)=>{const n=i("el-col"),s=i("el-date-picker"),d=i("el-input"),z=i("el-row"),Y=i("PureTable"),U=i("el-dialog"),x=L("loading");return _(),P("div",null,[R((_(),O(U,{modelValue:m.value,"onUpdate:modelValue":e[7]||(e[7]=o=>m.value=o),"close-on-press-escape":!1,center:"","append-to-body":"","destroy-on-close":"",top:"5vh",title:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355",width:"1040px"},{default:u(()=>[l(z,{gutter:10},{default:u(()=>[l(n,{span:12},{default:u(()=>[l(f($),{value:a.value.customerNo,"onUpdate:value":e[0]||(e[0]=o=>a.value.customerNo=o),api:f(K),style:{width:"100%"},placeholder:"\u5BA2\u6237\u516C\u53F8","response-label-prop":"invoice_title","response-val-prop":"checkNo",onItemChange:e[1]||(e[1]=o=>k())},null,8,["value","api"])]),_:1}),l(n,{span:10},{default:u(()=>[l(s,{modelValue:a.value.start,"onUpdate:modelValue":e[2]||(e[2]=o=>a.value.start=o),type:"daterange","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD",onChange:t.asd,"value-forma":"YYYY-MM-DD"},null,8,["modelValue","onChange"])]),_:1}),l(n,{span:5},{default:u(()=>[l(s,{modelValue:a.value.start,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.start=o),"disabled-date":w,type:"date",style:{width:"100%"},placeholder:"\u7533\u8BF7\u5F00\u59CB\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),l(n,{span:5},{default:u(()=>[l(s,{modelValue:a.value.end,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.end=o),"disabled-date":D,type:"date",style:{width:"100%"},placeholder:"\u7533\u8BF7\u7ED3\u675F\u65F6\u95F4"},null,8,["modelValue"])]),_:1}),l(n,{span:6},{default:u(()=>[l(d,{modelValue:a.value.platName,"onUpdate:modelValue":e[5]||(e[5]=o=>a.value.platName=o),placeholder:"\u5E73\u53F0\u540D\u79F0",clearable:""},null,8,["modelValue"])]),_:1}),l(n,{span:6},{default:u(()=>[l(d,{modelValue:a.value.sequenceNo,"onUpdate:modelValue":e[6]||(e[6]=o=>a.value.sequenceNo=o),placeholder:"\u8BA2\u5355\u7F16\u53F7",clearable:""},null,8,["modelValue"])]),_:1}),l(n,{span:6},{default:u(()=>[j]),_:1})]),_:1}),l(Y,{ref_key:"tableRef",ref:V,border:"",align:"left","row-key":"id","table-layout":"auto",size:"small",data:g.value,columns:f(F),pagination:p,paginationSmall:!0,"header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:S,onSizeChange:B,onCurrentChange:N},null,8,["data","columns","pagination"])]),_:1},8,["modelValue"])),[[x,c.value]])])}}});export{ne as default};
