Merge branch 'main' into feature/2.0

feature/2.0-sales-trade
Lei OT 2 years ago
commit 3af6ec1add

@ -124,15 +124,15 @@ const App = () => {
}, },
{ key: 'kpi', label: <NavLink to="/kpi">目标</NavLink>, icon: <FlagOutlined /> }, { key: 'kpi', label: <NavLink to="/kpi">目标</NavLink>, icon: <FlagOutlined /> },
{ key: 'distribution', label: <NavLink to="/distribution">统计分布</NavLink>, icon: <PieChartOutlined /> }, { key: 'distribution', label: <NavLink to="/distribution">统计分布</NavLink>, icon: <PieChartOutlined /> },
{ // {
key: 'detail', // key: 'detail',
label: ( // label: (
<NavLink to="/detail"> // <NavLink to="/detail">
<Badge.Ribbon text="Beta">统计分析</Badge.Ribbon> // <Badge.Ribbon text="Beta"></Badge.Ribbon>
</NavLink> // </NavLink>
), // ),
icon: <BarChartOutlined />, // icon: <BarChartOutlined />,
}, // },
]; ];
return ( return (

@ -8,7 +8,7 @@ const searchFormItemSet = {
'bu': { shows: ['DateType', 'years', 'HTBusinessUnits'], sort }, 'bu': { shows: ['DateType', 'years', 'HTBusinessUnits'], sort },
'dept': { shows: ['DateType', 'years', 'DepartmentList'], sort, fieldProps: { DepartmentList: { allowClear: true,isLeaf: true, show_all: false } }, }, 'dept': { shows: ['DateType', 'years', 'DepartmentList'], sort, fieldProps: { DepartmentList: { allowClear: true,isLeaf: true, show_all: false } }, },
'operator': { shows: ['DateType', 'years', 'DepartmentList', 'operator'], fieldProps: { DepartmentList: { allowClear: true, isLeaf: true }, operator: { param: { } } }, sort }, // is_assign: 1 'operator': { shows: ['DateType', 'years', 'DepartmentList', 'operator'], fieldProps: { DepartmentList: { allowClear: true, isLeaf: true }, operator: { param: { } } }, sort }, // is_assign: 1
'destination': { shows: ['DateType', 'years', 'destination'], sort }, 'destination': { shows: ['DateType', 'years', 'city'], sort }, // 'country', , 'globalCity'
'country': { shows: ['DateType', 'years', 'country'], sort }, 'country': { shows: ['DateType', 'years', 'country'], sort },
}; };

@ -142,6 +142,11 @@ export default observer((props) => {
transform: (value) => value?.key || '', transform: (value) => value?.key || '',
default: '', default: '',
}, },
'city': {
key: 'city',
transform: (value) => value?.key || '',
default: '',
},
}; };
let dest = {}; let dest = {};
const { applyDate, applyDate2, year, yearDiff, ...omittedValue } = values; const { applyDate, applyDate2, year, yearDiff, ...omittedValue } = values;
@ -327,6 +332,20 @@ function getFields(props) {
<SearchInput autoGet url="/service-Analyse2/GetCountryInfo" map={{ 'c_id': 'key', 'cn_name': 'label' }} resultkey={'result'} placeholder="输入搜索国籍: 中/英名字" /> <SearchInput autoGet url="/service-Analyse2/GetCountryInfo" map={{ 'c_id': 'key', 'cn_name': 'label' }} resultkey={'result'} placeholder="输入搜索国籍: 中/英名字" />
</Form.Item> </Form.Item>
), ),
item(
'city',
99,
<Form.Item name={'city'}>
<SearchInput autoGet url="/service-Analyse2/GetDestinationInfo" map={{ 'c_id': 'key', 'cn_name': 'label' }} resultkey={'result'} placeholder="输入搜索城市: 中/英名字" />
</Form.Item>
),
item(
'globalCity',
99,
<Form.Item name={'globalCity'}>
<SearchInput autoGet url="/service-Analyse2/GetGlobalDestinationInfo" map={{ 'c_id': 'key', 'cn_name': 'label' }} resultkey={'result'} placeholder="输入搜索城市: 中/英名字" />
</Form.Item>
),
]; ];
baseChildren = baseChildren baseChildren = baseChildren
.map((x) => { .map((x) => {

@ -66,7 +66,8 @@ export const sites = [
{ value: '163', key: '163', label: 'GH', code: 'GH' }, { value: '163', key: '163', label: 'GH', code: 'GH' },
{ value: '28', key: '28', label: '客运中国', code: 'GHKYZG' }, { value: '28', key: '28', label: '客运中国', code: 'GHKYZG' },
{ value: '7', key: '7', label: '客运海外', code: 'GHKYHW' }, { value: '7', key: '7', label: '客运海外', code: 'GHKYHW' },
{ value: '172', key: '172', label: 'GH TO B业务', code: 'GHTOB' }, { value: '172', key: '172', label: 'GHToB 海外', code: 'GHTOBHW' },
{ value: '176', key: '176', label: 'GHToB 中国', code: 'GHTOBZG' },
{ value: '11,12,20,21,10,18', key: '11,12,20,21,10,18', label: '国际(入境)', code: 'JP,VAC,IT,GM,RU,VC' }, { value: '11,12,20,21,10,18', key: '11,12,20,21,10,18', label: '国际(入境)', code: 'JP,VAC,IT,GM,RU,VC' },
{ value: '122,200,211,100,188', key: '122,200,211,100,188', label: '国际(海外)', code: 'VACHW,ITHW,GMHW,RUHW,VCHW' }, { value: '122,200,211,100,188', key: '122,200,211,100,188', label: '国际(海外)', code: 'VACHW,ITHW,GMHW,RUHW,VCHW' },
{ value: '11', key: '11', label: '日语', code: 'JP' }, { value: '11', key: '11', label: '日语', code: 'JP' },
@ -135,8 +136,9 @@ export const KPIObjects = [
{ key: 'dept', value: 'dept', label: '小组', data: leafGroup }, { key: 'dept', value: 'dept', label: '小组', data: leafGroup },
{ key: 'du', value: 'du', label: '销售小组', data: deptUnits }, { key: 'du', value: 'du', label: '销售小组', data: deptUnits },
{ key: 'operator', value: 'operator', label: '顾问' }, { key: 'operator', value: 'operator', label: '顾问' },
{ key: 'destination', value: 'destination', label: '目的地' }, { key: 'destination', value: 'destination', label: '目的地 城市' },
{ key: 'country', value: 'country', label: '国籍' }, // { key: 'destination', value: 'destination', label: '目的地 国籍' },
{ key: 'country', value: 'country', label: '客源 国籍' },
{ {
key: 'guestgrouptype', key: 'guestgrouptype',
value: 'guestgrouptype', value: 'guestgrouptype',

@ -342,6 +342,16 @@ class CustomerServices {
dataIndex: 'TotalCost' dataIndex: 'TotalCost'
} }
] ]
},
{
title: '报价',
dataIndex: 'TotalPrice',
sorter: (a, b) => a.TotalPrice - b.TotalPrice,
children: [{
title: total1.totalprice,
dataIndex: 'TotalPrice'
}
]
} }
]; ];
}); });

