金额的排序bug,因为带有,

订单数据的样式修改
feature/2.0-sales-trade
尹诚诚 3 years ago
parent e447bd26e3
commit c76065be63

@ -95,7 +95,7 @@ const Customer_care_inchina = () => {
/>
</Col>
<Col span={24}>
<Divider orientation="right"><a
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "在华客人.xlsx");

@ -89,7 +89,7 @@ const Customer_care_potential = () => {
/>
</Col>
<Col span={24}>
<Divider orientation="right"><a
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "潜力客户.xlsx");

@ -94,7 +94,7 @@ const Customer_care_regular = () => {
/>
</Col>
<Col span={24}>
<Divider orientation="right"><a
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "老客户.xlsx");

@ -1,6 +1,6 @@
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 DATE_FORMAT = "YYYY-MM-DD";
//export const HT_HOST = 'https://p9axztuwd7x8a7.mycht.cn';
export const HT_HOST = "http://202.103.68.100:890"; //889正式库

@ -13,7 +13,7 @@ class AuthStore {
}
auth = ['admin']; //开发时候用,正式环境留空
user = {name:'ycc',userid:'12345678'};//开发时候用,正式环境留空
user = {name:'loading',userid:'...'};//开发时候用,正式环境留空
has_permission(requireds) {
if (Object.keys(requireds).length == 0) {

@ -158,7 +158,7 @@ class DashboardStore {
loading: false,
data: [],
group_select_mode: 'multiple',//是否多选分组
groups: ['1', '2', '28', '7', '8', '9', '11', '12', '20', '21'],
groups: ['1', '2', '28', '7', '8', '9', '11', '12', '20', '21','18'],
columns: [
{
title: '市场',

@ -207,8 +207,7 @@ export function show_vs_tag(vs, vs_diff, data1, data2) {
}// else {
// tag = <Tag icon={< CaretUpOutlined/>} color="lime">{vs} {vs_diff}</Tag>
// }
return <span><div>{data1} vs {data2}</div>
{tag}</span>
return <span><div>{data1} vs {data2} </div> {tag} </span>
}
//数组去掉重复

@ -1,5 +1,5 @@
import React, {Component} from 'react';
import {Row, Col, Button, Tabs, Table} from 'antd';
import {Row, Col, Button, Tabs, Table, Divider} from 'antd';
import {
ContainerOutlined, CarryOutOutlined, BlockOutlined,
SmileOutlined, TagsOutlined, GlobalOutlined,
@ -13,6 +13,7 @@ import DatePickerCharts from '../charts/DatePickerCharts'
import * as config from "../config";
import {NavLink} from "react-router-dom";
import * as comm from "../utils/commons"
import {utils, writeFileXLSX} from "xlsx";
class Orders extends Component {
@ -142,13 +143,13 @@ class Orders extends Component {
{
title: '成交毛利(预计)',
children: [{title: ordercountTotal1.YJLY, dataIndex: 'YJLY'}],
sorter: (a, b) => b.YJLY - a.YJLY,
sorter: (a, b) => parseFloat(b.YJLY.replace(/,/g, '')) - parseFloat(a.YJLY.replace(/,/g, '')),
},
{
title: '单个订单价值',
children: [{title: ordercountTotal1.Ordervalue, dataIndex: 'Ordervalue'}],
sorter: (a, b) => b.Ordervalue - a.Ordervalue,
sorter: (a, b) => parseFloat(b.Ordervalue.replace(/,/g, '')) - parseFloat(a.Ordervalue.replace(/,/g, '')),
},
];
result.dataSource = data.ordercount1;
@ -246,22 +247,64 @@ class Orders extends Component {
<Tabs activeKey={orders_store.active_tab_key}
onChange={(active_key) => orders_store.onChange_Tabs(active_key)}>
<Tabs.TabPane tab={<span><ContainerOutlined/>来源类型</span>} key="Form">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_form" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_form").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "来源类型.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
<Tabs.TabPane tab={<span><CarryOutOutlined/>产品类型</span>} key="Product">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_product" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_product").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "产品类型.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
<Tabs.TabPane tab={<span><SmileOutlined/>国籍</span>} key="Country">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_country" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_country").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "国籍.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
<Tabs.TabPane tab={<span><TagsOutlined/>线路</span>} key="line">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_line" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_line").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "线路.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
<Tabs.TabPane tab={<span><GlobalOutlined/>目的地</span>} key="city">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_city" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_city").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "目的地.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
<Tabs.TabPane tab={<span><BlockOutlined/>页面类型</span>} key="LineClass">
<Table dataSource={table_data.dataSource} columns={table_data.columns} size="small"/>
<Table id="table_to_xlsx_LineClass" dataSource={table_data.dataSource}
columns={table_data.columns} size="small"
pagination={false}/>
<Divider orientation="right" plain><a
onClick={() => {
const wb = utils.table_to_book(document.getElementById("table_to_xlsx_LineClass").getElementsByTagName('table')[0]);
writeFileXLSX(wb, "页面类型.xlsx");
}}>导出excel</a></Divider>
</Tabs.TabPane>
</Tabs>
</Col>
@ -272,7 +315,4 @@ class Orders extends Component {
}
}
export
default
observer(Orders);
export default observer(Orders);

@ -118,12 +118,18 @@ const Orders_sub = () => {
dataIndex: 'COLI_Success',
key: 'COLI_Success',
render: (text, record) => <span>{text == 1 ? '是' : '否'}</span>,
sorter: (a, b) => b.COLI_Success - a.COLI_Success,
},
{
title: '预定时间',
dataIndex: 'COLI_ApplyDate',
key: 'COLI_ApplyDate',
},
{
title: 'IP',
dataIndex: 'COLI_SenderIP',
key: 'COLI_SenderIP',
},
{
title: '订单内容',
dataIndex: 'COLI_OrderDetailText',
@ -180,10 +186,10 @@ const Orders_sub = () => {
onChange={(active_key) => orders_store.onChange_Tabs_sub(ordertype, ordertype_sub, active_key)}>
<Tabs.TabPane tab={<span><ContainerOutlined/>订单内容</span>} key="detail">
<Row>
<Col span={11}>
<Col span={24}>
{date_picker_store.start_date.format(config.DATE_FORMAT)}~{date_picker_store.end_date.format(config.DATE_FORMAT)}
<Table dataSource={table_data.dataSource}
columns={table_data.columns} size="small" rowKey={record => record.COLI_ID}
columns={table_data.columns} size="small" rowKey={record => record.key}
expandable={{
expandedRowRender: (record) => (
<pre>{record.COLI_OrderDetailText}</pre>
@ -191,11 +197,11 @@ const Orders_sub = () => {
}}
/>
</Col>
<Col span={2}></Col>
<Col span={11}>
<Col span={24}>
{date_picker_store.start_date_cp ? date_picker_store.start_date_cp.format(config.DATE_FORMAT) + '~' + date_picker_store.end_date_cp.format(config.DATE_FORMAT) : ''}
<Table dataSource={table_data2.dataSource}
columns={table_data2.columns} size="small" rowKey={record => record.COLI_ID}
columns={table_data2.columns} size="small" rowKey={record => record.key}
expandable={{
expandedRowRender: (record) => (
<pre>{record.COLI_OrderDetailText}</pre>
@ -208,15 +214,15 @@ const Orders_sub = () => {
</Tabs.TabPane>
<Tabs.TabPane tab={<span><ContainerOutlined/>访问路径</span>} key="page">
<Row>
<Col span={11}>
<Col span={24}>
{date_picker_store.start_date.format(config.DATE_FORMAT)}~{date_picker_store.end_date.format(config.DATE_FORMAT)}
<Table dataSource={table_data.dataSource} rowKey={record => record.COLI_ID}
<Table dataSource={table_data.dataSource} rowKey={record => record.key}
columns={table_data.columns} size="small"/>
</Col>
<Col span={2}></Col>
<Col span={11}>
<Col span={24}>
{date_picker_store.start_date_cp ? date_picker_store.start_date_cp.format(config.DATE_FORMAT) + '~' + date_picker_store.end_date_cp.format(config.DATE_FORMAT) : ''}
<Table dataSource={table_data2.dataSource} rowKey={record => record.COLI_ID}
<Table dataSource={table_data2.dataSource} rowKey={record => record.key}
columns={table_data2.columns} size="small"/>
</Col>

Loading…
Cancel
Save