From 6d37e74ac12e0fb1494d9e9456789efbac568919 Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 28 Sep 2023 14:23:33 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libs/ht.js | 3 ++- src/stores/CustomerServices.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/libs/ht.js b/src/libs/ht.js index 37e5b86..ed2c7cc 100644 --- a/src/libs/ht.js +++ b/src/libs/ht.js @@ -42,7 +42,8 @@ export const sites = [ { key: '163', label: 'GH', code: 'GH' }, { key: '28', label: '客运中国', code: 'GHKYZG' }, { key: '7', label: '客运海外', code: 'GHKYHW' }, - { key: '172', label: 'ToB业务', code: 'GHTOB' }, + { key: '172', label: 'GHToB 海外', code: 'GHTOBHW' }, + { key: '176', label: 'GHToB 中国', code: 'GHTOBZG' }, { key: '11,12,20,21,10,18', label: '国际(入境)', code: 'JP,VAC,IT,GM,RU,VC' }, { key: '122,200,211,100,188', label: '国际(海外)', code: 'VACHW,ITHW,GMHW,RUHW,VCHW' }, { key: '11', label: '日语', code: 'JP' }, diff --git a/src/stores/CustomerServices.js b/src/stores/CustomerServices.js index 8ad1619..dba1f48 100644 --- a/src/stores/CustomerServices.js +++ b/src/stores/CustomerServices.js @@ -342,6 +342,16 @@ class CustomerServices { dataIndex: 'TotalCost' } ] + }, + { + title: '报价', + dataIndex: 'TotalPrice', + sorter: (a, b) => a.TotalPrice - b.TotalPrice, + children: [{ + title: total1.totalprice, + dataIndex: 'TotalPrice' + } + ] } ]; }); From 1283886075ae9a3f70527046d97269337d99ca44 Mon Sep 17 00:00:00 2001 From: YCC Date: Thu, 28 Sep 2023 14:58:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?tob=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libs/ht.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ht.js b/src/libs/ht.js index 6f9cc80..cbc3ae8 100644 --- a/src/libs/ht.js +++ b/src/libs/ht.js @@ -66,7 +66,7 @@ export const sites = [ { value: '28', key: '28', label: '客运中国', code: 'GHKYZG' }, { value: '7', key: '7', label: '客运海外', code: 'GHKYHW' }, { value: '172', key: '172', label: 'GHToB 海外', code: 'GHTOBHW' }, - { value:'176',key: '176', label: 'GHGH TO B 中国', code: 'GHTOBZG' }, + { 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: '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' }, From 2b036eab348308445c5565c446cf6704d1eab603 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 28 Sep 2023 15:14:11 +0800 Subject: [PATCH 3/4] revert: detail beta --- src/App.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 718dd76..6d61367 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -124,15 +124,15 @@ const App = () => { }, { key: 'kpi', label: 目标, icon: }, { key: 'distribution', label: 统计分布, icon: }, - { - key: 'detail', - label: ( - - 统计分析 - - ), - icon: , - }, + // { + // key: 'detail', + // label: ( + // + // 统计分析 + // + // ), + // icon: , + // }, ]; return ( From 8cbcdc911c6d39031f4445658061bf7a5f8207ed Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 28 Sep 2023 15:30:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?KPI=20=E8=AE=BE=E7=BD=AE=E5=9B=BD=E5=86=85?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/kpi/ObjectPanel.jsx | 2 +- src/components/search/SearchForm.jsx | 19 +++++++++++++++++++ src/libs/ht.js | 5 +++-- src/views/KPI.jsx | 18 ++++++++---------- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/components/kpi/ObjectPanel.jsx b/src/components/kpi/ObjectPanel.jsx index ba7ab01..1d83680 100644 --- a/src/components/kpi/ObjectPanel.jsx +++ b/src/components/kpi/ObjectPanel.jsx @@ -8,7 +8,7 @@ const searchFormItemSet = { 'bu': { shows: ['DateType', 'years', 'HTBusinessUnits'], sort }, '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 - 'destination': { shows: ['DateType', 'years', 'destination'], sort }, + 'destination': { shows: ['DateType', 'years', 'city'], sort }, // 'country', , 'globalCity' 'country': { shows: ['DateType', 'years', 'country'], sort }, }; diff --git a/src/components/search/SearchForm.jsx b/src/components/search/SearchForm.jsx index e8051c4..e6bac4f 100644 --- a/src/components/search/SearchForm.jsx +++ b/src/components/search/SearchForm.jsx @@ -142,6 +142,11 @@ export default observer((props) => { transform: (value) => value?.key || '', default: '', }, + 'city': { + key: 'city', + transform: (value) => value?.key || '', + default: '', + }, }; let dest = {}; const { applyDate, applyDate2, year, yearDiff, ...omittedValue } = values; @@ -327,6 +332,20 @@ function getFields(props) { ), + item( + 'city', + 99, + + + + ), + item( + 'globalCity', + 99, + + + + ), ]; baseChildren = baseChildren .map((x) => { diff --git a/src/libs/ht.js b/src/libs/ht.js index 4d44be7..75d70d0 100644 --- a/src/libs/ht.js +++ b/src/libs/ht.js @@ -136,8 +136,9 @@ export const KPIObjects = [ { key: 'dept', value: 'dept', label: '小组', data: leafGroup }, { key: 'du', value: 'du', label: '销售小组', data: deptUnits }, { key: 'operator', value: 'operator', label: '顾问' }, - { key: 'destination', value: 'destination', label: '目的地' }, - { key: 'country', value: 'country', label: '国籍' }, + { key: 'destination', value: 'destination', label: '目的地 城市' }, + // { key: 'destination', value: 'destination', label: '目的地 国籍' }, + { key: 'country', value: 'country', label: '客源 国籍' }, { key: 'guestgrouptype', value: 'guestgrouptype', diff --git a/src/views/KPI.jsx b/src/views/KPI.jsx index 7ab7e3d..294358e 100644 --- a/src/views/KPI.jsx +++ b/src/views/KPI.jsx @@ -2,7 +2,7 @@ import { useContext, useEffect, useState } from 'react'; import { stores_Context } from './../config'; import { observer } from 'mobx-react'; 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 ObjectPanel from '../components/kpi/ObjectPanel'; import OverviewPanel from './../components/kpi/OverviewPanel'; @@ -19,12 +19,12 @@ const objectComponents = { 'country': ObjectPanel, }; const objectFilterKey = { - 'bu': 'HTBusinessUnits', - 'dept': 'DepartmentList', + 'bu': ['HTBusinessUnits'], + 'dept': ['DepartmentList'], // 'du': 'du', // 'operator': 'operator', - // 'destination': 'destination', - 'country': 'country', + 'destination': ['city', ], + 'country': ['country'], }; export default observer((props) => { const { KPIStore, DictDataStore, date_picker_store: searchFormStore } = useContext(stores_Context); @@ -80,11 +80,9 @@ export default observer((props) => { // KPIStore.getList(getkpiParam).then((data) => { // // setDataSource(data); if (objectFilterKey?.[curObject]) { - const selectItem = searchFormStore.formValues[objectFilterKey[curObject]]; - if (selectItem) { - selectItem.value = selectItem.key; - } - setRetObjects(flush([selectItem])); + const selectItems = Object.values(pick(searchFormStore.formValues, objectFilterKey[curObject])); + const _selectItems = flush(selectItems).map((ele) => ({ ...ele, value: ele.key })); + setRetObjects(_selectItems); } // }); };