|
|
|
|
@ -1,16 +1,6 @@
|
|
|
|
|
import {
|
|
|
|
|
App,
|
|
|
|
|
Badge,
|
|
|
|
|
Button,
|
|
|
|
|
DatePicker,
|
|
|
|
|
Divider,
|
|
|
|
|
Flex, Form,
|
|
|
|
|
Input,
|
|
|
|
|
Radio, Row, Col, Select,
|
|
|
|
|
Space,
|
|
|
|
|
Switch,
|
|
|
|
|
Table,
|
|
|
|
|
Tag
|
|
|
|
|
App, Badge, Button, DatePicker, Divider, Flex, Form, Input,
|
|
|
|
|
Radio, Row, Col, Select, Space, Switch, Table, Tag
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import { memo, useCallback, useEffect, useState } from 'react'
|
|
|
|
|
import { NavLink } from 'react-router-dom'
|
|
|
|
|
@ -56,17 +46,14 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
return (
|
|
|
|
|
<Form
|
|
|
|
|
layout={'vertical'}
|
|
|
|
|
// layout={'inline'}
|
|
|
|
|
form={form}
|
|
|
|
|
initialValues={{ orderLabel: '', orderStatus: '', remindState: '',
|
|
|
|
|
initialValues={{
|
|
|
|
|
orderLabel: '', orderStatus: '', remindState: '',
|
|
|
|
|
startDateRange: [dayjs().startOf('M'), dayjs().endOf('M')]
|
|
|
|
|
}}
|
|
|
|
|
onFinish={handleSubmit}
|
|
|
|
|
// style={{
|
|
|
|
|
// maxWidth: '200',
|
|
|
|
|
// }}
|
|
|
|
|
>
|
|
|
|
|
<Row justify='start' align='middle' gutter={16}>
|
|
|
|
|
<Row justify='start' gutter={16}>
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
<Form.Item label='订单号' name='orderNumber'>
|
|
|
|
|
<Input placeholder='订单号' allowClear />
|
|
|
|
|
@ -89,7 +76,7 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
<Row justify='start' align='middle' gutter={16}>
|
|
|
|
|
<Row justify='start' gutter={16}>
|
|
|
|
|
<Col span={2}>
|
|
|
|
|
<Form.Item label='标签' name='orderLabel'>
|
|
|
|
|
<Select
|
|
|
|
|
@ -148,10 +135,8 @@ const AdvanceSearchForm = memo(function ({ onSubmit }) {
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col flex="auto">
|
|
|
|
|
{/* <Form.Item > */}
|
|
|
|
|
<Col span={2}>
|
|
|
|
|
<Button type='primary' htmlType='submit'>搜索</Button>
|
|
|
|
|
{/* </Form.Item> */}
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
@ -243,51 +228,7 @@ function OrderList({ formValues }) {
|
|
|
|
|
.then(response => response.json())
|
|
|
|
|
.then(json => {
|
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
|
const testOrder = [{
|
|
|
|
|
"key": 240129001,
|
|
|
|
|
"COLI_SN": 240129001,
|
|
|
|
|
"COLI_ID": "LYJ240129001",
|
|
|
|
|
"unread_msg": Math.floor(Math.random() * (100 - 2 + 1) + 2),
|
|
|
|
|
"COLI_LineGrade": 240001,
|
|
|
|
|
"coli_guest": "LiaoYijun",
|
|
|
|
|
"buytime": 1,
|
|
|
|
|
"COLI_StateCode": 1,
|
|
|
|
|
"COLI_State": "新订单",
|
|
|
|
|
"lettertitle": "1st Trip Plan: 8-Day Essential Japan Family Trip with Disneyland",
|
|
|
|
|
"last_received_time": new Date().toDateString(),
|
|
|
|
|
"COLI_Introduction": "",
|
|
|
|
|
"RemindState": 0
|
|
|
|
|
},{
|
|
|
|
|
"key": 240129002,
|
|
|
|
|
"COLI_SN": 240129002,
|
|
|
|
|
"COLI_ID": "QQS240129002",
|
|
|
|
|
"unread_msg": Math.floor(Math.random() * (100 - 2 + 1) + 2),
|
|
|
|
|
"COLI_LineGrade": 240002,
|
|
|
|
|
"coli_guest": "QinQianSheng",
|
|
|
|
|
"buytime": 2,
|
|
|
|
|
"COLI_StateCode": 1,
|
|
|
|
|
"COLI_State": "新订单",
|
|
|
|
|
"lettertitle": "2nd Trip Plan: 2-Week Japan Private Family Vacation",
|
|
|
|
|
"last_received_time": new Date().toDateString(),
|
|
|
|
|
"COLI_Introduction": "",
|
|
|
|
|
"RemindState": 0
|
|
|
|
|
},{
|
|
|
|
|
"key": 240129003,
|
|
|
|
|
"COLI_SN": 240129003,
|
|
|
|
|
"COLI_ID": "LYT240129003",
|
|
|
|
|
"unread_msg": Math.floor(Math.random() * (100 - 2 + 1) + 2),
|
|
|
|
|
"COLI_LineGrade": 240003,
|
|
|
|
|
"coli_guest": "LeiYuanTing",
|
|
|
|
|
"buytime": 3,
|
|
|
|
|
"COLI_StateCode": 1,
|
|
|
|
|
"COLI_State": "新订单",
|
|
|
|
|
"lettertitle": "3rd Trip Plan: 12-Day Best of Thailand and Cambodia Tour",
|
|
|
|
|
"last_received_time": new Date().toDateString(),
|
|
|
|
|
"COLI_Introduction": "",
|
|
|
|
|
"RemindState": 0
|
|
|
|
|
}]
|
|
|
|
|
const fetchData = json.result.map((order) => { return {...order, key: order.COLI_ID}})
|
|
|
|
|
setOrderData([...testOrder, ...fetchData])
|
|
|
|
|
setOrderData(json.result.map((order) => { return { ...order, key: order.COLI_ID } }))
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: '查询出错',
|
|
|
|
|
|