|
|
@ -1,32 +1,45 @@
|
|
|
|
import React, { Children, useContext, useState } from 'react';
|
|
|
|
import React, { useContext } from 'react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import { stores_Context } from '../config';
|
|
|
|
import moment from 'moment';
|
|
|
|
import { Row, Col, Table, Space, Typography } from 'antd';
|
|
|
|
import { Row, Col, Table, Select, Space, Typography, Progress, Spin, Divider, Button, Switch } from 'antd';
|
|
|
|
|
|
|
|
import SearchForm from './../components/search/SearchForm';
|
|
|
|
import SearchForm from './../components/search/SearchForm';
|
|
|
|
import { VSTag, TableExportBtn } from './../components/Data';
|
|
|
|
import { VSTag } from './../components/Data';
|
|
|
|
import { CruiseAgency } from './../libs/ht';
|
|
|
|
import { CruiseAgency } from './../libs/ht';
|
|
|
|
|
|
|
|
|
|
|
|
const { Text } = Typography;
|
|
|
|
const { Text } = Typography;
|
|
|
|
|
|
|
|
|
|
|
|
export default observer((props) => {
|
|
|
|
export default observer((props) => {
|
|
|
|
const { sale_store, date_picker_store: searchFormStore } = useContext(stores_Context);
|
|
|
|
const { date_picker_store: searchFormStore } = useContext(stores_Context);
|
|
|
|
const { customerServicesStore, HotelCruiseStore, date_picker_store } = useContext(stores_Context);
|
|
|
|
const { HotelCruiseStore, date_picker_store } = useContext(stores_Context);
|
|
|
|
const { loading, dataSource } = HotelCruiseStore.cruise;
|
|
|
|
const { loading, dataSource, summaryRow } = HotelCruiseStore.cruise;
|
|
|
|
|
|
|
|
|
|
|
|
const { formValues, siderBroken } = searchFormStore;
|
|
|
|
const { formValues, siderBroken } = searchFormStore;
|
|
|
|
|
|
|
|
|
|
|
|
const tableSorter = (a, b, colName) => (a[colName] - b[colName]);
|
|
|
|
const tableSorter = (a, b, colName) => a[colName] - b[colName];
|
|
|
|
const tableProps = {
|
|
|
|
const tableProps = {
|
|
|
|
size: 'small',
|
|
|
|
size: 'small',
|
|
|
|
bordered: true, pagination: false,
|
|
|
|
bordered: true,
|
|
|
|
|
|
|
|
pagination: false,
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{ title: '产品', dataIndex: 'ProductName', key: 'ProductName' },
|
|
|
|
{ title: '产品', children: [{ title: summaryRow.ProductName, dataIndex: 'ProductName', key: 'ProductName' }] },
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '房间数',
|
|
|
|
title: '房间数',
|
|
|
|
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalNum'),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
|
|
|
|
<Text strong>
|
|
|
|
|
|
|
|
{summaryRow.TotalNum}
|
|
|
|
|
|
|
|
{summaryRow.TotalNumPercent ? <Text type="secondary"> VS {summaryRow.CPTotalNum}</Text> : null}
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
{summaryRow.TotalNumPercent && <VSTag diffPercent={summaryRow.TotalNumPercent} />}
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
),
|
|
|
|
dataIndex: 'TotalNum',
|
|
|
|
dataIndex: 'TotalNum',
|
|
|
|
key: 'TotalNum',
|
|
|
|
key: 'TotalNum',
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalNum'),
|
|
|
|
|
|
|
|
render: (v, r) => (
|
|
|
|
render: (v, r) => (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
@ -39,8 +52,26 @@ export default observer((props) => {
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ title: '人数', dataIndex: 'TotalPersonNum', key: 'TotalPersonNum',
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '人数',
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalPersonNum'),
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalPersonNum'),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
|
|
|
|
<Text strong>
|
|
|
|
|
|
|
|
{summaryRow.TotalPersonNum}
|
|
|
|
|
|
|
|
{summaryRow.TotalPersonNumPercent ? <Text type="secondary"> VS {summaryRow.CPTotalPersonNum}</Text> : null}
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
{summaryRow.TotalPersonNumPercent && <VSTag diffPercent={summaryRow.TotalPersonNumPercent} />}
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
dataIndex: 'TotalPersonNum',
|
|
|
|
|
|
|
|
key: 'TotalPersonNum',
|
|
|
|
render: (v, r) => (
|
|
|
|
render: (v, r) => (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
@ -51,9 +82,28 @@ export default observer((props) => {
|
|
|
|
{r.CPTotalNum && <VSTag diffPercent={r.TotalPersonNumPercent} />}
|
|
|
|
{r.CPTotalNum && <VSTag diffPercent={r.TotalPersonNumPercent} />}
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
),},
|
|
|
|
),
|
|
|
|
{ title: '总利润', dataIndex: 'TotalProfit', key: 'TotalProfit',
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: '总利润',
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalProfit'),
|
|
|
|
sorter: (a, b) => tableSorter(a, b, 'TotalProfit'),
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
|
|
|
|
<Text strong>
|
|
|
|
|
|
|
|
{summaryRow.TotalProfit}
|
|
|
|
|
|
|
|
{summaryRow.TotalProfitPercent ? <Text type="secondary"> VS {summaryRow.CPTotalProfit}</Text> : null}
|
|
|
|
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
{summaryRow.TotalProfitPercent && <VSTag diffPercent={summaryRow.TotalProfitPercent} />}
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
dataIndex: 'TotalProfit',
|
|
|
|
|
|
|
|
key: 'TotalProfit',
|
|
|
|
render: (v, r) => (
|
|
|
|
render: (v, r) => (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
|
<Space direction={'vertical'}>
|
|
|
@ -64,7 +114,10 @@ export default observer((props) => {
|
|
|
|
{r.CPTotalNum && <VSTag diffPercent={r.TotalProfitPercent} />}
|
|
|
|
{r.CPTotalNum && <VSTag diffPercent={r.TotalProfitPercent} />}
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
), },
|
|
|
|
),
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
// { title: '单订船', dataIndex: '', key: '' },
|
|
|
|
// { title: '单订船', dataIndex: '', key: '' },
|
|
|
|
// { title: '订单含行程', dataIndex: '', key: '' },
|
|
|
|
// { title: '订单含行程', dataIndex: '', key: '' },
|
|
|
|
// { title: '国籍', dataIndex: '', key: '' },
|
|
|
|
// { title: '国籍', dataIndex: '', key: '' },
|
|
|
@ -83,8 +136,14 @@ export default observer((props) => {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 'countryArea',
|
|
|
|
// 'countryArea',
|
|
|
|
shows: [
|
|
|
|
shows: [
|
|
|
|
'DepartmentList', 'orderStatus', 'dates', 'keyword', 'cruiseDirection', 'agency',
|
|
|
|
'DepartmentList',
|
|
|
|
'cruiseBookType', 'country', // 'roomsRange', 'personRange'
|
|
|
|
'orderStatus',
|
|
|
|
|
|
|
|
'dates',
|
|
|
|
|
|
|
|
'keyword',
|
|
|
|
|
|
|
|
'cruiseDirection',
|
|
|
|
|
|
|
|
'agency',
|
|
|
|
|
|
|
|
'cruiseBookType',
|
|
|
|
|
|
|
|
'country', // 'roomsRange', 'personRange'
|
|
|
|
],
|
|
|
|
],
|
|
|
|
sort: { keyword: 101, agency: 110, cruiseDirection: 102, country: 104 },
|
|
|
|
sort: { keyword: 101, agency: 110, cruiseDirection: 102, country: 104 },
|
|
|
|
fieldProps: {
|
|
|
|
fieldProps: {
|
|
|
|