From c1f19fdafca9a6d6f41c9a41abde74dfe1aeb937 Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Thu, 7 Aug 2025 18:42:46 +0800 Subject: [PATCH] update --- package.json | 2 +- src/layouts/BasicLayout.tsx | 13 +- .../components/selectServiceShop.tsx | 2 +- .../CardHaveCollection/index.tsx | 15 +- .../components/CardInfo.tsx | 681 ++++++++++++++++++ .../CardInformationManager/index.tsx | 13 +- .../CardVoucherCollection/index.tsx | 22 +- .../CardVoucherRedemption/index.tsx | 16 +- .../CardVoucherSearch/index.tsx | 45 +- .../MerchantInformation/index.tsx | 61 +- .../ActiveMemberStatistics/index.tsx | 6 +- .../travelMember/AfterSalesManage/index.tsx | 12 +- .../AfterSalesTypeManage/index.tsx | 12 +- .../index.tsx | 12 +- .../travelMember/BookingMealOrder/index.tsx | 36 +- .../BusinessActivityStatistics/index.tsx | 5 +- .../ConsumptionRecordSearch/index.tsx | 81 ++- .../ConsumptionTypeConfig/index.tsx | 12 +- .../GrowthValueRecordSearch/index.tsx | 8 +- .../GrowthValueRuleConfig/index.tsx | 20 +- .../travelMember/MallBrandManage/index.tsx | 19 +- .../MallClassificationManage/index.tsx | 3 +- .../travelMember/MallOrderManage/index.tsx | 45 +- .../MemberSummaryStatistics/index.tsx | 69 +- .../travelMember/MemberTagManage/index.tsx | 17 +- .../MembershipLevelManage/index.tsx | 19 +- .../MembershipLevelStatistics/index.tsx | 7 +- .../MembershipTypeStatistics/index.tsx | 9 +- .../OperationTypeConfig/index.tsx | 14 +- .../travelMember/OrderProductManage/index.tsx | 11 +- .../travelMember/PointsRecordSearch/index.tsx | 3 + .../PointsRuleConfig/PointConfig.tsx | 22 +- .../travelMember/PointsRuleConfig/index.tsx | 12 +- .../ProductListingManagement/index.tsx | 21 +- .../ProductSpecificationManage/index.tsx | 17 +- .../RegistrationStatistics/index.tsx | 8 +- .../SummaryOfIntegralGrowthValue/index.tsx | 5 +- .../SummaryOfReservation/index.tsx | 57 +- .../SupplierClassification/index.tsx | 12 +- .../SupplierMerchantManage/index.tsx | 18 +- .../SupplierOrderStatistics/index.tsx | 78 +- .../travelMember/TradingLedger/index.tsx | 2 +- src/pages/travelMember/memberInfor/index.tsx | 50 +- .../component/modalFooter.tsx | 22 +- src/pages/travelMember/service.ts | 40 +- src/utils/format.ts | 15 + src/versionEnv.ts | 6 +- 47 files changed, 1519 insertions(+), 156 deletions(-) create mode 100644 src/pages/CardInformation/CardInformationManager/components/CardInfo.tsx diff --git a/package.json b/package.json index a140f65..b3cd83f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.5.17", + "version": "4.5.18", "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 bb7f9d8..a499cbd 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -31,7 +31,7 @@ import session from '@/utils/session'; import upMenu from '@/assets/tab/upMenu.svg' import { getFieldEnum, getFieldEnumTravel, getFieldEnumTree, getFieldGetFieEnumList, getTravelFieldEnumTree, handleGetFieldEnumTreeTravel, handleGetNestingFIELDENUMList } from "@/services/options"; import { handleGetServerpartTree } from '@/pages/basicManage/serverpartAssets/service'; -import { handeGetNestingFIELDENUMList } from '@/pages/travelMember/service'; +import { handeGetFieldEnumByFieldYN, handeGetNestingFIELDENUMList } from '@/pages/travelMember/service'; import list from '@/pages/Invoicing/list'; @@ -680,6 +680,17 @@ const BasicLayout: React.FC = (props) => { } }) + // 云南 商家信息管理 里面的 经营业态 的枚举 + handeGetFieldEnumByFieldYN({ FieldExplainField: 'BUSINESS_TRADE' }).then(BUSINESSTRADE => { + session.set('BUSINESSTRADESHOPYN', BUSINESSTRADE); + const BUSINESSTRADESHOPYNObj: any = {} + if (BUSINESSTRADE && BUSINESSTRADE.length > 0) { + BUSINESSTRADE.forEach((item: any) => { + BUSINESSTRADESHOPYNObj[item.value] = item.label + }) + } + session.set('BUSINESSTRADESHOPYNObj', BUSINESSTRADESHOPYNObj); + }) // 商品业态 diff --git a/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx b/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx index e8c4a26..ca7c887 100644 --- a/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx +++ b/src/pages/CardInformation/CardCouponApplicRules/components/selectServiceShop.tsx @@ -181,7 +181,7 @@ const SelectServiceShop = ({ currentUser, showDetail, onCancel, onOk, currentRow PageIndex: params?.current, PageSize: params?.pageSize, keyWord: { - Key: "SHOPNAME", + Key: "SHOPNAME,SERVERPART_NAME", Value: params?.searchText } } diff --git a/src/pages/CardInformation/CardHaveCollection/index.tsx b/src/pages/CardInformation/CardHaveCollection/index.tsx index 4835ddf..db48f8c 100644 --- a/src/pages/CardInformation/CardHaveCollection/index.tsx +++ b/src/pages/CardInformation/CardHaveCollection/index.tsx @@ -11,6 +11,7 @@ import { handeGetCouponStockList } from "@/pages/travelMember/service"; import moment from 'moment' import CardVoucherSearch from "../CardVoucherSearch"; import { highlightText } from "@/utils/highlightText"; +import CardInfo from "../CardInformationManager/components/CardInfo"; const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -37,6 +38,8 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { const [currentRow, setCurrentRow] = useState() // 显示详情 const [showDetial, setShowDetail] = useState() + // 显示详情 + const [showCouponDetial, setShowCouponDetail] = useState() // 当前查询的文字 const [currentSearchText, setCurrentSearchText] = useState('') @@ -89,7 +92,13 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { hideInSearch: true, ellipsis: true, render: (_, record) => { - return highlightText(record?.COUPON_NAME, currentSearchText) + return record?.COUPON_NAME ? + { + setCurrentRow(record) + setShowCouponDetail(true) + }}> + {highlightText(record?.COUPON_NAME, currentSearchText)} + : "" } }, { @@ -244,6 +253,10 @@ const CardHaveCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { > + + {/* 卡券的编辑 还是 新增 组件 */} + + ) } diff --git a/src/pages/CardInformation/CardInformationManager/components/CardInfo.tsx b/src/pages/CardInformation/CardInformationManager/components/CardInfo.tsx new file mode 100644 index 0000000..008cc0b --- /dev/null +++ b/src/pages/CardInformation/CardInformationManager/components/CardInfo.tsx @@ -0,0 +1,681 @@ +import { connect } from "umi"; +import type { ConnectState } from "@/models/connect"; +import { Col, Divider, FormInstance, message, Modal, Row } from "antd"; +import { useRef, useState } from "react"; +import ProForm, { ProFormDatePicker, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form"; +import { handeGetCOUPONDetail, handeGetWECHATAPPSIGNList } from "@/pages/travelMember/service"; +import session from "@/utils/session"; +import { handleDeleteCOUPON, handleGetCOOPSHOP_RULEList, handleSynchroCOUPONService } from "../../service"; +import { uploadPicture } from "@/services/picture"; +import { ExclamationCircleOutlined } from "@ant-design/icons"; +import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter"; +import { handleSetlogSave } from "@/utils/format"; +import moment from 'moment' + + +const beforeUpload = (file: any) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; + if (!isJpgOrPng) { + message.error('请上传JPEG、jpg、png格式的图片文件!'); + } + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + message.error('图片大小不超过 2MB!'); + } + return isJpgOrPng && isLt2M; +} + +type DetailProps = { + showDetail: boolean + currentRow: any + currentUser: any + parentRef?: any + setShowDetail: any + setCurrentRow: any + readonly?: boolean // 判断是不是只读 +} +const CardInfo = ({ showDetail, currentRow, currentUser, parentRef, setShowDetail, setCurrentRow, readonly }: DetailProps) => { + const { confirm } = Modal; + // 表单数据 + const ModalFormRef = useRef(); + // 卡券详情 + const [couponDetail, setCouponDetail] = useState() + // 小程序列表数据 + const [wxMinList, setWxMinList] = useState([]) + // 文件列表 + const [fileList, setFileList] = useState([]) + const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + // 悬浮框 按钮加载的属性 + const [modalLoading, setModalLoading] = useState(false) + + + // 预览上传后的图片 + const handlePreview = async () => { + setFileList(fileList) + setImagePreviewVisible(true) + }; + + + // 删除的方法 + const handleDeleteShopRule = async (id: any) => { + const req: any = { + COUPONId: id + } + const data = await handleDeleteCOUPON(req) + console.log('datadatadatadata', data); + if (data.Result_Code === 100) { + handleSetlogSave(`删除【${couponDetail?.COUPON_NAME || "-"}(${id})】卡券`) + message.success(data.Result_Desc) + if (parentRef) { + parentRef.current?.reload() + } + ModalFormRef?.current?.resetFields() + setCurrentRow(null) + setShowDetail(false) + setFileList([]) + } else { + message.error(data.Result_Desc) + } + } + + // 同步的方法 + const handleSynchroCOUPON = async (res: any) => { + let req: any = {} + let minDetail: any = {} + if (wxMinList && wxMinList.length > 0 && res.WECHATAPPSIGN_ID) { + + let filterObj: any = wxMinList.filter((n: any) => n.WECHATAPPSIGN_ID === res.WECHATAPPSIGN_ID) + + if (filterObj && filterObj.length > 0) { + let obj = filterObj[0] + minDetail = { + WECHATAPPSIGN_ID: obj.WECHATAPPSIGN_ID, + WECHATAPPSIGN_NAME: obj.WECHATAPPSIGN_NAME, + WECHATAPP_APPID: obj.WECHATAPP_APPID + } + } + } + + if (currentRow?.COUPON_ID) { + req = { + ...couponDetail, + ...res, + END_TIME: moment(res.END_TIME).format("YYYY-MM-DD"), + START_TIME: moment(res.START_TIME).format("YYYY-MM-DD"), + VALID_END_TIME: moment(res.VALID_END_TIME).format("YYYY-MM-DD"), + VALID_START_TIME: moment(res.VALID_START_TIME).format("YYYY-MM-DD"), + UPDATE_STAFF_ID: currentUser?.ID, + UPDATE_STAFF_NAME: currentUser?.Name, + UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + COUPON_IMAGEURL: fileList && fileList.length > 0 ? fileList[0].url : "", + ...minDetail + } + } else { + req = { + ...res, + END_TIME: moment(res.END_TIME).format("YYYY-MM-DD"), + START_TIME: moment(res.START_TIME).format("YYYY-MM-DD"), + VALID_END_TIME: moment(res.VALID_END_TIME).format("YYYY-MM-DD"), + VALID_START_TIME: moment(res.VALID_START_TIME).format("YYYY-MM-DD"), + COUPON_IMAGEURL: fileList && fileList.length > 0 ? fileList[0].url : "", + CREATE_STAFF_ID: currentUser?.ID, + CREATE_STAFF_NAME: currentUser?.Name, + CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + ...minDetail + } + } + + console.log('reqreqreqreq', req); + + const data = await handleSynchroCOUPONService(req) + console.log('datadatadatadata', data); + if (data.Result_Code === 100) { + handleSetlogSave(`${currentRow?.COUPON_ID ? '更新' : '新增'}【${data.Result_Data.COUPON_NAME}】卡券`) + message.success(data.Result_Desc) + ModalFormRef?.current?.resetFields() + setCurrentRow(undefined) + setShowDetail(false) + if (parentRef) { + parentRef.current?.reload() + } + } else { + message.error(data.Result_Desc) + } + } + + return ( +
+ { + ModalFormRef?.current?.resetFields() + setCurrentRow(null) + setShowDetail(false) + setFileList([]) + }} + confirmLoading={modalLoading} + width={1400} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + destroyOnClose + title={currentRow?.COUPON_ID ? currentRow?.COUPON_NAME : "新增卡券"} + onOk={() => { + ModalFormRef?.current?.validateFields().then(async (res) => { + await handleSynchroCOUPON(res) + }) + }} + footer={readonly ? false : { + await handleDeleteShopRule(currentRow?.COUPON_ID) + }} + handleCancel={() => { + ModalFormRef?.current?.resetFields() + setCurrentRow(null) + setShowDetail(false) + setFileList([]) + }} + handleOK={() => { + ModalFormRef?.current?.validateFields().then(async (res) => { + setModalLoading(true) + await handleSynchroCOUPON(res) + setModalLoading(false) + }) + }} + + />} + > +
+ { + if (currentRow?.COUPON_ID) { + const req: any = { + COUPONId: currentRow?.COUPON_ID + } + const data = await handeGetCOUPONDetail(req) + setCouponDetail(data) + return data + } else { + return {} + } + }} + + > + 基本信息 + + + + + + + { + const COUPONTYPEList = session.get('COUPONTYPEList') + return COUPONTYPEList + }} + // options={COUPONTYPEList} + rules={[ + { + required: true, + message: '请选择卡券类型' + } + ]} + readonly={readonly} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 基本规则 + + + { + const req: any = { + SearchParameter: { + OWNERUNIT_ID: 911, + ISVALID: 1 + }, + PageIndex: 1, + PageSize: 999999 + } + + const data = await handleGetCOOPSHOP_RULEList(req) + let list: any = [] + console.log('data', data); + if (data && data.length > 0) { + data.forEach((item: any) => { + list.push({ label: item.COOPSHOP_RULE_NAME, value: item.COOPSHOP_RULE_ID }) + }) + } + // setCOOPSHOPRULEIDOPTIONS(list) + return list + }} + rules={[ + { + required: true, + message: '请选择适用门店' + } + ]} + readonly={readonly} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + 上架信息 + + + { + const req: any = { + SearchParameter: { + OWNERUNIT_ID: 911, + } + } + const data = await handeGetWECHATAPPSIGNList(req) + console.log('datadatadatadata', data); + setWxMinList(data || []) + let list: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + list.push({ label: item.WECHATAPPSIGN_NAME, value: item.WECHATAPPSIGN_ID }) + }) + } + return list + }} + // options={[ + // { label: "彩云驿", value: 37 }, + // { label: "彩云驿出行", value: 38 }, + // ]} + rules={[ + { + required: true, + message: '请选择小程序' + } + ]} + readonly={readonly} + /> + + + + + + + 详情介绍 + + + + + + + + + + 卡券图标 + + + { + const formData = new FormData(); + formData.append('files', info.file); + formData.append('TableType', '1208'); + formData.append('ImageName', typeof info.file !== 'string' ? info.file?.name : ''); + if (info.filename) { + const success = await uploadPicture(formData) + if (success) { + const list = [{ + // uid: `${success.ImageId}`, // 注意,这个uid一定不能少,否则上传失败 + name: success.Result_Data.ImageName, + // status: 'done', + url: success.Result_Data.ImageUrl, // url 是展示在页面上的绝对链接 + // imgUrl: success.ImagePath // + success.ImageUrl, + }] + setFileList(list) + } + } else { + message.error("您上传的图片不存在.") + } + }, + onChange: async (info: any) => { + if (info.file.status === 'removed') { + confirm({ + title: '确认删除该图片吗?', + icon: , + async onOk() { + setFileList([]) + } + }); + } + } + }} + disabled={readonly} + /> + + + +
+
+
+ ) +} + +export default connect(({ user, }: ConnectState) => ({ + currentUser: user.currentUser, +}))(CardInfo); diff --git a/src/pages/CardInformation/CardInformationManager/index.tsx b/src/pages/CardInformation/CardInformationManager/index.tsx index b5c57e6..b405768 100644 --- a/src/pages/CardInformation/CardInformationManager/index.tsx +++ b/src/pages/CardInformation/CardInformationManager/index.tsx @@ -24,6 +24,7 @@ import { uploadPicture } from "@/services/picture"; import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter"; import { handeGetWECHATAPPSIGNList } from "@/pages/travelMember/service"; import { highlightText } from "@/utils/highlightText"; +import CardInfo from "./components/CardInfo"; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -207,7 +208,6 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = // } ] - // 删除的方法 const handleDeleteShopRule = async (id: any) => { const req: any = { @@ -368,7 +368,12 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = } - + + + {/* { @@ -409,7 +414,7 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = />} > -
+
= (props) =
- + */}
) } diff --git a/src/pages/CardInformation/CardVoucherCollection/index.tsx b/src/pages/CardInformation/CardVoucherCollection/index.tsx index dacd88a..0c187ea 100644 --- a/src/pages/CardInformation/CardVoucherCollection/index.tsx +++ b/src/pages/CardInformation/CardVoucherCollection/index.tsx @@ -10,6 +10,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { handeGetCouponStockList } from "@/pages/travelMember/service"; import moment from 'moment' import { highlightText } from "@/utils/highlightText"; +import CardInfo from "../CardInformationManager/components/CardInfo"; const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -33,7 +34,10 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => const [searchParams, setSearchParams] = useState() // 当前查询的文字 const [currentSearchText, setCurrentSearchText] = useState('') - + // 显示详情的抽屉 + const [showDetail, setShowDetail] = useState(false) + // 当前行数据 + const [currentRow, setCurrentRow] = useState() const columns: any = [ { @@ -84,7 +88,12 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => hideInSearch: true, ellipsis: true, render: (_, record) => { - return highlightText(record?.COUPON_NAME, currentSearchText) + return record?.COUPON_NAME ? { + setCurrentRow(record) + setShowDetail(true) + }}> + {highlightText(record?.COUPON_NAME, currentSearchText)} + : "-" } }, { @@ -163,10 +172,6 @@ const CardVoucherCollection: React.FC<{ currentUser: CurrentUser }> = (props) => setPrintOut(el); }} > - - - -
= (props) => />
+ + + {/* 卡券的编辑 还是 新增 组件 */} + + ) } diff --git a/src/pages/CardInformation/CardVoucherRedemption/index.tsx b/src/pages/CardInformation/CardVoucherRedemption/index.tsx index 9d01dfa..1a5b81b 100644 --- a/src/pages/CardInformation/CardVoucherRedemption/index.tsx +++ b/src/pages/CardInformation/CardVoucherRedemption/index.tsx @@ -9,6 +9,7 @@ import { FormInstance } from "antd"; import { handeGetCouponExchangeSummary } from "@/pages/travelMember/service"; import moment from 'moment' import { highlightText } from "@/utils/highlightText"; +import CardInfo from "../CardInformationManager/components/CardInfo"; const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { const { currentUser } = props @@ -19,6 +20,10 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> const [collapsible, setCollapsible] = useState(false) // 当前查询的文字 const [currentSearchText, setCurrentSearchText] = useState('') + // 显示详情的抽屉 + const [showDetail, setShowDetail] = useState(false) + // 当前行数据 + const [currentRow, setCurrentRow] = useState() const columns: any = [ { @@ -69,7 +74,13 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> hideInSearch: true, ellipsis: true, render: (_, record) => { - return highlightText(record?.CouponName, currentSearchText) + return record?.CouponName ? + record?.ServerpartShop_Id ? { + setCurrentRow({ ...record, COUPON_ID: record?.CouponId }) + setShowDetail(true) + }}> + {highlightText(record?.CouponName, currentSearchText)} + : highlightText(record?.CouponName, currentSearchText) : "" } }, { @@ -179,6 +190,9 @@ const CardVoucherRedemption: React.FC<{ currentUser: CurrentUser | undefined }> + + {/* 卡券的编辑 还是 新增 组件 */} + ) } diff --git a/src/pages/CardInformation/CardVoucherSearch/index.tsx b/src/pages/CardInformation/CardVoucherSearch/index.tsx index e9a24b1..2208ab2 100644 --- a/src/pages/CardInformation/CardVoucherSearch/index.tsx +++ b/src/pages/CardInformation/CardVoucherSearch/index.tsx @@ -1,4 +1,4 @@ -// 卡券领取查询 +// 卡券领取查询 import { connect } from "umi"; import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; @@ -18,6 +18,8 @@ import SelectCardVouch from "./components/selectCardVouch"; import { handeGetCOUPON_SENDList } from "@/pages/travelMember/service"; import moment from 'moment' import { highlightText } from "@/utils/highlightText"; +import MemberDetail from "@/pages/travelMember/memberInfor/component/memberDetail"; +import CardInfo from "../CardInformationManager/components/CardInfo"; const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentRow?: any }> = (props) => { @@ -42,6 +44,13 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool const [searchParams, setSearchParams] = useState() // 当前查询的文字 const [currentSearchText, setCurrentSearchText] = useState('') + // 显示详情抽屉 + const [showDetailDrawer, setShowDetailDrawer] = useState(false) + // 当前行数据 + const [currentRow, setCurrentRow] = useState() + // 显示卡券详情的抽屉 + const [showDetail, setShowDetail] = useState(false) + const columns: any = [ { @@ -108,7 +117,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool ellipsis: true, align: "center", render: (_, record) => { - return highlightText(record?.COUPON_NAME, currentSearchText) + return record?.COUPON_NAME ? { + setCurrentRow(record) + setShowDetail(true) + }}> + {highlightText(record?.COUPON_NAME, currentSearchText)} + : "-" } }, { @@ -127,7 +141,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool ellipsis: true, align: "center", render: (_, record) => { - return highlightText(record?.MEMBERSHIP_NAME, currentSearchText) + return record?.MEMBERSHIP_NAME ? { + setCurrentRow(record) + setShowDetailDrawer(true) + }}> + {highlightText(record?.MEMBERSHIP_NAME, currentSearchText)} + : "" } }, { @@ -184,6 +203,12 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool }, ] + // 悬浮框的关闭方法 + const handleCloseModal = () => { + setShowDetailDrawer(false) + setCurrentRow(undefined); + } + return (
{ // 打印报表 @@ -191,7 +216,6 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool setPrintOut(el); }} > -
{ isComponent ? '' : @@ -231,7 +255,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool PageIndex: 1, PageSize: 999999, keyWord: { - key: "COUPON_NAME", + key: "COUPON_NAME,MEMBERSHIP_NAME", value: params?.searchValue || "" }, } @@ -251,7 +275,7 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool PageIndex: 1, PageSize: 999999, keyWord: { - key: "COUPON_NAME", + key: "COUPON_NAME,MEMBERSHIP_NAME", value: params?.searchValue || "" }, } @@ -274,6 +298,15 @@ const CardVoucherSearch: React.FC<{ currentUser: CurrentUser, isComponent?: bool />
+ + {/* 会员详情 */} + + + {/* 卡券的编辑 还是 新增 组件 */} + ) } diff --git a/src/pages/operatingMerchants/MerchantInformation/index.tsx b/src/pages/operatingMerchants/MerchantInformation/index.tsx index 6f345f4..a593147 100644 --- a/src/pages/operatingMerchants/MerchantInformation/index.tsx +++ b/src/pages/operatingMerchants/MerchantInformation/index.tsx @@ -1,4 +1,4 @@ -// 商家信息管理 +// 商家信息管理 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -23,7 +23,7 @@ import { handleDeleteSERVERPARTSELLER, handleGetMEMBERADDRESSList, handleGetRela import LeftSelectTree from '@/pages/reports/settlementAccount/component/leftSelectTree'; import session from '@/utils/session'; import PageTitleBox from '@/components/PageTitleBox'; -import { handeGetCOMMENTList, handeGetPictureList, handeGetRevenueReport } from '@/pages/travelMember/service'; +import { handeDeleteSERVERPARTSELLER, handeGetCOMMENTList, handeGetPictureList, handeGetRevenueReport } from '@/pages/travelMember/service'; import { deletePicture, uploadPicture } from '@/services/picture'; import { handleGetServerPartShopNewList } from '@/pages/basicManage/serviceArea/service'; import { handleGetServerpartShopList } from '@/pages/DataVerification/service'; @@ -82,7 +82,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = const [revenueLoading, setRevenueLoading] = useState(false) - let SHOPTRADEObj = session.get('SHOPTRADEObj') + let BUSINESSTRADESHOPYNObj = session.get('BUSINESSTRADESHOPYNObj') let SHOPTRADEList = session.get('SHOPTRADEList') // 云南 门店业态 let BUSINESSTRADEYNTree = session.get('BUSINESSTRADEYNTree') @@ -175,6 +175,13 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = title: '经营业态', align: 'center', width: 120, + // ellipsis: true, + // valueType: 'select', + // valueEnum: BUSINESSTRADESHOPYNObj + // request: () => { + // const SHOPTRADEList = session.get('SHOPTRADEList') + // return SHOPTRADEList + // } valueType: 'treeSelect', ellipsis: true, fieldProps: { @@ -919,7 +926,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = setCurrentRow({ ...detail, - SHOPTRADE: obj.SHOPTRADE, + // SHOPTRADE: obj.SHOPTRADE, + SHOPTRADE: '', SERVERPART_ID: Number(obj.SERVERPART_ID), SERVERPARTSHOP_IDS: SERVERPARTSHOP_IDS, SERVERPART_NAME: obj.SERVERPART_NAME @@ -1227,6 +1235,35 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = handleGetRevenueData() handleSetlogSave(`点击获取营收按钮`) }}>获取营收 + + { + if (!currentRow?.SELLER_ID) { + return + } + const req: any = { SERVERPARTSELLERId: currentRow?.SELLER_ID } + const data = await handeDeleteSERVERPARTSELLER(req) + if (data.Result_Code === 100) { + message.success(data.Result_Desc) + formRef?.current?.resetFields() + handleConfirmLoading(false) + handleModalVisible(false) + setCurrentRowDetail(null) + setCurrentRow(undefined) + setMerchantLogoList([]) + setDoorImageList([]) + setInteriorImageList([]) + setCurrentShopData([]) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + }} + > + + + :
} @@ -1458,6 +1495,22 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = /> + {/* { + const BUSINESSTRADESHOPYN = session.get('BUSINESSTRADESHOPYN') + return BUSINESSTRADESHOPYN + }} + rules={[ + { + required: true, + message: '请选择门店业态!' + } + ]} + disabled={currentRow?.SHOPTRADE} + /> */} + const [showLoading, setShowLoading] = useState(false) // 当前的搜索条件 const [searchParams, setSearchParams] = useState() + // 是否排除测试会员 + const [ExcludeTest, setExcludeTest] = useState(true) let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') @@ -74,6 +76,8 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }> MembershipLevel: "", } + setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true) + setShowLoading(true) const data = await handeGetMembershipCount(req) setShowLoading(false) @@ -285,7 +289,7 @@ const ActiveMemberStatistics: React.FC<{ currentUser: CurrentUser | undefined }> setShowDetail(false) }} > - + ) diff --git a/src/pages/travelMember/AfterSalesManage/index.tsx b/src/pages/travelMember/AfterSalesManage/index.tsx index a316308..2fdf092 100644 --- a/src/pages/travelMember/AfterSalesManage/index.tsx +++ b/src/pages/travelMember/AfterSalesManage/index.tsx @@ -139,10 +139,16 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, initialValue: "1" }, { diff --git a/src/pages/travelMember/AfterSalesTypeManage/index.tsx b/src/pages/travelMember/AfterSalesTypeManage/index.tsx index dd3f98a..4b49eec 100644 --- a/src/pages/travelMember/AfterSalesTypeManage/index.tsx +++ b/src/pages/travelMember/AfterSalesTypeManage/index.tsx @@ -139,9 +139,11 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1" }, @@ -415,7 +417,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr }} > - {/* + = (pr } ]} /> - */} + = (props) => { const { currentUser } = props @@ -16,6 +17,8 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser const [selectedId, setSelectedId] = useState() // 查询的条件 const [searchParams, setSearchParams] = useState() + // 当前查询的文字 + const [currentSearchText, setCurrentSearchText] = useState('') const columns: any = [ { @@ -63,6 +66,9 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser hideInSearch: true, align: 'left', ellipsis: true, + render: (_, record) => { + return highlightText(record?.Commodity_Name, currentSearchText) + } }, { title: "商品条码", @@ -143,11 +149,15 @@ const AnalysisOfHotSellingButUnsoldProducts: React.FC<{ currentUser: CurrentUser ServerpartId: "", StartDate: params?.StartDate || "", EndDate: params?.EndDate || "", - SaleBillType: params?.SaleBillType || "" + SaleBillType: params?.SaleBillType || "", + SearchKeyName: "Commodity_Name", + SearchKeyValue: params?.searchText || "", + SortStr: "" } setSearchParams(params) const data = await handeGetCommoditySaleSummary(req) + setCurrentSearchText(params?.searchText || "") console.log('datadatadatadata', data); if (data.List && data.List.length > 0) { return { data: data.List, success: true } diff --git a/src/pages/travelMember/BookingMealOrder/index.tsx b/src/pages/travelMember/BookingMealOrder/index.tsx index f8e4ca5..9a3c57c 100644 --- a/src/pages/travelMember/BookingMealOrder/index.tsx +++ b/src/pages/travelMember/BookingMealOrder/index.tsx @@ -17,7 +17,7 @@ import './style.less' 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 { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format"; import { highlightText } from "@/utils/highlightText"; @@ -127,6 +127,40 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr width: 150, ellipsis: true, }, + { + title: '会员标签', + dataIndex: "MEMBERSHIP_TARGET", + width: 150, + align: 'center', + valueType: 'treeSelect', + 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); + let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID') + return res + }, + hideInSearch: true, + fieldProps: { + 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', + } + } + }, { dataIndex: 'ORDER_DATE', title: '订单时间', diff --git a/src/pages/travelMember/BusinessActivityStatistics/index.tsx b/src/pages/travelMember/BusinessActivityStatistics/index.tsx index ca64406..0bd8e84 100644 --- a/src/pages/travelMember/BusinessActivityStatistics/index.tsx +++ b/src/pages/travelMember/BusinessActivityStatistics/index.tsx @@ -39,6 +39,8 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine const [valueType, setValueType] = useState() // 显示加载效果 const [showLoading, setShowLoading] = useState(false) + // 是否排除测试会员 + const [ExcludeTest, setExcludeTest] = useState(true) let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList') @@ -72,6 +74,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine MembershipLevel: formData?.MembershipLevel === '1' ? '' : formData?.MembershipLevel || "", } + setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true) setShowLoading(true) const data = await handeGetMembershipCount(req) @@ -466,7 +469,7 @@ const BusinessActivityStatistics: React.FC<{ currentUser: CurrentUser | undefine setShowDetail(false) }} > - + ) diff --git a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx index c08b091..b30617f 100644 --- a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx +++ b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx @@ -14,11 +14,11 @@ 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 { handleGetCONSUMPTIONRECORDList } from "../service"; +import { handeGetNestingAUTOTYPEList, handleGetCONSUMPTIONRECORDList } from "../service"; import moment from 'moment' import session from "@/utils/session"; import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; -import { handleSetlogSave } from "@/utils/format"; +import { convertTreeFieldToNumber, handleSetlogSave } from "@/utils/format"; import MemberDetail from "../memberInfor/component/memberDetail"; @@ -163,6 +163,40 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? }, sorter: true, }, + { + title: '会员标签', + dataIndex: "MEMBERSHIP_TARGET", + valueType: 'treeSelect', + align: 'center', + width: 120, + hideInSearch: true, + request: async () => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID') + return res + }, + 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: 200, @@ -225,6 +259,41 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? }, sorter: true }, + + { + title: '会员标签', + dataIndex: "MEMBERSHIP_TARGET", + valueType: 'treeSelect', + align: 'center', + width: 120, + hideInTable: true, + request: async () => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID') + return res + }, + 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, @@ -344,7 +413,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? expandRowByClick: true }} headerTitle={isComponent ? '' : } - scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 450px)' }} + scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 480px)' }} search={isComponent ? false : { span: 6, defaultCollapsed: false }} options={isComponent ? false : { density: true, @@ -367,7 +436,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID, - CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999' + CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999', + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: params?.pageSize, @@ -386,7 +456,8 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? CONSUMPTIONRECORD_DATE_Start: params?.CONSUMPTIONRECORD_DATE_Start || "", CONSUMPTIONRECORD_DATE_End: params?.CONSUMPTIONRECORD_DATE_End || "", CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE, - CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999' + CONSUMPTIONRECORD_STATES: '1010,2000,2010,3000,8000,8010,8020,8900,8999', + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" }, PageIndex: params?.current, PageSize: params?.pageSize, diff --git a/src/pages/travelMember/ConsumptionTypeConfig/index.tsx b/src/pages/travelMember/ConsumptionTypeConfig/index.tsx index 09f2148..56afe0d 100644 --- a/src/pages/travelMember/ConsumptionTypeConfig/index.tsx +++ b/src/pages/travelMember/ConsumptionTypeConfig/index.tsx @@ -138,9 +138,15 @@ const ConsumptionTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1" }, diff --git a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx index b84f37e..2f5908e 100644 --- a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx +++ b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx @@ -63,7 +63,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? dataIndex: 'searchText', hideInTable: true, fieldProps: { - placeholder: '请输入门店名称/用户昵称' + placeholder: '请输入门店名称/用户昵称/订单编号' } }, { @@ -149,7 +149,6 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? SearchKey: "" } const data = await handeGetNestingAUTOTYPEList(req); - console.log('datadatadatadatadata', data); return data }, fieldProps: { @@ -362,7 +361,7 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? // sortStr: "OPERATE_DATE desc", sortStr: sortstr.toString(), keyWord: { - Key: "MEMBERSHIP_NAME,SHOPNAME", + Key: "MEMBERSHIP_NAME,SHOPNAME,TICKET_CODE", Value: params?.searchText } } @@ -371,6 +370,9 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { + data.List.forEach((item: any) => { + item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : "" + }) return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } diff --git a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx index fdb8921..57e4925 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx @@ -189,11 +189,17 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> width: 120, align: 'center', valueType: 'select', - valueEnum: { - "0": "无效", - "1": "有效", - }, - initialValue: "1" + // valueEnum: { + // "1": "有效", + // "0": "无效", + // }, + initialValue: "1", + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] + } }, // { // dataIndex: 'STAFF_NAME', @@ -442,12 +448,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE, - MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE + MEMBERSHIP_TYPES: params?.MEMBERSHIP_TYPE === 1 ? '' : params?.MEMBERSHIP_TYPE || "" }, SortStr: "MEMBERSHIP_TYPE,MEMBERSHIP_LEVEL,PROMOTION_LEVEL desc", PageIndex: 1, PageSize: 20 } + console.log('reqreqreqreq', req); + const data = await handleGetGROWTHSETTINGList(req); if (data.List && data.List.length > 0) { handleSetlogSave(`查看了成长规则配置列表`) diff --git a/src/pages/travelMember/MallBrandManage/index.tsx b/src/pages/travelMember/MallBrandManage/index.tsx index fcaec4c..71ac0ec 100644 --- a/src/pages/travelMember/MallBrandManage/index.tsx +++ b/src/pages/travelMember/MallBrandManage/index.tsx @@ -147,10 +147,11 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { align: 'center', width: 120, valueType: 'select', - valueEnum: { - "-1": "全部", - "1": "有效", - "0": "无效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1" }, @@ -238,7 +239,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { let req: any = {} - if (currentRow?.SELLER_ID) { + if (currentRow?.BRAND_ID) { req = { ...currentRow, ...res, @@ -265,7 +266,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") - handleSetlogSave(`${currentRow?.SELLER_ID ? '更新' : '新增'}品牌【${data.Result_Data.BRAND_NAME}】`) + handleSetlogSave(`${currentRow?.BRAND_ID ? '更新' : '新增'}品牌【${data.Result_Data.BRAND_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -279,7 +280,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { // 预览上传后的图片 const handlePreview = async () => { - setFileList(file) + setFileList(fileList) setImagePreviewVisible(true) }; const handleChangePreview = (val: any) => { @@ -439,9 +440,9 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }} footer={ { - await handelDelete(currentRow?.SELLER_ID) + await handelDelete(currentRow?.BRAND_ID) }} handleCancel={() => { handleConfirmLoading(false) diff --git a/src/pages/travelMember/MallClassificationManage/index.tsx b/src/pages/travelMember/MallClassificationManage/index.tsx index 32891f5..747e770 100644 --- a/src/pages/travelMember/MallClassificationManage/index.tsx +++ b/src/pages/travelMember/MallClassificationManage/index.tsx @@ -166,7 +166,8 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined valueEnum: { "1": "上架", "0": "下架" - } + }, + initialValue: "1" }, { dataIndex: "PRESALE_TYPE", diff --git a/src/pages/travelMember/MallOrderManage/index.tsx b/src/pages/travelMember/MallOrderManage/index.tsx index 791f4d1..14e37b9 100644 --- a/src/pages/travelMember/MallOrderManage/index.tsx +++ b/src/pages/travelMember/MallOrderManage/index.tsx @@ -15,12 +15,12 @@ import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form"; import orderIcon from '@/assets/detail/orderIcon.png' import closeIcon from '@/assets/detail/closeIcon.png' -import { handleSetlogSave } from "@/utils/format"; +import { convertTreeFieldToNumber, 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 +const MallOrderManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, searchReq?: any }> = (props) => { + const { currentUser, isComponent, searchReq } = props const draggleRef = React.createRef() const actionRef = useRef(); const formRef = useRef(); @@ -158,6 +158,41 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { ellipsis: true, align: "center", }, + { + title: '会员标签', + width: 150, + dataIndex: "MEMBERSHIP_TARGET", + valueType: 'treeSelect', + align: "center", + 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); + let res = convertTreeFieldToNumber(data, 'AUTOTYPE_ID') + return res + }, + hideInSearch: true, + 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: "联系电话", dataIndex: "ORDER_PERSONTEL", @@ -464,14 +499,14 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }} scroll={{ x: "100%", y: "calc(100vh - 410px)" }} headerTitle={} // 列表表头 - search={{ + search={isComponent ? false : { span: 6, defaultCollapsed: false }} request={async (params) => { console.log('paramsparamsparams', params); - const req = { + const req = isComponent ? searchReq : { SearchParameter: { OWNERUNIT_ID: currentUser?.OwnerUnitId, PROVINCE_CODE: currentUser?.ProvinceCode, diff --git a/src/pages/travelMember/MemberSummaryStatistics/index.tsx b/src/pages/travelMember/MemberSummaryStatistics/index.tsx index aee1c40..d9612a0 100644 --- a/src/pages/travelMember/MemberSummaryStatistics/index.tsx +++ b/src/pages/travelMember/MemberSummaryStatistics/index.tsx @@ -55,7 +55,24 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } // 显示详情抽屉 const [showDetailDrawer, setShowDetailDrawer] = useState(false) // 传入给子组件的搜索内容 - const [toChildrenSearchParams, setToChildrenSearchParams] = useState() + const [toChildrenSearchParams, setToChildrenSearchParams] = useState({ + SearchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: searchParams?.StartDate || "", + OPERATE_DATE_End: searchParams?.EndDate || "", + OWNERUNIT_ID: 911, + POINT_TYPE: '', + POINT_SOURCE: '', + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: searchParams?.searchText || "" + }, + PageIndex: searchParams?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + }) // 积分的columns const columns: any = [ @@ -351,15 +368,16 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } ] useEffect(() => { - handleGetTopData() + let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] + handleGetTopData(StartDate, EndDate) }, []) // 获取顶部的数据 const handleGetTopData = async (StartDate?: string, EndDate?: string, MEMBERSHIP_TARGET?: string) => { const req: any = { CalcType: 1, // 1 汇总 2 会员等级 3 会员类型 OwnerUnitId: currentUser?.OwnerUnitId, - StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", - EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + StartDate: StartDate ? StartDate : "", + EndDate: EndDate ? EndDate : "", PointSource: "", ServerpartId: "", MemberShipId: "", @@ -457,6 +475,49 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } StartDate: StartDate, EndDate: EndDate }) + let req: any = {} + if (selectTab <= 3) { + req = { + SearchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: StartDate || "", + OPERATE_DATE_End: EndDate || "", + OWNERUNIT_ID: 911, + POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '', + POINT_SOURCE: '', + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: searchParams?.searchText || "" + }, + PageIndex: searchParams?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + } + } else { + req = { + searchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: StartDate || "", + OPERATE_DATE_End: EndDate || "", + OWNERUNIT_ID: 911, + SCORESETTING_STATE: 1, + GROWTH_SOURCES: "", + GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '', + MEMBERSHIP_TARGET: searchParams?.MEMBERSHIP_TARGET && searchParams?.MEMBERSHIP_TARGET.length > 0 ? searchParams?.MEMBERSHIP_TARGET.toString() : "" + }, + PageIndex: searchParams?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: searchParams?.searchText || "" + }, + } + } + + setToChildrenSearchParams(req) actionRef.current?.reload() PointsRecordSearchRef.current?.actionRef?.current?.reload() }} diff --git a/src/pages/travelMember/MemberTagManage/index.tsx b/src/pages/travelMember/MemberTagManage/index.tsx index 379b184..af0a96d 100644 --- a/src/pages/travelMember/MemberTagManage/index.tsx +++ b/src/pages/travelMember/MemberTagManage/index.tsx @@ -140,11 +140,18 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - }, - initialValue: "1" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + initialValue: "1", + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] + } + }, { dataIndex: 'AUTOTYPE_DESC', diff --git a/src/pages/travelMember/MembershipLevelManage/index.tsx b/src/pages/travelMember/MembershipLevelManage/index.tsx index 454ddc1..5dc0c60 100644 --- a/src/pages/travelMember/MembershipLevelManage/index.tsx +++ b/src/pages/travelMember/MembershipLevelManage/index.tsx @@ -1,4 +1,4 @@ -// 会员等级管理 +// 会员等级管理 会员等级配置 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -138,11 +138,18 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - }, - initialValue: "1" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + initialValue: "1", + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] + } + }, { dataIndex: 'FIELDENUM_DESC', diff --git a/src/pages/travelMember/MembershipLevelStatistics/index.tsx b/src/pages/travelMember/MembershipLevelStatistics/index.tsx index bab8197..3bd9976 100644 --- a/src/pages/travelMember/MembershipLevelStatistics/index.tsx +++ b/src/pages/travelMember/MembershipLevelStatistics/index.tsx @@ -281,7 +281,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined useEffect(() => { const initData = async () => { - await handleGetTopData(); + let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] + await handleGetTopData(StartDate, EndDate); // 使用最新的selectBigTab值触发表格加载 // actionRef.current?.reload(); }; @@ -293,8 +294,8 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined const req: any = { CalcType: 2, // 1 汇总 2 会员等级 3 会员类型 OwnerUnitId: currentUser?.OwnerUnitId, - StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", - EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + StartDate: StartDate ? StartDate : "", + EndDate: EndDate ? EndDate : "", PointSource: "", ServerpartId: "", MemberShipId: "", diff --git a/src/pages/travelMember/MembershipTypeStatistics/index.tsx b/src/pages/travelMember/MembershipTypeStatistics/index.tsx index 1808575..657e1c7 100644 --- a/src/pages/travelMember/MembershipTypeStatistics/index.tsx +++ b/src/pages/travelMember/MembershipTypeStatistics/index.tsx @@ -368,7 +368,10 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined useEffect(() => { const initData = async () => { - await handleGetTopData(); + + let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] + + await handleGetTopData(StartDate, EndDate); // 使用最新的selectBigTab值触发表格加载 actionRef.current?.reload(); }; @@ -379,8 +382,8 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined const req: any = { CalcType: 3, // 1 汇总 2 会员等级 3 会员类型 OwnerUnitId: currentUser?.OwnerUnitId, - StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", - EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + StartDate: StartDate ? StartDate : "", + EndDate: EndDate ? EndDate : "", PointSource: "", ServerpartId: "", MemberShipId: "", diff --git a/src/pages/travelMember/OperationTypeConfig/index.tsx b/src/pages/travelMember/OperationTypeConfig/index.tsx index b036fba..91049c9 100644 --- a/src/pages/travelMember/OperationTypeConfig/index.tsx +++ b/src/pages/travelMember/OperationTypeConfig/index.tsx @@ -140,10 +140,16 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, initialValue: "1" }, { @@ -471,7 +477,7 @@ const OperationTypeConfig: React.FC<{ currentUser: CurrentUser | undefined }> = // treeData: tableData, fieldNames: { label: 'FIELDENUM_NAME', - value: 'FIELDENUM_VALUE', + value: 'FIELDENUM_ID', children: 'children' }, treeDefaultExpandAll: true, diff --git a/src/pages/travelMember/OrderProductManage/index.tsx b/src/pages/travelMember/OrderProductManage/index.tsx index 52d6d9f..bd1ca09 100644 --- a/src/pages/travelMember/OrderProductManage/index.tsx +++ b/src/pages/travelMember/OrderProductManage/index.tsx @@ -210,12 +210,13 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "-1": "全部", - "1": "上架", - "0": "下架" + fieldProps: { + options: [ + { label: '上架', value: "1" }, + { label: '下架', value: "0" } + ] }, - initialValue: '-1' + initialValue: '1' }, { dataIndex: 'OPERATE_DATE', diff --git a/src/pages/travelMember/PointsRecordSearch/index.tsx b/src/pages/travelMember/PointsRecordSearch/index.tsx index 4654e2a..2d0a853 100644 --- a/src/pages/travelMember/PointsRecordSearch/index.tsx +++ b/src/pages/travelMember/PointsRecordSearch/index.tsx @@ -365,6 +365,9 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { + data.List.forEach((item: any) => { + item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : "" + }) return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } diff --git a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx index a113b3a..933bbcd 100644 --- a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx +++ b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx @@ -139,11 +139,17 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" - }, - initialValue: "1" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + initialValue: "1", + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] + } }, { dataIndex: 'FIELDENUM_DESC', @@ -430,7 +436,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) }} > - {/* + = (props) value: 'FIELDENUM_ID', children: 'children' }, + placeholder: "请选择上级类别", showSearch: true, + treeDefaultExpandAll: true, filterTreeNode: (input, node) => (node.FIELDENUM_NAME || '').toLowerCase().includes(input.toLowerCase()) }} @@ -473,7 +481,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } ]} /> - */} + = (pr width: 120, align: 'center', valueType: 'select', - valueEnum: { - "1": "有效", - "0": "无效" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1", hideInTable: true diff --git a/src/pages/travelMember/ProductListingManagement/index.tsx b/src/pages/travelMember/ProductListingManagement/index.tsx index 10419bf..eb977c0 100644 --- a/src/pages/travelMember/ProductListingManagement/index.tsx +++ b/src/pages/travelMember/ProductListingManagement/index.tsx @@ -496,6 +496,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop } else { message.success('删除成功!'); handleSetlogSave(`删除商品【${currentRow?.COMMODITY_NAME}】`) + handleConfirmLoading(false) + handleModalVisible(false) + setMainImgList([]) + setHeaderImgList([]) + setDetailImgList([]) actionRef.current?.reload() } }; @@ -846,11 +851,17 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop setShowMoreSpecs(true) }}>多规格管理 - + { + await handelDelete(currentRow?.COMMODITY_ID); + }} + > + + + : "" } diff --git a/src/pages/travelMember/ProductSpecificationManage/index.tsx b/src/pages/travelMember/ProductSpecificationManage/index.tsx index 82265e2..b2785c6 100644 --- a/src/pages/travelMember/ProductSpecificationManage/index.tsx +++ b/src/pages/travelMember/ProductSpecificationManage/index.tsx @@ -147,10 +147,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine title: '有效状态', align: 'center', width: 150, + valueType: 'select', ellipsis: true, - valueEnum: { - "1": "有效", - "0": "无效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1", render: (_, record) => { @@ -475,6 +478,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine { formRef.current?.resetFields(); setCurrentRow(undefined); + setFileList([]) }} onCancel={() => { handleConfirmLoading(false) @@ -524,6 +529,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine disabled={disabled} bounds={bounds} onStart={(event, uiData) => onDraggaleStart(event, uiData)} + handle='.ProductSpecificationManageBox' >
{modal}
@@ -565,8 +571,13 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine labelCol={{ style: { width: 80 } }} // initialValues={currentRow} request={async () => { + if (currentRow?.USERDEFINEDTYPE_ICO) { + setFileList([{ url: currentRow?.USERDEFINEDTYPE_ICO }]) + } + return currentRow ? { ...currentRow, + } : dataType === 1 ? { USERDEFINEDTYPE_STATE: 1 } : { diff --git a/src/pages/travelMember/RegistrationStatistics/index.tsx b/src/pages/travelMember/RegistrationStatistics/index.tsx index 2f87ae2..c15eeb6 100644 --- a/src/pages/travelMember/RegistrationStatistics/index.tsx +++ b/src/pages/travelMember/RegistrationStatistics/index.tsx @@ -1,4 +1,4 @@ -// 活跃会员统计 +// 注册途径统计 import { connect, CurrentUser } from "umi"; import { ConnectState } from "@/models/connect"; import { useEffect, useRef, useState } from "react"; @@ -41,6 +41,8 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }> let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') let MEMBERSHIPTYPEYNList = session.get('MEMBERSHIPTYPEYNList') + // 是否排除测试会员 + const [ExcludeTest, setExcludeTest] = useState(true) const handleGetData = async (formData?: any) => { console.log('formDataformDataformData', formData); @@ -63,7 +65,7 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }> } console.log('reqreqreq', req); - + setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true) setShowLoading(true) const data = await handeGetMembershipCount(req) @@ -267,7 +269,7 @@ const RegistrationStatistics: React.FC<{ currentUser: CurrentUser | undefined }> setShowDetail(false) }} > - + ) diff --git a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx index 1678185..6bf416a 100644 --- a/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx +++ b/src/pages/travelMember/SummaryOfIntegralGrowthValue/index.tsx @@ -37,6 +37,8 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi const [valueType, setValueType] = useState() // 显示加载效果 const [showLoading, setShowLoading] = useState(false) + // 是否排除测试会员 + const [ExcludeTest, setExcludeTest] = useState(true) let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') @@ -62,6 +64,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi MembershipType: "", MembershipLevel: "" } + setExcludeTest(formData ? formData?.ExcludeTest === 1 ? true : false : true) setShowLoading(true) const data = await handeGetMembershipCount(req) const data2 = await handeGetMembershipCount(req2) @@ -243,7 +246,7 @@ const SummaryOfIntegralGrowthValue: React.FC<{ currentUser: CurrentUser | undefi setShowDetail(false) }} > - + ) diff --git a/src/pages/travelMember/SummaryOfReservation/index.tsx b/src/pages/travelMember/SummaryOfReservation/index.tsx index e03cc49..814a21a 100644 --- a/src/pages/travelMember/SummaryOfReservation/index.tsx +++ b/src/pages/travelMember/SummaryOfReservation/index.tsx @@ -34,7 +34,25 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = const [tableSumDetail, setTableSumDetail] = useState() // 选择的tab const [selectPageTab, setSelectPageTab] = useState(1) + // 会员标签的枚举 + const [MEMBERSHIP_TARGETOBJ, setMEMBERSHIP_TARGETOBJ] = useState() + // 把树形的数据 全部层级的value 和label都匹配上 + const flattenGrowthType = (list: any[], nameKey: string, valueKey: any) => { + const result: Record = {} + + function traverse(items: any[]) { + items.forEach(item => { + result[item[valueKey]] = item[nameKey] + if (Array.isArray(item.children) && item.children.length > 0) { + traverse(item.children) + } + }) + } + + traverse(list) + return result + } const columns: any = [ @@ -106,6 +124,32 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = hideInSearch: true, width: 150, ellipsis: true, + valueType: 'treeSelect', + request: async () => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + 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', + } + } }, { dataIndex: 'TOTAL_COUNT', @@ -205,8 +249,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = const req: any = { CalcType: 1, OwnerUnitId: currentUser?.OwnerUnitId, - StartDate: StartDate || searchParams?.StartDate || "", - EndDate: EndDate || searchParams?.EndDate || "", + StartDate: StartDate || "", + EndDate: EndDate || "", SalebillType: selectPageTab === 1 ? "6000" : "3000,3001,3002", MerchantId: "" } @@ -231,7 +275,8 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = } useEffect(() => { - handleGetTopData() + let [StartDate, EndDate] = [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] + handleGetTopData(StartDate, EndDate) }, []) useEffect(() => { @@ -305,7 +350,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = SearchKey: "" } const data = await handeGetNestingAUTOTYPEList(req); - console.log('datadatadatadatadata', data); + console.log('datadatadatadatadata333333', data); return data }} fieldProps={{ @@ -630,6 +675,7 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = let COUPON_AMOUNTSUM: number = 0 let TOTAL_COUNTSUM: number = 0 data.List.forEach((item: any) => { + item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : "" PAY_AMOUNTSUM += item.PAY_AMOUNT ORDER_AMOUNTSUM += item.ORDER_AMOUNT COUPON_AMOUNTSUM += item.COUPON_AMOUNT @@ -650,6 +696,9 @@ const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = children: data.List }] + console.log('resresresres', res); + + return { data: res, success: true } // , total: data.TotalCount } diff --git a/src/pages/travelMember/SupplierClassification/index.tsx b/src/pages/travelMember/SupplierClassification/index.tsx index f1a7213..78d74d9 100644 --- a/src/pages/travelMember/SupplierClassification/index.tsx +++ b/src/pages/travelMember/SupplierClassification/index.tsx @@ -131,9 +131,15 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "1": "有效", - "0": "无效" + // valueEnum: { + // "1": "有效", + // "0": "无效" + // }, + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1" }, diff --git a/src/pages/travelMember/SupplierMerchantManage/index.tsx b/src/pages/travelMember/SupplierMerchantManage/index.tsx index 6cbad9f..135347e 100644 --- a/src/pages/travelMember/SupplierMerchantManage/index.tsx +++ b/src/pages/travelMember/SupplierMerchantManage/index.tsx @@ -125,10 +125,11 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> width: 120, ellipsis: true, valueType: "select", - valueEnum: { - "-1": "全部", - "0": "无效", - "1": "有效" + fieldProps: { + options: [ + { label: '有效', value: "1" }, + { label: '无效', value: "0" } + ] }, initialValue: "1" }, @@ -218,11 +219,10 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> const handleAddUpdate = async (res: any) => { let req: any = {} - if (currentRow?.USERDEFINEDTYPE_ID) { + if (currentRow?.MERCHANTS_ID) { req = { ...currentRow, ...res, - MERCHANTS_STATE: 1, OWNERUNIT_ID: currentUser?.OwnerUnitId, OWNERUNIT_NAME: currentUser?.OwnerUnitName, PROVINCE_CODE: currentUser?.ProvinceCode, @@ -243,7 +243,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> const data = await handeSynchroMERCHANTS(req) handleConfirmLoading(false) if (data.Result_Code === 100) { - handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '编辑' : '新增'}【${data.Result_Data?.MERCHANTS_NAME}】`) + handleSetlogSave(`${currentRow?.MERCHANTS_ID ? '编辑' : '新增'}【${data.Result_Data?.MERCHANTS_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -416,7 +416,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> let newValue: any = { ...values }; if (currentRow) { // 编辑数据 - newValue = { ...values, COMMODITY_ID: currentRow.COMMODITY_ID }; + newValue = { ...values, MERCHANTS_ID: currentRow.MERCHANTS_ID }; } // 如果有开关,要把开关的代码写进去 await handleAddUpdate(newValue); @@ -524,7 +524,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> diff --git a/src/pages/travelMember/SupplierOrderStatistics/index.tsx b/src/pages/travelMember/SupplierOrderStatistics/index.tsx index 7a5a5f3..f64c108 100644 --- a/src/pages/travelMember/SupplierOrderStatistics/index.tsx +++ b/src/pages/travelMember/SupplierOrderStatistics/index.tsx @@ -6,7 +6,7 @@ import React, { useRef, useState } from "react"; import ProCard from "@ant-design/pro-card"; import { MenuFoldOutlined } from "@ant-design/icons"; import type { FormInstance } from "antd"; -import { Button, message, Space, Spin, Tree } from "antd"; +import { Button, Drawer, message, Modal, Space, Spin, Tree } from "antd"; import useRequest from "@ahooksjs/use-request"; import { getServerpartTree } from "@/services/options"; import type { ActionType } from "@ant-design/pro-table"; @@ -17,11 +17,14 @@ import PageTitleBox from "@/components/PageTitleBox"; import SupplierLeftSelectTree from "./components/SupplierLeftSelectTree"; import { handeGetGetOnlineOrderSummary } from "../service"; import moment from 'moment' +import Draggable from "react-draggable"; +import MallOrderManage from "../MallOrderManage"; const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props const downloadBtnRef = useRef() + const draggleRef = React.createRef() const actionRef = useRef(); const formRef = useRef(); const [reqDetailList, setReqDetailList] = useState(); // 合计项数据源 @@ -39,6 +42,17 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) const [showExportTable, setShowExportTable] = useState(false) // 查询的条件 const [searchParams, setSearchParams] = useState() + // 显示供应商订单详情 + const [showDetailDrawer, setShowDetailDrawer] = useState(false) + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + // 点击行数据 + const [currentRow, setCurrentRow] = useState() + // 要传给组件的搜索参数 + const [searchReq, setSearchReq] = useState() + + const [columnsStateMap, setColumnsStateMap] = useState({ 'TotalActualAmount.maxData': { show: false }, @@ -108,7 +122,35 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) align: 'center', hideInSearch: true, ellipsis: true, - fixed: 'left' + fixed: 'left', + render: (_, record) => { + return record?.StatisticalName ? { + + setSearchReq({ + SearchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + PROVINCE_CODE: currentUser?.ProvinceCode, + SALEBILL_TYPES: "", + ORDER_DATE_Start: searchParams?.StartDate, + ORDER_DATE_End: searchParams?.EndDate, + SALEBILL_STATES: "1010,2010,3000", + CHANNEL_TYPE: "", + SearchKeyValue: "", + MERCHANTS_IDS: record?.StatisticalId || "", + MEMBERSHIP_TARGET: "", + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "ORDER_DATE desc", + + }) + + setCurrentRow(record) + setShowDetailDrawer(true) + }}> + {record?.StatisticalName} + : "-" + } }, { dataIndex: 'TotalActualAmount', @@ -695,6 +737,19 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) tempTable.remove() // 防止重复打印一个内容 } + const onDraggaleStart = (event, uiData) => { + const { clientWidth, clientHeight } = window.document.documentElement; + const targetRect = draggleRef.current?.getBoundingClientRect(); + if (!targetRect) { + return; + } + setBounds({ + left: -targetRect.left + uiData.x, + right: clientWidth - (targetRect.right - uiData.x), + top: -targetRect.top + uiData.y, + bottom: clientHeight - (targetRect.bottom - uiData.y), + }); + }; return (
{ @@ -827,6 +882,25 @@ const SupplierOrderStatistics: React.FC<{ currentUser: CurrentUser }> = (props) />
+ + + { + setShowDetailDrawer(false) + setCurrentRow(undefined) + }} + > + + + + ) } diff --git a/src/pages/travelMember/TradingLedger/index.tsx b/src/pages/travelMember/TradingLedger/index.tsx index a3a229e..92fbb17 100644 --- a/src/pages/travelMember/TradingLedger/index.tsx +++ b/src/pages/travelMember/TradingLedger/index.tsx @@ -319,7 +319,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { }} scroll={{ x: "100%", y: "calc(100vh - 430px)" }} headerTitle={} // 列表表头 - search={{ span: 6 }} + search={{ span: 6, defaultCollapsed: false }} request={async (params) => { const req: any = { diff --git a/src/pages/travelMember/memberInfor/index.tsx b/src/pages/travelMember/memberInfor/index.tsx index 90e820a..c5e38d5 100644 --- a/src/pages/travelMember/memberInfor/index.tsx +++ b/src/pages/travelMember/memberInfor/index.tsx @@ -14,7 +14,7 @@ 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 { handeGetMemberShipLicenseList, handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service"; +import { handeGetMemberShipLicenseList, handeGetNestingAUTOTYPEList, handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service"; import session from "@/utils/session"; import moment from 'moment' import Draggable from "react-draggable"; @@ -36,9 +36,10 @@ import { highlightText } from "@/utils/highlightText"; // noMemberLevel 判断是否隐藏 会员等级得筛选条件 // come 具体来自哪个页面 // comeParams 来自哪个页面 可能需要带上那个页面的查询参数 +// ExcludeTest 是否排除测试会员 -const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueType?: any, isComponent?: boolean, noMemberType?: boolean, noMemberLevel?: boolean, come?: string, comeParams?: any }> = (props) => { - const { currentUser, searchType, valueType, isComponent, noMemberType, noMemberLevel, come, comeParams } = props +const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueType?: any, isComponent?: boolean, noMemberType?: boolean, noMemberLevel?: boolean, come?: string, comeParams?: any, ExcludeTest?: boolean }> = (props) => { + const { currentUser, searchType, valueType, isComponent, noMemberType, noMemberLevel, come, comeParams, ExcludeTest } = props const downloadBtnRef = useRef() const draggleRef = React.createRef() const actionRef = useRef(); @@ -225,6 +226,39 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT // return newList // } }, + { + 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, @@ -730,9 +764,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT expandable={{ expandRowByClick: true }} - scroll={{ x: '100%', y: 'calc(100vh - 450px)' }} + scroll={{ x: '100%', y: 'calc(100vh - 460px)' }} headerTitle={} - search={{ span: 6 }} + search={{ span: 6, defaultCollapsed: false }} request={async (params, sorter) => { const sortstr = Object.keys(sorter).map(n => { @@ -751,6 +785,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT MEMBERSHIP_STATE: 1000, ACTIVE_DATE_Start: come === 'ActiveMemberStatistics' ? comeParams?.start || '' : '', ACTIVE_DATE_End: come === 'ActiveMemberStatistics' ? comeParams?.end || '' : '', + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "", + ExcludeTest: ExcludeTest || '' }, keyWord: { // PLATE_NUMBER @@ -770,6 +806,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "1" ? "" : params?.MEMBERSHIP_TYPE, MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "1" ? "" : params?.MEMBERSHIP_LEVEL, MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE, + MEMBERSHIP_TARGET: params?.MEMBERSHIP_TARGET && params?.MEMBERSHIP_TARGET.length > 0 ? params?.MEMBERSHIP_TARGET.toString() : "" // PLATE_NUMBER: params?.MEMBERSHIP_NAME || "" }, keyWord: { @@ -809,6 +846,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser, searchType?: any, valueT // const data = await handeGetMemberShipLicenseList(req) console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { + data.List.forEach((item: any) => { + item.MEMBERSHIP_TARGET = item.MEMBERSHIP_TARGET ? [Number(item.MEMBERSHIP_TARGET)] : "" + }) return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } diff --git a/src/pages/travelMember/scenicSpotConfig/component/modalFooter.tsx b/src/pages/travelMember/scenicSpotConfig/component/modalFooter.tsx index 6bb45af..25fc71c 100644 --- a/src/pages/travelMember/scenicSpotConfig/component/modalFooter.tsx +++ b/src/pages/travelMember/scenicSpotConfig/component/modalFooter.tsx @@ -1,6 +1,7 @@ import { connect } from "umi"; import type { ConnectState } from "@/models/connect"; import { Button } from "antd"; +import Popconfirm from "antd/es/popconfirm"; type DetailProps = { hideDelete?: boolean @@ -9,19 +10,26 @@ type DetailProps = { handleCancel?: any hideOK?: boolean handleOK?: any + confirmLoading?: boolean // 确认按钮的加载效果 } -const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideOK, handleOK }: DetailProps) => { +const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideOK, handleOK, confirmLoading }: DetailProps) => { return (
{ hideDelete ? "" : - + { + if (handleDelete) { + handleDelete() + } + }} + > + + + }
@@ -35,7 +43,7 @@ const ModalFooter = ({ hideDelete, handleDelete, hideCancel, handleCancel, hideO } { hideOK ? '' : -