import React, { Children, useContext, useState } from 'react'; import { observer } from 'mobx-react'; import { stores_Context } from '../config'; import moment from 'moment'; import { Row, Col, Table, Select, Space, Typography, Progress, Spin, Divider, Button, Switch } from 'antd'; import SearchForm from './../components/search/SearchForm'; import { VSTag, TableExportBtn } from './../components/Data'; const {Text} = Typography; export default observer((props) => { const { sale_store, date_picker_store: searchFormStore } = useContext(stores_Context); const { customerServicesStore, HotelCruiseStore, date_picker_store } = useContext(stores_Context); const { loading, dataSource } = HotelCruiseStore.cruise; const { formValues, siderBroken } = searchFormStore; const tableSorter = (a, b, colName) => (a[colName] - b[colName]); const tableProps = { size: 'small', bordered: true, pagination: false, columns: [ { title: '产品', dataIndex: 'ProductName', key: 'ProductName' }, { title: '房间数', dataIndex: 'TotalNum', key: 'TotalNum', sorter: (a, b) => tableSorter(a, b, 'TotalNum'), render: (v, r) => ( <> {v} {r.CPTotalNum && VS {r.CPTotalNum}} {r.CPTotalNum && } ), }, { title: '人数', dataIndex: 'TotalPersonNum', key: 'TotalPersonNum', sorter: (a, b) => tableSorter(a, b, 'TotalPersonNum'), render: (v, r) => ( <> {v} {r.CPTotalPersonNum && VS {r.CPTotalPersonNum}} {r.CPTotalNum && } ),}, { title: '总利润', dataIndex: 'TotalProfit', key: 'TotalProfit', sorter: (a, b) => tableSorter(a, b, 'TotalProfit'), render: (v, r) => ( <> {v} {r.CPTotalProfit && VS {r.CPTotalProfit}} {r.CPTotalNum && } ), }, // { title: '单订船', dataIndex: '', key: '' }, // { title: '订单含行程', dataIndex: '', key: '' }, // { title: '国籍', dataIndex: '', key: '' }, ], }; return ( <> { HotelCruiseStore.setSearchValues(obj, form); HotelCruiseStore.getCruiseData(obj); }} />
record.ProductName} /> ); });