From f081aa46e9776db2a0941b763b8c6a4dfe08715d Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 18 Jun 2025 15:09:00 +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=E6=94=AF=E6=8C=81=E5=95=86=E5=8A=A1?= =?UTF-8?q?=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 | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/views/Conversations/Online/Components/EmailBind.jsx b/src/views/Conversations/Online/Components/EmailBind.jsx index a2c782a..f6c999d 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, Form, Row, Col, Input } from 'antd' +import { App, Modal, Button, Table, Form, Row, Col, Input, Checkbox } from 'antd' import { ApiOutlined } from '@ant-design/icons' import { isEmpty, cloneDeep } from '@/utils/commons' import { fetchJSON } from '@/utils/request' @@ -33,7 +33,7 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, coliID, onB const copyObject = cloneDeep(values) delete copyObject.type const allEmpty = Object.values(copyObject).every((val) => { - return val === null || val === '' || val === undefined + return val === null || String(val).trim() === '' || val === undefined }) if (allEmpty) { notification.warning({ @@ -45,12 +45,13 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, coliID, onB return false } // values.opisn = loginUserId - values.sourcetype = values.sourcetype || '227001' + values.sourcetype = values.is_biz ? '227002' : '227001' + delete values.is_biz setLoading(false) setSearchLoading(true) setSearchResult([]) const result = await fetchHTOrderList(values) - setSearchResult(result) + setSearchResult(result.map(ele => ({...ele, sourcetype: values.sourcetype}))) setSearchLoading(false) } @@ -133,7 +134,7 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, coliID, onB key: 'action', width: 150, render: (_, record) => ( - ), @@ -158,7 +159,7 @@ export const EmailBindFormModal = ({ mai_sn, conversationid, userId, coliID, onB destroyOnHidden> {/* */}
- - - + -