@ -2,7 +2,7 @@ import { useContext, useEffect, useState } from 'react';
import { stores_Context } from './../config'; import { stores_Context } from './../config';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { Row, Col, Tabs, Spin } from 'antd'; import { Row, Col, Tabs, Spin } from 'antd';
import { flush, isEmpty, objectMapper } from './../utils/commons'; import { flush, isEmpty, objectMapper, pick } from './../utils/commons';
import { KPIObjects } from './../libs/ht'; import { KPIObjects } from './../libs/ht';
import ObjectPanel from '../components/kpi/ObjectPanel'; import ObjectPanel from '../components/kpi/ObjectPanel';
import OverviewPanel from './../components/kpi/OverviewPanel'; import OverviewPanel from './../components/kpi/OverviewPanel';
@ -19,12 +19,12 @@ const objectComponents = {
'country': ObjectPanel, 'country': ObjectPanel,
}; };
const objectFilterKey = { const objectFilterKey = {
'bu': 'HTBusinessUnits', 'bu': ['HTBusinessUnits'],
'dept': 'DepartmentList', 'dept': ['DepartmentList'],
// 'du': 'du', // 'du': 'du',
// 'operator': 'operator', // 'operator': 'operator',
// 'destination': 'destination', 'destination': ['city', ],
'country': 'country', 'country': ['country'],
}; };
export default observer((props) => { export default observer((props) => {
const { KPIStore, DictDataStore, date_picker_store: searchFormStore } = useContext(stores_Context); const { KPIStore, DictDataStore, date_picker_store: searchFormStore } = useContext(stores_Context);
@ -80,11 +80,9 @@ export default observer((props) => {
// KPIStore.getList(getkpiParam).then((data) => { // KPIStore.getList(getkpiParam).then((data) => {
// // setDataSource(data); // // setDataSource(data);
if (objectFilterKey?.[curObject]) { if (objectFilterKey?.[curObject]) {
const selectItem = searchFormStore.formValues[objectFilterKey[curObject]]; const selectItems = Object.values(pick(searchFormStore.formValues, objectFilterKey[curObject]));
if (selectItem) { const _selectItems = flush(selectItems).map((ele) => ({ ...ele, value: ele.key }));
selectItem.value = selectItem.key; setRetObjects(_selectItems);
}
setRetObjects(flush([selectItem]));
} }
// }); // });
}; };

Loading…
Cancel
Save