You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dashboard/src/stores/CustomerServices.js

163 lines
3.6 KiB
JavaScript

import {makeAutoObservable, runInAction} from "mobx"
import * as config from "../config";
import * as req from '../utils/request';
class CustomerServices {
constructor(rootStore) {
this.rootStore = rootStore;
makeAutoObservable(this);
}
fetchAgentList() {
req.fetchJSON(config.HT_HOST + '/service-web/QueryData/GetAgentGroupInfoALL?DateType=applyDate&Date1=2022-08-01&Date2=2022-08-31%2023:59&OldDate1=2022-07-01&OldDate2=2022-07-31%2023:59')
.then(json => {
console.info(json);
if (json.errcode === 0) {
runInAction(() => {
this.agentList = json.result1;
});
}
});
req.fetchJSON(config.HT_HOST + '/service-web/QueryData/GetAgentGroupInfo?VEI_SN=1262&DateType=applyDate&Date1=2022-08-01&Date2=2022-08-31%2023:59&OldDate1=2022-07-01&OldDate2=2022-07-31%2023:59')
.then(json => {
console.info(json);
if (json.errcode === 0) {
runInAction(() => {
this.groupList = json.result1;
});
}
});
}
fetchGroupListByAgent() {
req.fetchJSON(config.HT_HOST + '/service-web/QueryData/GetAgentGroupInfo?VEI_SN=1262&DateType=applyDate&Date1=2022-08-01&Date2=2022-08-31%2023:59&OldDate1=2022-07-01&OldDate2=2022-07-31%2023:59')
.then(json => {
console.info(json);
if (json.errcode === 0) {
runInAction(() => {
this.groupList = json.result1;
});
}
});
}
groupList = [{
EOI_ObjSN: 1,
GRI_SN: '---',
GRI_Name: 0,
COLI_PersonNum: 0,
COLI_Days: 0,
PassCity: 0,
VendorName: 0,
GuideName: '-',
Good: 0,
Bad: '-',
ECI_Content: '-',
totalcost: 0,
key: 1
}];
groupListColumns = [
{
title: '团名',
dataIndex: 'GRI_Name'
},
{
title: '人数',
dataIndex: 'COLI_PersonNum'
},
{
title: '天数',
dataIndex: 'COLI_Days'
},
{
title: '经过城市',
dataIndex: 'PassCity'
},
{
title: '地接社名称',
dataIndex: 'VendorName'
},
{
title: '导游',
dataIndex: 'GuideName'
},
{
title: '好评',
dataIndex: 'Good'
},
{
title: '差评',
dataIndex: 'Bad'
},
{
title: '评论内容',
dataIndex: 'ECI_Content'
},
{
title: '交易额',
dataIndex: 'totalcost'
}
];
agentList = [{
EOI_ObjSN: 1,
VendorName: '---',
GroupCount: 0,
PersonNum: 0,
GroupDays: 0,
totalcost: 0,
GoodCount: 0,
GoodRate: '-',
BadCount: 0,
BadRate: '-',
key: 1
}];
agentListColumns = [
{
title: '地接社名称',
dataIndex: 'VendorName'
},
{
title: '团数',
dataIndex: 'GroupCount'
},
{
title: '人数',
dataIndex: 'PersonNum'
},
{
title: '团天数',
dataIndex: 'GroupDays'
},
{
title: '交易额',
dataIndex: 'totalcost'
},
{
title: '好评数',
dataIndex: 'GoodCount'
},
{
title: '好评率',
dataIndex: 'GoodRate'
},
{
title: '差评数',
dataIndex: 'BadCount'
},
{
title: '差评率',
dataIndex: 'BadRate'
}
];
}
export default CustomerServices;