1 |
- import{Z as t,cm as y,D as x,cn as A,_ as z,d as V,m as g,n as G,S as $,w as T,p as j,r as B,o as N,c as S,b as Y,H as U,h as b,x as I,F as O,y as w,u as R,co as L}from"./index.56449854.js";import{d as H}from"./index.85e76c41.js";import{a as c,s as m,m as k,d as q,u as o}from"./calc.f00124e1.js";const Z=[{label:"\u90E8\u95E8",prop:"depart",cellRenderer({row:e}){return e.depart.split("@").join("")}},{label:"\u5F53\u65E5\u8425\u4E1A\u6536\u5165",cellRenderer({row:e}){return o(e.dayinfo.sale_total)}},{label:"\u5F53\u6708\u8425\u6536\u76EE\u6807",cellRenderer({row:e}){return o(e.total_tips)}},{label:"\u5F53\u6708\u8425\u4E1A\u6536\u5165(\u51C0)",cellRenderer({row:e}){return t(A,{width:220},{reference:()=>t("div",null,[t(y,{icon:x("information-line"),link:!0},{}),t("span",null,o(e.monthinfo.monthNetSales))]),default:()=>t("div",{class:"table-size"},[t("p",null,`\u76F4\u8425/\u81EA\u8425: ${o(e.currentMonthPure[0].zy)}`),t("p",null,`\u652F\u4ED8\u6E20\u9053: ${o(e.currentMonthPure[0].qd)}`)])})}},{label:"\u5F53\u6708\u6210\u672C",cellRenderer({row:e}){return t(A,{width:220},{reference:()=>t("div",null,[t(y,{icon:x("information-line"),link:!0},{}),t("span",null,o(Number(c(Number(c(e.zy_cost,e.qd_cost)).toFixed(2),e.post_fee)).toFixed(2)))]),default:()=>t("div",{class:"table-size"},[t("p",null,`\u76F4\u8425/\u81EA\u8425: ${o(e.zy_cost)}`),t("p",null,`\u6E20\u9053: ${o(e.qd_cost)}`),t("p",null,`\u7269\u6D41\u8D39\u7528: ${o(e.post_fee)}`)])})}},{label:"\u5F53\u6708\u6BDB\u5229",cellRenderer({row:e}){return t(A,{width:220},{reference:()=>t("div",null,[t(y,{icon:x("information-line"),link:!0},{}),t("span",null,o(Number(m(Number(c(e.zy_gross,e.qd_gross)).toFixed(2),e.post_fee)).toFixed(2)))]),default:()=>t("div",{class:"table-size"},[t("p",null,`\u76F4\u8425/\u81EA\u8425: ${o(e.zy_gross)}`),t("p",null,`\u6E20\u9053: ${o(e.qd_gross)}`)])})}}],J={title:"",superUserNoAction:!1,showTitle:!0,responseCode:0,columns:Z,noRequiredInit:!0,isRequestArray:!0,handleData(e=[]){let n=(e||[]).map(({depart:u,msale_total:a,mth_total:l,sale_total:d,th_total:p,total_tips:f,mzy_sale_total:_,mchannel_sale_total:C,channel_cost_total:F,zy_cost_total:v,mzy_cost_total:h,mchannel_cost_total:M,mpost_fee:P})=>({depart:u,total_tips:f,mzy_sale_total:_,mchannel_sale_total:C,channel_cost_total:F,zy_cost_total:v,mchannel_cost_total:M,mzy_cost_total:h,post_fee:P,dayinfo:{sale_total:d,th_total:p},monthinfo:{msale_total:a,mth_total:l}}));n=n.filter(u=>Number(u.monthinfo.msale_total)!==0||Number(u.post_fee)!==0);const E=n.reduce((u,a)=>{const{total_tips:l=0,day:d=0,month:p=0}=a;return{total_tips:c(l,u.total_tips),month:c(p,u.month),day:c(d,u.day)}},{total_tips:0,month:0,day:0});n=n.map(({depart:u})=>u).map(u=>n.find(({depart:a})=>a===u));const i={\u767E\u8FB0:"\u5BA2\u670D\u90E8@\u767E\u8FB0",\u6CD3\u6E90:"\u7F51\u7EDC\u90E8@\u6CD3\u6E90",\u666E\u6DA6:" \u9879\u76EE\u90E8@\u666E\u6DA6",\u5E73\u53F0:" \u5E73\u53F0\u90E8@\u6CF0\u6587\u521B"};n=n.map(({depart:u,total_tips:a,dayinfo:l,monthinfo:d,mchannel_sale_total:p,mzy_sale_total:f,mchannel_cost_total:_,post_fee:C,mzy_cost_total:F})=>{let v=m(d.msale_total,d.mth_total);const h=k(q(v,a),100).toFixed(2);return{total_tips:a,zy_cost:F,qd_cost:_,post_fee:C,depart:i[u],currentMonthPure:[{zy:f,qd:p}],zy_gross:Number(m(f,F)).toFixed(2),qd_gross:Number(m(p,_)).toFixed(2),dayinfo:{...l,sale_total:m(l.sale_total,l.th_total)},proportion:k(q(d.msale_total,E.month)||0,100)||0,monthinfo:{monthNetSales:v,monthProportion:h}}});let s=["\u767E\u8FB0","\u6CD3\u6E90","\u666E\u6DA6","\u6CF0\u6587\u521B"];const D=n.map(u=>u.depart);return s=s.filter(u=>D.findIndex(a=>a.indexOf(u))!==-1),s.map(u=>n.find(a=>a.depart.indexOf(u)!==-1)).filter(u=>!!u)},apis:{httpList:H}},K={"w-full":""},Q={class:"flex justify-between px-[15px] pt-[10px] mt-[10px] mb-[-10px] bg-white"},W={class:"flex"},X=V({__name:"Department",setup(e){const n=[{value:"GS2203161855277894",label:"\u5E73\u53F0\u516C\u53F8: \u4E07\u5B87"},{value:"GS2302231125079621",label:"\u4E1A\u52A1\u516C\u53F8: \u767E\u8FB0"},{value:"GS2302231323386950",label:"\u4E1A\u52A1\u516C\u53F8: \u6CD3\u6E90"},{value:"GS2302231124114965",label:"\u4E1A\u52A1\u516C\u53F8: \u666E\u6DA6"},{value:"GS2304031312553746",label:"\u4E1A\u52A1\u516C\u53F8: \u9526\u5174"},{value:"GS2401181650538135",label:"\u4E1A\u52A1\u516C\u53F8: \u77E5\u4E8B"},{value:"GS2402020907088731",label:"\u5E73\u53F0\u516C\u53F8: \u6CF0\u6587\u521B"}],E=g(null),r=g({companyNo:"",daytime:""});return G(()=>{const i=$(new Date).format("YYYY-MM-DD");r.value.daytime=i,r.value.companyNo=n[0].value}),T(()=>r.value,({daytime:i,companyNo:s})=>{!i&&!s||j(()=>E.value.getPageData({daytime:i,companyNo:s}))},{deep:!0,immediate:!0}),(i,s)=>{const D=B("ElDatePicker"),u=B("ElSelect"),a=B("PageContainer");return N(),S("div",K,[Y("div",Q,[U(" \u90E8\u95E8\u5B8C\u6210\u60C5\u51B5 "),Y("div",W,[b(D,{modelValue:r.value.daytime,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value.daytime=l),clearable:!1,class:"mr-[10px]",placeholder:"\u9009\u62E9\u65E5\u671F","value-format":"YYYY-MM-DD",format:"YYYY-MM-DD"},null,8,["modelValue"]),b(u,{modelValue:r.value.companyNo,"onUpdate:modelValue":s[1]||(s[1]=l=>r.value.companyNo=l),placeholder:"\u4E1A\u52A1\u516C\u53F8"},{default:I(()=>[(N(),S(O,null,w(n,l=>b(R(L),{key:l.value,label:l.label,value:l.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),b(a,{"get-content-ref":l=>E.value=l,contentConfig:R(J)},null,8,["get-content-ref","contentConfig"])])}}});var le=z(X,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/dashboard/newResults/Department.vue"]]);export{le as default};
|