|
|
@ -1,8 +1,8 @@
|
|
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
|
import { useNavigate } from 'react-router-dom'
|
|
|
|
import { memo, useMemo, useCallback, useEffect, useState } from 'react'
|
|
|
|
import { memo, useMemo, useCallback, useEffect, useState } from 'react'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
Row, Col, Divider, Table, Card, Button, Input,
|
|
|
|
Row, Badge, Divider, Table, Card, Button, Input,
|
|
|
|
Space, Segmented, Radio, Select, Flex, Spin, Form, Switch, DatePicker, List, Avatar
|
|
|
|
Space, Tag, Radio, Select, Flex, Spin, Form, Switch, DatePicker, List, Avatar
|
|
|
|
} from 'antd'
|
|
|
|
} from 'antd'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
StarFilled, ZoomInOutlined, StarOutlined, BarsOutlined, AppstoreOutlined, SearchOutlined
|
|
|
|
StarFilled, ZoomInOutlined, StarOutlined, BarsOutlined, AppstoreOutlined, SearchOutlined
|
|
|
@ -83,29 +83,11 @@ const columns = [
|
|
|
|
title: '订单号',
|
|
|
|
title: '订单号',
|
|
|
|
dataIndex: 'orderNumber',
|
|
|
|
dataIndex: 'orderNumber',
|
|
|
|
key: 'orderNumber',
|
|
|
|
key: 'orderNumber',
|
|
|
|
width: 300,
|
|
|
|
width: 222,
|
|
|
|
render: (text, record, inde) => {
|
|
|
|
render: (text, record, index) => {
|
|
|
|
return (
|
|
|
|
if (index === 1) return <Space size='middle'>{text}<Tag color='red'>重点</Tag></Space>
|
|
|
|
<Space size='middle'>
|
|
|
|
else if (index === 2) return <Space size='middle'>{text}<Tag color='green'>潜力</Tag></Space>
|
|
|
|
{text}
|
|
|
|
else return <Space size='middle'>{text}<Tag color='blue'>休眠</Tag></Space>
|
|
|
|
<Segmented
|
|
|
|
|
|
|
|
options={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '潜力',
|
|
|
|
|
|
|
|
value: '潜力',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '重点',
|
|
|
|
|
|
|
|
value: '重点',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
label: '休眠',
|
|
|
|
|
|
|
|
value: '休眠',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -116,6 +98,13 @@ const columns = [
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Space size='middle'>
|
|
|
|
<Space size='middle'>
|
|
|
|
<a>{text}</a>
|
|
|
|
<a>{text}</a>
|
|
|
|
|
|
|
|
<Badge
|
|
|
|
|
|
|
|
className="site-badge-count-109"
|
|
|
|
|
|
|
|
count={Math.floor(Math.random() * (100 - 2 + 1) + 2)}
|
|
|
|
|
|
|
|
style={{
|
|
|
|
|
|
|
|
backgroundColor: '#52c41a',
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -125,42 +114,11 @@ const columns = [
|
|
|
|
dataIndex: 'orderStatus',
|
|
|
|
dataIndex: 'orderStatus',
|
|
|
|
key: 'orderStatus',
|
|
|
|
key: 'orderStatus',
|
|
|
|
width: 120,
|
|
|
|
width: 120,
|
|
|
|
render: (text, record, inde) => {
|
|
|
|
render: (text, record, index) => {
|
|
|
|
return (
|
|
|
|
if (index === 1) return text + '(一催)'
|
|
|
|
<Select
|
|
|
|
else if (index === 2) return text + '(二催)'
|
|
|
|
defaultValue='新订单'
|
|
|
|
else if (index === 3) return text + '(三催)'
|
|
|
|
style={{
|
|
|
|
else return text
|
|
|
|
width: 100,
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
bordered={false}
|
|
|
|
|
|
|
|
options={[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '新订单',
|
|
|
|
|
|
|
|
label: '新订单',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '报价中',
|
|
|
|
|
|
|
|
label: '报价中',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '丢失',
|
|
|
|
|
|
|
|
label: '丢失',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '一催',
|
|
|
|
|
|
|
|
label: '一催',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '二催',
|
|
|
|
|
|
|
|
label: '二催',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
value: '三催',
|
|
|
|
|
|
|
|
label: '三催',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -181,11 +139,10 @@ const columns = [
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
const AdvanceSearchForm = memo(function AdvanceSearch({ onSubmit }) {
|
|
|
|
const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
const [form] = Form.useForm()
|
|
|
|
const [form] = Form.useForm()
|
|
|
|
console.info('AdvanceSearch: ')
|
|
|
|
|
|
|
|
function handleSubmit(values) {
|
|
|
|
function handleSubmit(values) {
|
|
|
|
onSubmit(values);
|
|
|
|
onSubmit?.(values)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Form
|
|
|
|
<Form
|
|
|
@ -278,8 +235,6 @@ function OrderFollow() {
|
|
|
|
const orderListMemo = useMemo(() => <OrderList searchCriteria={searchCriteria} />, [searchCriteria])
|
|
|
|
const orderListMemo = useMemo(() => <OrderList searchCriteria={searchCriteria} />, [searchCriteria])
|
|
|
|
|
|
|
|
|
|
|
|
const handleSubmit = useCallback((criteria) => {
|
|
|
|
const handleSubmit = useCallback((criteria) => {
|
|
|
|
console.info('onSubmit.searchCriteria: ')
|
|
|
|
|
|
|
|
console.info(criteria)
|
|
|
|
|
|
|
|
setSearchCriteria({
|
|
|
|
setSearchCriteria({
|
|
|
|
...criteria,
|
|
|
|
...criteria,
|
|
|
|
type: 'advance'
|
|
|
|
type: 'advance'
|
|
|
@ -292,7 +247,7 @@ function OrderFollow() {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Space direction='vertical' size='large' style={{ width: '100%' }}>
|
|
|
|
<Space direction='vertical' size='large' style={{ width: '100%' }}>
|
|
|
|
<Flex gap='large' justify='start' align='center' horizontal>
|
|
|
|
<Flex gap='large' justify='start' align='center' horizontal='true'>
|
|
|
|
<Radio.Group
|
|
|
|
<Radio.Group
|
|
|
|
options={[
|
|
|
|
options={[
|
|
|
|
{ label: '今日任务', value: 'today' },
|
|
|
|
{ label: '今日任务', value: 'today' },
|
|
|
@ -327,13 +282,11 @@ function OrderFollow() {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
function OrderList({ searchCriteria }) {
|
|
|
|
function OrderList({ searchCriteria }) {
|
|
|
|
|
|
|
|
|
|
|
|
const countryList = useGetJson(`https://p9axztuwd7x8a7.mycht.cn/service-InfoSys/InfoSys/GetCountryList`)
|
|
|
|
|
|
|
|
console.info(countryList)
|
|
|
|
|
|
|
|
console.info('OrderList.searchCriteria: ')
|
|
|
|
|
|
|
|
console.info(searchCriteria)
|
|
|
|
console.info(searchCriteria)
|
|
|
|
|
|
|
|
const countryList = useGetJson(`https://p9axztuwd7x8a7.mycht.cn/service-InfoSys/InfoSys/GetCountryList`)
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Table loading={countryList === null} dataSource={dataSource} columns={columns} />
|
|
|
|
<Table loading={countryList === null} dataSource={countryList === null ? null : dataSource} columns={columns} />
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|