From eace01c46efe985fd492218673ed419e63b27b42 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Mon, 29 Jan 2024 14:46:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E9=A1=B5=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ChatHistory.jsx | 1 - src/views/OrderFollow.jsx | 55 +++++++++++++++++++++++++++++++++-- src/views/SalesManagement.jsx | 11 +++++-- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/src/views/ChatHistory.jsx b/src/views/ChatHistory.jsx index 1d429af..250616d 100644 --- a/src/views/ChatHistory.jsx +++ b/src/views/ChatHistory.jsx @@ -30,7 +30,6 @@ const data = [ ] const SearchForm = memo(function ({ onSubmit }) { - console.info('SearchForm') const [form] = Form.useForm() function handleSubmit(values) { onSubmit?.(values) diff --git a/src/views/OrderFollow.jsx b/src/views/OrderFollow.jsx index a476529..826f467 100644 --- a/src/views/OrderFollow.jsx +++ b/src/views/OrderFollow.jsx @@ -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 ( - +
{return `总数:${total}`} + }} /> ) } function OrderFollow() { diff --git a/src/views/SalesManagement.jsx b/src/views/SalesManagement.jsx index 6c3b808..3618395 100644 --- a/src/views/SalesManagement.jsx +++ b/src/views/SalesManagement.jsx @@ -153,7 +153,7 @@ const SalesTable = function({formValues}) { setLoading(true) setTimeout(() => { const randomData = dataSource.map(data => { - data.travelAdvisor = 'Albee' + Math.floor(Math.random() * (100 - 2 + 1) + 2) + data.travelAdvisor = 'LYJ2024' + Math.floor(Math.random() * (100 - 2 + 1) + 2) data.important = Math.floor(Math.random() * (100 - 2 + 1) + 2) data.star = Math.floor(Math.random() * (100 - 2 + 1) + 2) data.ing = Math.floor(Math.random() * (100 - 2 + 1) + 2) @@ -188,7 +188,14 @@ const SalesTable = function({formValues}) { }, ] return ( -
+
{return `总数:${total}`} + }} /> ) }