eslint autofix .

feature/2.0-sales-trade
lyt 2 years ago committed by lot
parent 0ec6966e75
commit 1ab0c7d0c7

@ -1,139 +1,203 @@
import "./App.css"; import './App.css';
import React, { useContext } from "react"; import React, { useContext } from 'react';
import { HomeOutlined, TeamOutlined, DashboardOutlined, FileProtectOutlined, CustomerServiceTwoTone, SnippetsTwoTone, DollarOutlined, AreaChartOutlined, WechatOutlined, UserOutlined } from "@ant-design/icons"; import {
import { Layout, Menu, Image, Spin } from "antd"; HomeOutlined,
import { BrowserRouter, Route, Routes, NavLink } from "react-router-dom"; TeamOutlined,
import Home from "./views/Home"; DashboardOutlined,
import Dashboard from "./views/Dashboard"; FileProtectOutlined,
import Orders from "./views/Orders"; CustomerServiceTwoTone,
import Orders_sub from "./views/Orders_sub"; SnippetsTwoTone,
import ProtectedRoute from "./views/ProtectedRoute"; DollarOutlined,
import Customer_care_inchina from "./charts/Customer_care_inchina"; AreaChartOutlined,
import Customer_care_potential from "./charts/Customer_care_potential"; WechatOutlined,
import Customer_care_regular from "./charts/Customer_care_regular"; UserOutlined,
import Wechat_session from "./charts/Wechat_session"; } from '@ant-design/icons';
import WhatsApp_session from "./charts/WhatsApp_session"; import { Layout, Menu, Image, Spin } from 'antd';
import AgentGroupCount from "./views/AgentGroupCount"; import { BrowserRouter, Route, Routes, NavLink } from 'react-router-dom';
import AgentGroupList from "./views/AgentGroupList"; import Home from './views/Home';
import DestinationGroupCount from "./views/DestinationGroupCount"; import Dashboard from './views/Dashboard';
import DestinationGroupList from "./views/DestinationGroupList"; import Orders from './views/Orders';
import Credit_card_bill from "./views/Credit_card_bill"; import Orders_sub from './views/Orders_sub';
import exchange_rate from "./charts/ExchangeRate"; import ProtectedRoute from './views/ProtectedRoute';
import Sale from "./views/Sale"; import Customer_care_inchina from './charts/Customer_care_inchina';
import Sale_sub from "./views/Sale_sub"; import Customer_care_potential from './charts/Customer_care_potential';
import Logo from "./logo.png"; import Customer_care_regular from './charts/Customer_care_regular';
import { stores_Context } from "./config"; import Wechat_session from './charts/Wechat_session';
import { observer } from "mobx-react"; import WhatsApp_session from './charts/WhatsApp_session';
import ExchangeRate from "./charts/ExchangeRate"; import AgentGroupCount from './views/AgentGroupCount';
import AgentGroupList from './views/AgentGroupList';
import DestinationGroupCount from './views/DestinationGroupCount';
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 Logo from './logo.png';
import { stores_Context } from './config';
import { observer } from 'mobx-react';
import ExchangeRate from './charts/ExchangeRate';
const App = () => { const App = () => {
const { Content, Footer, Sider } = Layout; const { Content, Footer, Sider } = Layout;
const { auth_store } = useContext(stores_Context); const { auth_store } = useContext(stores_Context);
const menu_items = [ const menu_items = [
{ key: 1, label: <NavLink to="/">主页</NavLink>, icon: <HomeOutlined /> }, { key: 1, label: <NavLink to="/">主页</NavLink>, icon: <HomeOutlined /> },
{ {
key: 2, key: 2,
label: "市场", label: '市场',
icon: <AreaChartOutlined />, icon: <AreaChartOutlined />,
children: [ children: [
{ key: 21, label: <NavLink to="/orders">订单数据</NavLink>, icon: <FileProtectOutlined /> }, {
{ key: 22, label: <NavLink to="/dashboard">仪表盘</NavLink>, icon: <DashboardOutlined /> }, key: 21,
], label: <NavLink to="/orders">订单数据</NavLink>,
}, icon: <FileProtectOutlined />,
{ },
key: 5, {
label: "销售", key: 22,
icon: <SnippetsTwoTone />, label: <NavLink to="/dashboard">仪表盘</NavLink>,
children: [{ key: 51, label: <NavLink to="/sale">业绩数据</NavLink> }], icon: <DashboardOutlined />,
}, },
{ ],
key: 3, },
label: "客运", {
icon: <WechatOutlined />, key: 5,
children: [ label: '销售',
{ key: 31, label: <NavLink to="/customer_care_potential">潜力客户</NavLink> }, icon: <SnippetsTwoTone />,
{ key: 32, label: <NavLink to="/customer_care_regular">老客户</NavLink> }, children: [{ key: 51, label: <NavLink to="/sale">业绩数据</NavLink> }],
{ key: 33, label: <NavLink to="/customer_care_inchina">在华客户</NavLink> }, },
{ key: 34, label: <NavLink to="/wechat_session">微信会话存档</NavLink> }, {
{ key: 35, label: <NavLink to="/whatsapp_session">WhatsApp会话存档</NavLink> }, key: 3,
], label: '客运',
}, icon: <WechatOutlined />,
{ children: [
key: 4, {
label: "财务", key: 31,
icon: <DollarOutlined />, label: <NavLink to="/customer_care_potential">潜力客户</NavLink>,
children: [ },
{ key: 41, label: <NavLink to="/credit_card_bill">信用卡账单</NavLink> }, {
{ key: 42, label: <NavLink to="/exchange_rate">汇率</NavLink> }, key: 32,
], label: <NavLink to="/customer_care_regular">老客户</NavLink>,
}, },
{ {
key: 6, key: 33,
label: "客服", label: <NavLink to="/customer_care_inchina">在华客户</NavLink>,
icon: <WechatOutlined />, },
children: [ {
{ key: 61, label: <NavLink to="/agent/group/count">地接社接团</NavLink> }, key: 34,
{ key: 62, label: <NavLink to="/destination/group/count">目的地接团</NavLink> }, label: <NavLink to="/wechat_session">微信会话存档</NavLink>,
], },
} {
]; key: 35,
label: <NavLink to="/whatsapp_session">WhatsApp会话存档</NavLink>,
},
],
},
{
key: 4,
label: '财务',
icon: <DollarOutlined />,
children: [
{
key: 41,
label: <NavLink to="/credit_card_bill">信用卡账单</NavLink>,
},
{ key: 42, label: <NavLink to="/exchange_rate">汇率</NavLink> },
],
},
{
key: 6,
label: '客服',
icon: <WechatOutlined />,
children: [
{
key: 61,
label: <NavLink to="/agent/group/count">地接社接团</NavLink>,
},
{
key: 62,
label: <NavLink to="/destination/group/count">目的地接团</NavLink>,
},
],
},
];
return ( return (
<BrowserRouter> <BrowserRouter>
<Layout <Layout
style={{ hasSider
minHeight: "100vh", style={{
}}> minHeight: '100vh',
<Sider collapsible={true} breakpoint="lg"> }}
<Image src={Logo} preview={false} /> >
<Menu theme="dark" defaultSelectedKeys={["1"]} defaultOpenKeys={["2", "5"]} mode="inline" items={menu_items} /> <Sider
</Sider> collapsible={true}
<Layout className="site-layout"> breakpoint="lg"
<Content style={{
style={{ overflow: 'auto',
padding: 16, height: '100vh',
minHeight: 480, position: 'sticky',
}}> left: 0,
<Routes> top: 0,
<Route path="/" element={<Home />} /> bottom: 0,
<Route element={<ProtectedRoute auth={["admin", "director_bu", "marketing"]} />}> }}
<Route path="/orders" element={<Orders />} /> >
<Route path="/orders_sub/:ordertype/:ordertype_sub/:ordertype_title" element={<Orders_sub />} /> <Image src={Logo} preview={false} />
<Route path="/dashboard" element={<Dashboard />} /> <Menu
</Route> theme="dark"
<Route element={<ProtectedRoute auth={["admin", "director_bu", "customer_care"]} />}> defaultSelectedKeys={['1']}
<Route path="/customer_care_inchina" element={<Customer_care_inchina />} /> defaultOpenKeys={['2', '5']}
<Route path="/customer_care_regular" element={<Customer_care_regular />} /> mode="inline"
<Route path="/customer_care_potential" element={<Customer_care_potential />} /> items={menu_items}
<Route path="/whatsapp_session" element={<WhatsApp_session />} /> />
<Route path="/wechat_session" element={<Wechat_session />} /> </Sider>
<Route path="/agent/group/count" element={<AgentGroupCount />} /> <Layout className="site-layout">
<Route path="/destination/group/count" element={<DestinationGroupCount />} /> <Content
<Route path="/agent/:agentId/group/list" element={<AgentGroupList />} /> style={{
<Route path="/destination/:destinationId/group/list" element={<DestinationGroupList />} /> padding: 16,
</Route> minHeight: 480,
<Route element={<ProtectedRoute auth={["admin", "director_bu", "financial"]} />}> }}
<Route path="/credit_card_bill" element={<Credit_card_bill />} /> >
<Route path="/exchange_rate" element={<ExchangeRate />} /> <Routes>
</Route> <Route path="/" element={<Home />} />
<Route element={<ProtectedRoute auth={["admin", "director_bu", "sale"]} />}> <Route element={<ProtectedRoute auth={['admin', 'director_bu', 'marketing']} />}>
<Route path="/sale" element={<Sale />} /> <Route path="/orders" element={<Orders />} />
<Route path="/sale_sub/:type_sub" element={<Sale_sub />} /> <Route path="/orders_sub/:ordertype/:ordertype_sub/:ordertype_title" element={<Orders_sub />} />
</Route> <Route path="/dashboard" element={<Dashboard />} />
</Routes> </Route>
</Content> <Route element={<ProtectedRoute auth={['admin', 'director_bu', 'customer_care']} />}>
<Footer <Route path="/customer_care_inchina" element={<Customer_care_inchina />} />
style={{ <Route path="/customer_care_regular" element={<Customer_care_regular />} />
textAlign: "center", <Route path="/customer_care_potential" element={<Customer_care_potential />} />
}}> <Route path="/whatsapp_session" element={<WhatsApp_session />} />
<UserOutlined /> {auth_store.user.name} ({auth_store.user.userid})<br /> <Route path="/wechat_session" element={<Wechat_session />} />
Hainatravel Dashboard ©2022 Created by IT <Route path="/agent/group/count" element={<AgentGroupCount />} />
</Footer> <Route path="/destination/group/count" element={<DestinationGroupCount />} />
</Layout> <Route path="/agent/:agentId/group/list" element={<AgentGroupList />} />
</Layout> <Route path="/destination/:destinationId/group/list" element={<DestinationGroupList />} />
</BrowserRouter> </Route>
); <Route element={<ProtectedRoute auth={['admin', 'director_bu', 'financial']} />}>
<Route path="/credit_card_bill" element={<Credit_card_bill />} />
<Route path="/exchange_rate" element={<ExchangeRate />} />
</Route>
<Route element={<ProtectedRoute auth={['admin', 'director_bu', 'sale']} />}>
<Route path="/sale" element={<Sale />} />
<Route path="/sale_sub/:type_sub" element={<Sale_sub />} />
</Route>
</Routes>
</Content>
<Footer
style={{
textAlign: 'center',
}}
>
<UserOutlined /> {auth_store.user.name} ({auth_store.user.userid})
<br />
Hainatravel Dashboard ©2022 Created by IT
</Footer>
</Layout>
</Layout>
</BrowserRouter>
);
}; };
export default observer(App); export default observer(App);

