|
@@ -139,9 +139,7 @@ export default {
|
|
|
daytime: this.date,
|
|
|
});
|
|
|
|
|
|
-
|
|
|
if ((res.code === 0 && res.data && res.data.length > 0) && (result.code === 0 && result.data && result.data.length > 0)) {
|
|
|
-
|
|
|
const mapCompanySupplierSale = result.data.reduce((prev,current) => ({
|
|
|
...prev,
|
|
|
[current.companyName]:subtraction(current.monthinfo[2].msale_total,current.monthinfo[2].mth_total)
|
|
@@ -163,7 +161,7 @@ export default {
|
|
|
monthinfo:{ msale_total, mth_total }
|
|
|
}));
|
|
|
|
|
|
- tableData = ["百辰","泓源","普润","平台"].map(c => {
|
|
|
+ tableData = ["百辰","泓源","普润","平台"].map(c => {
|
|
|
return tableData.find(({depart}) => depart === c)
|
|
|
})
|
|
|
|
|
@@ -184,15 +182,13 @@ export default {
|
|
|
/* 月净销售 = 月销售 - 月退货 **/
|
|
|
let monthNetSales = subtraction(monthinfo.msale_total, monthinfo.mth_total)
|
|
|
|
|
|
- const supplierSalekey = Object.keys(mapCompanySupplierSale).find(key => key.includes(depart))
|
|
|
-
|
|
|
- if(supplierSalekey){
|
|
|
- monthNetSales = addition(monthNetSales,mapCompanySupplierSale[supplierSalekey])
|
|
|
- }
|
|
|
-
|
|
|
- if(supplierSalekey === '北京普润心堂商贸有限公司'){
|
|
|
- monthNetSales = addition(monthNetSales,mapCompanySupplierSale['北京锦兴弘昌科技有限公司'])
|
|
|
- }
|
|
|
+ // const supplierSalekey = Object.keys(mapCompanySupplierSale).find(key => key.includes(depart))
|
|
|
+ // if(supplierSalekey){
|
|
|
+ // monthNetSales = addition(monthNetSales,mapCompanySupplierSale[supplierSalekey])
|
|
|
+ // }
|
|
|
+ // if(supplierSalekey === '北京普润心堂商贸有限公司'){
|
|
|
+ // monthNetSales = addition(monthNetSales,mapCompanySupplierSale['北京锦兴弘昌科技有限公司'])
|
|
|
+ // }
|
|
|
|
|
|
/* 月经销售完成率 = 月净销售 / 销售指标 **/
|
|
|
const monthProportion = multiplication(division(monthNetSales,total_tips),100).toFixed(2)
|
|
@@ -222,6 +218,7 @@ export default {
|
|
|
total_tips:this.tableData.reduce((prev,current) => addition(prev,current.total_tips),0),
|
|
|
}
|
|
|
const completionRate = multiplication(division(this.total.completion,this.total.total_tips) || 0, 100).toFixed(2) + '%'
|
|
|
+
|
|
|
this.total = {
|
|
|
...this.total,
|
|
|
completionRate
|