diff --git a/src/charts/Customer_care_regular.jsx b/src/charts/Customer_care_regular.jsx index 375d2f7..04851e1 100644 --- a/src/charts/Customer_care_regular.jsx +++ b/src/charts/Customer_care_regular.jsx @@ -7,6 +7,7 @@ import { observer } from 'mobx-react'; import SearchForm from './../components/search/SearchForm'; import LineWithAvg from '../components/LineWithAvg'; import { flow } from 'mobx'; +import { TableExportBtn } from '../components/Data'; const Customer_care_regular = () => { const { orders_store, date_picker_store, customer_store } = useContext(stores_Context); @@ -14,6 +15,207 @@ const Customer_care_regular = () => { // useEffect(() => {}, []); + const columns = [ + { + title: '订单号', + dataIndex: 'COLI_ID', + key: 'COLI_ID', + }, + { + title: '预定日期', + dataIndex: 'COLI_ApplyDate', + key: 'COLI_ApplyDate', + }, + { + title: '订单状态', + width: '4rem', + dataIndex: 'OrderState1', + key: 'OrderState1', + render: (text, record) => record.OrderState === 1 ? '成行' : '未成行', + sorter: (a, b) => b.OrderState - a.OrderState, + }, + { + title: '毛利', + dataIndex: 'ML', + key: 'ML', + }, + { + title: '人数', + dataIndex: 'PersonNum', + key: 'PersonNum', + }, + { + title: '天数', + dataIndex: 'COLI_Days', + key: 'COLI_Days', + }, + { + title: '人天数', + dataIndex: 'CGI_PersonDays', + key: 'CGI_PersonDays', + }, + { + title: '走团日期', + dataIndex: 'COLI_OrderStartDate', + key: 'COLI_OrderStartDate', + }, + { + title: '走团国家', + dataIndex: 'recommend_country', + key: 'recommend_country', + width: '4em', + }, + { + title: '小组', + dataIndex: 'Department', + key: 'Department', + }, + { + title: '老客户', + dataIndex: 'COLI_IsOld', + key: 'COLI_IsOld', + }, + { + title: '老客户推荐', + dataIndex: 'COLI_IsCusCommend', + key: 'COLI_IsCusCommend', + }, + { + title: '国籍', + dataIndex: 'MEI_Country', + key: 'MEI_Country', + }, + { + title: '网站', + dataIndex: 'COLI_WebCode', + key: 'COLI_WebCode', + }, + { + title: '来源', + dataIndex: 'SourceType', + key: 'SourceType', + }, + { + title: '页面类型', + dataIndex: 'COLI_LineClass', + key: 'COLI_LineClass', + }, + { + title: '券额', + dataIndex: 'Voucher_amount', + key: 'Voucher_amount', + width: '4em', + }, + { + title: '券类别', + dataIndex: 'Voucher_type', + key: 'Voucher_type', + width: '5em', + }, + { + title: '上次 订单号', + dataIndex: 'coli_id_Last', + key: 'coli_id_Last', + width: '5em', + render: (_, r) => ({ + children: _, + }), + onCell: (r) => ({ + style: { backgroundColor: '#5B8FF9' + '1A' }, + }), + }, + { + title: '上次 走团日期', + dataIndex: 'COLI_OrderStartDate_Last', + key: 'COLI_OrderStartDate_Last', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '上次 小组', + dataIndex: 'Department_Last', + key: 'Department_Last', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + ]; + const export_columns = [].concat(columns, [ + { + title: '上次经过国家', + dataIndex: 'last_country', + key: 'last_country', + onCell: (r) => ({ + style: { backgroundColor: '#5B8FF9' + '1A' }, + }), + }, + { + title: '复购周期', + dataIndex: 'Repurchase_cycle', + key: 'Repurchase_cycle', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '下单次数', + dataIndex: 'Orders_number', + key: 'Orders_number', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '推荐次数', + dataIndex: 'recommend_time', + key: 'recommend_time', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '历史成行次数', + dataIndex: 'Travel_count', + key: 'Travel_count', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '旅行周期', + dataIndex: 'Travel_cycle', + key: 'Travel_cycle', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + { + title: '第1次走团日期', + dataIndex: 'firstStartdate', + key: 'firstStartdate', + width: '4em', + render: (_, r) => ({ + props: { style: { backgroundColor: '#5B8FF9' + '1A' } }, + children: _, + }), + }, + ]); + return (