Merge remote-tracking branch 'origin/main' into dev/chat

dev/chat
Lei OT 2 years ago
commit b91314db0f

@ -30,7 +30,6 @@ const data = [
]
const SearchForm = memo(function ({ onSubmit }) {
console.info('SearchForm')
const [form] = Form.useForm()
function handleSubmit(values) {
onSubmit?.(values)

@ -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() {

@ -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 (
<Table dataSource={salesData} loading={loading} columns={columns} />
<Table dataSource={salesData} loading={loading}
columns={columns}
pagination={{
showQuickJumper: true,
showLessItems: true,
showSizeChanger: true,
showTotal: (total) => {return `总数:${total}`}
}} />
)
}

Loading…
Cancel
Save