import{Z as m,bh as n,au as s}from"./index.1d5f2f42.js";import{c as r}from"./createRequset.f858bea3.js";import{i as F}from"./isBeyondTime.8b05db81.js";import{a as o}from"./calc.3602fe08.js";const h=new Date,i=m(h).format("YYYY-MM-DD"),y={formItems:[{field:"date",type:"date_picker",defaultValue:[i,i],trigger:"change",otherOptions:{type:"daterange",startPlaceholder:"\u4E0B\u5355\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u4E0B\u5355\u7ED3\u675F\u65F6\u95F4",valueFormat:"YYYY-MM-DD",startProp:"start",endProp:"end"}},{field:"depart_id",type:"depart-query",trigger:"change"}]},f="purchease/sale/";var b={list:r(`${f}orderInfoBySaler`),businessList:r("")};const D=[{prop:"sale_name",label:"\u9500\u552E\u5458",minWidth:"155px"},{prop:"depart_name",label:"\u6240\u5728\u90E8\u95E8",minWidth:"155px"},{prop:"consult_num",label:"\u7ADE\u4EF7\u5355\u6570\u91CF",minWidth:"155px"},{prop:"consult_total",label:"\u7ADE\u4EF7\u5355\u603B\u91D1\u989D",minWidth:"155px"},{prop:"sale_num",label:"\u8BA2\u5355\u6570\u91CF",minWidth:"155px"},{prop:"sale_total",label:"\u9500\u552E\u91D1\u989D",minWidth:"155px"},{prop:"th_total",label:"\u9000\u8D27\u91D1\u989D",minWidth:"155px"},{prop:"sale_real_total",label:"\u5B9E\u9645\u91D1\u989D",minWidth:"155px"}],A={columns:D,showTitle:!1,notPagination:!0,superUserNoAction:!1,beforeRequestList(e){const{start:t,end:u}=e;return F({name:"\u4E0B\u5355\u65F6\u95F4",len:30,start:t,end:u})?n.EMPTY:n.NEXT},tableRowClassName({rowIndex:e}){if(e===0)return"warning-row"},handleData(e){const t={sale_name:"\u5408\u8BA1",depart_name:"--",consult_num:0,consult_total:0,sale_total:0,th_total:0,sale_real_total:0,sale_num:0};return e.forEach(u=>{const{consult_num:l,consult_total:a,sale_total:p,th_total:d,sale_real_total:_,sale_num:c}=u;t.consult_num=Number(o(t.consult_num,l)).toFixed(0),t.consult_total=Number(o(t.consult_total,a)).toFixed(2),t.sale_total=Number(o(t.sale_total,p)).toFixed(2),t.th_total=Number(o(t.th_total,d)).toFixed(2),t.sale_real_total=Number(o(t.sale_real_total,_)).toFixed(2),t.sale_num=Number(o(t.sale_num,c)).toFixed(0)}),[t,...e]},apis:{httpList:b.list}};function T({len:e,start:t,end:u,message:l}){let a=!0;return!t||!u?(s.warning("\u8BF7\u9009\u62E9\u5BFC\u51FA\u62A5\u8868\u7684\u65F6\u95F4\u533A\u95F4!"),a):(a=m(u).diff(t,"days")>e,a&&s.warning(l||"\u5BFC\u51FA\u62A5\u8868\u7684\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC7 "+e+" \u5929"),a)}export{b as a,A as c,T as i,y as s};
