|
|
|
@ -1,10 +1,21 @@
|
|
|
|
|
import { memo, useCallback, useEffect, useState } from 'react'
|
|
|
|
|
import {
|
|
|
|
|
Badge, Divider, Table, Button, Input,
|
|
|
|
|
Space, Tag, Radio, Select, Flex, Form, Switch, DatePicker, App
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import { Conditional } from '@/components/Conditional'
|
|
|
|
|
import { useAuthContext } from '@/stores/AuthContext'
|
|
|
|
|
import {
|
|
|
|
|
App,
|
|
|
|
|
Badge,
|
|
|
|
|
Button,
|
|
|
|
|
DatePicker,
|
|
|
|
|
Divider,
|
|
|
|
|
Flex, Form,
|
|
|
|
|
Input,
|
|
|
|
|
Radio, Select,
|
|
|
|
|
Space,
|
|
|
|
|
Switch,
|
|
|
|
|
Table,
|
|
|
|
|
Tag
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import { memo, useCallback, useEffect, useState } from 'react'
|
|
|
|
|
import { NavLink } from 'react-router-dom'
|
|
|
|
|
|
|
|
|
|
const { RangePicker } = DatePicker
|
|
|
|
|
|
|
|
|
@ -17,7 +28,7 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
<Form
|
|
|
|
|
layout={'inline'}
|
|
|
|
|
form={form}
|
|
|
|
|
initialValues={{ orderLabel: '全部' }}
|
|
|
|
|
initialValues={{ orderLabel: '全部', orderStatus: '全部' }}
|
|
|
|
|
onFinish={handleSubmit}
|
|
|
|
|
style={{
|
|
|
|
|
maxWidth: 'none',
|
|
|
|
@ -29,18 +40,9 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
width: 100,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: '潜力',
|
|
|
|
|
label: '潜力',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '重点',
|
|
|
|
|
label: '重点',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '休眠',
|
|
|
|
|
label: '休眠',
|
|
|
|
|
}
|
|
|
|
|
{ value: '240003', label: '重点' },
|
|
|
|
|
{ value: '240002', label: '潜力' },
|
|
|
|
|
{ value: '240001', label: '休眠' }
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
@ -80,7 +82,7 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
<Form.Item label='订单号' name='orderNumber'>
|
|
|
|
|
<Input placeholder='订单号' allowClear />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item label='出发日期' name='startDate'>
|
|
|
|
|
<Form.Item label='出发日期' name='startDateRange'>
|
|
|
|
|
<RangePicker />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item >
|
|
|
|
@ -97,11 +99,11 @@ function OrderList({ formValues }) {
|
|
|
|
|
title: '订单号',
|
|
|
|
|
dataIndex: 'COLI_ID',
|
|
|
|
|
width: 222,
|
|
|
|
|
render: (text, record, index) => {
|
|
|
|
|
if (record.COLI_LineGrade === 240003) return <Space key={record.COLI_ID + index} size='middle'>{text}<Tag color='red'>重点</Tag></Space>
|
|
|
|
|
else if (record.COLI_LineGrade === 240002) return <Space key={record.COLI_ID + index} size='middle'>{text}<Tag color='green'>潜力</Tag></Space>
|
|
|
|
|
else if (record.COLI_LineGrade === 240001) return <Space key={record.COLI_ID + index} size='middle'>{text}<Tag color='blue'>休眠</Tag></Space>
|
|
|
|
|
else return <Space key={record.COLI_ID + index} size='middle'>{text}</Space>
|
|
|
|
|
render: (text, record) => {
|
|
|
|
|
if (record.COLI_LineGrade === 240003) return <Space>{text}<Tag color='red'>重点</Tag></Space>
|
|
|
|
|
else if (record.COLI_LineGrade === 240002) return <Space>{text}<Tag color='green'>潜力</Tag></Space>
|
|
|
|
|
else if (record.COLI_LineGrade === 240001) return <Space>{text}<Tag color='blue'>休眠</Tag></Space>
|
|
|
|
|
else return <Space>{text}</Space>
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -111,8 +113,8 @@ function OrderList({ formValues }) {
|
|
|
|
|
let regularText = ''
|
|
|
|
|
if (record.buytime > 0) regularText = '(R' + record.buytime + ')'
|
|
|
|
|
return (
|
|
|
|
|
<Space size='middle'>
|
|
|
|
|
<a>{text + regularText}</a>
|
|
|
|
|
<Space>
|
|
|
|
|
<NavLink to={`/order/chat/${record.COLI_ID}`}>{text + regularText}</NavLink>
|
|
|
|
|
<Badge
|
|
|
|
|
count={record.unread_msg}
|
|
|
|
|
style={{
|
|
|
|
|