|
|
@ -3,7 +3,7 @@ import moment from "moment";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
import * as config from "../config";
|
|
|
|
import * as config from "../config";
|
|
|
|
import * as req from '../utils/request';
|
|
|
|
import * as req from '../utils/request';
|
|
|
|
import { prepareUrl } from '../utils/commons';
|
|
|
|
import { groupBy, prepareUrl } from '../utils/commons';
|
|
|
|
|
|
|
|
|
|
|
|
class CustomerServices {
|
|
|
|
class CustomerServices {
|
|
|
|
|
|
|
|
|
|
|
@ -13,7 +13,7 @@ class CustomerServices {
|
|
|
|
this.endDate = moment().endOf('week').subtract(7, 'days');
|
|
|
|
this.endDate = moment().endOf('week').subtract(7, 'days');
|
|
|
|
this.startDateString = this.startDate.format(config.DATE_FORMAT);
|
|
|
|
this.startDateString = this.startDate.format(config.DATE_FORMAT);
|
|
|
|
this.endDateString = this.endDate.format(config.DATE_FORMAT) + '%2023:59';
|
|
|
|
this.endDateString = this.endDate.format(config.DATE_FORMAT) + '%2023:59';
|
|
|
|
this.dateType = 'startDate';
|
|
|
|
this.dateType = 'departureDate';
|
|
|
|
this.inProgress = false;
|
|
|
|
this.inProgress = false;
|
|
|
|
this.selectedAgent = '';
|
|
|
|
this.selectedAgent = '';
|
|
|
|
this.selectedTeam = '';
|
|
|
|
this.selectedTeam = '';
|
|
|
@ -43,8 +43,8 @@ class CustomerServices {
|
|
|
|
.append('DateType', this.dateType)
|
|
|
|
.append('DateType', this.dateType)
|
|
|
|
.append('Date1', this.startDateString)
|
|
|
|
.append('Date1', this.startDateString)
|
|
|
|
.append('Date2', this.endDateString)
|
|
|
|
.append('Date2', this.endDateString)
|
|
|
|
.append('OldDate1', this.startDateString)
|
|
|
|
.append('OldDate1', this.startDateDiffString)
|
|
|
|
.append('OldDate2', this.endDateString)
|
|
|
|
.append('OldDate2', this.endDateDiffString)
|
|
|
|
.append('VEI_SN', this.selectedAgent)
|
|
|
|
.append('VEI_SN', this.selectedAgent)
|
|
|
|
.append('DepList', this.selectedTeam)
|
|
|
|
.append('DepList', this.selectedTeam)
|
|
|
|
.append('Country', this.selectedCountry)
|
|
|
|
.append('Country', this.selectedCountry)
|
|
|
@ -53,8 +53,9 @@ class CustomerServices {
|
|
|
|
.then(json => {
|
|
|
|
.then(json => {
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
runInAction(() => {
|
|
|
|
runInAction(() => {
|
|
|
|
this.agentGroupList = json.result1;
|
|
|
|
const splitTotalList = groupBy(json.result1, row => row.EOI_ObjSN === -1 ? '0' : '1');
|
|
|
|
const total1 = json.total1;
|
|
|
|
this.agentGroupList = splitTotalList['1'];
|
|
|
|
|
|
|
|
const total1 = splitTotalList['0']?.[0] || {}; // json.total1;
|
|
|
|
this.agentGroupListColumns = [
|
|
|
|
this.agentGroupListColumns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '地接社名称',
|
|
|
|
title: '地接社名称',
|
|
|
@ -293,8 +294,10 @@ class CustomerServices {
|
|
|
|
.then(json => {
|
|
|
|
.then(json => {
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
runInAction(() => {
|
|
|
|
runInAction(() => {
|
|
|
|
this.destinationGroupCount = json.result1;
|
|
|
|
const splitTotalList = groupBy(json.result1, row => row.COLD_ServiceCity === -1 ? '0' : '1');
|
|
|
|
const total1 = json.total1;
|
|
|
|
this.agentGroupList = splitTotalList['1'];
|
|
|
|
|
|
|
|
const total1 = splitTotalList['0']?.[0] || {}; // json.total1;
|
|
|
|
|
|
|
|
this.destinationGroupCount = splitTotalList['1'];
|
|
|
|
this.destinationGroupCountColumns = [
|
|
|
|
this.destinationGroupCountColumns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '城市',
|
|
|
|
title: '城市',
|
|
|
@ -342,7 +345,7 @@ class CustomerServices {
|
|
|
|
dataIndex: 'TotalCost',
|
|
|
|
dataIndex: 'TotalCost',
|
|
|
|
sorter: (a, b) => a.TotalCost - b.TotalCost,
|
|
|
|
sorter: (a, b) => a.TotalCost - b.TotalCost,
|
|
|
|
children: [{
|
|
|
|
children: [{
|
|
|
|
title: total1.totalcost,
|
|
|
|
title: total1.TotalCost,
|
|
|
|
dataIndex: 'TotalCost'
|
|
|
|
dataIndex: 'TotalCost'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -352,7 +355,7 @@ class CustomerServices {
|
|
|
|
dataIndex: 'TotalPrice',
|
|
|
|
dataIndex: 'TotalPrice',
|
|
|
|
sorter: (a, b) => a.TotalPrice - b.TotalPrice,
|
|
|
|
sorter: (a, b) => a.TotalPrice - b.TotalPrice,
|
|
|
|
children: [{
|
|
|
|
children: [{
|
|
|
|
title: total1.totalprice,
|
|
|
|
title: total1.TotalPrice,
|
|
|
|
dataIndex: 'TotalPrice'
|
|
|
|
dataIndex: 'TotalPrice'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
@ -458,7 +461,7 @@ class CustomerServices {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
searchValues = {
|
|
|
|
searchValues = {
|
|
|
|
DateType: { key: 'startDate', label: '走团日期'},
|
|
|
|
DateType: { key: 'departureDate', label: '抵达日期'},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
setSearchValues(obj, values) {
|
|
|
|
setSearchValues(obj, values) {
|
|
|
@ -466,6 +469,8 @@ class CustomerServices {
|
|
|
|
this.selectedAgent = obj.agency;
|
|
|
|
this.selectedAgent = obj.agency;
|
|
|
|
this.startDateString = obj.Date1;
|
|
|
|
this.startDateString = obj.Date1;
|
|
|
|
this.endDateString = obj.Date2;
|
|
|
|
this.endDateString = obj.Date2;
|
|
|
|
|
|
|
|
this.startDateDiffString = obj.DateDiff1;
|
|
|
|
|
|
|
|
this.endDateDiffString = obj.DateDiff2;
|
|
|
|
this.selectedCountry = obj.countryArea;
|
|
|
|
this.selectedCountry = obj.countryArea;
|
|
|
|
this.selectedTeam = obj.DepartmentList.replace('ALL', '');
|
|
|
|
this.selectedTeam = obj.DepartmentList.replace('ALL', '');
|
|
|
|
this.selectedOrderStatus = obj.orderStatus;
|
|
|
|
this.selectedOrderStatus = obj.orderStatus;
|
|
|
|