添加花梨鹰的数据查询

feature/2.0-sales-trade
尹诚诚 3 years ago
parent a8db4f71f3
commit af57935a08

@ -37,6 +37,7 @@ class GroupSelect extends Component {
<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>
</div>
);

@ -34,7 +34,7 @@ class SiteSelect extends Component {
<Select.Option key="18" value="VC">法语VC</Select.Option>
<Select.Option key="16" value="CT">CT</Select.Option>
<Select.Option key="30" value="trippest">TP</Select.Option>
{/*<Select.Option key="31" value="HLY">花梨鹰</Select.Option>*/}
<Select.Option key="31" value="HLY">花梨鹰</Select.Option>
</Select>
</div>
);

@ -2,5 +2,5 @@ import React from "react";
export const stores_Context = React.createContext();
export const DATE_FORMAT = "YYYY-MM-DD";
export const HT_HOST = 'https://p9axztuwd7x8a7.mycht.cn';
//export const HT_HOST = "http://202.103.68.100:890"; //889正式库
//export const HT_HOST = 'https://p9axztuwd7x8a7.mycht.cn';
export const HT_HOST = "http://202.103.68.100:890"; //889正式库

@ -9,7 +9,7 @@ class AuthStore {
constructor(rootStore) {
this.rootStore = rootStore;
makeAutoObservable(this);
this.get_auth(); //放到钉钉环境才能开启
//this.get_auth(); //放到钉钉环境才能开启
}
auth = ['admin']; //开发时候用,正式环境留空

@ -24,6 +24,8 @@ class OrdersStore {
orderCountData_type = [];//子维度订单统计
orderCountData_Form = [];//表单类型统计数据源
orderCountData_Form_sub = [];//子维度类型统计
diff_days1=0;//日期相差天数,用于计算日平均值
diff_days2=0;//日期相差天数,比较数据时使用
handleChange_webcode = (value) => {
this.webcode = value;
@ -45,7 +47,7 @@ class OrdersStore {
result.push({
'xField': item.ApplyDate,
'yField': item.orderCount,
'seriesField': item.groups
'seriesField': item.groups,
})
}
if (data_source.ordercount2 && end_date) {

@ -13,9 +13,10 @@ class SaleStore {
loading = false;
loading_table = false;
spinning = false; //加载状态
active_tab_key = "All"; //当前选择的标签
group_select_mode = false;
date_type = "applyDate";
date_type = "ConfirmDate";
groups = ["1,2,28,7"];
ml_data = []; //毛利数据
type_data = []; //类型的数据
@ -30,7 +31,6 @@ class SaleStore {
//切换标签页
onChange_Tabs(active_key) {
this.active_tab_key = active_key;
//this.getOrderCountByType_sub(ordertype, ordertype_sub, this.active_tab_key_sub);
}
//下单日期或者出发日期
@ -203,6 +203,7 @@ class SaleStore {
//子维度查询 beign
get_department_order_ml_by_type_sub(date_moment, type_sub) {
this.spinning = true;
let result = { dataSource: [], columns: [] };
const date1_start = date_moment.start_date.format(config.DATE_FORMAT);
const date1_end = date_moment.end_date.format(config.DATE_FORMAT);
@ -269,9 +270,11 @@ class SaleStore {
runInAction(() => {
this.type_data_sub = result;
this.spinning = false;
});
})
.catch((error) => {
this.spinning = false;
console.log("fetch data failed", error);
});
}

@ -18,12 +18,6 @@ class Orders extends Component {
super(props);
}
// componentDidMount() {
// const {orders_store} = this.context;
// orders_store.getOrderCount();
// orders_store.onChange_Tabs(orders_store.active_tab_key);
// }
format_data(data) {
const { date_picker_store, orders_store } = this.context;
let result = { dataSource: [], columns: [] };

@ -1,5 +1,5 @@
import React, { useContext, useEffect } from "react";
import { Row, Col, Button, Divider, Table, Space, Radio, Select } from "antd";
import { Row, Col, Button, Divider, Table, Space, Tag, Spin } from "antd";
import { ContainerOutlined, SearchOutlined } from "@ant-design/icons";
import { stores_Context } from "../config";
import { Column, Pie } from "@ant-design/charts";
@ -27,17 +27,21 @@ const Sale_sub = () => {
<NavLink to={`/sale`}>返回</NavLink>
</Col>
</Row>
<Row gutter={{ sm: 16, lg: 32 }}>
{!comm.empty(type_data.dataSource) &&
type_data.dataSource.map((item) => {
return (
<Col md={24} lg={12}>
<Divider orientation="left">{item.subType_name}</Divider>
<Table key={item.subType} dataSource={item.data} columns={type_data.columns} size="small" rowKey={(record) => record.key} loading={sale_store.loading_table} pagination={false} scroll={{ x: "100%" }} />
</Col>
);
})}
</Row>
<Spin size="large" spinning={sale_store.spinning}>
<Row gutter={{ sm: 16, lg: 32 }}>
{!comm.empty(type_data.dataSource) &&
type_data.dataSource.map((item) => {
return (
<Col md={24} xxl={12}>
<Divider>
<Tag color="#87d068">{item.subType_name}</Tag>
</Divider>
<Table key={item.subType} dataSource={item.data} columns={type_data.columns} size="small" rowKey={(record) => record.key} loading={sale_store.loading_table} pagination={false} scroll={{ x: "100%" }} />
</Col>
);
})}
</Row>
</Spin>
</div>
);
};

Loading…
Cancel
Save