|
|
|
@ -1,9 +1,8 @@
|
|
|
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
|
|
import { useRef, useEffect, useState } from 'react'
|
|
|
|
|
import { observer } from 'mobx-react'
|
|
|
|
|
import {
|
|
|
|
|
Row, Col, Divider, Table, Card, Button, Input,
|
|
|
|
|
Space, Segmented, Radio, Select, AutoComplete, Spin, Typography, Flex, DatePicker, List, Avatar
|
|
|
|
|
Space, Segmented, Radio, Select, AutoComplete, Spin, Typography, Switch, DatePicker, List, Avatar
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import {
|
|
|
|
|
StarFilled, ZoomInOutlined, StarOutlined, BarsOutlined, AppstoreOutlined, SearchOutlined
|
|
|
|
@ -184,10 +183,63 @@ const columns = [
|
|
|
|
|
function OrderFollow() {
|
|
|
|
|
|
|
|
|
|
const [taskCategory, setTaskCategory] = useState('today')
|
|
|
|
|
const [advanceChecked, toggleAdvance] = useState(false)
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Spin spinning={false} delay={500}>
|
|
|
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
|
|
|
<Row gutter={[16, 16]} justify='start' align='middle'>
|
|
|
|
|
<Col span={10}>
|
|
|
|
|
<Radio.Group
|
|
|
|
|
options={[
|
|
|
|
|
{ label: '今日任务', value: 'today' },
|
|
|
|
|
{ label: '潜力客户', value: 'star' },
|
|
|
|
|
{ label: '重点订单', value: 'important' },
|
|
|
|
|
{ label: '成行', value: 'myfavorites' },
|
|
|
|
|
{ label: '走团中', value: 'ing' },
|
|
|
|
|
{ label: '走团后一月', value: 'lastMonth' }
|
|
|
|
|
]}
|
|
|
|
|
value={taskCategory}
|
|
|
|
|
onChange={({ target: { value } }) => {
|
|
|
|
|
setTaskCategory(value)
|
|
|
|
|
}}
|
|
|
|
|
optionType='button'
|
|
|
|
|
buttonStyle='solid'
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
<Switch checkedChildren='高级查询' unCheckedChildren='高级查询'
|
|
|
|
|
defaultChecked={false}
|
|
|
|
|
onChange={() => {toggleAdvance(!advanceChecked)}} />
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Conditional condition={advanceChecked} whenTrue={<AdvanceCriteria />} />
|
|
|
|
|
</Space>
|
|
|
|
|
<Divider plain orientation='left'></Divider>
|
|
|
|
|
<Space
|
|
|
|
|
direction='vertical'
|
|
|
|
|
size='middle'
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<OrderList taskCategory={taskCategory} />
|
|
|
|
|
</Space>
|
|
|
|
|
</Spin>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
function OrderList({ taskCategory }) {
|
|
|
|
|
console.info('taskCategory: ' + taskCategory)
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Table dataSource={dataSource} columns={columns} />
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AdvanceCriteria() {
|
|
|
|
|
return (
|
|
|
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
|
|
@ -250,9 +302,8 @@ function OrderFollow() {
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={6}>
|
|
|
|
|
<Input placeholder="订单号" allowClear />
|
|
|
|
|
<Input placeholder='订单号' allowClear />
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
<RangePicker />
|
|
|
|
|
</Col>
|
|
|
|
@ -265,45 +316,6 @@ function OrderFollow() {
|
|
|
|
|
</Space>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Spin spinning={false} delay={500}>
|
|
|
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
|
|
|
<Row gutter={[16, 16]} justify='start' align='middle'>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
<Radio.Group
|
|
|
|
|
options={[
|
|
|
|
|
{ label: '今日任务', value: 'today' },
|
|
|
|
|
{ label: '潜力客户', value: 'star' },
|
|
|
|
|
{ label: '重点订单', value: 'important' },
|
|
|
|
|
{ label: '成行', value: 'myfavorites' },
|
|
|
|
|
{ label: '走团中', value: 'ing' },
|
|
|
|
|
{ label: '走团后一月', value: 'lastMonth' },
|
|
|
|
|
{ label: '高级查询', value: 'advance' }
|
|
|
|
|
]}
|
|
|
|
|
value={taskCategory}
|
|
|
|
|
onChange={({ target: { value } }) => {
|
|
|
|
|
setTaskCategory(value)
|
|
|
|
|
}}
|
|
|
|
|
optionType='button'
|
|
|
|
|
buttonStyle='solid'
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Conditional condition={taskCategory==='advance'} whenTrue={<AdvanceCriteria />} />
|
|
|
|
|
</Space>
|
|
|
|
|
<Divider plain orientation='left'></Divider>
|
|
|
|
|
<Space
|
|
|
|
|
direction='vertical'
|
|
|
|
|
size='middle'
|
|
|
|
|
style={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Table dataSource={dataSource} columns={columns} />
|
|
|
|
|
</Space>
|
|
|
|
|
</Spin>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default observer(OrderFollow)
|
|
|
|
|
export default OrderFollow
|
|
|
|
|