diff --git a/src/App.jsx b/src/App.jsx index 6d61367..56e29cf 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -31,6 +31,7 @@ import DestinationGroupList from './views/DestinationGroupList'; import Credit_card_bill from './views/Credit_card_bill'; import Sale from './views/Sale'; import Sale_sub from './views/Sale_sub'; +import Sale_KPI from './views/Sale_KPI'; import Logo from './logo.png'; import { stores_Context } from './config'; import { observer } from 'mobx-react'; @@ -66,7 +67,7 @@ const App = () => { key: 5, label: '销售', icon: , - children: [{ key: 51, label: 业绩数据 }], + children: [{ key: 51, label: 业绩数据 },{ key: 52, label: 销售进度 }], }, { key: 3, @@ -199,6 +200,7 @@ const App = () => { }> } /> } /> + } /> diff --git a/src/stores/SaleStore.js b/src/stores/SaleStore.js index 0ed662f..aac1586 100644 --- a/src/stores/SaleStore.js +++ b/src/stores/SaleStore.js @@ -158,6 +158,11 @@ class SaleStore { children: [{ title: json.result1.reduce((a, b) => a + b.COLI_OrderCount, 0), dataIndex: 'COLI_OrderCount' }], sorter: (a, b) => b.COLI_OrderCount - a.COLI_OrderCount, }, + { + title: '订单价值', + children: [{ title: '', dataIndex: 'ordervalue' }], + sorter: (a, b) => b.ordervalue - a.ordervalue, + }, { title: '单团毛利', children: [{ title: '', dataIndex: 'COLI_SingleML' }], @@ -168,9 +173,10 @@ class SaleStore { children: [{ title: '', dataIndex: 'COLI_Cycle' }], sorter: (a, b) => b.COLI_Cycle - a.COLI_Cycle, }, + ]; result.dataSource = json.result1; - } else if (this.active_tab_key === 'ResponseRateByWL') { + } else if (this.active_tab_key === 'ResponseRateByWL') { result.columns = [ { title: '', @@ -403,6 +409,11 @@ class SaleStore { dataIndex: 'COLI_OrderCount', sorter: (a, b) => b.COLI_OrderCount - a.COLI_OrderCount, }, + { + title: '订单价值', + dataIndex: 'ordervalue', + sorter: (a, b) => b.ordervalue - a.ordervalue, + }, { title: '单团毛利', dataIndex: 'COLI_SingleML', diff --git a/src/views/Sale.jsx b/src/views/Sale.jsx index 26e7b83..779c5a5 100644 --- a/src/views/Sale.jsx +++ b/src/views/Sale.jsx @@ -19,39 +19,6 @@ const Sale = () => { //const ml_data = sale_store.ml_data; // 毛利数据 const type_data = comm.empty(sale_store.type_data) ? { dataSource: [], columns: [] } : sale_store.type_data; // 毛利数据 - // const column_config = { - // data: type_data.dataSource, - // xField: 'OPI_Name', - // yField: 'COLI_ML2', - // //seriesField: "OPI_Name", - // label: { - // position: 'top', - // }, - // xAxis: { - // label: { - // autoHide: false, - // autoRotate: true, - // }, - // }, - // // legend: { - // // itemValue: { - // // formatter: (text, item) => { - // // const items = ml_data.filter(d => d.groups === item.value); // 按分组筛选 - // // return items.length ? items.reduce((a, b) => a + b.COLI_ML, 0) : ""; // 计算总数 - // // }, - // // }, - // // }, - // // tooltip: { - // // customContent: (title, items) => { - // // const data = items[0].data || {};console.log(data); - // // return `
${title}
wwwwwww
`; - // // }, - // // title: (title, datum) => { - // // return title; // + " " + comm.getWeek(datum.COLI_Date); // 显示周几 - // // }, - // // }, - // }; - const column_config_create = (tab_name) => { let average_value = 0; //平均线的值 let config_data = []; diff --git a/src/views/Sale_KPI.jsx b/src/views/Sale_KPI.jsx new file mode 100644 index 0000000..5584dbb --- /dev/null +++ b/src/views/Sale_KPI.jsx @@ -0,0 +1,49 @@ +import React, { useContext, useEffect } from 'react'; +import { Row, Col, Button, Tabs, Table, Divider, Radio, Select } from 'antd'; +import { ContainerOutlined, SearchOutlined, UserSwitchOutlined } from '@ant-design/icons'; +import { stores_Context } from '../config'; +import { observer } from 'mobx-react'; +import { NavLink, useParams } from 'react-router-dom'; +import * as comm from '../utils/commons'; +import * as config from '../config'; +import { utils, writeFileXLSX } from 'xlsx'; +import SearchForm from './../components/search/SearchForm'; + +const Sale_KPI = () => { + const { sale_store, date_picker_store: searchFormStore } = useContext(stores_Context); + const { formValues } = searchFormStore; + + const pageRefresh = (queryData) => { + const overviewFlag = queryData.DepartmentList.toLowerCase() === 'all' || queryData.DepartmentList.toLowerCase().includes(','); + queryData.groupType = overviewFlag ? 'overview' : 'dept'; + }; + return ( +
+ + + { + pageRefresh(obj); + }} + /> + + + + + + +
+ ); +}; +export default observer(Sale_KPI);