From a07144f2c33cc79ba658374c8c430d9d7b11d59d Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Wed, 6 Aug 2025 19:00:53 +0800 Subject: [PATCH] update --- config/config.ts | 1 + package.json | 2 +- src/layouts/BasicLayout.tsx | 2 +- .../CardCouponApplicRules/index.tsx | 27 ++++++-- .../CardHaveCollection/index.tsx | 19 +++++ .../CardInformationManager/index.tsx | 25 +++++-- .../CardVoucherCollection/index.tsx | 20 ++++++ .../CardVoucherRedemption/index.tsx | 15 ++++ .../CardVoucherSearch/index.tsx | 29 +++++++- .../MerchantInformation/index.tsx | 46 ++++++++++--- .../components/compareList.tsx | 24 +++---- .../component/YearExamineDetailTable.tsx | 8 +-- .../index.tsx | 8 +++ .../components/orderDetailModal.tsx | 6 +- .../travelMember/BookingMealOrder/index.tsx | 14 +++- .../travelMember/BuriedPointConfig/index.tsx | 34 +++++---- .../BusinessActivityStatistics/index.tsx | 14 ++-- .../GrowthValueRecordSearch/index.tsx | 69 +++++++++++++++---- .../GrowthValueRuleConfig/index.tsx | 2 +- .../travelMember/MallBrandManage/index.tsx | 18 +++-- .../MallClassificationManage/index.tsx | 12 +++- .../travelMember/MallOrderManage/index.tsx | 19 ++++- .../components/addressDetail.tsx | 13 +++- .../travelMember/MemberAddress/index.tsx | 25 ++++--- .../MemberSummaryStatistics/index.tsx | 19 ++--- .../travelMember/MemberTagManage/index.tsx | 20 ++++-- .../MembershipLevelDistribution/index.tsx | 34 ++++++++- .../MembershipLevelStatistics/index.tsx | 15 ++-- .../MembershipTypeStatistics/index.tsx | 15 ++-- .../MerchantEvaluationManage/index.tsx | 18 ++++- .../OrderAfterSalesManage/index.tsx | 10 ++- .../travelMember/OrderProductManage/index.tsx | 32 ++++++--- .../travelMember/PointsRecordSearch/index.tsx | 66 ++++++++++++++---- .../ProductListingManagement/index.tsx | 16 +++-- .../ProductSpecificationManage/index.tsx | 14 +++- .../ProductWarningRuleSetting/index.tsx | 7 +- .../RegistrationRetentionAnalysis/index.tsx | 33 +++++---- .../ShoppingMallProductSearch/index.tsx | 19 ++++- .../SummaryOfIntegralGrowthValue/index.tsx | 4 +- .../SummaryOfReservation/index.tsx | 27 +++++--- .../SummaryofMerchantReviews/index.tsx | 19 +++-- .../components/SupplierLeftSelectTree.tsx | 5 +- .../travelMember/TradingLedger/index.tsx | 21 ++++-- src/pages/travelMember/memberInfor/index.tsx | 19 +++-- .../travelMember/scenicSpotConfig/index.tsx | 26 ++++--- src/utils/highlightText.tsx | 18 +++++ src/versionEnv.ts | 6 +- 47 files changed, 698 insertions(+), 217 deletions(-) create mode 100644 src/utils/highlightText.tsx diff --git a/config/config.ts b/config/config.ts index ab20322..0e795a2 100644 --- a/config/config.ts +++ b/config/config.ts @@ -18,6 +18,7 @@ const { REACT_APP_ENV } = process.env; export default defineConfig({ hash: true, + mock: false, antd: {}, dva: { hmr: true diff --git a/package.json b/package.json index 79e9f30..a140f65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.5.15", + "version": "4.5.17", "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index 43fca5c..bb7f9d8 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -334,7 +334,7 @@ const BasicLayout: React.FC = (props) => { obj[item.value] = item.label }) session.set('BUSINESSTRADEYNList', list); - session.set('BUSINESSTRADEYNObj', obj); + session.set('BUSINESSTRADEYNObj', flattenGrowthType(BUSINESSTRADEYN, 'label', 'value')); session.set('BUSINESSTRADEYNTree', BUSINESSTRADEYN); } }) diff --git a/src/pages/CardInformation/CardCouponApplicRules/index.tsx b/src/pages/CardInformation/CardCouponApplicRules/index.tsx index 1aaed14..1fabf42 100644 --- a/src/pages/CardInformation/CardCouponApplicRules/index.tsx +++ b/src/pages/CardInformation/CardCouponApplicRules/index.tsx @@ -1,4 +1,4 @@ -// 卡券适用规则 卡券规则设置 +// 卡券适用规则 卡券规则设置 营销活动设置 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -21,6 +21,7 @@ import './index.less' import { handleSetlogSave } from "@/utils/format"; import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter"; import SelectServiceShop from "./components/selectServiceShop"; +import { highlightText } from "@/utils/highlightText"; const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -52,7 +53,8 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => const [modalLoading, setModalLoading] = useState(false) // 显示选择门店 const [showSelectShopModal, setShowSelectShopModal] = useState(false) - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ // { @@ -63,6 +65,14 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => // hideInSearch: true, // ellipsis: true, // }, + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入门店规则' + } + }, { title: "适用门店规则", dataIndex: "COOPSHOP_RULE_NAME", @@ -74,7 +84,10 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => return record?.COOPSHOP_RULE_NAME ? { setShowDetail(true) setCurrentRow(record) - }}>{record?.COOPSHOP_RULE_NAME} : "-" + }}> + {/* {record?.COOPSHOP_RULE_NAME} */} + {highlightText(record?.COOPSHOP_RULE_NAME, currentSearchText)} + : "-" } }, { @@ -300,9 +313,13 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => ISVALID: 1 }, PageIndex: 1, - PageSize: 999999 + PageSize: 999999, + KeyWord: { + Key: 'COOPSHOP_RULE_NAME', + Value: params?.searchValue || '' + }, } - + setCurrentSearchText(params?.searchValue || "") setSearchParams(params) const data = await handleGetCOOPSHOP_RULEList(req) console.log('datadatadatadatadata', data); diff --git a/src/pages/CardInformation/CardHaveCollection/index.tsx b/src/pages/CardInformation/CardHaveCollection/index.tsx index c5db437..4835ddf 100644 --- a/src/pages/CardInformation/CardHaveCollection/index.tsx +++ b/src/pages/CardInformation/CardHaveCollection/index.tsx @@ -10,6 +10,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { handeGetCouponStockList } from "@/pages/travelMember/service"; import moment from 'moment' import CardVoucherSearch from "../CardVoucherSearch"; +import { highlightText } from "@/utils/highlightText"; const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -36,8 +37,18 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { const [currentRow, setCurrentRow] = useState() // 显示详情 const [showDetial, setShowDetail] = useState() + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入卡券名称' + } + }, { title: "卡券类型", dataIndex: "COUPON_TYPE", @@ -77,6 +88,9 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { align: 'center', hideInSearch: true, ellipsis: true, + render: (_, record) => { + return highlightText(record?.COUPON_NAME, currentSearchText) + } }, { title: "发放数量", @@ -188,10 +202,15 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { }, PageIndex: 1, PageSize: 999999, + keyWord: { + key: "COUPON_NAME", + value: params?.searchValue || "" + }, sortStr: "END_TIME desc" } setSearchParams(params) const data = await handeGetCouponStockList(req) + setCurrentSearchText(params?.searchValue || "") console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { return { data: data.List, success: true } diff --git a/src/pages/CardInformation/CardInformationManager/index.tsx b/src/pages/CardInformation/CardInformationManager/index.tsx index 4a5add5..b5c57e6 100644 --- a/src/pages/CardInformation/CardInformationManager/index.tsx +++ b/src/pages/CardInformation/CardInformationManager/index.tsx @@ -1,4 +1,4 @@ -// 卡券信息管理 +// 卡券信息管理 营销活动配置 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -23,6 +23,7 @@ import moment from 'moment' import { uploadPicture } from "@/services/picture"; import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter"; import { handeGetWECHATAPPSIGNList } from "@/pages/travelMember/service"; +import { highlightText } from "@/utils/highlightText"; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -74,7 +75,8 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 // 小程序列表数据 const [wxMinList, setWxMinList] = useState([]) - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 预览上传后的图片 const handlePreview = async () => { @@ -86,6 +88,14 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = } const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入卡券名称' + } + }, { title: "序号", dataIndex: "index", @@ -109,7 +119,10 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = { name: "-", url: record.COUPON_IMAGEURL } ]) } - }}>{record?.COUPON_NAME} : "-" + }}> + {/* {record?.COUPON_NAME} */} + {highlightText(record?.COUPON_NAME, currentSearchText)} + : "-" } }, { @@ -311,13 +324,17 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = COUPON_TYPES: params?.COUPON_TYPES || "", COUPON_ISVALID: 1 }, + keyWord: { + key: "COUPON_NAME", + value: params?.searchValue || "" + }, PageIndex: 1, PageSize: 999999 } setSearchParams(params) - const data = await handleGetCOUPONList(req) + setCurrentSearchText(params?.searchValue || "") if (data && data.length > 0) { return { data, success: true } } diff --git a/src/pages/CardInformation/CardVoucherCollection/index.tsx b/src/pages/CardInformation/CardVoucherCollection/index.tsx index 18f3ff3..dacd88a 100644 --- a/src/pages/CardInformation/CardVoucherCollection/index.tsx +++ b/src/pages/CardInformation/CardVoucherCollection/index.tsx @@ -9,6 +9,7 @@ import ProTable from "@ant-design/pro-table"; import PageTitleBox from "@/components/PageTitleBox"; import { handeGetCouponStockList } from "@/pages/travelMember/service"; import moment from 'moment' +import { highlightText } from "@/utils/highlightText"; const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -30,8 +31,19 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => const [showExportTable, setShowExportTable] = useState(false) // 查询的条件 const [searchParams, setSearchParams] = useState() + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') + const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入卡券名称' + } + }, { title: "卡券类型", dataIndex: "COUPON_TYPE", @@ -71,6 +83,9 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => align: 'center', hideInSearch: true, ellipsis: true, + render: (_, record) => { + return highlightText(record?.COUPON_NAME, currentSearchText) + } }, { title: "发放数量", @@ -180,12 +195,17 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => START_TIME_End: params?.ENDDATE || "",// 结束时间 COUPON_ISVALID: 1 }, + keyWord: { + key: "COUPON_NAME", + value: params?.searchValue || "" + }, PageIndex: 1, PageSize: 999999, sortStr: "END_TIME desc" } setSearchParams(params) const data = await handeGetCouponStockList(req) + setCurrentSearchText(params?.searchValue || "") console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { return { data: data.List, success: true } diff --git a/src/pages/CardInformation/CardVoucherRedemption/index.tsx b/src/pages/CardInformation/CardVoucherRedemption/index.tsx index 37aee3b..9d01dfa 100644 --- a/src/pages/CardInformation/CardVoucherRedemption/index.tsx +++ b/src/pages/CardInformation/CardVoucherRedemption/index.tsx @@ -8,6 +8,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { FormInstance } from "antd"; import { handeGetCouponExchangeSummary } from "@/pages/travelMember/service"; import moment from 'moment' +import { highlightText } from "@/utils/highlightText"; const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { const { currentUser } = props @@ -16,8 +17,18 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() const [collapsible, setCollapsible] = useState(false) + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入卡券名称' + } + }, { title: "卡券类型", dataIndex: "CouponType", @@ -57,6 +68,9 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> align: 'center', hideInSearch: true, ellipsis: true, + render: (_, record) => { + return highlightText(record?.CouponName, currentSearchText) + } }, { title: "服务区名称", @@ -147,6 +161,7 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> } let data: any = await handeGetCouponExchangeSummary(req) + setCurrentSearchText(params?.searchValue || "") if (data && data.length > 0) { return { data: data, success: true } diff --git a/src/pages/CardInformation/CardVoucherSearch/index.tsx b/src/pages/CardInformation/CardVoucherSearch/index.tsx index 89ba44a..e9a24b1 100644 --- a/src/pages/CardInformation/CardVoucherSearch/index.tsx +++ b/src/pages/CardInformation/CardVoucherSearch/index.tsx @@ -17,6 +17,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import SelectCardVouch from "./components/selectCardVouch"; import { handeGetCOUPON_SENDList } from "@/pages/travelMember/service"; import moment from 'moment' +import { highlightText } from "@/utils/highlightText"; const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentRow?: any }> = (props) => { @@ -39,8 +40,18 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool const [showExportTable, setShowExportTable] = useState(false) // 查询的条件 const [searchParams, setSearchParams] = useState() + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入卡券名称' + } + }, { title: "查询类型", dataIndex: "searchType", @@ -96,6 +107,9 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.COUPON_NAME, currentSearchText) + } }, { title: "优惠券编码", @@ -112,6 +126,9 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.MEMBERSHIP_NAME, currentSearchText) + } }, { title: "优惠券状态", @@ -197,7 +214,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool }} scroll={{ x: "100%", y: "calc(100vh - 410px)" }} headerTitle={} // 列表表头 - search={isComponent ? false : { span: 6 }} + search={isComponent ? false : { span: 6, defaultCollapsed: false }} request={async (params) => { console.log('selectedIdselectedIdselectedIdselectedId', selectedId); if (!selectedId && !isComponent) { @@ -213,6 +230,10 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool }, PageIndex: 1, PageSize: 999999, + keyWord: { + key: "COUPON_NAME", + value: params?.searchValue || "" + }, } } else { req = { @@ -229,12 +250,16 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool }, PageIndex: 1, PageSize: 999999, + keyWord: { + key: "COUPON_NAME", + value: params?.searchValue || "" + }, } } setSearchParams(params) const data = await handeGetCOUPON_SENDList(req) - + setCurrentSearchText(params?.searchValue || "") console.log('datadatadatadata', data); if (data && data.length > 0) { return { data: data, success: true } diff --git a/src/pages/operatingMerchants/MerchantInformation/index.tsx b/src/pages/operatingMerchants/MerchantInformation/index.tsx index b3423d2..6f345f4 100644 --- a/src/pages/operatingMerchants/MerchantInformation/index.tsx +++ b/src/pages/operatingMerchants/MerchantInformation/index.tsx @@ -29,6 +29,7 @@ import { handleGetServerPartShopNewList } from '@/pages/basicManage/serviceArea/ import { handleGetServerpartShopList } from '@/pages/DataVerification/service'; import ModalFooter from '@/pages/travelMember/scenicSpotConfig/component/modalFooter'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -129,7 +130,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = }; }); }; - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 定义列表字段内容 const columns: any = [ @@ -158,9 +160,14 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = ellipsis: true, render: (_, record) => { return record?.SELLER_NAME ? { + console.log('fkdsf', { ...record }); + setCurrentRow({ ...record }); handleModalVisible(true); - }}>{`${record?.SELLER_NAME}`} : "-" + }}> + {/* {`${record?.SELLER_NAME}`} */} + {highlightText(record?.SELLER_NAME, currentSearchText)} + : "-" } }, { @@ -767,11 +774,26 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = // 获取营收数据 const handleGetRevenueData = async () => { + // 拿门店信息 + let shopIds: string = '' + if (currentRow?.SERVERPARTSHOP_IDS) { + shopIds = currentRow?.SERVERPARTSHOP_IDS + } else if (currentRow?.ShopList && currentRow?.ShopList.length > 0) { + currentRow?.ShopList.forEach((item: any) => { + if (shopIds) { + shopIds += `,${item.SERVERPARTSHOP_ID}` + } else { + shopIds = `${item.SERVERPARTSHOP_ID}` + } + }) + } + + const req: any = { DataType: 1, DataSourceType: 1, ServerpartIds: currentRow?.SERVERPART_ID || "", - ServerpartShopIds: currentRow?.SERVERPARTSHOP_IDS || "", + ServerpartShopIds: shopIds || "", StartDate: moment().subtract(1, 'M').startOf('M').format('YYYY-MM-DD'), EndDate: moment().subtract(1, 'M').endOf('M').format('YYYY-MM-DD'), } @@ -951,10 +973,9 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = }, } - console.log('reqreqreqreq', req); const data = await handleGetMEMBERADDRESSList(req); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) - console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -1350,14 +1371,17 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = // setInteriorImageList(list3); // } // } + console.log('fdsjflasfs', { + ...data, + SHOPTRADE: currentRow?.SHOPTRADE ? Number(currentRow?.SHOPTRADE) : "", + SERVERPART_ID: currentRow?.SERVERPART_ID ? Number(currentRow?.SERVERPART_ID) : "", + }); + return { ...data, SHOPTRADE: currentRow?.SHOPTRADE ? Number(currentRow?.SHOPTRADE) : "", SERVERPART_ID: currentRow?.SERVERPART_ID ? Number(currentRow?.SERVERPART_ID) : "", - // MerchantLogo: list1, - // DoorImage: list2, - // InteriorImage: list3, } // if (currentRow?.SELLER_ID) { // const data = await handleGetSERVERPARTSELLERDetail({ SERVERPARTSELLERId: currentRow?.SELLER_ID }) @@ -1438,7 +1462,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = name="SHOPTRADE" label="门店业态" request={() => { - return processTreeData(BUSINESSTRADEYNTree) + let newShopTrade = processTreeData(BUSINESSTRADEYNTree) + return newShopTrade }} fieldProps={{ treeDefaultExpandAll: true, // 默认展开所有节点 @@ -1611,6 +1636,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = files.splice(index, 1) setMerchantLogoList(files) message.success("删除成功") + actionRef.current?.reload() } else { message.error("删除失败") @@ -1659,6 +1685,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = files.splice(index, 1) setDoorImageList(files) message.success("删除成功") + actionRef.current?.reload() } else { message.error("删除失败") @@ -1707,6 +1734,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = files.splice(index, 1) setInteriorImageList(files) message.success("删除成功") + actionRef.current?.reload() } else { message.error("删除失败") diff --git a/src/pages/reports/revenueConfirmation/components/compareList.tsx b/src/pages/reports/revenueConfirmation/components/compareList.tsx index 7e6ed3a..2b1fa1a 100644 --- a/src/pages/reports/revenueConfirmation/components/compareList.tsx +++ b/src/pages/reports/revenueConfirmation/components/compareList.tsx @@ -2839,16 +2839,16 @@ const compareList: React.FC<{ precision: 2, onChange: (e: any) => { const res = editFormRef.current?.getFieldValue() - if (e || res.CashPayCorrect) { - setShowRecalibration(true) - } else { - setShowRecalibration(false) - } + // if (e || res.CashPayCorrect) { + // setShowRecalibration(true) + // } else { + // setShowRecalibration(false) + // } } }} /> {editFormRef.current?.getFieldValue('MobilePayCorrectDesc')} @@ -2865,16 +2865,16 @@ const compareList: React.FC<{ precision: 2, onChange: (e: any) => { const res = editFormRef.current?.getFieldValue() - if (e || res?.MobilePayCorrect) { - setShowRecalibration(true) - } else { - setShowRecalibration(false) - } + // if (e || res?.MobilePayCorrect) { + // setShowRecalibration(true) + // } else { + // setShowRecalibration(false) + // } } }} /> {/* CashPayCorrectDesc */} - {editFormRef.current?.getFieldValue('CashPayCorrectDesc')} + {editFormRef.current?.getFieldValue('CashPayCorrectDesc')} : '' : '' } diff --git a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx index c63665e..9a5cfd6 100644 --- a/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx +++ b/src/pages/reports/settlementAccount/component/YearExamineDetailTable.tsx @@ -2611,11 +2611,11 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS const footer: string = `
- 财务部: + 运营管理子公司财务部: ${signature?.financeRealName || ''}
- 经发部: + 运营管理子公司运营服务部: ${signature?.developmentRealName || ''}
@@ -2709,11 +2709,11 @@ const YearExamineDetailTable = ({ parentRow, currentApprovalstate, onRef, setIsS const footer: string = `
- 财务部: + 运营管理子公司财务部: ${signature?.financeRealName || ''}
- 经发部: + 运营管理子公司运营服务部: ${signature?.developmentRealName || ''}
diff --git a/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx b/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx index 1b48d97..f65351b 100644 --- a/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx +++ b/src/pages/travelMember/AnalysisOfHotSellingButUnsoldProducts/index.tsx @@ -18,6 +18,14 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser const [searchParams, setSearchParams] = useState() const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProps: { + placeholder: "请输入" + } + }, { title: '统计时间', dataIndex: 'search_date', diff --git a/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx b/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx index 1684301..d8b089e 100644 --- a/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx +++ b/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx @@ -161,7 +161,8 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow, detailTy ...data, ORDER_PERSON: addressObj?.USER_NAME || "", ORDER_ADDRESS: `${addressObj?.ADDRESS || ""}${addressObj?.DOORPLATE || ""}`, - CURRENT_POINT: currentRow?.CURRENT_POINT || "" + CURRENT_POINT: currentRow?.CURRENT_POINT || "", + ORDER_DATE: currentRow?.ORDER_DATE ? moment(currentRow?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : '' } } else { const req: any = { @@ -200,7 +201,8 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow, detailTy ...res, ORDER_PERSON: addressObj?.USER_NAME || "", ORDER_ADDRESS: `${addressObj?.ADDRESS || ""}${addressObj?.DOORPLATE || ""}`, - CURRENT_POINT: currentRow?.CURRENT_POINT || "" + CURRENT_POINT: currentRow?.CURRENT_POINT || "", + ORDER_DATE: res?.ORDER_DATE ? moment(res?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : '' } } else { message.error('当前订单数据异常,请联系管理员!') diff --git a/src/pages/travelMember/BookingMealOrder/index.tsx b/src/pages/travelMember/BookingMealOrder/index.tsx index 978c316..f8e4ca5 100644 --- a/src/pages/travelMember/BookingMealOrder/index.tsx +++ b/src/pages/travelMember/BookingMealOrder/index.tsx @@ -18,6 +18,7 @@ import orderIcon from '@/assets/detail/orderIcon.png' import closeIcon from '@/assets/detail/closeIcon.png' import OrderDetailModal from "./components/orderDetailModal"; import { handleSetlogSave } from "@/utils/format"; +import { highlightText } from "@/utils/highlightText"; const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { @@ -54,6 +55,8 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -110,7 +113,10 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr setCurrentRow(record); handleModalVisible(true) handleSetlogSave(`查看编号为【${record?.SALEBILL_CODE}】的订单`) - }}>{record?.SALEBILL_CODE} : "-" + }}> + {/* {record?.SALEBILL_CODE} */} + {highlightText(record?.SALEBILL_CODE, currentSearchText)} + : "-" } }, { @@ -173,6 +179,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr }, hideInTable: true, fieldProps: { + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -345,6 +352,8 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr if (!selectedId) { return } + console.log('params', params); + const req = { searchParameter: { SERVERPART_IDS: selectedId, @@ -353,13 +362,14 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr ORDER_DATE_End: params?.ORDER_DATE_End || "", SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2000,3000" : params?.SALEBILL_STATE, SearchKeyValue: params?.searchText || "", - MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET || "" + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: 1, PageSize: 999999, SortStr: "ORDER_DATE desc", } const data = await handeGetSaleBillWholeList(req) + setCurrentSearchText(params?.searchText || "") // const req = { // searchParameter: { // ORDER_DATE_Start: params?.ORDER_DATE_Start || "", diff --git a/src/pages/travelMember/BuriedPointConfig/index.tsx b/src/pages/travelMember/BuriedPointConfig/index.tsx index e22284f..5c18aa7 100644 --- a/src/pages/travelMember/BuriedPointConfig/index.tsx +++ b/src/pages/travelMember/BuriedPointConfig/index.tsx @@ -1,4 +1,4 @@ -// 埋点配置 +// 埋点配置 行为埋点配置 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -24,6 +24,7 @@ import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚 import PageTitleBox from "@/components/PageTitleBox"; import { handeDeleteWECHATAPPBURYPOINT, handeGetWECHATAPPBURYPOINTList, handeGetWECHATAPPSIGNList, handeSynchroWECHATAPPBURYPOINT } from '../service'; import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { highlightText } from '@/utils/highlightText'; const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { @@ -56,7 +57,9 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; - // 拖动结束 + + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 定义列表字段内容 @@ -107,7 +110,10 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p return record?.WECHATAPP_ROUTE ? { setCurrentRow({ ...record }); handleModalVisible(true); - }}>{record?.WECHATAPP_ROUTE} : "-" + }}> + {/* {record?.WECHATAPP_ROUTE} */} + {highlightText(record?.WECHATAPP_ROUTE, currentSearchText)} + : "-" } }, { @@ -117,15 +123,18 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p ellipsis: true, align: 'center', hideInSearch: true, + render: (_, record) => { + return highlightText(record?.WECHATAPP_MOULD, currentSearchText) + } }, - { - dataIndex: 'WECHATAPP_APPID', - title: '小程序APPID', - align: 'center', - width: 150, - ellipsis: true, - hideInSearch: true, - }, + // { + // dataIndex: 'WECHATAPP_APPID', + // title: '小程序APPID', + // align: 'center', + // width: 150, + // ellipsis: true, + // hideInSearch: true, + // }, { dataIndex: 'WECHATAPPSIGN_NAME', title: '小程序名称', @@ -258,7 +267,7 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p
{ return `${record?.WECHATAPPBURYPOINT_ID}` }} @@ -286,6 +295,7 @@ const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (p console.log('reqreqreqreqreq', req); const data = await handeGetWECHATAPPBURYPOINTList(req); + setCurrentSearchText(params?.searchText || "") console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } diff --git a/src/pages/travelMember/BusinessActivityStatistics/index.tsx b/src/pages/travelMember/BusinessActivityStatistics/index.tsx index bcccbd2..ca64406 100644 --- a/src/pages/travelMember/BusinessActivityStatistics/index.tsx +++ b/src/pages/travelMember/BusinessActivityStatistics/index.tsx @@ -221,7 +221,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine
{item.value}
占比
- {item.key ? item.key + '%' : ""} + {item.key ? item.key > 1000 ? '1000%' : item.key + '%' : ""}
}) @@ -258,7 +258,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine { item && item?.TotalActualAmount && item?.TotalActualAmount.QOQData && item?.TotalActualAmount.summaryData ? - {(((item?.TotalActualAmount.summaryData - item?.TotalActualAmount.QOQData) / item?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalActualAmount.summaryData - item?.TotalActualAmount.QOQData) / item?.TotalActualAmount.QOQData) > 10 ? '1000%' : (((item?.TotalActualAmount.summaryData - item?.TotalActualAmount.QOQData) / item?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -278,7 +278,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine item && item?.TotalSuccAmount && item?.TotalSuccAmount.QOQData && item?.TotalSuccAmount.summaryData ? // {item && item?.TotalSuccAmount ? item?.TotalSuccAmount.QOQData : "-"} - {(((item?.TotalSuccAmount.summaryData - item?.TotalSuccAmount.QOQData) / item?.TotalSuccAmount.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalSuccAmount.summaryData - item?.TotalSuccAmount.QOQData) / item?.TotalSuccAmount.QOQData) > 10 ? '1000%' : (((item?.TotalSuccAmount.summaryData - item?.TotalSuccAmount.QOQData) / item?.TotalSuccAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -297,7 +297,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine { item && item?.TotalSuccTicket && item?.TotalSuccTicket.QOQData && item?.TotalSuccTicket.summaryData ? - {(((item?.TotalSuccTicket.summaryData - item?.TotalSuccTicket.QOQData) / item?.TotalSuccTicket.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalSuccTicket.summaryData - item?.TotalSuccTicket.QOQData) / item?.TotalSuccTicket.QOQData) > 10 ? '1000%' : (((item?.TotalSuccTicket.summaryData - item?.TotalSuccTicket.QOQData) / item?.TotalSuccTicket.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -397,7 +397,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine { item && item?.CouponAmount && item?.CouponAmount.QOQData && item?.CouponAmount.summaryData ? - {(((item?.CouponAmount.summaryData - item?.CouponAmount.QOQData) / item?.CouponAmount.QOQData) * 100).toFixed(2) + '%'} + {((item?.CouponAmount.summaryData - item?.CouponAmount.QOQData) / item?.CouponAmount.QOQData) > 10 ? '1000%' : (((item?.CouponAmount.summaryData - item?.CouponAmount.QOQData) / item?.CouponAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -416,7 +416,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine { item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? - {(((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) > 10 ? '1000%' : (((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -435,7 +435,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine { item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? - {(((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) > 10 ? '1000%' : (((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} : "-" } diff --git a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx index 3b62d71..b84f37e 100644 --- a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx +++ b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx @@ -14,12 +14,13 @@ import ProTable from "@ant-design/pro-table"; import ReactHTMLTableToExcel from "react-html-table-to-excel"; import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; import PageTitleBox from "@/components/PageTitleBox"; -import { handleGetMEMBERGROWTHList } from "../service"; +import { handeGetNestingAUTOTYPEList, handleGetMEMBERGROWTHList } from "../service"; import moment from 'moment' import session from "@/utils/session"; import { handleSetlogSave } from "@/utils/format"; import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; import MemberDetail from "../memberInfor/component/memberDetail"; +import { highlightText } from "@/utils/highlightText"; const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any, searchReq?: any, onRef?: any, height?: any }> = (props) => { @@ -53,7 +54,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? const [searchParams, setSearchParams] = useState() // 显示详情抽屉 const [showDetailDrawer, setShowDetailDrawer] = useState(false) - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -102,7 +104,9 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? setShowDetailDrawer(true) handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> - {record?.MEMBERSHIP_NAME} + {/* {record?.MEMBERSHIP_NAME} */} + {highlightText(record?.MEMBERSHIP_NAME, currentSearchText)} + : "-" } }, @@ -130,6 +134,39 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? }, sorter: true }, + { + title: '会员标签', + dataIndex: "MEMBERSHIP_TARGET", + valueType: 'treeSelect', + align: 'center', + width: 120, + request: async () => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + console.log('datadatadatadatadata', data); + return data + }, + fieldProps: { + multiple: true, + allowClear: true, + showSearch: true, + filterTreeNode: (input, node) => { + // ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配 + return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase()); + }, + treeDefaultExpandAll: true, + fieldNames: { + label: 'AUTOTYPE_NAME', + value: 'AUTOTYPE_ID', + } + } + }, { title: "成长来源", width: 120, @@ -226,14 +263,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? valueType: 'digit', sorter: true }, - { - title: "服务区名称", - width: 150, - dataIndex: "SERVERPART_NAME", - hideInSearch: true, - align: 'center', - ellipsis: true, - }, { title: "门店名称", width: 150, @@ -241,6 +270,17 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? hideInSearch: true, align: 'center', ellipsis: true, + render: (_, record) => { + return highlightText(record?.SHOPNAME, currentSearchText) + } + }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, }, ] @@ -286,8 +326,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? setting: true }} request={async (params, sorter) => { - - const sortstr = Object.keys(sorter).map(n => { const value = sorter[n] return value ? `${n} ${value.replace('end', '')}` : '' @@ -302,6 +340,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? OWNERUNIT_ID: 911, SCORESETTING_STATE: 1, MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID, + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, @@ -315,7 +354,8 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? OWNERUNIT_ID: 911, SCORESETTING_STATE: 1, GROWTH_SOURCES: params?.GROWTH_SOURCE === "0" ? "" : params?.GROWTH_SOURCE, - GROWTH_TYPE: params?.GROWTH_TYPE === "-2" ? '' : params?.GROWTH_TYPE + GROWTH_TYPE: params?.GROWTH_TYPE === "-2" ? '' : params?.GROWTH_TYPE, + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, @@ -327,6 +367,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? } } const data = await handleGetMEMBERGROWTHList(req); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { diff --git a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx index 6e8277c..fdb8921 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx @@ -426,7 +426,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> }}> { return `${record?.GROWTHSETTING_ID}` }} diff --git a/src/pages/travelMember/MallBrandManage/index.tsx b/src/pages/travelMember/MallBrandManage/index.tsx index f5f967b..fcaec4c 100644 --- a/src/pages/travelMember/MallBrandManage/index.tsx +++ b/src/pages/travelMember/MallBrandManage/index.tsx @@ -22,6 +22,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { deletePicture, uploadPicture } from "@/services/picture"; import { handleSetlogSave } from "@/utils/format"; import ModalFooter from "../scenicSpotConfig/component/modalFooter"; +import { highlightText } from "@/utils/highlightText"; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -70,6 +71,8 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { // 文件列表 const [fileList, setFileList] = useState([]) const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; const targetRect = draggleRef.current?.getBoundingClientRect(); @@ -106,7 +109,8 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { setCurrentRow({ ...record }); handleModalVisible(true); }}> - {record?.BRAND_NAME} + {/* {record?.BRAND_NAME} */} + {highlightText(record?.BRAND_NAME, currentSearchText)} : "-" } }, @@ -329,6 +333,8 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { SortStr: "BRAND_INDEX,OPERATE_DATE" } const data = await handleGetBRANDList(req) + setCurrentSearchText(params?.BRAND_NAME || "") + console.log('datadatadatadatadata', data); handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { @@ -477,7 +483,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }} > - + = (props) => { }} /> - + = (props) => { }} /> - + - + = (props) => { }} /> - - { @@ -65,7 +66,8 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined // 文件列表 const [fileList, setFileList] = useState([]) const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; const targetRect = draggleRef.current?.getBoundingClientRect(); @@ -123,7 +125,11 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined } setCurrentRow({ ...record }); handleModalVisible(true); - }}>{record?.USERDEFINEDTYPE_NAME} + }}> + {/* {record?.USERDEFINEDTYPE_NAME} */} + {highlightText(record?.USERDEFINEDTYPE_NAME, currentSearchText)} + +
} }, @@ -329,6 +335,8 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined SearchKey: params?.searchText || "" } const data = await handlGetUSERDEFINEDTYPEList(req); + setCurrentSearchText(params?.searchText || "") + console.log('datadatadatadatadata', data); handleSetlogSave(`点击查询按钮`) if (data && data.length > 0) { diff --git a/src/pages/travelMember/MallOrderManage/index.tsx b/src/pages/travelMember/MallOrderManage/index.tsx index 41195c6..791f4d1 100644 --- a/src/pages/travelMember/MallOrderManage/index.tsx +++ b/src/pages/travelMember/MallOrderManage/index.tsx @@ -17,6 +17,7 @@ import orderIcon from '@/assets/detail/orderIcon.png' import closeIcon from '@/assets/detail/closeIcon.png' import { handleSetlogSave } from "@/utils/format"; import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; +import { highlightText } from "@/utils/highlightText"; const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props @@ -33,6 +34,8 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { // 弹出框拖动效果 const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 const [disabled, setDraggleDisabled] = useState() // 是否拖动 + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; @@ -128,7 +131,6 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { initialValue: '0', hideInTable: true, }, - { title: "序号", dataIndex: "index", @@ -144,6 +146,9 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.MERCHANTS_NAME, currentSearchText) + } }, { title: "收货人员", @@ -174,7 +179,10 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { setCurrentRow(record); handleModalVisible(true) handleSetlogSave(`查询【${record?.ORDER_PERSON}】编号【${record?.SALEBILL_CODE}】的订单`) - }}>{record?.SALEBILL_CODE} : "-" + }}> + {/* {record?.SALEBILL_CODE} */} + {highlightText(record?.SALEBILL_CODE, currentSearchText)} + : "-" } }, { @@ -236,6 +244,9 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.COMMODITY_NAME, currentSearchText) + } }, { title: "订单金额", @@ -308,6 +319,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }, hideInTable: true, fieldProps: { + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -470,7 +482,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { CHANNEL_TYPE: params?.PAY_METHOD === "0" ? "" : params?.PAY_METHOD, SearchKeyValue: params?.searchText || "", MERCHANTS_IDS: params?.MERCHANTS_IDS || "", - MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET || "" + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: 1, PageSize: 999999, @@ -485,6 +497,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { // const data = await handeGetSALEBILLList(req); const data = await handeGetSaleBillWholeList(req); console.log('datadatadatadatadata', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } diff --git a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx index 8be8ea6..20ac000 100644 --- a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx +++ b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx @@ -2,7 +2,7 @@ import { connect } from "umi"; import type { ConnectState } from "@/models/connect"; import ProTable, { ActionType } from "@ant-design/pro-table"; import { Col, FormInstance, message, Modal, Popconfirm, Row, Space } from "antd"; -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { handleDeleteMEMBERADDRESS, handleGetMEMBERADDRESSList, handleSynchroMEMBERADDRESS } from "../../service"; import React from "react"; import Draggable from "react-draggable"; @@ -289,6 +289,17 @@ const AddressDetail = ({ currentBigRow, currentUser, isComponent }: DetailProps) } }; + useEffect(() => { + console.log('provinceprovince', province); + console.log('citycitycitycity', city); + console.log('countycountycounty', county); + + formRef.current?.setFieldsValue({ ADDRESS: `${province || ''}${city || ''}${county || ''}` }) + + // 监听省、市、区/县的变化,拼接收货地址 + // setAddress(`${province || ''}${city || ''}${county || ''}`); + + }, [province, city, county]); return ( diff --git a/src/pages/travelMember/MemberAddress/index.tsx b/src/pages/travelMember/MemberAddress/index.tsx index 94d5143..54eb8ef 100644 --- a/src/pages/travelMember/MemberAddress/index.tsx +++ b/src/pages/travelMember/MemberAddress/index.tsx @@ -23,6 +23,7 @@ import { handeGetMemberAddressCombineList, handleDeleteMEMBERADDRESS, handleGetM import PageTitleBox from '@/components/PageTitleBox'; import AddressDetail from './components/addressDetail'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; @@ -50,7 +51,8 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props const [showDetailDrawer, setShowDetailDrawer] = useState(false) // 显示当前选中的外层表格数据 const [currentBigRow, setCurrentBigRow] = useState(false) - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; @@ -69,6 +71,10 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props useEffect(() => { + console.log('provinceprovince', province); + console.log('citycitycitycity', city); + console.log('countycountycounty', county); + formRef.current?.setFieldsValue({ ADDRESS: `${province || ''}${city || ''}${county || ''}` }) // 监听省、市、区/县的变化,拼接收货地址 @@ -98,7 +104,10 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props return record?.USER_NAME ? { setCurrentBigRow(record) setShowDetailDrawer(true) - }}>{record?.USER_NAME} : "-" + }}> + {/* {record?.USER_NAME} */} + {highlightText(record?.USER_NAME, currentSearchText)} + : "-" } }, { @@ -119,6 +128,9 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props width: 150, align: 'center', hideInSearch: true, + render: (_, record) => { + return highlightText(record?.MOBILEPHONE, currentSearchText) + } }, // { // dataIndex: 'RECEIVE_PROVINCE', @@ -478,7 +490,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props }}> { return `${record?.MEMBERADDRESS_ID}` }} @@ -519,9 +531,8 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props SearchKeyValue: params?.searchText || "" } - console.log('reqreqreqreqreqreqreq', req); const data = await handeGetMemberAddressCombineList(req) - console.log('datadatadatadatadata', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`查询了会员地址管理列表`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } @@ -647,7 +658,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props formRef={formRef} autoFocusFirstInput submitter={false} - preserve={false} + preserve={true} initialValues={currentRow} onFinish={async (values) => { let newValue: any = { ...values }; @@ -689,8 +700,6 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props label="省" fieldProps={{ onChange: (e: any) => { - console.log('eee', e); - setProvince(e.target.value) } }} diff --git a/src/pages/travelMember/MemberSummaryStatistics/index.tsx b/src/pages/travelMember/MemberSummaryStatistics/index.tsx index f451e50..aee1c40 100644 --- a/src/pages/travelMember/MemberSummaryStatistics/index.tsx +++ b/src/pages/travelMember/MemberSummaryStatistics/index.tsx @@ -365,7 +365,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } MemberShipId: "", MembershipType: "", MembershipLevel: "", - MembershipTarget: MEMBERSHIP_TARGET || "" + MembershipTarget: MEMBERSHIP_TARGET && MEMBERSHIP_TARGET.length > 0 ? MEMBERSHIP_TARGET.toString() : "" } const data = await handeGetPointGrowthSummary(req) console.log('datadatadatadatadata', data); @@ -386,7 +386,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } OWNERUNIT_ID: 911, POINT_TYPE: value === 1 ? '' : value === 2 ? '1' : value === 3 ? '-1' : '', POINT_SOURCE: '', - MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || "" + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" }, keyWord: { Key: "MEMBERSHIP_NAME", @@ -406,7 +406,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } SCORESETTING_STATE: 1, GROWTH_SOURCES: "", GROWTH_TYPE: value === 4 ? '' : value === 5 ? '1' : value === 6 ? '-1' : '', - MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || "" + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: searchParams?.current, PageSize: 20, @@ -494,6 +494,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } return data }} fieldProps={{ + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -545,7 +546,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.TotalPoint && topData?.TotalPoint.QOQData && topData?.TotalPoint.summaryData ? // {topData && topData?.TotalPoint ? topData?.TotalPoint.QOQData : "-"} - {(((topData?.TotalPoint.summaryData - topData?.TotalPoint.QOQData) / topData?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalPoint.summaryData - topData?.TotalPoint.QOQData) / topData?.TotalPoint.QOQData) > 10 ? '1000%' : (((topData?.TotalPoint.summaryData - topData?.TotalPoint.QOQData) / topData?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -567,7 +568,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.EarnPoint && topData?.EarnPoint.QOQData && topData?.EarnPoint.summaryData ? // {topData && topData?.EarnPoint ? topData?.EarnPoint.QOQData : "-"} - {(((topData?.EarnPoint.summaryData - topData?.EarnPoint.QOQData) / topData?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + {((topData?.EarnPoint.summaryData - topData?.EarnPoint.QOQData) / topData?.EarnPoint.QOQData) > 10 ? '1000%' : (((topData?.EarnPoint.summaryData - topData?.EarnPoint.QOQData) / topData?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -590,7 +591,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.ConsumePoint && topData?.ConsumePoint.QOQData && topData?.ConsumePoint.summaryData ? // {topData && topData?.ConsumePoint ? topData?.ConsumePoint.QOQData : "-"} - {(((topData?.ConsumePoint.summaryData - topData?.ConsumePoint.QOQData) / topData?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + {((topData?.ConsumePoint.summaryData - topData?.ConsumePoint.QOQData) / topData?.ConsumePoint.QOQData) > 10 ? '1000%' : (((topData?.ConsumePoint.summaryData - topData?.ConsumePoint.QOQData) / topData?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -613,7 +614,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.TotalGrowth && topData?.TotalGrowth.QOQData && topData?.TotalGrowth.summaryData ? // {topData && topData?.TotalGrowth ? topData?.TotalGrowth.QOQData : "-"} - {(((topData?.TotalGrowth.summaryData - topData?.TotalGrowth.QOQData) / topData?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalGrowth.summaryData - topData?.TotalGrowth.QOQData) / topData?.TotalGrowth.QOQData) > 10 ? '1000%' : (((topData?.TotalGrowth.summaryData - topData?.TotalGrowth.QOQData) / topData?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -635,7 +636,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.EarnGrowth && topData?.EarnGrowth.QOQData && topData?.EarnGrowth.summaryData ? // {topData && topData?.EarnGrowth ? topData?.EarnGrowth.QOQData : "-"} - {(((topData?.EarnGrowth.summaryData - topData?.EarnGrowth.QOQData) / topData?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + {((topData?.EarnGrowth.summaryData - topData?.EarnGrowth.QOQData) / topData?.EarnGrowth.QOQData) > 10 ? '1000%' : (((topData?.EarnGrowth.summaryData - topData?.EarnGrowth.QOQData) / topData?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} : "" @@ -659,7 +660,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } topData && topData?.ConsumeGrowth && topData?.ConsumeGrowth.QOQData && topData?.ConsumeGrowth.summaryData ? // {topData && topData?.ConsumeGrowth ? topData?.ConsumeGrowth.QOQData : "-"} - {(((topData?.ConsumeGrowth.summaryData - topData?.ConsumeGrowth.QOQData) / topData?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + {((topData?.ConsumeGrowth.summaryData - topData?.ConsumeGrowth.QOQData) / topData?.ConsumeGrowth.QOQData) > 10 ? '1000%' : (((topData?.ConsumeGrowth.summaryData - topData?.ConsumeGrowth.QOQData) / topData?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } diff --git a/src/pages/travelMember/MemberTagManage/index.tsx b/src/pages/travelMember/MemberTagManage/index.tsx index ea457fb..379b184 100644 --- a/src/pages/travelMember/MemberTagManage/index.tsx +++ b/src/pages/travelMember/MemberTagManage/index.tsx @@ -1,4 +1,4 @@ -// 会员标签管理 +// 会员标签管理 会员标签配置 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -29,6 +29,7 @@ import classNames from 'classnames'; import session from '@/utils/session'; import ModalFooter from '../scenicSpotConfig/component/modalFooter'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { @@ -94,6 +95,9 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') + // 定义列表字段内容 const columns: any = [ { @@ -115,7 +119,10 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro setCurrentRow({ ...record }); handleModalVisible(true); }} - >{record?.AUTOTYPE_NAME || ""} + > + {/* {record?.AUTOTYPE_NAME || ""} */} + {highlightText(record?.AUTOTYPE_NAME, currentSearchText)} + } }, { @@ -179,7 +186,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro // 同步点餐列表 const handleAddUpdate = async (res: any) => { let req: any = {} - if (currentRow?.FIELDENUM_ID) { + if (currentRow?.AUTOTYPE_ID) { req = { ...currentRow, ...res, @@ -203,7 +210,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro const data = await handeSynchroAUTOTYPE(req) handleConfirmLoading(false) if (data.Result_Code === 100) { - handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${currentRow?.AUTOTYPE_NAME}】`) + handleSetlogSave(`${currentRow?.AUTOTYPE_ID ? '更新' : '新增'}【${currentRow?.AUTOTYPE_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -223,7 +230,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro }}> { return `${record?.AUTOTYPE_PID}-${record?.AUTOTYPE_ID}` }} @@ -243,6 +250,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro } const data = await handeGetNestingAUTOTYPEList(req); console.log('datadatadatadatadata', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) if (data && data.length > 0) { setTypeTreeData(data) @@ -378,7 +386,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro let newValue = { ...values }; if (currentRow) { // 编辑数据 - newValue = { ...values, FIELDENUM_ID: currentRow.FIELDENUM_ID }; + newValue = { ...values, AUTOTYPE_ID: currentRow.AUTOTYPE_ID }; } // 如果有开关,要把开关的代码写进去 diff --git a/src/pages/travelMember/MembershipLevelDistribution/index.tsx b/src/pages/travelMember/MembershipLevelDistribution/index.tsx index e39b918..84cbe23 100644 --- a/src/pages/travelMember/MembershipLevelDistribution/index.tsx +++ b/src/pages/travelMember/MembershipLevelDistribution/index.tsx @@ -10,9 +10,11 @@ import moment from 'moment' import { handleSetlogSave } from "@/utils/format"; import session from "@/utils/session"; import { handleGetMEMBERSHIPList } from "../service"; +import { highlightText } from "@/utils/highlightText"; +import MemberDetail from "../memberInfor/component/memberDetail"; const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { - + const { currentUser } = props const actionRef = useRef(); const formRef = useRef(); // 树相关的属性和方法 @@ -26,6 +28,10 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj'); let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj') let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') + + const columns: any = [ { @@ -41,7 +47,8 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin setShowDetailDrawer(true) handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> - {record?.MEMBERSHIP_NAME || ""} + {/* {record?.MEMBERSHIP_NAME || ""} */} + {highlightText(record?.MEMBERSHIP_NAME, currentSearchText)} }, fieldProps: { @@ -114,6 +121,9 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.MEMBERSHIP_MOBILEPHONE, currentSearchText) + } }, { title: "会员等级", @@ -183,6 +193,9 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.CERTIFICATE_NUMBER, currentSearchText) + } }, { title: "会员卡号", @@ -220,6 +233,9 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.PLATE_NUMBER, currentSearchText) + } }, // { // title: "付费会员", @@ -302,6 +318,12 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin }, ] + // 悬浮框的关闭方法 + const handleCloseModal = () => { + setShowDetailDrawer(false) + setCurrentRow(undefined); + } + return (
@@ -352,6 +374,7 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin handleSetlogSave(`查看了会员账户管理列表`) const data = await handleGetMEMBERSHIPList(req) + setCurrentSearchText(params?.MEMBERSHIP_NAME || "") if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -364,6 +387,13 @@ const MembershipLevelDistribution: React.FC<{ currentUser: CurrentUser | undefin }} />
+ + + {/* 会员详情 */} +
) diff --git a/src/pages/travelMember/MembershipLevelStatistics/index.tsx b/src/pages/travelMember/MembershipLevelStatistics/index.tsx index 9017043..bab8197 100644 --- a/src/pages/travelMember/MembershipLevelStatistics/index.tsx +++ b/src/pages/travelMember/MembershipLevelStatistics/index.tsx @@ -300,7 +300,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined MemberShipId: "", MembershipType: "", MembershipLevel: "", - MembershipTarget: MEMBERSHIP_TARGET || "" + MembershipTarget: MEMBERSHIP_TARGET && MEMBERSHIP_TARGET.length > 0 ? MEMBERSHIP_TARGET.toString() : "" } setTopLoading(true) const data = await handeGetPointGrowthSummary(req) @@ -499,6 +499,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined return data }} fieldProps={{ + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -557,7 +558,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? // {item && item?.TotalPoint ? item?.TotalPoint.QOQData : "-"} - {(((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) > 10 ? '1000%' : (((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -581,7 +582,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? // {item && item?.EarnPoint ? item?.EarnPoint.QOQData : "-"} - {(((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) > 10 ? '1000%' : (((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -606,7 +607,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? // {item && item?.ConsumePoint ? item?.ConsumePoint.QOQData : "-"} - {(((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) > 10 ? '1000%' : (((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -631,7 +632,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? // {item && item?.TotalGrowth ? item?.TotalGrowth.QOQData : "-"} - {(((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) > 10 ? '1000%' : (((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -655,7 +656,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? // {item && item?.EarnGrowth ? item?.EarnGrowth.QOQData : "-"} - {(((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) > 10 ? '1000%' : (((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} : "" @@ -681,7 +682,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? // {item && item?.ConsumeGrowth ? item?.ConsumeGrowth.QOQData : "-"} - {(((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) > 10 ? '1000%' : (((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } diff --git a/src/pages/travelMember/MembershipTypeStatistics/index.tsx b/src/pages/travelMember/MembershipTypeStatistics/index.tsx index c45c4c1..1808575 100644 --- a/src/pages/travelMember/MembershipTypeStatistics/index.tsx +++ b/src/pages/travelMember/MembershipTypeStatistics/index.tsx @@ -386,7 +386,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined MemberShipId: "", MembershipType: "", MembershipLevel: "", - MembershipTarget: MEMBERSHIP_TARGET || "" + MembershipTarget: MEMBERSHIP_TARGET && MEMBERSHIP_TARGET.length > 0 ? MEMBERSHIP_TARGET.toString() : "" } setTopLoading(true) const data = await handeGetPointGrowthSummary(req) @@ -584,6 +584,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined return data }} fieldProps={{ + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -641,7 +642,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? // {item && item?.TotalPoint ? item?.TotalPoint.QOQData : "-"} - {(((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) > 10 ? '1000%' : (((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -665,7 +666,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? // {item && item?.EarnPoint ? item?.EarnPoint.QOQData : "-"} - {(((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) > 10 ? '1000%' : (((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -690,7 +691,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? // {item && item?.ConsumePoint ? item?.ConsumePoint.QOQData : "-"} - {(((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + {((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) > 10 ? '1000%' : (((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -715,7 +716,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? // {item && item?.TotalGrowth ? item?.TotalGrowth.QOQData : "-"} - {(((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) > 10 ? '1000%' : (((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } @@ -739,7 +740,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? // {item && item?.EarnGrowth ? item?.EarnGrowth.QOQData : "-"} - {(((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) > 10 ? '1000%' : (((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} : "" @@ -765,7 +766,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? // {item && item?.ConsumeGrowth ? item?.ConsumeGrowth.QOQData : "-"} - {(((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + {((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) > 10 ? '1000%' : (((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} : "" } diff --git a/src/pages/travelMember/MerchantEvaluationManage/index.tsx b/src/pages/travelMember/MerchantEvaluationManage/index.tsx index 123bc28..7ebb8e0 100644 --- a/src/pages/travelMember/MerchantEvaluationManage/index.tsx +++ b/src/pages/travelMember/MerchantEvaluationManage/index.tsx @@ -18,6 +18,7 @@ import Draggable from "react-draggable"; import ProForm, { ProFormList, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form"; import { getBase64 } from "@/utils/utils"; import './MerchantEvaluationManage.less' +import { highlightText } from "@/utils/highlightText"; @@ -61,7 +62,8 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -112,6 +114,9 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.SELLER_NAME, currentSearchText) + } }, { title: "评价时间", @@ -133,6 +138,9 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.MEMBERSHIP_NAME, currentSearchText) + } }, { title: "会员类型", @@ -191,7 +199,11 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent ReplyList: record?.ReplyList || [] }) setShowDetailDrawer(true) - }}>{record?.COMMENT_CONTENT} : "-" + }}> + {/* {record?.COMMENT_CONTENT} */} + {highlightText(record?.COMMENT_CONTENT, currentSearchText)} + + : "-" } }, // { @@ -330,7 +342,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent SortStr: "CREATE_DATE desc" } const data = await handeGetCOMMENTList(req) - console.log('datadatadatadatadata222', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) diff --git a/src/pages/travelMember/OrderAfterSalesManage/index.tsx b/src/pages/travelMember/OrderAfterSalesManage/index.tsx index 70b5312..206db4b 100644 --- a/src/pages/travelMember/OrderAfterSalesManage/index.tsx +++ b/src/pages/travelMember/OrderAfterSalesManage/index.tsx @@ -15,6 +15,7 @@ import orderIcon from '@/assets/detail/orderIcon.png' import closeIcon from '@/assets/detail/closeIcon.png' import './style.less' import { handleSetlogSave } from "@/utils/format"; +import { highlightText } from "@/utils/highlightText"; const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -44,6 +45,8 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ @@ -131,7 +134,8 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => handleModalVisible(true) handleSetlogSave(`查询【${record?.ORDER_PERSON}】编码为${record?.SALEBILL_CODE}的订单`) }}> - {record?.SALEBILL_CODE} + {/* {record?.SALEBILL_CODE} */} + {highlightText(record?.SALEBILL_CODE, currentSearchText)} : "" } }, @@ -142,6 +146,9 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.COMMODITY_NAME, currentSearchText) + } }, { title: "订单状态", @@ -306,6 +313,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => // const data = await handeGetSALEBILLList(req); const data = await handeGetSaleBillWholeList(req); + setCurrentSearchText(params?.searchText || "") console.log('datadatadatadatadata', data); handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { diff --git a/src/pages/travelMember/OrderProductManage/index.tsx b/src/pages/travelMember/OrderProductManage/index.tsx index 08639c9..52d6d9f 100644 --- a/src/pages/travelMember/OrderProductManage/index.tsx +++ b/src/pages/travelMember/OrderProductManage/index.tsx @@ -31,6 +31,7 @@ import session from '@/utils/session'; import OrderCategoryTreeMultiple from './components/OrderCategoryTreeMultiple'; import Item from 'antd/lib/list/Item'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { @@ -100,14 +101,16 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 定义列表字段内容 const columns: any = [ { dataIndex: 'searchText', title: '查询内容', hideInTable: true, - fieldProp: { - placeholder: "请输入商品名称" + fieldProps: { + placeholder: "请输入购买的商品" } }, @@ -169,7 +172,10 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( setCurrentRow(record) setShowDetail(true) - }}>{record?.COMMODITY_NAME} : "" + }}> + {/* {record?.COMMODITY_NAME} */} + {highlightText(record?.COMMODITY_NAME, currentSearchText)} + : "" } }, { @@ -221,6 +227,17 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( sorter: (a, b) => new Date(a.OPERATE_DATE).getTime() - new Date(b.OPERATE_DATE).getTime(), defaultSortOrder: 'descend', }, + { + dataIndex: 'SHOPNAME', + title: '门店名称', + align: 'center', + width: 180, + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return highlightText(record?.SHOPNAME, currentSearchText) + } + }, { dataIndex: 'SERVERPART_NAME', title: '服务区名称', @@ -229,14 +246,6 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( ellipsis: true, hideInSearch: true, }, - { - dataIndex: 'SHOPNAME', - title: '门店名称', - align: 'center', - width: 180, - ellipsis: true, - hideInSearch: true, - } ]; // 新增商品的columns const getProductsColumns: any = [ @@ -484,6 +493,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( console.log('reqreqreqreq', req); const data = await handeGetSellerCommodityList(req); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) // const data = await handeGetCOMMODITYList(req); console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/PointsRecordSearch/index.tsx b/src/pages/travelMember/PointsRecordSearch/index.tsx index b559615..4654e2a 100644 --- a/src/pages/travelMember/PointsRecordSearch/index.tsx +++ b/src/pages/travelMember/PointsRecordSearch/index.tsx @@ -13,13 +13,14 @@ import type { ActionType } from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table"; import ReactHTMLTableToExcel from "react-html-table-to-excel"; import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; -import { handleGetCONSUMPTIONRECORDList, handleGetPOINTRECORDList } from "../service"; +import { handeGetNestingAUTOTYPEList, handleGetCONSUMPTIONRECORDList, handleGetPOINTRECORDList } from "../service"; import PageTitleBox from "@/components/PageTitleBox"; import moment from 'moment' import session from "@/utils/session"; import { handleSetlogSave } from "@/utils/format"; import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; import MemberDetail from "../memberInfor/component/memberDetail"; +import { highlightText } from "@/utils/highlightText"; const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any, searchReq?: any, onRef?: any, height?: any }> = (props) => { @@ -53,6 +54,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo const [currentRow, setCurrentRow] = useState() // 显示详情抽屉 const [showDetailDrawer, setShowDetailDrawer] = useState(false) + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -100,7 +103,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo setShowDetailDrawer(true) handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> - {record?.MEMBERSHIP_NAME} + {/* {record?.MEMBERSHIP_NAME} */} + {highlightText(record?.MEMBERSHIP_NAME, currentSearchText)} : "-" } }, @@ -128,6 +132,39 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo }, sorter: true }, + { + title: '会员标签', + dataIndex: "MEMBERSHIP_TARGET", + valueType: 'treeSelect', + align: 'center', + width: 120, + request: async () => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + console.log('datadatadatadatadata', data); + return data + }, + fieldProps: { + multiple: true, + allowClear: true, + showSearch: true, + filterTreeNode: (input, node) => { + // ✅ 输入时根据 AUTOTYPE_NAME 模糊匹配 + return node?.AUTOTYPE_NAME?.toLowerCase()?.includes(input.toLowerCase()); + }, + treeDefaultExpandAll: true, + fieldNames: { + label: 'AUTOTYPE_NAME', + value: 'AUTOTYPE_ID', + } + } + }, { title: "积分方式", width: 120, @@ -221,6 +258,17 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo valueType: "digit", sorter: true }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + render: (_, record) => { + return highlightText(record?.SHOPNAME, currentSearchText) + } + }, { title: "服务区名称", width: 150, @@ -229,15 +277,6 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo align: 'center', ellipsis: true, }, - { - title: "门店名称", - width: 150, - dataIndex: "SHOPNAME", - hideInSearch: true, - ellipsis: true, - align: 'center', - }, - ] const handleCloseModal = () => { @@ -296,6 +335,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo SearchParameter: { OWNERUNIT_ID: 911, MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID, + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, @@ -308,7 +348,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo OPERATE_DATE_End: params?.OPERATE_DATE_End || "", OWNERUNIT_ID: 911, POINT_TYPE: params?.POINT_TYPE === '0' ? '' : params?.POINT_TYPE, - POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE + POINT_SOURCE: params?.POINT_SOURCE === '0' ? '' : params?.POINT_SOURCE, + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: 20, @@ -320,6 +361,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo } } const data = await handleGetPOINTRECORDList(req) + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { diff --git a/src/pages/travelMember/ProductListingManagement/index.tsx b/src/pages/travelMember/ProductListingManagement/index.tsx index 0508820..10419bf 100644 --- a/src/pages/travelMember/ProductListingManagement/index.tsx +++ b/src/pages/travelMember/ProductListingManagement/index.tsx @@ -28,6 +28,7 @@ import { handeDeleteCOMMODITY, handeDeleteRTCOMMODITY_MULTI, handeGetCOMMODITY_M import session from '@/utils/session'; import { deletePicture, uploadPicture } from '@/services/picture'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { @@ -99,6 +100,8 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop const [selectShopRowKey, setSelectShopRowKey] = useState([]) // 上下架的加载效果 const [toListLoading, setToListLoading] = useState(false) + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 预览上传后的图片 const handlePreview = async (type: number) => { @@ -114,8 +117,6 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop const handleChangePreview = (val: any) => { setImagePreviewVisible(val) } - - const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; const targetRect = draggleRef.current?.getBoundingClientRect(); @@ -130,7 +131,6 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop }); }; - // 定义列表字段内容 const columns: any = [ { @@ -168,6 +168,9 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop hideInSearch: true, width: 120, ellipsis: true, + render: (_, record) => { + return highlightText(record?.BRAND_NAME, currentSearchText) + } }, { dataIndex: 'COMMODITY_INDEX', @@ -190,7 +193,10 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop handleSetlogSave(`查看商品【${record?.COMMODITY_NAME}】信息`) setCurrentRow({ ...record }); handleModalVisible(true); - }}>{record?.COMMODITY_NAME} : "-" + }}> + {/* {record?.COMMODITY_NAME} */} + {highlightText(record?.COMMODITY_NAME, currentSearchText)} + : "-" } }, { @@ -710,6 +716,8 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop PageSize: 999999, } const data = await handeGetCOMMODITYList(req); + setCurrentSearchText(params?.searchText || "") + console.log('datadatadatadatadata', data); handleSetlogSave(`点击查询按钮`) setSelectShopRowKey([]) diff --git a/src/pages/travelMember/ProductSpecificationManage/index.tsx b/src/pages/travelMember/ProductSpecificationManage/index.tsx index f25b1e7..82265e2 100644 --- a/src/pages/travelMember/ProductSpecificationManage/index.tsx +++ b/src/pages/travelMember/ProductSpecificationManage/index.tsx @@ -28,6 +28,7 @@ import ModalFooter from '../scenicSpotConfig/component/modalFooter'; import { handleSetlogSave } from '@/utils/format'; import { uploadPicture } from '@/services/picture'; import defaultIcon from '../../../assets/brand/defaultIcon.png' +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -64,7 +65,8 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine const [fileList, setFileList] = useState([]) const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const onDraggaleStart = (event, uiData) => { const { clientWidth, clientHeight } = window.document.documentElement; @@ -110,7 +112,9 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine setCurrentRow({ ...record }); handleModalVisible(true); }}> - {record?.COMMODITY_NAME} + {/* {record?.COMMODITY_NAME} */} + {highlightText(record?.COMMODITY_NAME, currentSearchText)} + : record?.USERDEFINEDTYPE_NAME ?
@@ -122,7 +126,10 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine } setCurrentRow({ ...record }); handleModalVisible(true); - }}>{record?.USERDEFINEDTYPE_NAME} + }}> + {/* {record?.USERDEFINEDTYPE_NAME} */} + {highlightText(record?.USERDEFINEDTYPE_NAME, currentSearchText)} +
: "-" } @@ -412,6 +419,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine const data = await handlGetUSERDEFINEDTYPEList(req); setTableData(data) handleSetlogSave(`点击查询按钮`) + setCurrentSearchText(params?.searchText || "") if (data && data.length > 0) { let list: any = transformMultiRuleToChildren(data) console.log('listlistlistlist', list); diff --git a/src/pages/travelMember/ProductWarningRuleSetting/index.tsx b/src/pages/travelMember/ProductWarningRuleSetting/index.tsx index 3507730..281deaf 100644 --- a/src/pages/travelMember/ProductWarningRuleSetting/index.tsx +++ b/src/pages/travelMember/ProductWarningRuleSetting/index.tsx @@ -19,6 +19,7 @@ import Draggable from "react-draggable"; import ProForm, { ProFormDigit, ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form"; import { handleSetlogSave } from "@/utils/format"; import { handeGetCOMMODITYWARNINGList, handeGetDeleteCOMMODITYWARNING, handeSynchroCOMMODITYWARNING } from "../service"; +import { highlightText } from "@/utils/highlightText"; const ProductWarningRuleSetting: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -53,6 +54,8 @@ const ProductWarningRuleSetting: React.FC<{ currentUser: CurrentUser }> = (props bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -75,7 +78,8 @@ const ProductWarningRuleSetting: React.FC<{ currentUser: CurrentUser }> = (props setCurrentRow(record) handleModalVisible(true) }}> - {record?.WARNING_NAME} + {/* {record?.WARNING_NAME} */} + {highlightText(record?.WARNING_NAME, currentSearchText)} : "-" } }, @@ -222,6 +226,7 @@ const ProductWarningRuleSetting: React.FC<{ currentUser: CurrentUser }> = (props setSearchParams(params) const data = await handeGetCOMMODITYWARNINGList(req) + setCurrentSearchText(params?.searchText || "") console.log('datadatadatadata', data); if (data && data.length > 0) { return { data, success: true } diff --git a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx index 5f6a22f..6f2ac5e 100644 --- a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx +++ b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx @@ -19,6 +19,7 @@ import { handleGetBEHAVIORRECORDList } from "@/pages/Setting/OperationLog/servic import MemberDetail from "../memberInfor/component/memberDetail"; import { handleSetlogSave } from "@/utils/format"; import { handeGetNestingFIELDENUMListNoEncryption } from "../service"; +import { highlightText } from "@/utils/highlightText"; const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any }> = (props) => { @@ -45,7 +46,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp const [tableLoading, setTableLoading] = useState(false) // 判断是否是第一次 const [isFirst, setIsFirst] = useState(true) - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const [columnsStateMap, setColumnsStateMap] = useState({ BEHAVIORRECORD_ID: { show: false }, @@ -68,6 +70,14 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp const [currentRow, setCurrentRow] = useState() const columns: any = [ + { + title: '查询内容', + hideInTable: true, + dataIndex: 'searchValue', + fieldProps: { + placeholder: '请输入操作人员/访问页面' + } + }, { title: '查询时间', dataIndex: 'search_date', @@ -97,20 +107,16 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp hideInSearch: true, dataIndex: 'BEHAVIORRECORD_ID' }, - { - title: '查询内容', - hideInTable: true, - dataIndex: 'searchValue', - fieldProps: { - placeholder: '请输入操作人员/访问页面' - } - }, + { title: '访问页面', width: 150, hideInSearch: true, ellipsis: true, dataIndex: 'BEHAVIORRECORD_ROUTNAME', + render: (_, record) => { + return highlightText(record?.BEHAVIORRECORD_ROUTNAME, currentSearchText) + } // render: (_, record) => { // return record?.BEHAVIORRECORD_ROUTNAME ? { // console.log('record', record); @@ -179,7 +185,8 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp setShowDetailDrawer(true) handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> - {record?.USER_NAME || '-'} + {/* {record?.USER_NAME || '-'} */} + {highlightText(record?.USER_NAME, currentSearchText)} } }, @@ -473,7 +480,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp expandRowByClick: true }} scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }} - search={isComponent ? false : { span: 6 }} + search={isComponent ? false : { span: 6, defaultCollapsed: false }} // dataSource={tableData} // loading={tableLoading} options={isComponent ? false : { @@ -508,11 +515,11 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComp PageIndex: params?.current || 1, PageSize: params?.pageSize || 999999 } - console.log('reqreqreqreq', req); setSearchParams(params) const data = await handleGetBEHAVIORRECORDList(req) - console.log('dhsjdhasjdhs', data); + + setCurrentSearchText(params?.searchValue || "") setReqDetailList(data.List) setTableData(data.List) diff --git a/src/pages/travelMember/ShoppingMallProductSearch/index.tsx b/src/pages/travelMember/ShoppingMallProductSearch/index.tsx index 4a0be66..b5cda33 100644 --- a/src/pages/travelMember/ShoppingMallProductSearch/index.tsx +++ b/src/pages/travelMember/ShoppingMallProductSearch/index.tsx @@ -28,6 +28,7 @@ import session from '@/utils/session'; import { deletePicture, uploadPicture } from '@/services/picture'; import LeftSelectMallType from '../ProductListingManagement/component/LeftSelectMallType'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { @@ -96,6 +97,8 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined const [fileList, setFileList] = useState([]) const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 预览上传后的图片 const handlePreview = async () => { setFileList(fileList) @@ -126,9 +129,12 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined { dataIndex: 'searchText', title: '查询内容', + align: 'center', hideInTable: true, - fieldProp: { - placeholder: "请输入品牌名称/商品名称" + width: 120, + ellipsis: true, + fieldProps: { + placeholder: "请输入商品名称/品牌名称" } }, { @@ -155,6 +161,9 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined hideInSearch: true, width: 120, ellipsis: true, + render: (_, record) => { + return highlightText(record?.BRAND_NAME, currentSearchText) + } }, { dataIndex: 'COMMODITY_INDEX', @@ -177,7 +186,10 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined setCurrentRow({ ...record }); handleModalVisible(true); handleSetlogSave(`查询商品【${record?.COMMODITY_NAME}】`) - }}>{record?.COMMODITY_NAME || ""} + }}> + {/* {record?.COMMODITY_NAME} */} + {highlightText(record?.COMMODITY_NAME, currentSearchText)} + } }, { @@ -662,6 +674,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined PageSize: 999999, } const data = await handeGetCOMMODITYList(req); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { diff --git a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx index a444bbf..1678185 100644 --- a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx +++ b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx @@ -185,7 +185,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
{item.value}
占比
- {item.key ? item.key + '%' : ""} + {item.key ? item.key > 1000 ? '1000%' : item.key + '%' : ""}
}) @@ -217,7 +217,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi
{item.value}
占比
- {item.key ? item.key + '%' : ""} + {item.key ? item.key > 1000 ? '1000%' : item.key + '%' : ""}
}) diff --git a/src/pages/travelMember/SummaryOfReservation/index.tsx b/src/pages/travelMember/SummaryOfReservation/index.tsx index 18ef923..e03cc49 100644 --- a/src/pages/travelMember/SummaryOfReservation/index.tsx +++ b/src/pages/travelMember/SummaryOfReservation/index.tsx @@ -96,7 +96,15 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = title: '下单人员', align: 'center', hideInSearch: true, - width: 250, + width: 150, + ellipsis: true, + }, + { + dataIndex: 'MEMBERSHIP_TARGET', + title: '会员标签', + align: 'center', + hideInSearch: true, + width: 150, ellipsis: true, }, { @@ -301,6 +309,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = return data }} fieldProps={{ + multiple: true, allowClear: true, showSearch: true, filterTreeNode: (input, node) => { @@ -349,7 +358,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = { topData && topData?.TotalActualAmount && topData?.TotalActualAmount.QOQData && topData?.TotalActualAmount.summaryData ? - {(((topData?.TotalActualAmount.summaryData - topData?.TotalActualAmount.QOQData) / topData?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalActualAmount.summaryData - topData?.TotalActualAmount.QOQData) / topData?.TotalActualAmount.QOQData) > 10 ? '1000%' : (((topData?.TotalActualAmount.summaryData - topData?.TotalActualAmount.QOQData) / topData?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -372,7 +381,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalSuccAmount && topData?.TotalSuccAmount.QOQData && topData?.TotalSuccAmount.summaryData ? // {topData && topData?.TotalSuccAmount ? topData?.TotalSuccAmount.QOQData : "-"} - {(((topData?.TotalSuccAmount.summaryData - topData?.TotalSuccAmount.QOQData) / topData?.TotalSuccAmount.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalSuccAmount.summaryData - topData?.TotalSuccAmount.QOQData) / topData?.TotalSuccAmount.QOQData) > 10 ? '1000%' : (((topData?.TotalSuccAmount.summaryData - topData?.TotalSuccAmount.QOQData) / topData?.TotalSuccAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -395,7 +404,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalSuccTicket && topData?.TotalSuccTicket.QOQData && topData?.TotalSuccTicket.summaryData ? // {topData && topData?.TotalSuccTicket ? topData?.TotalSuccTicket.QOQData : "-"} - {(((topData?.TotalSuccTicket.summaryData - topData?.TotalSuccTicket.QOQData) / topData?.TotalSuccTicket.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalSuccTicket.summaryData - topData?.TotalSuccTicket.QOQData) / topData?.TotalSuccTicket.QOQData) > 10 ? '1000%' : (((topData?.TotalSuccTicket.summaryData - topData?.TotalSuccTicket.QOQData) / topData?.TotalSuccTicket.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -418,7 +427,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalCount && topData?.TotalCount.QOQData && topData?.TotalCount.summaryData ? // {topData && topData?.TotalCount ? topData?.TotalCount.QOQData : "-"} - {(((topData?.TotalCount.summaryData - topData?.TotalCount.QOQData) / topData?.TotalCount.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalCount.summaryData - topData?.TotalCount.QOQData) / topData?.TotalCount.QOQData) > 10 ? '1000%' : (((topData?.TotalCount.summaryData - topData?.TotalCount.QOQData) / topData?.TotalCount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -441,7 +450,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalFailureTicket && topData?.TotalFailureTicket.QOQData && topData?.TotalFailureTicket.summaryData ? // {topData && topData?.TotalFailureTicket ? topData?.TotalFailureTicket.QOQData : "-"} - {(((topData?.TotalFailureTicket.summaryData - topData?.TotalFailureTicket.QOQData) / topData?.TotalFailureTicket.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalFailureTicket.summaryData - topData?.TotalFailureTicket.QOQData) / topData?.TotalFailureTicket.QOQData) > 10 ? '1000%' : (((topData?.TotalFailureTicket.summaryData - topData?.TotalFailureTicket.QOQData) / topData?.TotalFailureTicket.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -464,7 +473,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalRefundTicket && topData?.TotalRefundTicket.QOQData && topData?.TotalRefundTicket.summaryData ? // {topData && topData?.TotalRefundTicket ? topData?.TotalRefundTicket.QOQData : "-"} - {(((topData?.TotalRefundTicket.summaryData - topData?.TotalRefundTicket.QOQData) / topData?.TotalRefundTicket.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalRefundTicket.summaryData - topData?.TotalRefundTicket.QOQData) / topData?.TotalRefundTicket.QOQData) > 10 ? '1000%' : (((topData?.TotalRefundTicket.summaryData - topData?.TotalRefundTicket.QOQData) / topData?.TotalRefundTicket.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -487,7 +496,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = topData && topData?.TotalRefundAmount && topData?.TotalRefundAmount.QOQData && topData?.TotalRefundAmount.summaryData ? // {topData && topData?.TotalRefundAmount ? topData?.TotalRefundAmount.QOQData : "-"} - {(((topData?.TotalRefundAmount.summaryData - topData?.TotalRefundAmount.QOQData) / topData?.TotalRefundAmount.QOQData) * 100).toFixed(2) + '%'} + {((topData?.TotalRefundAmount.summaryData - topData?.TotalRefundAmount.QOQData) / topData?.TotalRefundAmount.QOQData) > 10 ? '1000%' : (((topData?.TotalRefundAmount.summaryData - topData?.TotalRefundAmount.QOQData) / topData?.TotalRefundAmount.QOQData) * 100).toFixed(2) + '%'} : "-" } @@ -605,7 +614,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = selectTab == 9 ? '' : selectTab == 10 ? '' : '', SearchKeyValue: params?.searchText || "", - MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET || "", + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: 1, PageSize: 999999, diff --git a/src/pages/travelMember/SummaryofMerchantReviews/index.tsx b/src/pages/travelMember/SummaryofMerchantReviews/index.tsx index accd9c8..9b8b562 100644 --- a/src/pages/travelMember/SummaryofMerchantReviews/index.tsx +++ b/src/pages/travelMember/SummaryofMerchantReviews/index.tsx @@ -18,6 +18,7 @@ import Draggable from "react-draggable"; import ProForm, { ProFormList, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form"; import { getBase64 } from "@/utils/utils"; import './SummaryofMerchantReviews.less' +import { highlightText } from "@/utils/highlightText"; @@ -61,7 +62,8 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -112,6 +114,9 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.SELLER_NAME, currentSearchText) + } }, { title: "评价时间", @@ -133,6 +138,9 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return highlightText(record?.MEMBERSHIP_NAME, currentSearchText) + } }, { title: "会员类型", @@ -191,7 +199,10 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent ReplyList: record?.ReplyList || [] }) setShowDetailDrawer(true) - }}>{record?.COMMENT_CONTENT} : "-" + }}> + {/* {record?.COMMENT_CONTENT} */} + {highlightText(record?.COMMENT_CONTENT, currentSearchText)} + : "-" } }, // { @@ -280,8 +291,6 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent if (!selectedId && !isComponent) { return } - console.log('parentDetailparentDetailparentDetail', parentDetail); - const req: any = isComponent ? come === 'MerchantSalesRanking' ? { SearchParameter: { OWNERUNIT_ID: currentUser?.OwnerUnitId, @@ -330,8 +339,8 @@ const SummaryofMerchantReviews: React.FC<{ currentUser: CurrentUser, isComponent SortStr: "CREATE_DATE desc" } const data = await handeGetCOMMENTList(req) - console.log('datadatadatadatadata222', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { diff --git a/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx b/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx index 25ad18f..bb4392f 100644 --- a/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx +++ b/src/pages/travelMember/SupplierOrderStatistics/components/SupplierLeftSelectTree.tsx @@ -53,6 +53,7 @@ const SupplierLeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, let list: any = data.List setTreeView(list) + setAllTreeViews(list) return list }) // 显示服务区树搜索框 @@ -69,13 +70,13 @@ const SupplierLeftSelectTree = ({ setSelectedId, reload, actionRef, currentUser, setTreeView([]) const list: any = [] resList.forEach((item: any) => { - if (item.label.indexOf(value) !== -1) { + if (item.MERCHANTS_NAME.indexOf(value) !== -1) { list.push(item) } else { if (item.children && item.children.length > 0) { const childrenList: any = [] item.children.forEach((subItem: any) => { - if (subItem.label.indexOf(value) !== -1) { + if (subItem.MERCHANTS_NAME.indexOf(value) !== -1) { childrenList.push(subItem) } }) diff --git a/src/pages/travelMember/TradingLedger/index.tsx b/src/pages/travelMember/TradingLedger/index.tsx index d58c67d..a3a229e 100644 --- a/src/pages/travelMember/TradingLedger/index.tsx +++ b/src/pages/travelMember/TradingLedger/index.tsx @@ -18,6 +18,7 @@ import { handeGetSupplierSaleBillList } from "../service"; import moment from 'moment' import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; import { handleSetlogSave } from "@/utils/format"; +import { highlightText } from "@/utils/highlightText"; const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props @@ -41,14 +42,16 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { const [searchParams, setSearchParams] = useState() const [currentRow, setCurrentRow] = useState(); const [modalVisible, handleModalVisible] = useState(false); + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { + dataIndex: 'searchText', title: '查询内容', hideInTable: true, - dataIndex: 'searchText', - fieldprop: { - placeholder: "请输入供应商名称/订单号等" + fieldProps: { + placeholder: "请输入供货商/购买的商品/订单编号" } }, { @@ -84,6 +87,9 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { width: 200, ellipsis: true, hideInSearch: true, + render: (_, record) => { + return highlightText(record?.MERCHANTS_NAME, currentSearchText) + } }, { dataIndex: 'SALEBILL_CODE', @@ -99,7 +105,10 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { handleModalVisible(true) handleSetlogSave(`查询收货人【${record?.ORDER_PERSON}】编码【${record.SALEBILL_CODE}】订单`) - }}>{record?.SALEBILL_CODE} : "-" + }}> + {/* {record?.SALEBILL_CODE} */} + {highlightText(record?.SALEBILL_CODE, currentSearchText)} + : "-" } }, { @@ -117,6 +126,9 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { width: 300, ellipsis: true, hideInSearch: true, + render: (_, record) => { + return highlightText(record?.COMMODITY_NAME, currentSearchText) + } }, { dataIndex: 'ORDER_PERSON', @@ -336,6 +348,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { console.log('reqreqreqreq', req); const data = await handeGetSupplierSaleBillList(req) + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`点击查询按钮`) console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/memberInfor/index.tsx b/src/pages/travelMember/memberInfor/index.tsx index 72db1f4..90e820a 100644 --- a/src/pages/travelMember/memberInfor/index.tsx +++ b/src/pages/travelMember/memberInfor/index.tsx @@ -26,6 +26,7 @@ import AddressDetail from "../MemberAddress/components/addressDetail"; import { handleSetlogSave } from "@/utils/format"; import MemberDetail from "./component/memberDetail"; import { request } from "express"; +import { highlightText } from "@/utils/highlightText"; // searchType 1 会员类型 2 会员等级 @@ -104,6 +105,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT bottom: clientHeight - (targetRect.bottom - uiData.y), }); }; + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -119,7 +122,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT setShowDetailDrawer(true) handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> - {record?.MEMBERSHIP_NAME || ""} + {/* {record?.MEMBERSHIP_NAME || ""} */} + {highlightText(record?.MEMBERSHIP_NAME, currentSearchText)} }, fieldProps: { @@ -193,6 +197,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.MEMBERSHIP_MOBILEPHONE, currentSearchText) + } }, { title: "会员等级", @@ -262,6 +269,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.CERTIFICATE_NUMBER, currentSearchText) + } }, { title: "会员卡号", @@ -299,6 +309,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT hideInSearch: true, ellipsis: true, align: 'center', + render: (_, record) => { + return highlightText(record?.PLATE_NUMBER, currentSearchText) + } }, // { // title: "付费会员", @@ -721,9 +734,6 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT headerTitle={} search={{ span: 6 }} request={async (params, sorter) => { - console.log('paramsparamsparams', params); - console.log('searchTypesearchTypesearchType', searchType); - console.log('sortersortersortersorter', sorter); const sortstr = Object.keys(sorter).map(n => { const value = sorter[n] @@ -794,6 +804,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT handleSetlogSave(`查看了会员账户管理列表`) const data = await handleGetMEMBERSHIPList(req) + setCurrentSearchText(params?.MEMBERSHIP_NAME || "") // 可以拿到车牌号的用户信息列表 // const data = await handeGetMemberShipLicenseList(req) console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/scenicSpotConfig/index.tsx b/src/pages/travelMember/scenicSpotConfig/index.tsx index 72cc447..11c40bc 100644 --- a/src/pages/travelMember/scenicSpotConfig/index.tsx +++ b/src/pages/travelMember/scenicSpotConfig/index.tsx @@ -27,6 +27,7 @@ import session from '@/utils/session'; import { deletePicture, uploadPicture } from '@/services/picture'; import ModalFooter from './component/modalFooter'; import { handleSetlogSave } from '@/utils/format'; +import { highlightText } from '@/utils/highlightText'; const beforeUpload = (file: any) => { @@ -82,7 +83,8 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr // 文件列表 const [fileList, setFileList] = useState([]) const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 - + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') // 定义列表字段内容 const columns: any = [ @@ -123,7 +125,8 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr setFileList(imgList); handleModalVisible(true); }}> - {record?.SCENICAREA_NAME || ""} + {highlightText(record?.SCENICAREA_NAME, currentSearchText)} + {/* {record?.SCENICAREA_NAME || ""} */} } }, @@ -143,6 +146,9 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr ellipsis: true, align: 'center', hideInSearch: true, + render: (_, record) => { + return highlightText(record?.SCENICAREA_LOCATION, currentSearchText) + } }, { dataIndex: 'SCENICAREA_FACILITY', @@ -379,7 +385,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr background: "#fff" }}> { return `${record?.SCENICAREA_ID}` }} @@ -405,6 +411,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr } const data = await handeGetSCENICAREAList(req); console.log('datadatadatadatadata', data); + setCurrentSearchText(params?.searchText || "") handleSetlogSave(`查看了景区信息配置列表`) @@ -599,12 +606,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr ]} /> - - - + = (pr ]} /> + + + { + if (!text || !searchText) return text; + const regex = new RegExp(`(${searchText})`, 'gi'); + const parts = text.split(regex); + return ( + + {parts.map((part, i) => + part.toLowerCase() === searchText.toLowerCase() ? + {part} : + part + )} + + ); +}; \ No newline at end of file diff --git a/src/versionEnv.ts b/src/versionEnv.ts index 1834447..47351b3 100644 --- a/src/versionEnv.ts +++ b/src/versionEnv.ts @@ -1,4 +1,4 @@ // 由 scripts/writeVersion.js 自动生成 -export const VERSION = "4.5.15"; -export const GIT_HASH = "a14b50b"; -export const BUILD_TIME = "2025-08-05T03:04:59.319Z"; +export const VERSION = "4.5.17"; +export const GIT_HASH = "9900baf"; +export const BUILD_TIME = "2025-08-06T07:38:47.218Z";