|
|
@ -58,7 +58,6 @@ const getDepartmentOrderMLByType = async (param) => {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return { total1, result1 };
|
|
|
|
return { total1, result1 };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const GHproductTypeListSetting = {
|
|
|
|
const GHproductTypeListSetting = {
|
|
|
|
ja: ['日本', '东亚跨国'],
|
|
|
|
ja: ['日本', '东亚跨国'],
|
|
|
|
se: ['东南亚跨国', '泰国', '越南', '印度尼西亚', '水灯节', '柬埔寨', '老挝'],
|
|
|
|
se: ['东南亚跨国', '泰国', '越南', '印度尼西亚', '水灯节', '柬埔寨', '老挝'],
|
|
|
@ -264,12 +263,14 @@ class MeetingData {
|
|
|
|
// console.log(param);
|
|
|
|
// console.log(param);
|
|
|
|
const { total1: CHSalesDataWeek } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '1', OrderType:'ALL'});
|
|
|
|
const { total1: CHSalesDataWeek } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '1', OrderType:'ALL'});
|
|
|
|
const exceptCHSalesDataWeek = await getDetailData({ ...salesParam, 'DepartmentList': '28,33' });
|
|
|
|
const exceptCHSalesDataWeek = await getDetailData({ ...salesParam, 'DepartmentList': '28,33' });
|
|
|
|
|
|
|
|
const GHDataWeekConfirm = exceptCHSalesDataWeek.filter((ele) => Number(ele.orderState) === 1); // 成交的
|
|
|
|
|
|
|
|
|
|
|
|
const yearStart = moment().startOf("year").format(DATE_FORMAT);
|
|
|
|
const yearStart = moment().startOf("year").format(DATE_FORMAT);
|
|
|
|
const yearEnd = moment().endOf("year").format(SMALL_DATETIME_FORMAT);
|
|
|
|
const yearEnd = moment().endOf("year").format(SMALL_DATETIME_FORMAT);
|
|
|
|
/** 截至今年 - 成交 */
|
|
|
|
/** 截至今年 - 成交 */
|
|
|
|
const { total1: CHDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1', OrderType:'ALL' });
|
|
|
|
const { total1: CHDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1', OrderType:'ALL' });
|
|
|
|
const ColLineClassDataYear = await getDetailData({ ...salesParam, Date1: yearStart, 'DepartmentList': '28,33' });
|
|
|
|
const GHDataYear = await getDetailData({ ...salesParam, Date1: yearStart, 'DepartmentList': '28,33' });
|
|
|
|
|
|
|
|
const GHDataYearConfirm = GHDataYear.filter((ele) => Number(ele.orderState) === 1); // 成交的
|
|
|
|
/** 截至今年 - 走团 */
|
|
|
|
/** 截至今年 - 走团 */
|
|
|
|
const { total1: CHStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,Date2:yearEnd,DepartmentList: '1', OrderType:'ALL',DateType: 'startDate' });
|
|
|
|
const { total1: CHStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,Date2:yearEnd,DepartmentList: '1', OrderType:'ALL',DateType: 'startDate' });
|
|
|
|
const { ordercount1: GHStartDataYear } = await getOrderCountByType({ ...salesParam, Date1: yearStart,Date2:yearEnd, DepartmentList: '28,33', WebCode: 'All', OrderType: 'Product', DateType: 'startDate' });
|
|
|
|
const { ordercount1: GHStartDataYear } = await getOrderCountByType({ ...salesParam, Date1: yearStart,Date2:yearEnd, DepartmentList: '28,33', WebCode: 'All', OrderType: 'Product', DateType: 'startDate' });
|
|
|
@ -282,10 +283,10 @@ class MeetingData {
|
|
|
|
CJCount: (CHSalesDataWeek.COLI_CJCount),
|
|
|
|
CJCount: (CHSalesDataWeek.COLI_CJCount),
|
|
|
|
rowYear: { YJLY: price_to_number(CHDataYear.COLI_ML2), CJCount: CHDataYear.COLI_CJCount, YJLY2: price_to_number(CHStartDataYear.COLI_ML2) },
|
|
|
|
rowYear: { YJLY: price_to_number(CHDataYear.COLI_ML2), CJCount: CHDataYear.COLI_CJCount, YJLY2: price_to_number(CHStartDataYear.COLI_ML2) },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ key: 'ja', label: '日本+', ...dataSales('ja', exceptCHSalesDataWeek, ColLineClassDataYear, GHStartDataYear) },
|
|
|
|
{ key: 'ja', label: '日本+', ...dataSales('ja', GHDataWeekConfirm, GHDataYearConfirm, GHStartDataYear) },
|
|
|
|
{ key: 'se', label: '东南亚+', ...dataSales('se', exceptCHSalesDataWeek, ColLineClassDataYear, GHStartDataYear) },
|
|
|
|
{ key: 'se', label: '东南亚+', ...dataSales('se', GHDataWeekConfirm, GHDataYearConfirm, GHStartDataYear) },
|
|
|
|
{ key: 'in', label: '印度+', ...dataSales('in', exceptCHSalesDataWeek, ColLineClassDataYear, GHStartDataYear) },
|
|
|
|
{ key: 'in', label: '印度+', ...dataSales('in', GHDataWeekConfirm, GHDataYearConfirm, GHStartDataYear) },
|
|
|
|
{ key: 'other', label: '其他GH', ...dataSalesGHOther(exceptCHSalesDataWeek, ColLineClassDataYear, GHStartDataYear) },
|
|
|
|
{ key: 'other', label: '其他GH', ...dataSalesGHOther(GHDataWeekConfirm, GHDataYearConfirm, GHStartDataYear) },
|
|
|
|
];
|
|
|
|
];
|
|
|
|
const columnsSum = ['CJCount', 'YJLY'].reduce((r, col) => ({ ...r, [col]: rows.reduce((rr, row) => rr + row[col], 0) }), {});
|
|
|
|
const columnsSum = ['CJCount', 'YJLY'].reduce((r, col) => ({ ...r, [col]: rows.reduce((rr, row) => rr + row[col], 0) }), {});
|
|
|
|
const allYearData = rows.map(row => row.rowYear);
|
|
|
|
const allYearData = rows.map(row => row.rowYear);
|
|
|
|