Year.538224de.js 3.9 KB

1
  1. import{_ as v,d as B,m as h,n as N,S as D,w as y,p as w,r as f,o as x,c as b,b as F,H as A,h as c,x as Y,F as g,y as R,u as C,co as S}from"./index.56449854.js";import{a as V}from"./index.85e76c41.js";import{s as E,m as p,d as i,a as l,u as m}from"./calc.f00124e1.js";const k=[{label:"\u6708\u5EA6",prop:"month"},{label:"\u8425\u6536\u76EE\u6807",prop:"month",cellRenderer(o){return m(o.row.total_tips)}},{label:"\u8425\u4E1A\u6536\u5165(\u51C0)",prop:"month",cellRenderer(o){return m(o.row.pure_sale)}},{label:"\u8425\u6536\u5B8C\u6210(%)",prop:"month",cellRenderer(o){return Number(o.row.completion_rate).toFixed(2)+"%"}},{label:"\u6BDB\u5229\u76EE\u6807",cellRenderer(o){return m(o.row.cost_tips)}},{label:"\u6BDB\u5229\u5B8C\u6210",cellRenderer(o){return m(o.row.pure_profit)}},{label:"\u6BDB\u5229\u5B8C\u6210%",cellRenderer(o){return Number(o.row.cost_rate).toFixed(2)+"%"}}],M={title:"",superUserNoAction:!1,showTitle:!0,responseCode:0,columns:k,noRequiredInit:!0,isRequestArray:!0,handleData(o=[]){let s=(o||[]).map(e=>{const t=E(e.sale_total,e.th_total),r=p(i(t,e.total_tips),100),_=E(e.cgd_total,e.cgd_th_total),n=E(t,_),d=p(i(n,t)||0,100);return{pure_sale:t,pure_purch:_,pure_profit:n,completion_rate:r,pure_interest_rate:d,month:e.month,cost_tips:e.cost_tips,total_tips:e.total_tips,cost_rate:Number(e.cost_tips)===0?0:p(i(n,e.cost_tips)||0,100).toFixed(2)}});const u=s.reduce((e,t)=>({pure_sale:Number(l(e.pure_sale,t.pure_sale)).toFixed(2),pure_purch:Number(l(e.pure_purch,t.pure_purch)).toFixed(2),pure_profit:Number(l(e.pure_profit,t.pure_profit)).toFixed(2),completion_rate:Number(l(e.completion_rate,t.completion_rate)).toFixed(2),pure_interest_rate:Number(l(e.pure_interest_rate,t.pure_interest_rate)).toFixed(2),total_tips:Number(l(e.total_tips,t.total_tips)).toFixed(2),cost_tips:Number(l(e.cost_tips,t.cost_tips)).toFixed(2),cost_rate:Number(l(e.cost_rate,t.cost_rate)).toFixed(2),month:"\u5408\u8BA1"}),{pure_sale:0,pure_purch:0,pure_profit:0,completion_rate:0,pure_interest_rate:0,month:"\u5408\u8BA1",cost_tips:0,total_tips:0,cost_rate:0});return u.completion_rate=p(i(u.pure_sale,u.total_tips)||0,100),u.cost_rate=Number(u.cost_tips)===0?0:p(i(u.pure_profit,u.cost_tips)||0,100).toFixed(2),[...s,u]},apis:{httpList:V}},G={"w-full":""},P={class:"flex justify-between px-[15px] pt-[10px] mt-[10px] mb-[-10px] bg-white"},T={class:"flex"},U=B({__name:"Year",setup(o){const s=[{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&\u9526\u5174&\u77E5\u4E8B"},{value:"GS2402020907088731",label:"\u5E73\u53F0\u516C\u53F8: \u6CF0\u6587\u521B"}],u=h(null),e=h({companyNo:"",daytime:""});return N(()=>{const t=D(new Date).format("YYYY-MM-DD");e.value.daytime=t,e.value.companyNo=s[0].value}),y(()=>e.value,({daytime:t,companyNo:r})=>{w(()=>u.value.getPageData({daytime:t,companyNo:r}))},{deep:!0,immediate:!0}),(t,r)=>{const _=f("ElDatePicker"),n=f("ElSelect"),d=f("PageContainer");return x(),b("div",G,[F("div",P,[A(" \u5E74\u5EA6\u5B8C\u6210\u60C5\u51B5 "),F("div",T,[c(_,{modelValue:e.value.daytime,"onUpdate:modelValue":r[0]||(r[0]=a=>e.value.daytime=a),clearable:!1,class:"mr-[10px]",placeholder:"\u9009\u62E9\u65E5\u671F","value-format":"YYYY-MM-DD",format:"YYYY-MM-DD"},null,8,["modelValue"]),c(n,{modelValue:e.value.companyNo,"onUpdate:modelValue":r[1]||(r[1]=a=>e.value.companyNo=a),placeholder:"\u4E1A\u52A1\u516C\u53F8"},{default:Y(()=>[(x(),b(g,null,R(s,a=>c(C(S),{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),c(d,{"get-content-ref":a=>u.value=a,contentConfig:C(M)},null,8,["get-content-ref","contentConfig"])])}}});var H=v(U,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/dashboard/newResults/Year.vue"]]);export{H as default};