|
@@ -195,9 +195,9 @@ export default {
|
|
|
|
|
|
if (res.code === 0 && res.data && res.data.length > 0) {
|
|
|
let list = (res.data || [])
|
|
|
- .map(({depart, msale_total, mth_total, sale_total, th_total, total_tips ,mzy_sale_total, mchannel_sale_total,channel_cost_total,zy_cost_total,mchannel_cost_total}) => {
|
|
|
+ .map(({depart, msale_total, mth_total, sale_total, th_total, total_tips ,mzy_sale_total, mchannel_sale_total,channel_cost_total,zy_cost_total,mzy_cost_total,mchannel_cost_total}) => {
|
|
|
return {
|
|
|
- depart, total_tips,mzy_sale_total, mchannel_sale_total, channel_cost_total, zy_cost_total,mchannel_cost_total,
|
|
|
+ depart, total_tips,mzy_sale_total, mchannel_sale_total, channel_cost_total, zy_cost_total,mchannel_cost_total,mzy_cost_total,
|
|
|
dayinfo: { sale_total, th_total }, monthinfo:{ msale_total, mth_total }
|
|
|
}
|
|
|
});
|
|
@@ -217,19 +217,19 @@ export default {
|
|
|
const mapToDepartment = { 百辰:"客服部@百辰荣达", 泓源:"网络部@泓源广诚", 普润:" 项目部@普润心堂", 平台:" 平台部@万宇恒通" }
|
|
|
|
|
|
const company = this.companies.find(item => item.value === this.companyNo);
|
|
|
- this.list = list.map(({depart,total_tips,dayinfo,monthinfo,mchannel_sale_total,mzy_sale_total,zy_cost_total,mchannel_cost_total}) => {
|
|
|
+ this.list = list.map(({depart,total_tips,dayinfo,monthinfo,mchannel_sale_total,mzy_sale_total,zy_cost_total,mchannel_cost_total,mzy_cost_total}) => {
|
|
|
/* 月净销售 = 月销售 - 月退货 **/
|
|
|
const monthNetSales = subtraction(monthinfo.msale_total, monthinfo.mth_total)
|
|
|
/* 月经销售完成率 = 月净销售 / 销售指标 **/
|
|
|
const monthProportion = multiplication(division(monthNetSales,total_tips),100).toFixed(2)
|
|
|
return {
|
|
|
total_tips, // 营收目标
|
|
|
- zy_cost: zy_cost_total, // 自营成本
|
|
|
+ zy_cost: mzy_cost_total, // 自营成本
|
|
|
qd_cost: mchannel_cost_total, // 渠道成本
|
|
|
depart: mapToDepartment[depart],
|
|
|
company: company.label,
|
|
|
currentMonthPure:[ { zy : mzy_sale_total, qd: mchannel_sale_total } ], // 当月营业收入(净)
|
|
|
- zy_gross:Number(subtraction(mzy_sale_total,zy_cost_total)).toFixed(2), // 自营毛利 = 自营营收 - 自营成本
|
|
|
+ zy_gross:Number(subtraction(mzy_sale_total,mzy_cost_total)).toFixed(2), // 自营毛利 = 自营营收 - 自营成本
|
|
|
qd_gross:Number(subtraction(mchannel_sale_total,mchannel_cost_total)).toFixed(2), // 渠道毛利 = 渠道营收 - 渠道成本
|
|
|
dayinfo:{ ...dayinfo, /** 日销售额 = 日销售额 - 日退货额 */ sale_total:subtraction(dayinfo.sale_total,dayinfo.th_total) },
|
|
|
/* 占比 = (当前部门销售额 / 各部门总销售额) / 100 **/
|