From 077b3b310857f4219edd2ece381880cf2720d767 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Fri, 3 Nov 2023 11:25:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=94=80=E5=94=AE>=E4=B8=9A=E7=BB=A9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE.=20=E5=BA=94=E7=94=A8=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/search/SiteSelect.jsx | 2 +- src/stores/SaleStore.js | 14 ++++++ src/views/Sale.jsx | 72 ++++++++++------------------ 3 files changed, 41 insertions(+), 47 deletions(-) diff --git a/src/components/search/SiteSelect.jsx b/src/components/search/SiteSelect.jsx index 2e25905..b5406f7 100644 --- a/src/components/search/SiteSelect.jsx +++ b/src/components/search/SiteSelect.jsx @@ -32,7 +32,7 @@ class SiteSelect extends Component { allowClear={_mode != null} {...extProps} > - {_show_all===true ? 所有来源 : ''} + {_show_all===true ? 所有来源 : ''} {sites.map(ele => {ele.label})} diff --git a/src/stores/SaleStore.js b/src/stores/SaleStore.js index 08eabb8..29a27b9 100644 --- a/src/stores/SaleStore.js +++ b/src/stores/SaleStore.js @@ -32,6 +32,20 @@ class SaleStore { type_data_sub = []; // 类型的子维度数据 date_title = 'date_title'; // 日期段,只用于显示,防止日期选择控件的变化导致页面刷新 + searchValues = { + DateType: { key: 'ConfirmDate', label: '确认日期'}, + WebCode: { key: 'All', label: '所有来源'}, + IncludeTickets: { key: '1', label: '含门票'}, + DepartmentList: [groupsMappedByCode.GH], + }; + + setSearchValues(obj, values) { + this.groups = obj.DepartmentList; + this.webcode = obj.WebCode; + this.include_tickets = obj.IncludeTickets; + this.date_type = obj.DateType; + } + salesTrade = { groupType: 'dept', loading: false, operator: [], dept: [], overview: [], diff --git a/src/views/Sale.jsx b/src/views/Sale.jsx index 7f64bc9..e343529 100644 --- a/src/views/Sale.jsx +++ b/src/views/Sale.jsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect } from 'react'; -import { Row, Col, Button, Tabs, Table, Divider, Radio, Select } from 'antd'; +import { Row, Col, Button, Tabs, Table, Divider, Radio, Select, Spin } from 'antd'; import { ContainerOutlined, SearchOutlined, UserSwitchOutlined } from '@ant-design/icons'; import { stores_Context } from '../config'; import { Column, Pie, Treemap } from '@ant-design/charts'; @@ -12,6 +12,7 @@ import * as config from '../config'; import SiteSelect from '../components/search/SiteSelect'; import GroupSelect from '../components/search/GroupSelect'; import { utils, writeFileXLSX } from 'xlsx'; +import SearchForm from './../components/search/SearchForm'; const Sale = () => { const { sale_store, date_picker_store } = useContext(stores_Context); @@ -207,48 +208,28 @@ const Sale = () => { return (
- - - - - - - - - - - - - - - - - - - - - - - - - + + + { + sale_store.setSearchValues(obj, form); + sale_store.get_department_order_ml_by_type(date_picker_store); + }} + /> + + {/* @@ -284,12 +265,11 @@ const Sale = () => { */} - - - + +