|
|
@ -286,77 +286,82 @@ class MeetingData {
|
|
|
|
dataGHSales = async (param) => {
|
|
|
|
dataGHSales = async (param) => {
|
|
|
|
this.GHSalesLoading = true;
|
|
|
|
this.GHSalesLoading = true;
|
|
|
|
const salesParam = { ...param, DateType: 'confirmDate', WebCode: 'CHT,AH,GH,GHKYZG,GHKYHW,ZWQD', OrderType:'ALL', }; // WebCode: 不含分销
|
|
|
|
const salesParam = { ...param, DateType: 'confirmDate', WebCode: 'CHT,AH,GH,GHKYZG,GHKYHW,ZWQD', OrderType:'ALL', }; // WebCode: 不含分销
|
|
|
|
|
|
|
|
const partnerParam = { WebCode: 'GHTOBHW,GHTOBZG' };
|
|
|
|
const [
|
|
|
|
const [
|
|
|
|
{ total1: CHSalesData }, // 不含分销
|
|
|
|
{ total1: CHSalesDataTotal },
|
|
|
|
{ total1: AHSalesData }, // 不含分销
|
|
|
|
{ total1: CHPartnerSalesData },
|
|
|
|
{ total1: GHSalesData }, // 不含分销
|
|
|
|
{ total1: AHSalesDataTotal },
|
|
|
|
{ total1: partnerSalesData },
|
|
|
|
{ total1: AHpartnerSalesData },
|
|
|
|
{ total1: totalSalesData },
|
|
|
|
{ total1: GHSalesDataTotal },
|
|
|
|
|
|
|
|
{ total1: GHpartnerSalesData },
|
|
|
|
] = await Promise.all([
|
|
|
|
] = await Promise.all([
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '28', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '33', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '28', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2,28,33',WebCode: 'GHTOBHW,GHTOBZG',}),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '28', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2,28,33',WebCode: 'ALL',})
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '33', WebCode: 'ALL', }),
|
|
|
|
|
|
|
|
getDepartmentOrderMLByType({...salesParam, DepartmentList: '33', ...partnerParam }),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
// const { total1: CHSalesDataTotal } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2', WebCode: 'ALL',});
|
|
|
|
// 不含分销 = 总额 - 分销
|
|
|
|
// const { total1: CHPartnerSalesData } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '1,2', WebCode: 'GHTOBHW,GHTOBZG', });
|
|
|
|
const CHSalesData = {'COLI_CJCount': CHSalesDataTotal.COLI_CJCount-CHPartnerSalesData.COLI_CJCount, 'COLI_ML2': CHSalesDataTotal.COLI_ML2-CHPartnerSalesData.COLI_ML2};
|
|
|
|
// const { total1: AHSalesDataTotal } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '28',WebCode: 'ALL',});
|
|
|
|
const AHSalesData = {'COLI_CJCount': AHSalesDataTotal.COLI_CJCount-AHpartnerSalesData.COLI_CJCount, 'COLI_ML2': AHSalesDataTotal.COLI_ML2-AHpartnerSalesData.COLI_ML2};
|
|
|
|
// const { total1: AHpartnerSalesData } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '28', WebCode: 'GHTOBHW,GHTOBZG', });
|
|
|
|
const GHSalesData = {'COLI_CJCount': GHSalesDataTotal.COLI_CJCount-GHpartnerSalesData.COLI_CJCount, 'COLI_ML2': GHSalesDataTotal.COLI_ML2-GHpartnerSalesData.COLI_ML2};
|
|
|
|
// const { total1: GHSalesDataTotal } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '33',WebCode: 'ALL',});
|
|
|
|
const partnerSalesData = {'COLI_CJCount': CHPartnerSalesData.COLI_CJCount+AHpartnerSalesData.COLI_CJCount, 'COLI_ML2': CHPartnerSalesData.COLI_ML2+AHpartnerSalesData.COLI_ML2};
|
|
|
|
// const { total1: GHpartnerSalesData } = await getDepartmentOrderMLByType({...salesParam, DepartmentList: '33', WebCode: 'GHTOBHW,GHTOBZG', });
|
|
|
|
const totalSalesData = {
|
|
|
|
// 分销
|
|
|
|
'COLI_CJCount': CHSalesDataTotal.COLI_CJCount + AHSalesDataTotal.COLI_CJCount + GHSalesDataTotal.COLI_CJCount,
|
|
|
|
// const CHSalesData0 = {'COLI_CJCount': CHSalesDataTotal.COLI_CJCount-CHPartnerSalesData.COLI_CJCount, 'COLI_ML2': CHSalesDataTotal.COLI_ML2-CHPartnerSalesData.COLI_ML2};
|
|
|
|
'COLI_ML2': CHSalesDataTotal.COLI_ML2 + AHSalesDataTotal.COLI_ML2 + GHSalesDataTotal.COLI_ML2,
|
|
|
|
// const AHSalesData0 = {'COLI_CJCount': AHSalesDataTotal.COLI_CJCount-AHpartnerSalesData.COLI_CJCount, 'COLI_ML2': AHSalesDataTotal.COLI_ML2-AHpartnerSalesData.COLI_ML2};
|
|
|
|
};
|
|
|
|
// const GHSalesData0 = {'COLI_CJCount': GHSalesDataTotal.COLI_CJCount-GHpartnerSalesData.COLI_CJCount, 'COLI_ML2': GHSalesDataTotal.COLI_ML2-GHpartnerSalesData.COLI_ML2};
|
|
|
|
|
|
|
|
// const partnerSalesData0 = {'COLI_CJCount': CHPartnerSalesData.COLI_CJCount+AHpartnerSalesData.COLI_CJCount, 'COLI_ML2': CHPartnerSalesData.COLI_ML2+AHpartnerSalesData.COLI_ML2};
|
|
|
|
|
|
|
|
// const totalSalesData0 = {
|
|
|
|
|
|
|
|
// 'COLI_CJCount': CHSalesDataTotal.COLI_CJCount + AHSalesDataTotal.COLI_CJCount + GHSalesDataTotal.COLI_CJCount,
|
|
|
|
|
|
|
|
// 'COLI_ML2': CHSalesDataTotal.COLI_ML2 + AHSalesDataTotal.COLI_ML2 + GHSalesDataTotal.COLI_ML2,
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 [
|
|
|
|
const [
|
|
|
|
{ total1: CHDataYear },
|
|
|
|
{ total1: CHSalesYearTotal },
|
|
|
|
{ total1: AHDataYear },
|
|
|
|
{ total1: CHPartnerSalesYear },
|
|
|
|
{ total1: GHDataYear },
|
|
|
|
{ total1: AHSalesYearTotal },
|
|
|
|
{ total1: partnerDataYear },
|
|
|
|
{ total1: AHpartnerSalesYear },
|
|
|
|
{ total1: totalDataYear },
|
|
|
|
{ total1: GHSalesYearTotal },
|
|
|
|
|
|
|
|
{ total1: GHpartnerSalesYear },
|
|
|
|
] = await Promise.all([
|
|
|
|
] = await Promise.all([
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '28', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '33', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '28', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2,28,7,33',WebCode: 'GHTOBHW,GHTOBZG',}),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '28', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2,28,7,33',WebCode: 'ALL',})
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '33', WebCode: 'ALL', }),
|
|
|
|
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '33', ...partnerParam }),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
// const { total1: CHDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2', });
|
|
|
|
const CHDataYear = {'COLI_CJCount': CHSalesYearTotal.COLI_CJCount-CHPartnerSalesYear.COLI_CJCount, 'COLI_ML2': CHSalesYearTotal.COLI_ML2-CHPartnerSalesYear.COLI_ML2};
|
|
|
|
// const { total1: AHDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '28', });
|
|
|
|
const AHDataYear = {'COLI_CJCount': AHSalesYearTotal.COLI_CJCount-AHpartnerSalesYear.COLI_CJCount, 'COLI_ML2': AHSalesYearTotal.COLI_ML2-AHpartnerSalesYear.COLI_ML2};
|
|
|
|
// const { total1: GHDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '33', });
|
|
|
|
const GHDataYear = {'COLI_CJCount': GHSalesYearTotal.COLI_CJCount-GHpartnerSalesYear.COLI_CJCount, 'COLI_ML2': GHSalesYearTotal.COLI_ML2-GHpartnerSalesYear.COLI_ML2};
|
|
|
|
// const { total1: partnerDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2,28,7,33', WebCode: 'GHTOBHW,GHTOBZG', });
|
|
|
|
const partnerDataYear = {'COLI_CJCount': CHPartnerSalesYear.COLI_CJCount+AHpartnerSalesYear.COLI_CJCount, 'COLI_ML2': CHPartnerSalesYear.COLI_ML2+AHpartnerSalesYear.COLI_ML2};
|
|
|
|
// const { total1: totalDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart, DepartmentList: '1,2,28,7,33', WebCode: 'ALL', });
|
|
|
|
const totalDataYear = {
|
|
|
|
|
|
|
|
'COLI_CJCount': CHSalesYearTotal.COLI_CJCount + AHSalesYearTotal.COLI_CJCount + GHSalesYearTotal.COLI_CJCount,
|
|
|
|
|
|
|
|
'COLI_ML2': CHSalesYearTotal.COLI_ML2 + AHSalesYearTotal.COLI_ML2 + GHSalesYearTotal.COLI_ML2,
|
|
|
|
|
|
|
|
};
|
|
|
|
/** 截至今年 - 走团 */
|
|
|
|
/** 截至今年 - 走团 */
|
|
|
|
const [
|
|
|
|
const [
|
|
|
|
{ total1: CHStartDataYear },
|
|
|
|
{ total1: CHStartDataYearTotal },
|
|
|
|
{ total1: AHStartDataYear },
|
|
|
|
{ total1: CHPartnerStartDataYear },
|
|
|
|
{ total1: GHStartDataYear },
|
|
|
|
{ total1: AHStartDataYearTotal },
|
|
|
|
{ total1: partnerStartDataYear },
|
|
|
|
{ total1: AHpartnerStartDataYear },
|
|
|
|
{ total1: totalStartDataYear },
|
|
|
|
{ total1: GHStartDataYearTotal },
|
|
|
|
|
|
|
|
{ total1: GHpartnerStartDataYear },
|
|
|
|
] = await Promise.all([
|
|
|
|
] = await Promise.all([
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DepartmentList: '1,2', DateType: 'startDate' }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '1,2', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DepartmentList: '28', DateType: 'startDate' }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '1,2', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DepartmentList: '33', DateType: 'startDate' }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '28', WebCode: 'ALL', }),
|
|
|
|
/** 截至今年 - 走团 - 分销 */
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '28', ...partnerParam }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DepartmentList: '1,2,28,7,33',WebCode: 'GHTOBHW,GHTOBZG', DateType: 'startDate',}),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '33', WebCode: 'ALL', }),
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DepartmentList: '1,2,28,7,33',WebCode: 'ALL', DateType: 'startDate',})
|
|
|
|
getDepartmentOrderMLByType({...salesParam, Date1: yearStart, Date2:yearEnd, DateType: 'startDate', DepartmentList: '33', ...partnerParam }),
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
// const { total1: CHStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,DepartmentList: '1,2', DateType: 'startDate' });
|
|
|
|
const CHStartDataYear = {'COLI_CJCount': CHStartDataYearTotal.COLI_CJCount-CHPartnerStartDataYear.COLI_CJCount, 'COLI_ML2': CHStartDataYearTotal.COLI_ML2-CHPartnerStartDataYear.COLI_ML2};
|
|
|
|
// const { total1: AHStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,DepartmentList: '28', DateType: 'startDate' });
|
|
|
|
const AHStartDataYear = {'COLI_CJCount': AHStartDataYearTotal.COLI_CJCount-AHpartnerStartDataYear.COLI_CJCount, 'COLI_ML2': AHStartDataYearTotal.COLI_ML2-AHpartnerStartDataYear.COLI_ML2};
|
|
|
|
// const { total1: GHStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,DepartmentList: '33', DateType: 'startDate' });
|
|
|
|
const GHStartDataYear = {'COLI_CJCount': GHStartDataYearTotal.COLI_CJCount-GHpartnerStartDataYear.COLI_CJCount, 'COLI_ML2': GHStartDataYearTotal.COLI_ML2-GHpartnerStartDataYear.COLI_ML2};
|
|
|
|
/** 截至今年 - 走团 - 分销 */
|
|
|
|
const partnerStartDataYear = {'COLI_CJCount': CHPartnerStartDataYear.COLI_CJCount+AHpartnerStartDataYear.COLI_CJCount, 'COLI_ML2': CHPartnerStartDataYear.COLI_ML2+AHpartnerStartDataYear.COLI_ML2};
|
|
|
|
// const { total1: partnerStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,DepartmentList: '1,2,28,7,33', WebCode: 'GHTOBHW,GHTOBZG', DateType: 'startDate' });
|
|
|
|
const totalStartDataYear = {
|
|
|
|
// const { total1: totalStartDataYear } = await getDepartmentOrderMLByType({...salesParam, Date1: yearStart,DepartmentList: '1,2,28,7,33', WebCode: 'ALL', DateType: 'startDate' });
|
|
|
|
'COLI_CJCount': CHStartDataYearTotal.COLI_CJCount + AHStartDataYearTotal.COLI_CJCount + GHStartDataYearTotal.COLI_CJCount,
|
|
|
|
|
|
|
|
'COLI_ML2': CHStartDataYearTotal.COLI_ML2 + AHStartDataYearTotal.COLI_ML2 + GHStartDataYearTotal.COLI_ML2,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const rows = [
|
|
|
|
const rows = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|