From b7fa9490a7d0078cec6dc8b0249d628351913234 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 7 May 2025 16:06:12 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=82=AE=E4=BB=B6=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E8=AE=A2=E5=8D=95.=20=E7=BB=91=E5=AE=9A=E5=88=B0=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=BA=BA=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Online/Components/EmailBind.jsx | 108 +++++++++++++----- 1 file changed, 79 insertions(+), 29 deletions(-) diff --git a/src/views/Conversations/Online/Components/EmailBind.jsx b/src/views/Conversations/Online/Components/EmailBind.jsx index 5a6177d..288d18a 100644 --- a/src/views/Conversations/Online/Components/EmailBind.jsx +++ b/src/views/Conversations/Online/Components/EmailBind.jsx @@ -1,5 +1,5 @@ import { useState } from 'react' -import { App, Modal, Button, Table } from 'antd' +import { App, Modal, Button, Table, Form, Row, Col, Input } from 'antd' import { ApiOutlined } from '@ant-design/icons' import { isEmpty, cloneDeep } from '@/utils/commons' import { fetchJSON } from '@/utils/request' @@ -9,12 +9,17 @@ import dayjs from 'dayjs' import useAuthStore from '@/stores/AuthStore' import { fetchEmailBindOrderAction } from '@/actions/EmailActions' -const fetchOrderList = async (params) => { +const fetchMyOrderList = async (params) => { const { errcode, result } = await fetchJSON(`${API_HOST}/getdvancedwlorder`, params) return errcode !== 0 ? [] : result } +const fetchHTOrderList = async (params) => { + const { errcode, result } = await fetchJSON(`${API_HOST}/query_order`, params) + return errcode !== 0 ? [] : result +} -export const EmailBindFormModal = ({ mai_sn, conversationid, userId, onBoundSuccess, ...props }) => { +export const EmailBindFormModal = ({ mai_sn, conversationid, userId, coliID, onBoundSuccess, ...props }) => { + const [form] = Form.useForm() const [open, setOpen] = useState(false) const { userId: loginUserId } = useAuthStore((state) => state.loginUser) @@ -39,11 +44,12 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, onBoundSucc }) return false } - values.opisn = loginUserId + // values.opisn = loginUserId + values.sourcetype = values.sourcetype || '227001' setLoading(false) setSearchLoading(true) setSearchResult([]) - const result = await fetchOrderList(values) + const result = await fetchHTOrderList(values) setSearchResult(result) setSearchLoading(false) } @@ -76,34 +82,52 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, onBoundSucc width: 222, }, { - title: '客人姓名', - key: 'coli_guest', - dataIndex: 'coli_guest', - render: (text, record) => { - let regularText = '' - if (record.buytime > 0) regularText = '(R' + record.buytime + ')' - return text + regularText - }, + title: '顾问', + key: 'OperatorName', + dataIndex: 'OperatorName', + width: 100, }, { - title: '出发日期', - key: 'COLI_OrderStartDate', - dataIndex: 'COLI_OrderStartDate', - width: 120, - hidden: false, - sortDirections: ['ascend', 'descend'], - sorter: (a, b) => { - const datejsA = isEmpty(a.COLI_OrderStartDate) ? 0 : new dayjs(a.COLI_OrderStartDate).valueOf() - const datejsB = isEmpty(b.COLI_OrderStartDate) ? 0 : new dayjs(b.COLI_OrderStartDate).valueOf() - return datejsA - datejsB - }, + title: '分配时间', + key: 'COLI_AssignDate', + dataIndex: 'COLI_AssignDate', + width: 100, }, { - title: '附加信息', - ellipsis: true, - key: 'COLI_Introduction', - dataIndex: 'COLI_Introduction', + title: '天数', + key: 'COLI_Days', + dataIndex: 'COLI_Days', + width: 100, }, + // { + // title: '客人姓名', + // key: 'coli_guest', + // dataIndex: 'coli_guest', + // render: (text, record) => { + // let regularText = '' + // if (record.buytime > 0) regularText = '(R' + record.buytime + ')' + // return text + regularText + // }, + // }, + // { + // title: '出发日期', + // key: 'COLI_OrderStartDate', + // dataIndex: 'COLI_OrderStartDate', + // width: 120, + // hidden: false, + // sortDirections: ['ascend', 'descend'], + // sorter: (a, b) => { + // const datejsA = isEmpty(a.COLI_OrderStartDate) ? 0 : new dayjs(a.COLI_OrderStartDate).valueOf() + // const datejsB = isEmpty(b.COLI_OrderStartDate) ? 0 : new dayjs(b.COLI_OrderStartDate).valueOf() + // return datejsA - datejsB + // }, + // }, + // { + // title: '附加信息', + // ellipsis: true, + // key: 'COLI_Introduction', + // dataIndex: 'COLI_Introduction', + // }, { title: '', key: 'action', @@ -132,7 +156,33 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, onBoundSucc setOpen(false) }} destroyOnClose> - + {/* */} +
+ + + + + + + +
+ +
+
+