|
|
|
@ -162,7 +162,51 @@ function OrderList({ formValues }) {
|
|
|
|
|
.then(response => response.json())
|
|
|
|
|
.then(json => {
|
|
|
|
|
if (json.errcode === 0) {
|
|
|
|
|
setOrderData(json.result.map((order) => { return {...order, key: order.COLI_ID}}))
|
|
|
|
|
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])
|
|
|
|
|
} else {
|
|
|
|
|
notification.error({
|
|
|
|
|
message: '查询出错',
|
|
|
|
@ -184,7 +228,14 @@ function OrderList({ formValues }) {
|
|
|
|
|
}, [formValues])
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Table key='Order Table' loading={loading} dataSource={orderData} columns={orderColumns} />
|
|
|
|
|
<Table key='Order Table' loading={loading} dataSource={orderData}
|
|
|
|
|
columns={orderColumns}
|
|
|
|
|
pagination={{
|
|
|
|
|
showQuickJumper: true,
|
|
|
|
|
showLessItems: true,
|
|
|
|
|
showSizeChanger: true,
|
|
|
|
|
showTotal: (total) => {return `总数:${total}`}
|
|
|
|
|
}} />
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
function OrderFollow() {
|
|
|
|
|