销售进度

feature/2.0-sales-trade
YCC 2 years ago
parent 8cbcdc911c
commit d96a6480b3

@ -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: <SnippetsTwoTone />,
children: [{ key: 51, label: <NavLink to="/sale">业绩数据</NavLink> }],
children: [{ key: 51, label: <NavLink to="/sale">业绩数据</NavLink> },{ key: 52, label: <NavLink to="/sale_kpi">销售进度</NavLink> }],
},
{
key: 3,
@ -199,6 +200,7 @@ const App = () => {
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'sale']} />}>
<Route path="/sale" element={<Sale />} />
<Route path="/sale_sub/:type_sub" element={<Sale_sub />} />
<Route path="/sale_kpi" element={<Sale_KPI />} />
</Route>
</Routes>
</Content>

@ -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',

@ -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 `<div>${title}</div>wwwwwww<div></div>`;
// // },
// // title: (title, datum) => {
// // return title; // + " " + comm.getWeek(datum.COLI_Date); //
// // },
// // },
// };
const column_config_create = (tab_name) => {
let average_value = 0; //线
let config_data = [];

@ -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 (
<div>
<Row gutter={16} style={{ margin: '-16px -8px' }}>
<Col md={24} lg={24} xxl={24}>
<SearchForm
defaultValue={{
initialValue: {
...formValues,
},
shows: ['DateType', 'DepartmentList', 'WebCode', 'IncludeTickets', 'years'],
fieldProps: {
DepartmentList: { show_all: true },
WebCode: { show_all: true },
years: { hide_vs: true },
},
}}
onSubmit={(_err, obj, form, str) => {
pageRefresh(obj);
}}
/>
</Col>
</Row>
<Row>
<Col className="gutter-row" md={24}></Col>
</Row>
</div>
);
};
export default observer(Sale_KPI);
Loading…
Cancel
Save