@ -1,74 +1,83 @@
import React, {Component} from 'react'; import React, { Component } from 'react';
import {Row, Col, Button, Tabs, Table, Space} from 'antd'; import { Row, Col, Button, Tabs, Table, Space } from 'antd';
import { import {
ContainerOutlined, CarryOutOutlined, ContainerOutlined,
SmileOutlined, TagsOutlined, GlobalOutlined, CarryOutOutlined,
SearchOutlined, SmileOutlined,
TagsOutlined,
GlobalOutlined,
SearchOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import {stores_Context} from '../config' import { stores_Context } from '../config';
import {Line} from "@ant-design/charts"; import { Line } from '@ant-design/charts';
import SiteSelect from "./SiteSelect"; import SiteSelect from './SiteSelect';
import {observer} from 'mobx-react'; import { observer } from 'mobx-react';
import DatePickerCharts from './DatePickerCharts' import DatePickerCharts from './DatePickerCharts';
class Orders extends Component { class Orders extends Component {
static contextType = stores_Context;
static contextType = stores_Context; constructor(props) {
super(props);
}
constructor(props) { // componentDidMount() {
super(props); // const {orders_store} = this.context;
} // orders_store.getOrderCount();
// orders_store.onChange_Tabs(orders_store.active_tab_key);
// }
// componentDidMount() { render() {
// const {orders_store} = this.context; const { dashboard_store } = this.context;
// orders_store.getOrderCount(); const orders_data = dashboard_store.orders_data;
// orders_store.onChange_Tabs(orders_store.active_tab_key); const line_config = {
// } data: orders_data.data,
padding: 'auto',
xField: 'ApplyDate',
yField: 'orderCount',
seriesField: 'WebCode',
xAxis: {
type: 'timeCat',
},
smooth: true,
legend: {
position: 'right-top',
title: {
text: '总合计 ' + orders_data.data.reduce((a, b) => a + b.orderCount, 0),
},
itemMarginBottom: 12, // 垂直间距
itemValue: {
formatter: (text, item) => {
const items = orders_data.data.filter((d) => d.WebCode === item.value); // 按站点筛选
return items.length ? items.reduce((a, b) => a + b.orderCount, 0) : ''; // 计算总数
},
},
},
};
render() { return (
const {dashboard_store} = this.context; <div>
const orders_data = dashboard_store.orders_data; <h2>全网站订单数统计</h2>
const line_config = { <div>
data: orders_data.data, <Space>
padding: 'auto', <DatePickerCharts hide_vs={true} />
xField: 'ApplyDate', <Button
yField: 'orderCount', type="primary"
seriesField: 'WebCode', icon={<SearchOutlined />}
xAxis: { loading={orders_data.loading}
type: 'timeCat', onClick={() => {
}, orders_data.getOrderCount_all();
smooth: true, }}
legend: { >
position: 'right-top', 统计
title: { </Button>
text: '总合计 ' + orders_data.data.reduce((a, b) => a + b.orderCount, 0), </Space>
}, </div>
itemMarginBottom: 12,//垂直间距 <br />
itemValue: { <Line {...line_config} />
formatter: (text, item) => { </div>
const items = orders_data.data.filter((d) => d.WebCode === item.value);//按站点筛选 );
return items.length ? items.reduce((a, b) => a + b.orderCount, 0) : '';//计算总数 }
},
},
},
}
return (
<div>
<h2>全网站订单数统计</h2>
<div>
<Space>
<DatePickerCharts hide_vs={true}/>
<Button type="primary" icon={<SearchOutlined/>} loading={orders_data.loading} onClick={() => {
orders_data.getOrderCount_all();
}}>统计</Button>
</Space>
</div>
<br/>
<Line {...line_config}/>
</div>
);
}
} }
export default observer(Orders); export default observer(Orders);

@ -2,41 +2,41 @@ import { makeAutoObservable, runInAction } from "mobx";
import * as dd from "dingtalk-jsapi"; import * as dd from "dingtalk-jsapi";
import * as config from "../config"; import * as config from "../config";
//权限管理 // 权限管理
class AuthStore { class AuthStore {
constructor(rootStore) { constructor(rootStore) {
this.rootStore = rootStore; this.rootStore = rootStore;
makeAutoObservable(this); makeAutoObservable(this);
if (process.env.NODE_ENV == "production") { if (process.env.NODE_ENV == "production") {
this.get_auth(); //放到钉钉环境才能开启 this.get_auth(); // 放到钉钉环境才能开启
} }
} }
auth = ["admin"]; //开发时候用,正式环境留空 auth = ["admin"]; // 开发时候用,正式环境留空
user = { name: "loading", userid: "..." }; //开发时候用,正式环境留空 user = { name: "loading", userid: "..." }; // 开发时候用,正式环境留空
has_permission(requireds) { has_permission(requireds) {
if (Object.keys(requireds).length == 0) { if (Object.keys(requireds).length == 0) {
return true; return true;
} }
let has_permission = requireds.filter(item => this.auth.includes(item)); const has_permission = requireds.filter(item => this.auth.includes(item));
if (Object.keys(has_permission).length !== 0) { if (Object.keys(has_permission).length !== 0) {
return true; return true;
} }
return false; return false;
} }
//请求权限 // 请求权限
get_auth() { get_auth() {
let _this = this; const _this = this;
const CORPID = "ding48bce8fd3957c96b"; //企业的id const CORPID = "ding48bce8fd3957c96b"; // 企业的id
dd.runtime.permission.requestAuthCode({ dd.runtime.permission.requestAuthCode({
corpId: CORPID, corpId: CORPID,
onSuccess: function (res) { onSuccess: function (res) {
console.log(res); console.log(res);
let code = res.code; const code = res.code;
let url = "/dingtalk/dingtalkwork/Getusers_auth?code=" + code; const url = "/dingtalk/dingtalkwork/Getusers_auth?code=" + code;
//请求获取HT接口获取用户权限和用户信息 // 请求获取HT接口获取用户权限和用户信息
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then(response => response.json()) .then(response => response.json())
.then(json => { .then(json => {

@ -3,7 +3,7 @@ import * as dd from 'dingtalk-jsapi';
import * as config from "../config"; import * as config from "../config";
//会话管理 // 会话管理
class ChatSessionStore { class ChatSessionStore {
constructor(rootStore) { constructor(rootStore) {
@ -12,36 +12,36 @@ class ChatSessionStore {
} }
wechat_data = { wechat_data = {
counselors: [],//顾问列表 counselors: [],// 顾问列表
customers: [],//客户列表 customers: [],// 客户列表
} };
//请求权限 // 请求权限
get_auth() { get_auth() {
let _this = this; const _this = this;
const CORPID = 'ding48bce8fd3957c96b';//企业的id const CORPID = 'ding48bce8fd3957c96b';// 企业的id
dd.runtime.permission.requestAuthCode({ dd.runtime.permission.requestAuthCode({
corpId: CORPID, corpId: CORPID,
onSuccess: function (res) { onSuccess: function (res) {
console.log(res); console.log(res);
let code = res.code; const code = res.code;
let url = '/dingtalk/dingtalkwork/Getusers_auth?code=' + code; const url = '/dingtalk/dingtalkwork/Getusers_auth?code=' + code;
//请求获取HT接口获取用户权限和用户信息 // 请求获取HT接口获取用户权限和用户信息
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then((response) => response.json()) .then((response) => response.json())
.then((json) => { .then((json) => {
runInAction(() => { runInAction(() => {
_this.user = json.result; _this.user = json.result;
_this.auth = json.result.authlist; _this.auth = json.result.authlist;
}) });
}) })
.catch((error) => { .catch((error) => {
console.log('fetch data failed', error); console.log('fetch data failed', error);
}); });
}, },
onFail: function (err) { onFail: function (err) {
console.log(err) console.log(err);
} }
}); });
} }

@ -1,4 +1,4 @@
import {makeAutoObservable, runInAction} from "mobx" import {makeAutoObservable, runInAction} from "mobx";
import moment from "moment"; import moment from "moment";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
import * as config from "../config"; import * as config from "../config";
@ -512,7 +512,7 @@ class CustomerServices {
if (record.EOI_ObjSN === -1) { if (record.EOI_ObjSN === -1) {
return text; return text;
} else { } else {
return <a>{text}</a> return <a>{text}</a>;
} }
} }
}, },

@ -14,7 +14,7 @@ class CustomerStore {
potential_customer_order(get_detail = false) { potential_customer_order(get_detail = false) {
this.potential_data.loading = true; this.potential_data.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-tourdesign/PotentialCusOrder' let url = '/service-tourdesign/PotentialCusOrder';
url += '?Website=' + this.potential_data.webcode + '&DEI_SNList=' + this.potential_data.groups.toString(); url += '?Website=' + this.potential_data.webcode + '&DEI_SNList=' + this.potential_data.groups.toString();
if (this.potential_data.date_type == 'applyDate') { if (this.potential_data.date_type == 'applyDate') {
url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0'; url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0';
@ -27,9 +27,9 @@ class CustomerStore {
url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
url += '&ConfirmdateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ConfirmdateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&ConfirmdateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ConfirmdateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
if (get_detail) { if (get_detail) {
url += '&IsDetail=1' url += '&IsDetail=1';
} else { } else {
url += '&IsDetail=0' url += '&IsDetail=0';
} }
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then((response) => response.json()) .then((response) => response.json())
@ -41,7 +41,7 @@ class CustomerStore {
this.potential_data.data = json; this.potential_data.data = json;
} }
this.potential_data.loading = false; this.potential_data.loading = false;
}) });
}) })
.catch((error) => { .catch((error) => {
this.potential_data.loading = false; this.potential_data.loading = false;
@ -70,8 +70,8 @@ class CustomerStore {
data: [], data: [],
data_detail: [], data_detail: [],
webcode: 'GHKYZG', webcode: 'GHKYZG',
site_select_mode: false,//站点是否多选 site_select_mode: false,// 站点是否多选
group_select_mode: 'multiple',//是否多选分组 group_select_mode: 'multiple',// 是否多选分组
groups: ['1', '2', '7'], groups: ['1', '2', '7'],
date_type: 'applyDate', date_type: 'applyDate',
group_handleChange: this.handleChange_group_select.bind(this), group_handleChange: this.handleChange_group_select.bind(this),
@ -79,7 +79,7 @@ class CustomerStore {
potential_customer_order: this.potential_customer_order.bind(this), potential_customer_order: this.potential_customer_order.bind(this),
onChange_show_detail_table: this.onChange_show_detail_table.bind(this), onChange_show_detail_table: this.onChange_show_detail_table.bind(this),
handleChange_webcode: this.handleChange_webcode.bind(this), handleChange_webcode: this.handleChange_webcode.bind(this),
} };
// 潜力客户 end // 潜力客户 end
@ -87,7 +87,7 @@ class CustomerStore {
regular_customer_order(get_detail = false) { regular_customer_order(get_detail = false) {
this.regular_data.loading = true; this.regular_data.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-tourdesign/RegularCusOrder' let url = '/service-tourdesign/RegularCusOrder';
url += '?Website=' + this.regular_data.webcode + '&DEI_SNList=' + this.regular_data.groups.toString(); url += '?Website=' + this.regular_data.webcode + '&DEI_SNList=' + this.regular_data.groups.toString();
if (this.regular_data.date_type == 'applyDate') { if (this.regular_data.date_type == 'applyDate') {
url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0'; url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0';
@ -100,9 +100,9 @@ class CustomerStore {
url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
url += '&ConfirmdateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ConfirmdateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&ConfirmdateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ConfirmdateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
if (get_detail) { if (get_detail) {
url += '&IsDetail=1' url += '&IsDetail=1';
} else { } else {
url += '&IsDetail=0' url += '&IsDetail=0';
} }
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then((response) => response.json()) .then((response) => response.json())
@ -114,7 +114,7 @@ class CustomerStore {
this.regular_data.data = json; this.regular_data.data = json;
} }
this.regular_data.loading = false; this.regular_data.loading = false;
}) });
}) })
.catch((error) => { .catch((error) => {
this.regular_data.loading = false; this.regular_data.loading = false;
@ -143,8 +143,8 @@ class CustomerStore {
data: [], data: [],
data_detail: [], data_detail: [],
webcode: 'ALL', webcode: 'ALL',
site_select_mode: false,//站点是否多选 site_select_mode: false,// 站点是否多选
group_select_mode: 'multiple',//是否多选分组 group_select_mode: 'multiple',// 是否多选分组
groups: ['1', '2', '28', '7'], groups: ['1', '2', '28', '7'],
date_type: 'applyDate', date_type: 'applyDate',
group_handleChange: this.handleChange_group_select_regular.bind(this), group_handleChange: this.handleChange_group_select_regular.bind(this),
@ -152,7 +152,7 @@ class CustomerStore {
regular_customer_order: this.regular_customer_order.bind(this), regular_customer_order: this.regular_customer_order.bind(this),
onChange_show_detail_table: this.onChange_show_detail_table_regular.bind(this), onChange_show_detail_table: this.onChange_show_detail_table_regular.bind(this),
handleChange_webcode: this.handleChange_webcode_regular.bind(this), handleChange_webcode: this.handleChange_webcode_regular.bind(this),
} };
// 老客户 end // 老客户 end
@ -160,7 +160,7 @@ class CustomerStore {
inchina_customer_order(get_detail = false) { inchina_customer_order(get_detail = false) {
this.inchina_data.loading = true; this.inchina_data.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-tourdesign/RegularCusInChinaOrder' let url = '/service-tourdesign/RegularCusInChinaOrder';
url += '?Website=' + this.inchina_data.webcode + '&DEI_SNList=' + this.inchina_data.groups.toString(); url += '?Website=' + this.inchina_data.webcode + '&DEI_SNList=' + this.inchina_data.groups.toString();
if (this.inchina_data.date_type == 'applyDate') { if (this.inchina_data.date_type == 'applyDate') {
url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0'; url += '&ApplydateCheck=1&EntrancedateCheck=0&ConfirmDateCheck=0';
@ -170,9 +170,9 @@ class CustomerStore {
url += '&ApplydateCheck=0&EntrancedateCheck=1&ConfirmDateCheck=0'; url += '&ApplydateCheck=0&EntrancedateCheck=1&ConfirmDateCheck=0';
} }
if (get_detail) { if (get_detail) {
url += '&IsDetail=1' url += '&IsDetail=1';
} else { } else {
url += '&IsDetail=0' url += '&IsDetail=0';
} }
url += '&ApplydateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ApplydateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&ApplydateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&ApplydateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59'; url += '&EntrancedateStart=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&EntrancedateEnd=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
@ -187,7 +187,7 @@ class CustomerStore {
this.inchina_data.data = json; this.inchina_data.data = json;
} }
this.inchina_data.loading = false; this.inchina_data.loading = false;
}) });
}) })
.catch((error) => { .catch((error) => {
this.inchina_data.loading = false; this.inchina_data.loading = false;
@ -216,8 +216,8 @@ class CustomerStore {
data: [], data: [],
data_detail: [], data_detail: [],
webcode: 'ALL', webcode: 'ALL',
site_select_mode: false,//站点是否多选 site_select_mode: false,// 站点是否多选
group_select_mode: 'multiple',//是否多选分组 group_select_mode: 'multiple',// 是否多选分组
groups: ['1', '2', '28', '7'], groups: ['1', '2', '28', '7'],
date_type: 'applyDate', date_type: 'applyDate',
group_handleChange: this.handleChange_group_select_inchina.bind(this), group_handleChange: this.handleChange_group_select_inchina.bind(this),
@ -225,7 +225,7 @@ class CustomerStore {
inchina_customer_order: this.inchina_customer_order.bind(this), inchina_customer_order: this.inchina_customer_order.bind(this),
onChange_show_detail_table: this.onChange_show_detail_table_inchina.bind(this), onChange_show_detail_table: this.onChange_show_detail_table_inchina.bind(this),
handleChange_webcode: this.handleChange_webcode_inchina.bind(this), handleChange_webcode: this.handleChange_webcode_inchina.bind(this),
} };
// 在华客人 end // 在华客人 end
} }

@ -8,10 +8,10 @@ class DashboardStore {
} }
loading = false; loading = false;
site_select_mode = "multiple"; //是否多选站点 site_select_mode = "multiple"; // 是否多选站点
webcode = ["CHT", "AH", "GH"]; webcode = ["CHT", "AH", "GH"];
//订单统计 begin // 订单统计 begin
orders_data = { orders_data = {
loading: false, loading: false,
data: [], data: [],
@ -19,7 +19,7 @@ class DashboardStore {
}; };
getOrderCount_all() { getOrderCount_all() {
//统计所有站点订单数量 // 统计所有站点订单数量
this.orders_data.loading = true; this.orders_data.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = "/service-web/QueryData/GetOrderCount"; let url = "/service-web/QueryData/GetOrderCount";
@ -39,7 +39,7 @@ class DashboardStore {
}); });
} }
//订单统计 end // 订单统计 end
// 临时订单 begin // 临时订单 begin
@ -131,7 +131,7 @@ class DashboardStore {
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then(response => response.json()) .then(response => response.json())
.then(json => { .then(json => {
let table_data = []; const table_data = [];
json && json &&
json.map((item, index) => { json.map((item, index) => {
table_data.push({ table_data.push({
@ -156,7 +156,7 @@ class DashboardStore {
mobile_data = { mobile_data = {
loading: false, loading: false,
data: [], data: [],
group_select_mode: "multiple", //是否多选分组 group_select_mode: "multiple", // 是否多选分组
groups: ["1", "2", "28", "7", "8", "9", "11", "12", "20", "21", "18"], groups: ["1", "2", "28", "7", "8", "9", "11", "12", "20", "21", "18"],
columns: [ columns: [
{ {

@ -1,4 +1,4 @@
import {makeAutoObservable} from "mobx" import {makeAutoObservable} from "mobx";
import moment from "moment"; import moment from "moment";
class DatePickerStore { class DatePickerStore {
@ -16,7 +16,7 @@ class DatePickerStore {
onChange_dataPicker = (dates) => { onChange_dataPicker = (dates) => {
this.start_date = dates[0]; this.start_date = dates[0];
this.end_date = dates[1]; this.end_date = dates[1];
} };
onChange_dataPicker_cp = (dates) => { onChange_dataPicker_cp = (dates) => {
if (dates) { if (dates) {
@ -26,14 +26,14 @@ class DatePickerStore {
this.start_date_cp = false; this.start_date_cp = false;
this.end_date_cp = false; this.end_date_cp = false;
} }
} };
//计算上一个时间段 // 计算上一个时间段
previous_date() { previous_date() {
return [moment(this.start_date).subtract(this.end_date.diff(this.start_date, 'days') + 1, 'days'), moment(this.start_date).subtract(1, 'days')]; return [moment(this.start_date).subtract(this.end_date.diff(this.start_date, 'days') + 1, 'days'), moment(this.start_date).subtract(1, 'days')];
} }
//去年同期 // 去年同期
previous_year() { previous_year() {
return [moment(this.start_date).subtract(1, 'year'), moment(this.end_date).subtract(1, 'year')]; return [moment(this.start_date).subtract(1, 'year'), moment(this.end_date).subtract(1, 'year')];
} }

@ -1,10 +1,10 @@
import {makeAutoObservable, runInAction} from "mobx"; import {makeAutoObservable, runInAction} from "mobx";
import * as dd from 'dingtalk-jsapi'; import * as dd from 'dingtalk-jsapi';
import * as config from "../config"; import * as config from "../config";
import * as comm from '../utils/commons' import * as comm from '../utils/commons';
//财务管理 // 财务管理
class FinancialStore { class FinancialStore {
constructor(rootStore) { constructor(rootStore) {
@ -18,7 +18,7 @@ class FinancialStore {
bill_type_mode: false, bill_type_mode: false,
bill_types: ['ALL'], bill_types: ['ALL'],
bt_handleChange: this.bt_handleChange.bind(this), bt_handleChange: this.bt_handleChange.bind(this),
} };
bt_handleChange(value) { bt_handleChange(value) {
this.bill_type_data.bill_types = value; this.bill_type_data.bill_types = value;
@ -26,13 +26,13 @@ class FinancialStore {
get_bill_types() { get_bill_types() {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-web/QueryData/GetCreditCardBillType'; const url = '/service-web/QueryData/GetCreditCardBillType';
fetch(config.HT_HOST + url) fetch(config.HT_HOST + url)
.then((response) => response.json()) .then((response) => response.json())
.then((json) => { .then((json) => {
runInAction(() => { runInAction(() => {
this.bill_type_data.data = json.billtype; this.bill_type_data.data = json.billtype;
}) });
}) })
.catch((error) => { .catch((error) => {
console.log('fetch data failed', error); console.log('fetch data failed', error);
@ -54,7 +54,7 @@ class FinancialStore {
} }
set_table_handleChange = (pagination, filters, sorter) => { set_table_handleChange = (pagination, filters, sorter) => {
let filters_arr = Object.values(filters); const filters_arr = Object.values(filters);
if (!comm.empty(filters_arr)) { if (!comm.empty(filters_arr)) {
this.set_bill_filtered(filters_arr[0]); this.set_bill_filtered(filters_arr[0]);
} }
@ -69,7 +69,7 @@ class FinancialStore {
business_units: ['ALL'], business_units: ['ALL'],
group_select_mode: false, group_select_mode: false,
groups: ['ALL'], groups: ['ALL'],
filteredValue: [],//默认的筛选值 filteredValue: [],// 默认的筛选值
bu_handleChange: this.bu_handleChange.bind(this), bu_handleChange: this.bu_handleChange.bind(this),
group_handleChange: this.group_handleChange.bind(this), group_handleChange: this.group_handleChange.bind(this),
set_bill_filtered: this.set_bill_filtered.bind(this), set_bill_filtered: this.set_bill_filtered.bind(this),
@ -85,7 +85,7 @@ class FinancialStore {
this.credit_card_data.groups = value; this.credit_card_data.groups = value;
}; };
//请求信用卡账单 // 请求信用卡账单
get_credit_card_bills() { get_credit_card_bills() {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-web/QueryData/GetCreditCardBills'; let url = '/service-web/QueryData/GetCreditCardBills';
@ -99,14 +99,14 @@ class FinancialStore {
.then((json) => { .then((json) => {
runInAction(() => { runInAction(() => {
this.credit_card_data.data = json; this.credit_card_data.data = json;
}) });
}) })
.catch((error) => { .catch((error) => {
console.log('fetch data failed', error); console.log('fetch data failed', error);
}); });
} }
//请求信用卡账单 // 请求信用卡账单
get_credit_card_bills_by_type() { get_credit_card_bills_by_type() {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = '/service-web/QueryData/GetCreditCardBillsByType'; let url = '/service-web/QueryData/GetCreditCardBillsByType';
@ -120,7 +120,7 @@ class FinancialStore {
.then((json) => { .then((json) => {
runInAction(() => { runInAction(() => {
this.credit_card_data.data_by_type = json; this.credit_card_data.data_by_type = json;
}) });
}) })
.catch((error) => { .catch((error) => {
console.log('fetch data failed', error); console.log('fetch data failed', error);

@ -1,4 +1,4 @@
import {makeAutoObservable} from "mobx" import {makeAutoObservable} from "mobx";
import OrdersStore from "./OrdersStore"; import OrdersStore from "./OrdersStore";
import DashboardStore from "./DashboardStore"; import DashboardStore from "./DashboardStore";
import DatePickerStore from "./DatePickerStore"; import DatePickerStore from "./DatePickerStore";

@ -13,62 +13,63 @@ class OrdersStore {
} }
loading = false; loading = false;
site_select_mode = false; //是否多选站点 site_select_mode = false; // 是否多选站点
group_select_mode = false; group_select_mode = false;
groups = ["1,2,28,7,33"]; groups = ["1,2,28,7,33"];
webcode = "ALL"; webcode = "ALL";
date_type = "applyDate"; date_type = "applyDate";
include_tickets = "1"; //是否包含门票1是含有0不含 include_tickets = "1"; // 是否包含门票1是含有0不含
//diff_count_day = 0; //开始日期和结束日期的间隔,用于计算平均数 // diff_count_day = 0; //开始日期和结束日期的间隔,用于计算平均数
active_tab_key = "Form"; //当前切换的标签页 active_tab_key = "Form"; // 当前切换的标签页
active_tab_key_sub = "detail"; //当前切换的子维度标签页 active_tab_key_sub = "detail"; // 当前切换的子维度标签页
orderCountData = []; //订单统计数据源 orderCountData = []; // 订单统计数据源
orderCountData_type = []; //子维度订单统计 orderCountData_type = []; // 子维度订单统计
orderCountData_Form = []; //表单类型统计数据源 orderCountData_Form = []; // 表单类型统计数据源
orderCountData_Form_sub = []; //子维度类型统计 orderCountData_Form_sub = []; // 子维度类型统计
diff_days1 = 0; //日期相差天数,用于计算日平均值 diff_days1 = 0; // 日期相差天数,用于计算日平均值
diff_days2 = 0; //日期相差天数,比较数据时使用 diff_days2 = 0; // 日期相差天数,比较数据时使用
//选择事业部 // 选择事业部
group_handleChange(value) { group_handleChange(value) {
this.groups = value; this.groups = value;
} }
//计算两个时间段的有多少天 // 计算两个时间段的有多少天
get diff_count_day() { get diff_count_day() {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let _start_date = moment(date_picker_store.start_date.format(config.DATE_FORMAT)); const _start_date = moment(date_picker_store.start_date.format(config.DATE_FORMAT));
let _end_date = moment(date_picker_store.end_date.format(config.DATE_FORMAT)); const _end_date = moment(date_picker_store.end_date.format(config.DATE_FORMAT));
return _end_date.diff(_start_date, "days") + 1; return _end_date.diff(_start_date, "days") + 1;
} }
//下单日期、确认日期、出发日期 // 下单日期、确认日期、出发日期
onChange_datetype(value) { onChange_datetype(value) {
this.date_type = value; this.date_type = value;
} }
//选择来源网站 // 选择来源网站
handleChange_webcode = value => { handleChange_webcode = value => {
this.webcode = value; this.webcode = value;
}; };
//是否包含门票
// 是否包含门票
handleChange_include_tickets = value => { handleChange_include_tickets = value => {
this.include_tickets = value; this.include_tickets = value;
}; };
//切换标签页 // 切换标签页
onChange_Tabs_sub(ordertype, ordertype_sub, active_key) { onChange_Tabs_sub(ordertype, ordertype_sub, active_key) {
this.active_tab_key_sub = active_key; this.active_tab_key_sub = active_key;
this.getOrderCountByType_sub(ordertype, ordertype_sub, this.active_tab_key_sub); this.getOrderCountByType_sub(ordertype, ordertype_sub, this.active_tab_key_sub);
} }
//格式化一下数据 // 格式化一下数据
//映射时间做时间段对比的时候需要把对比时间段映射到开始时间上才能在同一个x轴显示 // 映射时间做时间段对比的时候需要把对比时间段映射到开始时间上才能在同一个x轴显示
//比如2022-10-01~2022-10-30 vs 2021-10-01~2021-10-30 则需要在2021年的时间段加365天的时间映射成2022起始时间段 // 比如2022-10-01~2022-10-30 vs 2021-10-01~2021-10-30 则需要在2021年的时间段加365天的时间映射成2022起始时间段
//相差的天数用a.diff(b, 'days')计算 // 相差的天数用a.diff(b, 'days')计算
format_data_source(data_source, start_date, end_date) { format_data_source(data_source, start_date, end_date) {
let result = []; const result = [];
for (let item of data_source.ordercount1) { for (const item of data_source.ordercount1) {
if (result[item.ApplyDate]) { if (result[item.ApplyDate]) {
result[item.ApplyDate].yField += item.orderCount; result[item.ApplyDate].yField += item.orderCount;
} else { } else {
@ -80,13 +81,13 @@ class OrdersStore {
} }
} }
if (data_source.ordercount2 && end_date) { if (data_source.ordercount2 && end_date) {
//不能直接用diff计算因为日期是含有时间的会导致计算差一天先转成格式化的日期再比较 // 不能直接用diff计算因为日期是含有时间的会导致计算差一天先转成格式化的日期再比较
let _start_date = moment(start_date.format(config.DATE_FORMAT)); const _start_date = moment(start_date.format(config.DATE_FORMAT));
let _end_date = moment(end_date.format(config.DATE_FORMAT)); const _end_date = moment(end_date.format(config.DATE_FORMAT));
let diff_days = _start_date.diff(_end_date, "days"); const diff_days = _start_date.diff(_end_date, "days");
for (let item of data_source.ordercount2) { for (const item of data_source.ordercount2) {
let ApplyDate = moment(item.ApplyDate).add(diff_days, "days").format(config.DATE_FORMAT); const ApplyDate = moment(item.ApplyDate).add(diff_days, "days").format(config.DATE_FORMAT);
let ApplyDate_key = ApplyDate + "_";//这个作为key const ApplyDate_key = ApplyDate + "_";// 这个作为key
if (result[ApplyDate_key]) { if (result[ApplyDate_key]) {
result[ApplyDate_key].yField += item.orderCount; result[ApplyDate_key].yField += item.orderCount;
} else { } else {
@ -101,7 +102,7 @@ class OrdersStore {
return comm.set_array_index(result); return comm.set_array_index(result);
} }
//网站订单数量,根据类型 // 网站订单数量,根据类型
getOrderCount_type(ordertype, ordertype_sub) { getOrderCount_type(ordertype, ordertype_sub) {
this.loading = true; this.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
@ -126,11 +127,11 @@ class OrdersStore {
}); });
} }
//网站订单数量 // 网站订单数量
getOrderCount() { getOrderCount() {
this.loading = true; this.loading = true;
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = "/service-web/QueryData/GetOrderCount"; //?WebCode=cht&COLI_ApplyDate1=2022-08-01&COLI_ApplyDate2=2022-08-31&COLI_ApplyDateold1=2021-08-01&COLI_ApplyDateold2=2021-08-31'; let url = "/service-web/QueryData/GetOrderCount"; // ?WebCode=cht&COLI_ApplyDate1=2022-08-01&COLI_ApplyDate2=2022-08-31&COLI_ApplyDateold1=2021-08-01&COLI_ApplyDateold2=2021-08-31';
url += "?WebCode=" + this.webcode + "&IncludeTickets=" + this.include_tickets; url += "?WebCode=" + this.webcode + "&IncludeTickets=" + this.include_tickets;
url += "&COLI_ApplyDate1=" + date_picker_store.start_date.format(config.DATE_FORMAT) + "&COLI_ApplyDate2=" + date_picker_store.end_date.format(config.DATE_FORMAT) + "%2023:59:59"; url += "&COLI_ApplyDate1=" + date_picker_store.start_date.format(config.DATE_FORMAT) + "&COLI_ApplyDate2=" + date_picker_store.end_date.format(config.DATE_FORMAT) + "%2023:59:59";
url += `&DepartmentList=${this.groups.toString()}&DateType=${this.date_type}`; url += `&DepartmentList=${this.groups.toString()}&DateType=${this.date_type}`;
@ -151,7 +152,7 @@ class OrdersStore {
}); });
} }
//网站订单类型 // 网站订单类型
getOrderCountByType(order_type) { getOrderCountByType(order_type) {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = "/service-web/QueryData/GetOrderCountByType"; let url = "/service-web/QueryData/GetOrderCountByType";
@ -165,7 +166,7 @@ class OrdersStore {
.then(response => response.json()) .then(response => response.json())
.then(json => { .then(json => {
runInAction(() => { runInAction(() => {
//错误:[MOBX]由于启用了严格模式所以不允许改变观察到的在动作之外的值。如果此更改是有意的请将代码包在“Actudio”中。 // 错误:[MOBX]由于启用了严格模式所以不允许改变观察到的在动作之外的值。如果此更改是有意的请将代码包在“Actudio”中。
this.orderCountData_Form = json; this.orderCountData_Form = json;
}); });
}) })
@ -174,12 +175,12 @@ class OrdersStore {
}); });
} }
//子维度查询 // 子维度查询
getOrderCountByType_sub(ordertype, ordertype_sub, sub_type) { getOrderCountByType_sub(ordertype, ordertype_sub, sub_type) {
const date_picker_store = this.rootStore.date_picker_store; const date_picker_store = this.rootStore.date_picker_store;
let url = "/service-web/QueryData/GetOrderCountByType_Sub"; let url = "/service-web/QueryData/GetOrderCountByType_Sub";
if (sub_type == "page_cxstate1") { if (sub_type == "page_cxstate1") {
//统计成行订单的路径 // 统计成行订单的路径
sub_type = "page&cxstate=1"; sub_type = "page&cxstate=1";
} }
url += `?WebCode=${this.webcode}&OrderType=${ordertype}&OrderType_val=${ordertype_sub}&SubOrderType=${sub_type}` + "&IncludeTickets=" + this.include_tickets; url += `?WebCode=${this.webcode}&OrderType=${ordertype}&OrderType_val=${ordertype_sub}&SubOrderType=${sub_type}` + "&IncludeTickets=" + this.include_tickets;
@ -192,7 +193,7 @@ class OrdersStore {
.then(response => response.json()) .then(response => response.json())
.then(json => { .then(json => {
runInAction(() => { runInAction(() => {
//错误:[MOBX]由于启用了严格模式所以不允许改变观察到的在动作之外的值。如果此更改是有意的请将代码包在“Actudio”中。 // 错误:[MOBX]由于启用了严格模式所以不允许改变观察到的在动作之外的值。如果此更改是有意的请将代码包在“Actudio”中。
this.orderCountData_Form_sub = json; this.orderCountData_Form_sub = json;
}); });
}) })
@ -201,7 +202,7 @@ class OrdersStore {
}); });
} }
//切换标签页 // 切换标签页
onChange_Tabs(active_key) { onChange_Tabs(active_key) {
this.active_tab_key = active_key; this.active_tab_key = active_key;
this.getOrderCountByType(this.active_tab_key); this.getOrderCountByType(this.active_tab_key);

@ -4,7 +4,7 @@ import * as config from "../config";
import * as comm from "../utils/commons"; import * as comm from "../utils/commons";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
//销售数据 // 销售数据
class SaleStore { class SaleStore {
constructor(rootStore) { constructor(rootStore) {
this.rootStore = rootStore; this.rootStore = rootStore;
@ -13,55 +13,57 @@ class SaleStore {
loading = false; loading = false;
loading_table = false; loading_table = false;
spinning = false; //加载状态 spinning = false; // 加载状态
active_tab_key = "All"; //当前选择的标签 active_tab_key = "All"; // 当前选择的标签
group_select_mode = false; group_select_mode = false;
groups = ["1,2,28,7,33"]; //默认GH事业部 groups = ["1,2,28,7,33"]; // 默认GH事业部
filter_country=[];//筛选国籍 filter_country=[];// 筛选国籍
filter_guest_type=[];//筛选客户关系 filter_guest_type=[];// 筛选客户关系
site_select_mode = false; //是否多选站点 site_select_mode = false; // 是否多选站点
include_tickets = "1"; //是否包含门票1是含有0不含 include_tickets = "1"; // 是否包含门票1是含有0不含
webcode = "ALL"; webcode = "ALL";
date_type = "ConfirmDate"; date_type = "ConfirmDate";
ml_data = []; //毛利数据 ml_data = []; // 毛利数据
type_data = []; //类型的数据 type_data = []; // 类型的数据
type_data_sub = []; //类型的子维度数据 type_data_sub = []; // 类型的子维度数据
date_title = "date_title"; //日期段,只用于显示,防止日期选择控件的变化导致页面刷新 date_title = "date_title"; // 日期段,只用于显示,防止日期选择控件的变化导致页面刷新
//是否包含门票 // 是否包含门票
handleChange_include_tickets = value => { handleChange_include_tickets = value => {
this.include_tickets = value; this.include_tickets = value;
}; };
//选择事业部 // 选择事业部
group_handleChange(value) { group_handleChange(value) {
this.groups = value; this.groups = value;
} }
//选择站点
// 选择站点
handleChange_webcode = value => { handleChange_webcode = value => {
this.webcode = value; this.webcode = value;
}; };
//切换标签页 // 切换标签页
onChange_Tabs(active_key) { onChange_Tabs(active_key) {
this.active_tab_key = active_key; this.active_tab_key = active_key;
} }
//下单日期或者出发日期 // 下单日期或者出发日期
onChange_datetype(value) { onChange_datetype(value) {
this.date_type = value; this.date_type = value;
} }
//选择客源国 // 选择客源国
onChange_Country(value) { onChange_Country(value) {
this.filter_country = value; this.filter_country = value;
} }
//选择成员关系
// 选择成员关系
onChange_GuestGroupType(value) { onChange_GuestGroupType(value) {
this.filter_guest_type = value; this.filter_guest_type = value;
} }
//获取业绩信息 // 获取业绩信息
get_department_order_ml(date_moment) { get_department_order_ml(date_moment) {
let result = []; let result = [];
const date1_start = date_moment.start_date.format(config.DATE_FORMAT); const date1_start = date_moment.start_date.format(config.DATE_FORMAT);
@ -103,9 +105,9 @@ class SaleStore {
}); });
} }
//按类型获取业绩 // 按类型获取业绩
get_department_order_ml_by_type(date_moment) { get_department_order_ml_by_type(date_moment) {
let result = { dataSource: [], columns: [] }; const result = { dataSource: [], columns: [] };
const date1_start = date_moment.start_date.format(config.DATE_FORMAT); const date1_start = date_moment.start_date.format(config.DATE_FORMAT);
const date1_end = date_moment.end_date.format(config.DATE_FORMAT); const date1_end = date_moment.end_date.format(config.DATE_FORMAT);
const date2_start = comm.empty(date_moment.start_date_cp) ? "" : date_moment.start_date_cp.format(config.DATE_FORMAT); const date2_start = comm.empty(date_moment.start_date_cp) ? "" : date_moment.start_date_cp.format(config.DATE_FORMAT);
@ -279,20 +281,20 @@ class SaleStore {
]; ];
result.dataSource = json.result1; result.dataSource = json.result1;
} else { } else {
//if (this.active_tab_key == "Country") // if (this.active_tab_key == "Country")
//获取类型的项目,去掉重复,作为列名 // 获取类型的项目,去掉重复,作为列名
let type_name_arr = []; const type_name_arr = [];
json.result1.map(item => { json.result1.map(item => {
type_name_arr[item.SubTypeSN] = { SubTypeSN: item.SubTypeSN, SubTypeName: item.SubTypeName }; type_name_arr[item.SubTypeSN] = { SubTypeSN: item.SubTypeSN, SubTypeName: item.SubTypeName };
}); });
let type_data = []; const type_data = [];
let type_data_arr = []; const type_data_arr = [];
for (let item of json.result1) { for (const item of json.result1) {
let op_sn = "OP_" + item.OPI_SN; //顾问的SN const op_sn = "OP_" + item.OPI_SN; // 顾问的SN
let items = json.result1.filter(d => d.OPI_SN == item.OPI_SN); //筛选出有当前顾问的记录 const items = json.result1.filter(d => d.OPI_SN == item.OPI_SN); // 筛选出有当前顾问的记录
let total_data_value = items.length ? items.reduce((a, b) => a + b.COLI_YJLY, 0) : ""; //记录累加 const total_data_value = items.length ? items.reduce((a, b) => a + b.COLI_YJLY, 0) : ""; // 记录累加
if (comm.empty(type_data[op_sn])) { if (comm.empty(type_data[op_sn])) {
type_data[op_sn] = [{ key: item.OPI_SN }, { T_name: item.OPI_Name }, { T_total: total_data_value }]; type_data[op_sn] = [{ key: item.OPI_SN }, { T_name: item.OPI_Name }, { T_total: total_data_value }];
} }
@ -312,9 +314,9 @@ class SaleStore {
{ title: "合计", children: [{ title: type_data_arr.reduce((a, b) => a + b.T_total, 0), dataIndex: "T_total" }], sorter: (a, b) => b.T_total - a.T_total } { title: "合计", children: [{ title: type_data_arr.reduce((a, b) => a + b.T_total, 0), dataIndex: "T_total" }], sorter: (a, b) => b.T_total - a.T_total }
); );
Object.values(type_name_arr).map((item, index) => { Object.values(type_name_arr).map((item, index) => {
let data_index = "T_" + item.SubTypeSN; const data_index = "T_" + item.SubTypeSN;
let items = type_data_arr.filter(d => d[data_index]); //筛选出有对应类型的记录 const items = type_data_arr.filter(d => d[data_index]); // 筛选出有对应类型的记录
let total_data_value = items.length ? items.reduce((a, b) => a + b[data_index], 0) : ""; //记录累加 const total_data_value = items.length ? items.reduce((a, b) => a + b[data_index], 0) : ""; // 记录累加
result.columns.push({ result.columns.push({
title: item.SubTypeName, title: item.SubTypeName,
children: [{ title: total_data_value, dataIndex: data_index }], children: [{ title: total_data_value, dataIndex: data_index }],
@ -335,10 +337,10 @@ class SaleStore {
}); });
} }
//子维度查询 // 子维度查询
get_department_order_ml_by_type_sub(date_moment, type_sub) { get_department_order_ml_by_type_sub(date_moment, type_sub) {
this.spinning = true; this.spinning = true;
let result = { dataSource: [], columns: [] }; const result = { dataSource: [], columns: [] };
const date1_start = date_moment.start_date.format(config.DATE_FORMAT); const date1_start = date_moment.start_date.format(config.DATE_FORMAT);
const date1_end = date_moment.end_date.format(config.DATE_FORMAT); const date1_end = date_moment.end_date.format(config.DATE_FORMAT);
const date2_start = comm.empty(date_moment.start_date_cp) ? "" : date_moment.start_date_cp.format(config.DATE_FORMAT); const date2_start = comm.empty(date_moment.start_date_cp) ? "" : date_moment.start_date_cp.format(config.DATE_FORMAT);
@ -388,11 +390,11 @@ class SaleStore {
dataIndex: "COLI_Cycle", dataIndex: "COLI_Cycle",
}, },
]; ];
//数据处理,把相同类型放入同一个数组 // 数据处理,把相同类型放入同一个数组
let type_data = []; const type_data = [];
!comm.empty(json.result1) && !comm.empty(json.result1) &&
Object.values(json.result1).map(item => { Object.values(json.result1).map(item => {
let subtype_sn = "type_" + item.subType; const subtype_sn = "type_" + item.subType;
if (comm.empty(type_data[subtype_sn])) { if (comm.empty(type_data[subtype_sn])) {
type_data[subtype_sn] = { subType: item.subType, subType_name: item.subTypeVal, data: [item] }; type_data[subtype_sn] = { subType: item.subType, subType_name: item.subTypeVal, data: [item] };
} else { } else {

@ -1,4 +1,4 @@
import {makeAutoObservable, runInAction} from "mobx" import {makeAutoObservable, runInAction} from "mobx";
import * as config from "../config"; import * as config from "../config";
import * as req from '../utils/request'; import * as req from '../utils/request';

@ -1,4 +1,4 @@
import {makeAutoObservable, runInAction} from "mobx" import {makeAutoObservable, runInAction} from "mobx";
import * as config from "../config"; import * as config from "../config";
import * as req from '../utils/request'; import * as req from '../utils/request';

@ -6,14 +6,14 @@ import moment from "moment";
if (!String.prototype.padStart) { if (!String.prototype.padStart) {
String.prototype.padStart = function padStart(targetLength, padString) { String.prototype.padStart = function padStart(targetLength, padString) {
targetLength = targetLength >> 0; //floor if number or convert non-number to 0; targetLength = targetLength >> 0; // floor if number or convert non-number to 0;
padString = String(typeof padString !== "undefined" ? padString : " "); padString = String(typeof padString !== "undefined" ? padString : " ");
if (this.length > targetLength) { if (this.length > targetLength) {
return String(this); return String(this);
} else { } else {
targetLength = targetLength - this.length; targetLength = targetLength - this.length;
if (targetLength > padString.length) { if (targetLength > padString.length) {
padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed padString += padString.repeat(targetLength / padString.length); // append to original to ensure we are longer than needed
} }
return padString.slice(0, targetLength) + String(this); return padString.slice(0, targetLength) + String(this);
} }
@ -48,10 +48,10 @@ export function formatPrice(price) {
return Math.ceil(price).toLocaleString(); return Math.ceil(price).toLocaleString();
} }
//千分符的金额转成数字默认为0 // 千分符的金额转成数字默认为0
export function price_to_number(price) { export function price_to_number(price) {
let num_string = (price + "").replace(/,/g, ""); const num_string = (price + "").replace(/,/g, "");
let number = parseFloat(num_string); const number = parseFloat(num_string);
return isNaN(number) ? 0 : number; return isNaN(number) ? 0 : number;
} }
@ -128,7 +128,7 @@ export class UrlBuilder {
append(name, value) { append(name, value) {
if (isNotEmpty(value)) { if (isNotEmpty(value)) {
this.paramList.push({ name: name, value: value }); this.paramList.push({ name, value });
} }
return this; return this;
} }
@ -155,12 +155,12 @@ export function isEmpty(val) {
} }
export function empty(a) { export function empty(a) {
if (a === "") return true; //检验空字符串 if (a === "") return true; // 检验空字符串
if (a === "null") return true; //检验字符串类型的null if (a === "null") return true; // 检验字符串类型的null
if (a === "undefined") return true; //检验字符串类型的 undefined if (a === "undefined") return true; // 检验字符串类型的 undefined
if (!a && a !== 0 && a !== "") return true; //检验 undefined 和 null if (!a && a !== 0 && a !== "") return true; // 检验 undefined 和 null
if (Array.prototype.isPrototypeOf(a) && a.length === 0) return true; //检验空数组 if (Array.prototype.isPrototypeOf(a) && a.length === 0) return true; // 检验空数组
if (Object.prototype.isPrototypeOf(a) && Object.keys(a).length === 0) return true; //检验空对象 if (Object.prototype.isPrototypeOf(a) && Object.keys(a).length === 0) return true; // 检验空对象
return false; return false;
} }
@ -180,10 +180,10 @@ export function debounce(fn, delay = 500) {
} }
export function throttle(fn, delay, atleast) { export function throttle(fn, delay, atleast) {
let timeout = null, let timeout = null;
startTime = new Date(); let startTime = new Date();
return function () { return function () {
let curTime = new Date(); const curTime = new Date();
clearTimeout(timeout); clearTimeout(timeout);
if (curTime - startTime >= atleast) { if (curTime - startTime >= atleast) {
fn(); fn();
@ -226,15 +226,15 @@ export function show_vs_tag(vs, vs_diff, data1, data2) {
); );
} }
//数组去掉重复 // 数组去掉重复
export function unique(arr) { export function unique(arr) {
let x = new Set(arr); const x = new Set(arr);
return [...x]; return [...x];
} }
export function getWeek(date) { export function getWeek(date) {
// 参数时间戳 // 参数时间戳
let week = moment(date).day(); const week = moment(date).day();
switch (week) { switch (week) {
case 1: case 1:
return "周一"; return "周一";
@ -253,12 +253,12 @@ export function getWeek(date) {
} }
} }
//把非数字下标的数组设置下标因为非数字数组的length为0导致读取失败 // 把非数字下标的数组设置下标因为非数字数组的length为0导致读取失败
export function set_array_index(result) { export function set_array_index(result) {
let result_array = []; const result_array = [];
let result_keys = Object.keys(result); const result_keys = Object.keys(result);
result_keys.sort(); //必须做一次排序用for in循环会导致顺序错误 result_keys.sort(); // 必须做一次排序用for in循环会导致顺序错误
for (let key of result_keys) { for (const key of result_keys) {
result_array.push(result[key]); result_array.push(result[key]);
} }
return result_array; return result_array;

@ -1,31 +1,28 @@
import React, {useContext, useEffect} from 'react'; import React, { useContext, useEffect } from 'react';
import { Row, Col, Typography, Space, DatePicker, Button, Select, Table, Divider } from 'antd'; import { Row, Col, Typography, Space, DatePicker, Button, Select, Table, Divider } from 'antd';
import { import { SearchOutlined } from '@ant-design/icons';
SearchOutlined, import { stores_Context } from '../config';
} from '@ant-design/icons'; import * as config from '../config';
import { stores_Context } from '../config'
import * as config from "../config";
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import moment from "moment"; import moment from 'moment';
import zhCNlocale from 'antd/es/date-picker/locale/zh_CN'; import zhCNlocale from 'antd/es/date-picker/locale/zh_CN';
import { utils, writeFileXLSX } from "xlsx"; import { utils, writeFileXLSX } from 'xlsx';
const AgentGroupCount = () => { const AgentGroupCount = () => {
const { customerServicesStore } = useContext(stores_Context);
const {customerServicesStore} = useContext(stores_Context);
const agentList = customerServicesStore.agentList; const agentList = customerServicesStore.agentList;
const agentGroupList = customerServicesStore.agentGroupList; const agentGroupList = customerServicesStore.agentGroupList;
const agentGroupListColumns = customerServicesStore.agentGroupListColumns; const agentGroupListColumns = customerServicesStore.agentGroupListColumns;
const {startDate, endDate, dateType, inProgress} = customerServicesStore; const { startDate, endDate, dateType, inProgress } = customerServicesStore;
useEffect(() => { useEffect(() => {
customerServicesStore.fetchAllAgent(); customerServicesStore.fetchAllAgent();
}, []); }, []);
const handleSearchClick = () => { const handleSearchClick = () => {
customerServicesStore.fetchAgentGroupCount(); customerServicesStore.fetchAgentGroupCount();
} };
const renderAgentItem = (agent) => { const renderAgentItem = (agent) => {
return ( return (
@ -33,7 +30,7 @@ const AgentGroupCount = () => {
{agent.VEI2_CompanyBN} {agent.VEI2_CompanyBN}
</Select.Option> </Select.Option>
); );
} };
return ( return (
<> <>
@ -42,7 +39,7 @@ const AgentGroupCount = () => {
<Col span={4}> <Col span={4}>
<Select <Select
value={customerServicesStore.selectedAgent} value={customerServicesStore.selectedAgent}
style={{ width: "95%" }} style={{ width: '95%' }}
showSearch showSearch
onSearch={(value) => { onSearch={(value) => {
console.log('search:', value); console.log('search:', value);
@ -50,42 +47,87 @@ const AgentGroupCount = () => {
filterOption={(input, option) => { filterOption={(input, option) => {
return option.children.indexOf(input) > -1; return option.children.indexOf(input) > -1;
}} }}
onChange={(value) => customerServicesStore.selectAgent(value)}> onChange={(value) => customerServicesStore.selectAgent(value)}
<Select.Option key="0" value="">所有地接社</Select.Option> >
<Select.Option key="0" value="">
所有地接社
</Select.Option>
{agentList.map(renderAgentItem)} {agentList.map(renderAgentItem)}
</Select> </Select>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Select <Select
style={{ width: "95%" }} style={{ width: '95%' }}
value={customerServicesStore.selectedTeam} value={customerServicesStore.selectedTeam}
onChange={(value) => customerServicesStore.selectTeam(value)} onChange={(value) => customerServicesStore.selectTeam(value)}
> >
<Select.Option key="0" value="">所有小组</Select.Option> <Select.Option key="0" value="">
<Select.Option key="31" value="1,2,28,7">GH事业部</Select.Option> 所有小组
<Select.Option key="32" value="8,9,11,12,20,21">国际事业部</Select.Option> </Select.Option>
<Select.Option key="33" value="10,18,16,30">孵化学院</Select.Option> <Select.Option key="31" value="1,2,28,7">
<Select.Option key="1" value="1">CH直销</Select.Option> GH事业部
<Select.Option key="2" value="2">CH大客户</Select.Option> </Select.Option>
<Select.Option key="28" value="28">AH</Select.Option> <Select.Option key="32" value="8,9,11,12,20,21">
<Select.Option key="7" value="7">市场推广</Select.Option> 国际事业部
<Select.Option key="8" value="8">德语</Select.Option> </Select.Option>
<Select.Option key="9" value="9">日语</Select.Option> <Select.Option key="33" value="10,18,16,30">
<Select.Option key="11" value="11">法语</Select.Option> 孵化学院
<Select.Option key="12" value="12">西语</Select.Option> </Select.Option>
<Select.Option key="20" value="20">俄语</Select.Option> <Select.Option key="1" value="1">
<Select.Option key="21" value="21">意语</Select.Option> CH直销
<Select.Option key="10" value="10">商旅</Select.Option> </Select.Option>
<Select.Option key="18" value="18">CT</Select.Option> <Select.Option key="2" value="2">
<Select.Option key="16" value="16">APP</Select.Option> CH大客户
<Select.Option key="30" value="30">Trippest</Select.Option> </Select.Option>
<Select.Option key="31" value="31">花梨鹰</Select.Option> <Select.Option key="28" value="28">
AH
</Select.Option>
<Select.Option key="7" value="7">
市场推广
</Select.Option>
<Select.Option key="8" value="8">
德语
</Select.Option>
<Select.Option key="9" value="9">
日语
</Select.Option>
<Select.Option key="11" value="11">
法语
</Select.Option>
<Select.Option key="12" value="12">
西语
</Select.Option>
<Select.Option key="20" value="20">
俄语
</Select.Option>
<Select.Option key="21" value="21">
意语
</Select.Option>
<Select.Option key="10" value="10">
商旅
</Select.Option>
<Select.Option key="18" value="18">
CT
</Select.Option>
<Select.Option key="16" value="16">
APP
</Select.Option>
<Select.Option key="30" value="30">
Trippest
</Select.Option>
<Select.Option key="31" value="31">
花梨鹰
</Select.Option>
</Select> </Select>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Select value={customerServicesStore.selectedCountry} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectCountry(value)}> <Select
value={customerServicesStore.selectedCountry}
style={{ width: '95%' }}
onChange={(value) => customerServicesStore.selectCountry(value)}
>
<Select.Option key="ALL" value=""> <Select.Option key="ALL" value="">
所有国家 所有国家
</Select.Option> </Select.Option>
<Select.Option key="china" value="china"> <Select.Option key="china" value="china">
国内 国内
@ -96,7 +138,11 @@ const AgentGroupCount = () => {
</Select> </Select>
</Col> </Col>
<Col span={4}> <Col span={4}>
<Select value={dateType} style={{ width: "95%" }} onChange={(value) => customerServicesStore.selectDateType(value)}> <Select
value={dateType}
style={{ width: '95%' }}
onChange={(value) => customerServicesStore.selectDateType(value)}
>
<Select.Option key="startDate" value="startDate"> <Select.Option key="startDate" value="startDate">
走团日期 走团日期
</Select.Option> </Select.Option>
@ -107,19 +153,28 @@ const AgentGroupCount = () => {
</Col> </Col>
<Col span={4}> <Col span={4}>
<DatePicker.RangePicker <DatePicker.RangePicker
format={config.DATE_FORMAT} locale={zhCNlocale} format={config.DATE_FORMAT}
locale={zhCNlocale}
allowClear={false} allowClear={false}
value={[startDate, endDate]} value={[startDate, endDate]}
onChange={(dates) => { customerServicesStore.selectDateRange(dates[0], dates[1]) }} onChange={(dates) => {
customerServicesStore.selectDateRange(dates[0], dates[1]);
}}
ranges={{ ranges={{
'本周': [moment().startOf('week'), moment().endOf('week')], '本周': [moment().startOf('week'), moment().endOf('week')],
'上周': [moment().startOf('week').subtract(7, 'days'), moment().endOf('week').subtract(7, 'days')], '上周': [moment().startOf('week').subtract(7, 'days'), moment().endOf('week').subtract(7, 'days')],
'本月': [moment().startOf('month'), moment().endOf('month')], '本月': [moment().startOf('month'), moment().endOf('month')],
'上个月': [moment().subtract(1, 'months').startOf('month'), moment(new Date()).subtract(1, 'months').endOf('month')], '上个月': [
moment().subtract(1, 'months').startOf('month'),
moment(new Date()).subtract(1, 'months').endOf('month'),
],
'近30天': [moment().subtract(30, 'days'), moment()], '近30天': [moment().subtract(30, 'days'), moment()],
'近三个月': [moment().subtract(2, 'month').startOf('month'), moment().endOf('month')], '近三个月': [moment().subtract(2, 'month').startOf('month'), moment().endOf('month')],
'今年': [moment().startOf('year').subtract(1, 'month'), moment().endOf('year').subtract(1, 'month')], '今年': [moment().startOf('year').subtract(1, 'month'), moment().endOf('year').subtract(1, 'month')],
'去年': [moment().subtract(1, 'year').startOf('year').subtract(1, 'month'), moment().subtract(1, 'year').endOf('year').subtract(1, 'month')], '去年': [
moment().subtract(1, 'year').startOf('year').subtract(1, 'month'),
moment().subtract(1, 'year').endOf('year').subtract(1, 'month'),
],
}} }}
/> />
</Col> </Col>
@ -130,7 +185,8 @@ const AgentGroupCount = () => {
loading={inProgress} loading={inProgress}
onClick={() => { onClick={() => {
handleSearchClick(); handleSearchClick();
}}> }}
>
统计 统计
</Button> </Button>
</Col> </Col>
@ -146,14 +202,17 @@ const AgentGroupCount = () => {
rowKey={(record) => record.key} rowKey={(record) => record.key}
loading={inProgress} loading={inProgress}
pagination={false} pagination={false}
scroll={{ x: "100%" }} scroll={{ x: '100%' }}
/> />
<Divider orientation="right" plain> <Divider orientation="right" plain>
<a <a
onClick={() => { onClick={() => {
const wb = utils.table_to_book(document.getElementById("agentGroupList").getElementsByTagName("table")[0]); const wb = utils.table_to_book(
writeFileXLSX(wb, "地接社团信息.xlsx"); document.getElementById('agentGroupList').getElementsByTagName('table')[0]
}}> );
writeFileXLSX(wb, '地接社团信息.xlsx');
}}
>
导出excel 导出excel
</a> </a>
</Divider> </Divider>
@ -162,6 +221,6 @@ const AgentGroupCount = () => {
</Space> </Space>
</> </>
); );
} };
export default observer(AgentGroupCount); export default observer(AgentGroupCount);
Loading…
Cancel
Save