diff --git a/config/routes.ts b/config/routes.ts index 7400967..0bef39a 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -1023,6 +1023,14 @@ export default [ name: 'MemberSummaryStatistics', component: './travelMember/MemberSummaryStatistics/index' }, + // 商城订单统计 + { + path: 'MallSummaryStatistics', + name: 'MallSummaryStatistics', + component: './travelMember/MallSummaryStatistics/index' + }, + + ] }, { diff --git a/src/pages/CardInformation/CardCouponApplicRules/index.tsx b/src/pages/CardInformation/CardCouponApplicRules/index.tsx index db00253..5165500 100644 --- a/src/pages/CardInformation/CardCouponApplicRules/index.tsx +++ b/src/pages/CardInformation/CardCouponApplicRules/index.tsx @@ -179,6 +179,7 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => console.log('datadatadatadatadata', data); setModalLoading(false) if (data.Result_Code === 100) { + handleSetlogSave(`${currentRow?.COOPSHOP_RULE_ID ? '更新' : '新增'}【${data.Result_Data.COOPSHOP_RULE_NAME}】卡券规则`) message.success(data.Result_Desc) ModalFormRef?.current?.resetFields() setCurrentRow(undefined) @@ -187,7 +188,6 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => } else { message.error(data.Result_Desc) } - handleSetlogSave(currentRow?.COOPSHOP_RULE_ID ? '卡券规则的编辑' : '卡券规则的新增') } // 删除规则记录 @@ -197,6 +197,7 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => } const data = await handleDeleteCOOPSHOP_RULE(req) if (data.Result_Code === 100) { + handleSetlogSave(`删除【${currentRow?.COOPSHOP_RULE_NAME}】卡券规则`) message.success(data.Result_Desc) actionRef.current?.reload() ModalFormRef?.current?.resetFields() @@ -205,7 +206,6 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => } else { message.error(data.Result_Desc) } - // handleSetlogSave('卡券规则的删除') } return ( diff --git a/src/pages/CardInformation/CardInformationManager/index.tsx b/src/pages/CardInformation/CardInformationManager/index.tsx index 479cff9..9da5937 100644 --- a/src/pages/CardInformation/CardInformationManager/index.tsx +++ b/src/pages/CardInformation/CardInformationManager/index.tsx @@ -188,6 +188,7 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = } const data = await handleDeleteCOUPON(req) if (data.Result_Code === 100) { + handleSetlogSave(`删除【${data.Result_Data.COUPON_NAME}】卡券`) message.success(data.Result_Desc) actionRef.current?.reload() ModalFormRef?.current?.resetFields() @@ -197,8 +198,6 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = } else { message.error(data.Result_Desc) } - - } @@ -236,6 +235,7 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = const data = await handleSynchroCOUPONService(req) if (data.Result_Code === 100) { + handleSetlogSave(`${currentRow?.COUPON_ID ? '更新' : '新增'}【${data.Result_Data.COUPON_NAME}】卡券`) message.success(data.Result_Desc) ModalFormRef?.current?.resetFields() setCurrentRow(undefined) @@ -244,7 +244,6 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) = } else { message.error(data.Result_Desc) } - handleSetlogSave(currentRow?.COOPSHOP_RULE_ID ? '卡券的编辑' : '卡券的新增') } return ( diff --git a/src/pages/operatingMerchants/MerchantInformation/index.tsx b/src/pages/operatingMerchants/MerchantInformation/index.tsx index 91d44da..c96320e 100644 --- a/src/pages/operatingMerchants/MerchantInformation/index.tsx +++ b/src/pages/operatingMerchants/MerchantInformation/index.tsx @@ -640,7 +640,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = handleConfirmLoading(false) if (data.Result_Code === 100) { await handleUploadAllImage(res, data) - handleSetlogSave(`更新【${currentRow?.SELLER_NAME}】商家信息成功`) + handleSetlogSave(`${currentRow?.SELLER_ID ? '更新' : '新增'}【${data.Result_Data.SELLER_NAME}】商家信息成功`) message.success(data.Result_Desc) formRef?.current?.resetFields() handleConfirmLoading(false) @@ -654,7 +654,6 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.SELLER_NAME}】商家信息失败`) } }; diff --git a/src/pages/travelMember/AfterSalesManage/index.tsx b/src/pages/travelMember/AfterSalesManage/index.tsx index 62ee042..a316308 100644 --- a/src/pages/travelMember/AfterSalesManage/index.tsx +++ b/src/pages/travelMember/AfterSalesManage/index.tsx @@ -1,5 +1,4 @@ // 点餐售后管理 售后服务管理 -// 点餐类别管理 点餐分类管理 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -29,6 +28,7 @@ import defaultIcon from '../../../assets/brand/defaultIcon.png' import classNames from 'classnames'; import session from '@/utils/session'; import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { handleSetlogSave } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -204,6 +204,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除类别【${currentRow?.FIELDENUM_NAME}】`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -230,6 +231,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr const data = await handeSynchroFIELDENUM(req) handleConfirmLoading(false) if (data.Result_Code === 100) { + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}类别【${data.Result_Data?.FIELDENUM_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -269,6 +271,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr } const data = await handeGetNestingFIELDENUMList(req); if (data && data.length > 0) { + handleSetlogSave(`点击查询按钮`) setTypeTreeData(data) return { data: data, success: true, total: data.length } } diff --git a/src/pages/travelMember/AfterSalesTypeManage/index.tsx b/src/pages/travelMember/AfterSalesTypeManage/index.tsx index e00ca4d..dd3f98a 100644 --- a/src/pages/travelMember/AfterSalesTypeManage/index.tsx +++ b/src/pages/travelMember/AfterSalesTypeManage/index.tsx @@ -28,6 +28,7 @@ import defaultIcon from '../../../assets/brand/defaultIcon.png' import classNames from 'classnames'; import session from '@/utils/session'; import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { handleSetlogSave } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -203,6 +204,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除类型【${currentRow?.FIELDENUM_NAME}】`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -230,6 +232,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}类型【${data.Result_Data.FIELDENUM_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -269,6 +272,7 @@ const AfterSalesManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pr const data = await handeGetNestingFIELDENUMList(req); if (data && data.length > 0) { setTypeTreeData(data) + handleSetlogSave(`点击查询按钮`) return { data: data, success: true, total: data.length } } return { data: [], success: true } diff --git a/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx b/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx index 0af569b..bd7b2c6 100644 --- a/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx +++ b/src/pages/travelMember/BookingMealOrder/components/orderDetailModal.tsx @@ -333,6 +333,8 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail options={false} request={async () => { let SALEBILL_ID: string = '' + console.log('currentRowcurrentRow', currentRow); + if (!currentRow?.SALEBILL_ID) { const req: any = { searchParameter: { @@ -377,6 +379,10 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail const data = await handeGetSALEDETAILList(req) console.log('datadatadata', data); if (data.List && data.List.length > 0) { + if (currentRow?.SALEBILL_ID) { + setOrderDetail(data.List[0]) + + } return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } @@ -387,7 +393,7 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail 合计 - {orderDetail?.TOTAL_COUNT || 0} + {orderDetail?.TOTAL_COUNT || orderDetail?.ORDER_COUNT || 0} {orderDetail?.ORDER_AMOUNT?.toFixed(2) || '0.00'} diff --git a/src/pages/travelMember/BookingMealOrder/index.tsx b/src/pages/travelMember/BookingMealOrder/index.tsx index 3bd669f..37127ba 100644 --- a/src/pages/travelMember/BookingMealOrder/index.tsx +++ b/src/pages/travelMember/BookingMealOrder/index.tsx @@ -17,6 +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"; const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { @@ -74,7 +75,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr }; }, }, - initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')], + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], }, { dataIndex: "index", @@ -96,6 +97,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr return record?.SALEBILL_CODE ? { setCurrentRow(record); handleModalVisible(true) + handleSetlogSave(`查看编号为【${record?.SALEBILL_CODE}】的订单`) }}>{record?.SALEBILL_CODE} : "-" } }, @@ -292,6 +294,7 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr // PageSize: 999999, // } // const data = await handeGetSALEBILLList(req); + handleSetlogSave(`点击查询按钮`) 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/ConsumptionRecordSearch/index.tsx b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx index 559dcb2..484e28c 100644 --- a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx +++ b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx @@ -70,7 +70,7 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent? }; }, }, - initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')], + initialValue: [moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], }, // { // title: "服务区名称", diff --git a/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx b/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx index 3eb990f..0123687 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx @@ -202,7 +202,6 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) const result = await handeDeleteFIELDENUM(req) if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】失败`) } else { message.success('删除成功!'); handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】成功`) @@ -233,7 +232,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】成功`) + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -242,7 +241,6 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】失败`) } } diff --git a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx index 1f4be39..a27a899 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx @@ -94,7 +94,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> hideInDescriptions: true, render: (_, record) => { return record?.GROWTHSETTING_NAME ? { - handleSetlogSave(`查看了${record?.GROWTHSETTING_NAME}的规则详情`) + handleSetlogSave(`查看【${record?.GROWTHSETTING_NAME}】规则详情`) setCurrentRow({ ...record }); handleModalVisible(true); }}>{record?.GROWTHSETTING_NAME} : '-' @@ -229,10 +229,9 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> }); if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除${currentRow?.GROWTHSETTING_NAME}失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除${currentRow?.GROWTHSETTING_NAME}成功`) + handleSetlogSave(`删除【${currentRow?.GROWTHSETTING_NAME}】成功`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -260,14 +259,13 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> } const data = await handleSynchroGROWTHSETTING(req); if (data.Result_Code === 100) { - handleSetlogSave(`更新${currentRow?.GROWTHSETTING_NAME}成功`) + handleSetlogSave(`${currentRow?.GROWTHSETTING_ID ? '更新' : '新增'}【${data.Result_Data.GROWTHSETTING_NAME}】成功`) message.success(data.Result_Desc) formRef?.current?.resetFields() setCurrentRow(undefined) handleModalVisible(false) actionRef.current?.reload() } else { - handleSetlogSave(`更新${currentRow?.GROWTHSETTING_NAME}失败`) message.error(data.Result_Desc) } }; diff --git a/src/pages/travelMember/HomepageAds/index.tsx b/src/pages/travelMember/HomepageAds/index.tsx index 149e682..2c6f24d 100644 --- a/src/pages/travelMember/HomepageAds/index.tsx +++ b/src/pages/travelMember/HomepageAds/index.tsx @@ -24,6 +24,8 @@ import PageTitleBox from '@/components/PageTitleBox'; import { handeGetUSERDEFINEDTYPEList, handlDeleteUSERDEFINEDTYPE, handlSynchroUSERDEFINEDTYPE } from '../service'; import { render } from 'react-dom'; import { uploadPicture } from '@/services/picture'; +import { handleSetlogSave } from '@/utils/format'; +import ModalFooter from '../scenicSpotConfig/component/modalFooter'; const beforeUpload = (file: any) => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -82,6 +84,14 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) width: 150, align: 'center', hideInSearch: true, + render: (_, record) => { + return record?.USERDEFINEDTYPE_NAME ? + { + setFileList(record?.USERDEFINEDTYPE_ICO ? [{ url: record?.USERDEFINEDTYPE_ICO }] : []) + setCurrentRow({ ...record }); + handleModalVisible(true); + }}>{record?.USERDEFINEDTYPE_NAME} : "-" + } }, { dataIndex: 'USERDEFINEDTYPE_ICO', @@ -127,38 +137,38 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" } }, - { - dataIndex: 'option', - title: '操作', - width: 150, - align: 'center', - valueType: 'option', - hideInSearch: true, - render: (_, record) => { - return ( - - { - console.log('record', record); - setFileList(record?.USERDEFINEDTYPE_ICO ? [{ url: record?.USERDEFINEDTYPE_ICO }] : []) - setCurrentRow({ ...record }); - handleModalVisible(true); - }} - > - 编辑 - - { - await handelDelete(record.USERDEFINEDTYPE_ID); - }} - > - 删除 - - - ); - }, - }, + // { + // dataIndex: 'option', + // title: '操作', + // width: 150, + // align: 'center', + // valueType: 'option', + // hideInSearch: true, + // render: (_, record) => { + // return ( + // + // { + // console.log('record', record); + // setFileList(record?.USERDEFINEDTYPE_ICO ? [{ url: record?.USERDEFINEDTYPE_ICO }] : []) + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // await handelDelete(record.USERDEFINEDTYPE_ID); + // }} + // > + // 删除 + // + // + // ); + // }, + // }, ]; // 预览上传后的图片 @@ -178,7 +188,14 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除时间为${currentRow?.PRESALE_STARTTIME}到${currentRow?.PRESALE_ENDTIME}的${selectTab === "1" ? '开屏海报' : '轮播图'}`) + actionRef.current?.reload() + handleConfirmLoading(false) + handleModalVisible(false) + setFileList([]) + setCurrentRow(undefined); + formRef.current?.resetFields(); } }; @@ -213,6 +230,7 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } const data = await handlSynchroUSERDEFINEDTYPE(req); if (data.Result_Code === 100) { + handleSetlogSave(`更新了时间为${data.Result_Data.PRESALE_STARTTIME}到${data.Result_Data.PRESALE_ENDTIME}的${selectTab === "1" ? '开屏海报' : '轮播图'}`) message.success(data.Result_Desc) formRef?.current?.resetFields() setCurrentRow(undefined) @@ -254,6 +272,7 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } const data = await handeGetUSERDEFINEDTYPEList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询大图列表`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -294,6 +313,7 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } const data = await handeGetUSERDEFINEDTYPEList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询轮播图列表`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -351,6 +371,10 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) } destroyOnClose={true} width={900} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} visible={modalVisible} confirmLoading={confirmLoading} afterClose={() => { @@ -362,7 +386,6 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) handleModalVisible(false) setFileList([]) }} - onOk={async () => { // 提交框内的数据 formRef?.current?.validateFields().then(() => { handleConfirmLoading(true) @@ -378,6 +401,25 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
{modal}
}} + footer={ { + await handelDelete(currentRow?.USERDEFINEDTYPE_ID) + }} + handleCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + setFileList([]) + setCurrentRow(undefined); + formRef.current?.resetFields(); + }} + handleOK={() => { + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + />} > { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; @@ -95,6 +97,18 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { align: 'center', width: 150, ellipsis: true, + render: (_, record) => { + return record?.BRAND_NAME ? { + console.log('recordrecordrecord', record); + if (record?.BRAND_INTRO) { + setFileList([{ url: record?.BRAND_INTRO }]) + } + setCurrentRow({ ...record }); + handleModalVisible(true); + }}> + {record?.BRAND_NAME} + : "-" + } }, { dataIndex: 'BRAND_CATEGORY', @@ -145,44 +159,43 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { ellipsis: true, }, - { - dataIndex: 'option', - title: '操作', - width: 120, - valueType: 'option', - align: 'center', - hideInSearch: true, - render: (_, record) => { - return ( - - { - console.log('recordrecordrecord', record); - if (record?.BRAND_INTRO) { - setFileList([{ url: record?.BRAND_INTRO }]) - } - setCurrentRow({ ...record }); - handleModalVisible(true); - }} - > - 编辑 - - { - await handelDelete(record.BRAND_ID); - }}> - 删除 - - - ); - }, - }, + // { + // dataIndex: 'option', + // title: '操作', + // width: 120, + // valueType: 'option', + // align: 'center', + // hideInSearch: true, + // render: (_, record) => { + // return ( + // + // { + // console.log('recordrecordrecord', record); + // if (record?.BRAND_INTRO) { + // setFileList([{ url: record?.BRAND_INTRO }]) + // } + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // await handelDelete(record.BRAND_ID); + // }}> + // 删除 + // + // + // ); + // }, + // }, ]; const handelDelete = async (id: number) => { - console.log('fjsdfsdflksa', id); const req: any = { BRANDId: id } @@ -191,7 +204,14 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除品牌【${currentRow?.BRAND_NAME}】`) actionRef.current?.reload() + + handleConfirmLoading(false) + handleModalVisible(false) + setFileList([]) + formRef.current?.resetFields(); + setCurrentRow(undefined); } }; @@ -241,6 +261,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}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -309,6 +330,7 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { } const data = await handleGetBRANDList(req) console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { let brandSelectList: any = [] data.List.forEach((item: any) => { @@ -377,7 +399,11 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => { } destroyOnClose={true} - width={500} + width={900} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} visible={modalVisible} confirmLoading={confirmLoading} afterClose={() => { @@ -406,11 +432,32 @@ const MallBrandManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
{modal}
}} + footer={ { + await handelDelete(currentRow?.SELLER_ID) + }} + handleCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + setFileList([]) + formRef.current?.resetFields(); + setCurrentRow(undefined); + }} + handleOK={() => { + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + + />} > = (props) => { newValue = { ...values, BRAND_ID: currentRow.BRAND_ID }; } - - console.log('newValuenewValue', newValue); - // 如果有开关,要把开关的代码写进去 await handleAddUpdate(newValue); handleConfirmLoading(false) diff --git a/src/pages/travelMember/MallClassificationManage/index.tsx b/src/pages/travelMember/MallClassificationManage/index.tsx index 3ee1274..edee31f 100644 --- a/src/pages/travelMember/MallClassificationManage/index.tsx +++ b/src/pages/travelMember/MallClassificationManage/index.tsx @@ -26,6 +26,7 @@ import PageTitleBox from '@/components/PageTitleBox'; import { uploadPicture } from '@/services/picture'; import defaultIcon from '../../../assets/brand/defaultIcon.png' import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { handleSetlogSave } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -240,6 +241,7 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除类别【${currentRow?.USERDEFINEDTYPE_NAME}】`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -281,6 +283,7 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined const data = await handlSynchroUSERDEFINEDTYPE(req) handleConfirmLoading(false) if (data.Result_Code === 100) { + handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '更新' : '新增'}类别【${data.Result_Data.USERDEFINEDTYPE_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -320,6 +323,7 @@ const MallClassificationManage: React.FC<{ currentUser: CurrentUser | undefined } const data = await handlGetUSERDEFINEDTYPEList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data && data.length > 0) { setTypeTreeData(data) return { data: data, success: true, total: data.length } diff --git a/src/pages/travelMember/MallEvaluationManage/index.tsx b/src/pages/travelMember/MallEvaluationManage/index.tsx index 3632748..472a3f9 100644 --- a/src/pages/travelMember/MallEvaluationManage/index.tsx +++ b/src/pages/travelMember/MallEvaluationManage/index.tsx @@ -27,6 +27,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { handeDeleteCOMMODITY, handeDeleteMALLCOMMENT, handeGetCOMMODITY_MULTIList, handeGetCOMMODITYDetail, handeGetCOMMODITYList, handeGetMALLCOMMENTList, handeSynchroCOMMODITY, handleGetBRANDList } from '../service'; import session from '@/utils/session'; import LeftSelectMallType from '../ProductListingManagement/component/LeftSelectMallType'; +import { handleSetlogSave } from '@/utils/format'; const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isComponent?: boolean, parentDetail?: any }> = (props) => { @@ -85,7 +86,7 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC }; }, }, - initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')], + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], }, { dataIndex: 'index', @@ -302,6 +303,7 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isC const data = await handeGetMALLCOMMENTList(req) console.log('datadatadatadatadata', data); if (data.List && data.List.length > 0) { + handleSetlogSave(`点击查询按钮`) return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } diff --git a/src/pages/travelMember/MallOrderManage/index.tsx b/src/pages/travelMember/MallOrderManage/index.tsx index b358337..6f5b4e2 100644 --- a/src/pages/travelMember/MallOrderManage/index.tsx +++ b/src/pages/travelMember/MallOrderManage/index.tsx @@ -15,6 +15,7 @@ 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"; const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props @@ -69,7 +70,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }; }, }, - initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')], + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], }, { title: "订单状态", @@ -162,6 +163,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { console.log('recordrecordrecordrecord', record); setCurrentRow(record); handleModalVisible(true) + handleSetlogSave(`查询【${record?.ORDER_PERSON}】编号【${record?.SALEBILL_CODE}】的订单`) }}>{record?.SALEBILL_CODE} : "-" } }, @@ -378,6 +380,7 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { // const data = await handeGetSALEBILLList(req); const data = await handeGetSaleBillWholeList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } diff --git a/src/pages/travelMember/MallSummaryStatistics/MallSummaryStatistics.less b/src/pages/travelMember/MallSummaryStatistics/MallSummaryStatistics.less new file mode 100644 index 0000000..6b5bddc --- /dev/null +++ b/src/pages/travelMember/MallSummaryStatistics/MallSummaryStatistics.less @@ -0,0 +1,258 @@ +.MallSummaryStatisticsMain { + width: 100%; + + .MallSummaryStatisticsTop { + width: 100%; + background: #FFFFFF; + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + border-radius: 4px; + box-sizing: border-box; + padding: 16px; + + .MallSummaryStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MallSummaryStatisticsTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 18px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + margin-left: 12px; + position: relative; + } + + .MallSummaryStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .MallSummaryStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .MallSummaryStatisticsItemFirst { + // width: 280px; + // height: 180px; + // background-image: url('../../../assets/detail/staticSumTotalBg.png'); + // background-size: 100% 100%; + // background-repeat: no-repeat; + // box-sizing: border-box; + // padding: 26px 39px; + // margin-right: 16px; + + // .firstItemTitle { + // font-family: PingFangSC, PingFang SC; + // font-weight: 500; + // font-size: 18px; + // color: #FFFFFF; + // line-height: 13px; + // text-align: left; + // font-style: normal; + // } + + // .firstItemValue { + // font-family: DINAlternate, DINAlternate; + // font-weight: bold; + // font-size: 28px; + // color: #FFFFFF; + // line-height: 32px; + // text-align: left; + // font-style: normal; + // margin-top: 12px; + // } + // } + + .MallSummaryStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .MallSummaryStatisticsOtherItem { + width: calc((100% - 112px) / 7); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + + .otherItemTitle { + height: 36px; + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 16px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + } + + .otherItemValue { + font-family: DINAlternate, DINAlternate; + font-weight: bold; + font-size: 32px; + color: #1492FF; + line-height: 38px; + text-align: left; + margin-top: 17px; + font-style: normal; + } + + .addLabel { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 12px; + color: rgba(0, 0, 0, 0.65); + line-height: 12px; + text-align: left; + font-style: normal; + margin-right: 5px; + margin-top: 10px; + } + + + .otherItemAddBox { + display: flex; + align-items: center; + margin-top: 10px; + + + .addIcon { + width: 7px; + height: 10px; + margin-right: 6px; + } + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 16px; + color: rgba(0, 0, 0, 0.65); + line-height: 16px; + text-align: center; + font-style: normal; + } + } + + // .otherBgIcon { + // width: 76px; + // height: 51px; + // position: absolute; + // top: 29px; + // right: 4px; + // background-image: url(../../../assets/detail/otherBgIcon.png); + // background-repeat: no-repeat; + // background-size: 100% 100%; + // } + } + + .MallSummaryStatisticsOtherItemSelect { + background-image: url('../../../assets/detail/staticSumTotalBg.png'); + background-size: 100% 100%; + background-repeat: no-repeat; + + .otherItemTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 16px; + color: #fff; + line-height: 18px; + text-align: left; + font-style: normal; + } + + .otherItemValue { + font-family: DINAlternate, DINAlternate; + font-weight: bold; + font-size: 32px; + color: #fff; + line-height: 38px; + text-align: left; + margin-top: 17px; + font-style: normal; + } + + .addLabel { + color: #fff; + } + + .otherItemAddBox { + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 14px; + color: #fff; + line-height: 16px; + text-align: center; + font-style: normal; + } + } + } + } + } + } + + + .MallSummaryStatisticsBottom { + width: 100%; + margin-top: 16px; + box-sizing: border-box; + background: #FFFFFF; + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + border-radius: 4px; + padding: 16px; + + .MallSummaryStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MallSummaryStatisticsTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 18px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + margin-left: 12px; + position: relative; + } + + .MallSummaryStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + } +} \ No newline at end of file diff --git a/src/pages/travelMember/MallSummaryStatistics/index.tsx b/src/pages/travelMember/MallSummaryStatistics/index.tsx new file mode 100644 index 0000000..7cab7d0 --- /dev/null +++ b/src/pages/travelMember/MallSummaryStatistics/index.tsx @@ -0,0 +1,571 @@ +// 订单汇总统计 +import { ConnectState } from "@/models/connect"; +import { useEffect, useRef, useState } from "react"; +import { connect, CurrentUser } from "umi"; +import { handeGetGetOnlineOrderSummary, handeGetSaleBillWholeList, handeGetSALEDETAILList } from "../service"; +import { Button, Col, FormInstance, Row, Tooltip } from "antd"; +import ProForm, { ProFormDateRangePicker } from "@ant-design/pro-form"; +import ProTable, { ActionType } from "@ant-design/pro-table"; +import moment from 'moment' +import './MallSummaryStatistics.less' +import addIcon from '@/assets/detail/addIcon.png' +import reduceIcon from '@/assets/detail/reduceIcon.png' +import { handleSetlogSave } from "@/utils/format"; +import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; +import PageTitleBox from "@/components/PageTitleBox"; + +const MallSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + // 搜索参数 + const [searchParams, setSearchParams] = useState({ + StartDate: moment().startOf('M').format('YYYY-MM-DD'), + EndDate: moment().format('YYYY-MM-DD') + }) + // 当前顶部的选择到了第几个 + const [selectTab, setSelectTab] = useState(1) + // 顶部内容的对象值 + const [topData, setTopData] = useState() + + const [modalVisible, handleModalVisible] = useState(); + const [currentRow, setCurrentRow] = useState(); + // 算的列表合计 + const [tableSumDetail, setTableSumDetail] = useState() + + + + const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + }, + { + title: '查询时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + ORDER_DATE_Start: value[0], + ORDER_DATE_End: value[1], + }; + }, + }, + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + }, + { + dataIndex: "index", + title: "序号", + align: 'center', + hideInSearch: true, + valueType: "index", + width: 70, + ellipsis: true, + }, + { + dataIndex: 'SALEBILL_CODE', + title: '订单编号', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + render: (_, record) => { + return record?.SALEBILL_CODE ? record?.SALEBILL_CODE === '合计' ? '合计' : { + setCurrentRow(record); + handleModalVisible(true) + handleSetlogSave(`查看编号为【${record?.SALEBILL_CODE}】的订单`) + }}>{record?.SALEBILL_CODE} : "-" + } + }, + { + dataIndex: 'SHOPNAME', + title: '门店名称', + align: 'center', + hideInSearch: true, + width: 150, + ellipsis: true, + }, + { + dataIndex: 'ORDER_PERSON', + title: '下单人员', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + }, + { + dataIndex: 'TOTAL_COUNT', + title: '销售数量', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + }, + { + dataIndex: 'ORDER_AMOUNT', + title: '订单金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'COUPON_AMOUNT', + title: '优惠金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'PAY_AMOUNT', + title: '实付金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'ORDER_DATE', + title: '订单时间', + align: 'center', + hideInSearch: true, + width: 170, + ellipsis: true, + render: (_, record) => { + return record?.SALEBILL_CODE === '合计' ? '' : record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : '' + } + }, + { + dataIndex: 'SALEBILL_STATE', + title: '订单状态', + align: 'center', + width: 120, + ellipsis: true, + valueType: 'select', + valueEnum: { + "0": "全部", + "1005": "订单待支付", + "1010": "订单待制作", + "2000": "订单待取餐", + "3000": "订单已完成", + "8000": "退款申请中", + "8900": "订单已退款", + "9000": "订单已关闭", + "9999": "订单已撤销", + }, + initialValue: "0" + } + ] + + // 获取顶部的数据 + const handleGetTopData = async (StartDate?: string, EndDate?: string) => { + + const req: any = { + CalcType: 1, + OwnerUnitId: currentUser?.OwnerUnitId, + StartDate: StartDate || searchParams?.StartDate || "", + EndDate: EndDate || searchParams?.EndDate || "", + SalebillType: "3000,3001,3002", + MerchantId: "" + } + const data = await handeGetGetOnlineOrderSummary(req) + console.log('datadatadatadata', data); + if (data && data.length > 0) { + let obj: any = data[0] + setTopData(obj) + } else { + setTopData(null) + } + } + // 改变顶部的选择 + const handleChangeTab = (value: number) => { + setSelectTab(value) + actionRef.current?.reload() + } + // 关闭悬浮框 + const handleCloseModal = () => { + handleModalVisible(false) + setCurrentRow(undefined); + } + + useEffect(() => { + handleGetTopData() + }, []) + return ( +
+
+
+
商城订单汇总
+
+ + + + { + console.log('values', values); + let [StartDate, EndDate] = ['', ''] + if (values.searchTime && values.searchTime.length > 0) { + [StartDate, EndDate] = values.searchTime + } + handleGetTopData(StartDate, EndDate) + setSearchParams({ + StartDate: StartDate, + EndDate: EndDate + }) + actionRef.current?.reload() + }} + > + + + + +
+ + +
+ +
+ + +
+ +
+
{ + handleChangeTab(1) + }}> +
实际销售金额(扣除退款)
+
{topData && topData?.TotalActualAmount ? topData?.TotalActualAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalActualAmount && topData?.TotalActualAmount.QOQData && topData?.TotalActualAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.TotalActualAmount && topData?.TotalActualAmount.QOQData && topData?.TotalActualAmount.summaryData ? + + {(((topData?.TotalActualAmount.summaryData - topData?.TotalActualAmount.QOQData) / topData?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(2) + }}> +
成交销售金额
+
{topData && topData?.TotalSuccAmount ? topData?.TotalSuccAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalSuccAmount && topData?.TotalSuccAmount.QOQData && topData?.TotalSuccAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(3) + }}> +
成交订单笔数
+
{topData && topData?.TotalSuccTicket ? topData?.TotalSuccTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalSuccTicket && topData?.TotalSuccTicket.QOQData && topData?.TotalSuccTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(4) + }}> +
成交销售数量
+
{topData && topData?.TotalCount ? topData?.TotalCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalCount && topData?.TotalCount.QOQData && topData?.TotalCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(5) + }}> +
交易失败笔数
+
{topData && topData?.TotalFailureTicket ? topData?.TotalFailureTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalFailureTicket && topData?.TotalFailureTicket.QOQData && topData?.TotalFailureTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(6) + }}> +
退款订单笔数
+
{topData && topData?.TotalRefundTicket ? topData?.TotalRefundTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalRefundTicket && topData?.TotalRefundTicket.QOQData && topData?.TotalRefundTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(7) + }}> +
退款订单金额
+
{topData && topData?.TotalRefundAmount ? topData?.TotalRefundAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalRefundAmount && topData?.TotalRefundAmount.QOQData && topData?.TotalRefundAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ {/* +
{ + handleChangeTab(8) + }}> +
用户访问量
+
{topData && topData?.VisitCount ? topData?.VisitCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.VisitCount && topData?.VisitCount.QOQData && topData?.VisitCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.VisitCount && topData?.VisitCount.QOQData && topData?.VisitCount.summaryData ? + // {topData && topData?.VisitCount ? topData?.VisitCount.QOQData : "-"} + + {(((topData?.VisitCount.summaryData - topData?.VisitCount.QOQData) / topData?.VisitCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(9) + }}> +
用户收藏量
+
{topData && topData?.CollectionCount ? topData?.CollectionCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.CollectionCount && topData?.CollectionCount.QOQData && topData?.CollectionCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.CollectionCount && topData?.CollectionCount.QOQData && topData?.CollectionCount.summaryData ? + // {topData && topData?.CollectionCount ? topData?.CollectionCount.QOQData : "-"} + + {(((topData?.CollectionCount.summaryData - topData?.CollectionCount.QOQData) / topData?.CollectionCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(10) + }}> +
商品数量
+
{topData && topData?.CommodityCount ? topData?.CommodityCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.CommodityCount && topData?.CommodityCount.QOQData && topData?.CommodityCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.CommodityCount && topData?.CommodityCount.QOQData && topData?.CommodityCount.summaryData ? + // {topData && topData?.CommodityCount ? topData?.CommodityCount.QOQData : "-"} + + {(((topData?.CommodityCount.summaryData - topData?.CommodityCount.QOQData) / topData?.CommodityCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
*/} + +
+
+ +
+ + + +
+ + `${record?.SALEBILL_CODE}-${record?.ORDER_DATE}`} + formRef={formRef} + bordered + actionRef={actionRef} + search={false} + options={false} + request={async (params, sorter) => { + const req = { + searchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + SALEBILL_TYPES: "3000,3001,3002", + ORDER_DATE_Start: searchParams?.StartDate || "", + ORDER_DATE_End: searchParams?.EndDate || "", + SALEBILL_STATES: selectTab == 1 ? '1010,2000,3000,8000' : + selectTab == 2 ? '1010,2000,3000,8000,8900' : + selectTab == 3 ? '1010,2000,3000,8000,8900' : + selectTab == 4 ? '1010,2000,3000,8000,8900' : + selectTab == 5 ? '9000,9999' : + selectTab == 6 ? '8900' : + selectTab == 7 ? '8900' : + selectTab == 8 ? '' : + selectTab == 9 ? '' : + selectTab == 10 ? '' : '', + SearchKeyValue: params?.searchText || "" + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "ORDER_DATE desc", + } + const data = await handeGetSaleBillWholeList(req) + + handleSetlogSave(`点击查询按钮`) + console.log('datadatadatadatadata', data); + if (data.List && data.List.length > 0) { + let PAY_AMOUNTSUM: number = 0 + let ORDER_AMOUNTSUM: number = 0 + let COUPON_AMOUNTSUM: number = 0 + let TOTAL_COUNTSUM: number = 0 + data.List.forEach((item: any) => { + PAY_AMOUNTSUM += item.PAY_AMOUNT + ORDER_AMOUNTSUM += item.ORDER_AMOUNT + COUPON_AMOUNTSUM += item.COUPON_AMOUNT + TOTAL_COUNTSUM += item.TOTAL_COUNT + }) + + let sumTotal: any = { + PAY_AMOUNT: PAY_AMOUNTSUM.toFixed(2), + ORDER_AMOUNT: ORDER_AMOUNTSUM.toFixed(2), + COUPON_AMOUNT: COUPON_AMOUNTSUM.toFixed(2), + TOTAL_COUNT: TOTAL_COUNTSUM.toFixed(0), + SALEBILL_CODE: "合计", + ORDER_DATE: 1 + } + + let res: any = [{ + ...sumTotal, + children: data.List + }] + + return { data: res, success: true } + // , total: data.TotalCount + } + return { data: [], success: true } + }} + pagination={false} + columns={columns} + expandable={{ + defaultExpandedRowKeys: ["合计-1"], + // defaultExpandAllRows: true, // 默认展开所有行(包括合计行) + // indentSize: 0, // 可选:调整缩进大小 + }} + /> +
+ + + +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(MallSummaryStatistics); \ No newline at end of file diff --git a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx index acde389..a6d58df 100644 --- a/src/pages/travelMember/MemberAddress/components/addressDetail.tsx +++ b/src/pages/travelMember/MemberAddress/components/addressDetail.tsx @@ -228,7 +228,6 @@ const AddressDetail = ({ currentBigRow, currentUser }: DetailProps) => { console.log('resultresultresult', result); if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.ADDRESS || ""}】失败`) } else { message.success('删除成功!'); modalActionRef.current?.reload() @@ -278,14 +277,13 @@ const AddressDetail = ({ currentBigRow, currentUser }: DetailProps) => { } const data = await handleSynchroMEMBERADDRESS(req); if (data.Result_Code === 100) { - handleSetlogSave(`更新【${currentRow?.ADDRESS || ""}】成功`) + handleSetlogSave(`${currentRow?.MEMBERADDRESS_ID ? '更新' : '新增'}【${data.Result_Data?.ADDRESS || ""}】成功`) message.success(data.Result_Desc) formRef?.current?.resetFields() setCurrentRow(undefined) handleModalVisible(false) modalActionRef.current?.reload() } else { - handleSetlogSave(`更新【${currentRow?.ADDRESS || ""}】失败`) message.error(data.Result_Desc) } }; diff --git a/src/pages/travelMember/MemberSummaryStatistics/index.tsx b/src/pages/travelMember/MemberSummaryStatistics/index.tsx index c62c0ae..0c716b6 100644 --- a/src/pages/travelMember/MemberSummaryStatistics/index.tsx +++ b/src/pages/travelMember/MemberSummaryStatistics/index.tsx @@ -12,6 +12,7 @@ import reduceIcon from '@/assets/detail/reduceIcon.png' import staticSumTotalBg from '@/assets/detail/staticSumTotalBg.png' import session from "@/utils/session"; import ProForm, { ProFormDateRangePicker } from "@ant-design/pro-form"; +import { handleSetlogSave } from "@/utils/format"; @@ -85,26 +86,32 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } width: 120, dataIndex: "POINT_TYPE", ellipsis: true, - hideInSearch: true, valueType: 'select', align: 'center', valueEnum: { "-2": "全部", "1": "累计", "-1": "消耗" - } + }, + initialValue: "-2" }, { title: "积分来源", width: 120, dataIndex: "POINT_SOURCE", ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', align: 'center', request: () => { return SCORETYPETree } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送" + // }, + // initialValue: "0" }, { title: "本次积分", @@ -125,12 +132,13 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } valueType: "digit" }, { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", + title: "实付金额", + width: 120, + dataIndex: "PAY_AMOUNT", hideInSearch: true, ellipsis: true, align: 'center', + valueType: "digit" }, { title: "获取时间", @@ -140,7 +148,7 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } align: 'center', ellipsis: true, render: (_, record) => { - return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -184,6 +192,14 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } align: 'center', ellipsis: true, }, + { + title: "会员昵称", + width: 150, + dataIndex: "MEMBERSHIP_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, { title: "累计成长值", width: 120, @@ -208,11 +224,22 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } dataIndex: "GROWTH_SOURCE", align: 'center', ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', request: () => { return SCORETYPETree + }, + fieldProps: { + allowClear: true, // 允许清除已选中的值 + treeDefaultExpandAll: true, // 默认展开所有节点(可选) + showSearch: true, // 允许搜索(可选) + treeNodeFilterProp: 'title', // 按 title 搜索(可选) } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送", + // }, }, { title: "成长方式", @@ -221,29 +248,21 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } ellipsis: true, align: 'center', valueType: 'select', - hideInSearch: true, valueEnum: { "-2": "全部", "1": "积累", "-1": "消耗", }, - }, - { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", - hideInSearch: true, - ellipsis: true, - align: 'center', + initialValue: "-2" }, { title: "操作时间", - width: 120, + width: 180, dataIndex: "OPERATE_DATE", align: 'center', hideInSearch: true, render: (_, record) => { - return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -483,10 +502,8 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } // 判断当前选择的 1、2、3为积分的 4、5、6 为成长值的 let req: any = {} let data: any = {} - const params = searchParams; - if (selectTab <= 3) { req = { SearchParameter: { @@ -532,6 +549,8 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined } // } setSearchParams(params) + handleSetlogSave(`查询${selectTab === 1 ? '总积分' : selectTab === 2 ? '赚取积分' : selectTab === 3 ? '消耗积分' : selectTab === 4 ? '总成长值' : selectTab === 5 ? '赚取成长值' : selectTab === 6 ? '消耗成长值' : ''}数据汇总`) + if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } diff --git a/src/pages/travelMember/MemberTagManage/index.tsx b/src/pages/travelMember/MemberTagManage/index.tsx index 05051fb..ea457fb 100644 --- a/src/pages/travelMember/MemberTagManage/index.tsx +++ b/src/pages/travelMember/MemberTagManage/index.tsx @@ -165,10 +165,9 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro const result = await handeDeleteAUTOTYPE(req) if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.AUTOTYPE_NAME}】失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除【${currentRow?.AUTOTYPE_NAME}】成功`) + handleSetlogSave(`删除【${currentRow?.AUTOTYPE_NAME}】`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -204,7 +203,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro const data = await handeSynchroAUTOTYPE(req) handleConfirmLoading(false) if (data.Result_Code === 100) { - handleSetlogSave(`更新【${currentRow?.AUTOTYPE_NAME}】成功`) + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${currentRow?.AUTOTYPE_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -214,7 +213,6 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.AUTOTYPE_NAME}】失败`) } } diff --git a/src/pages/travelMember/MembershipLevelManage/index.tsx b/src/pages/travelMember/MembershipLevelManage/index.tsx index cc124f0..454ddc1 100644 --- a/src/pages/travelMember/MembershipLevelManage/index.tsx +++ b/src/pages/travelMember/MembershipLevelManage/index.tsx @@ -201,10 +201,9 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> const result = await handeDeleteFIELDENUM(req) if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】成功`) + handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -231,7 +230,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> const data = await handeSynchroFIELDENUM(req) handleConfirmLoading(false) if (data.Result_Code === 100) { - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】成功`) + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data.FIELDENUM_NAME}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -241,7 +240,6 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }> actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】失败`) } } diff --git a/src/pages/travelMember/MembershipLevelStatistics/index.tsx b/src/pages/travelMember/MembershipLevelStatistics/index.tsx index d47d04a..fe2953e 100644 --- a/src/pages/travelMember/MembershipLevelStatistics/index.tsx +++ b/src/pages/travelMember/MembershipLevelStatistics/index.tsx @@ -11,6 +11,7 @@ import addIcon from '@/assets/detail/addIcon.png' import reduceIcon from '@/assets/detail/reduceIcon.png' import session from "@/utils/session"; import ProForm, { ProFormDateRangePicker } from "@ant-design/pro-form"; +import { handleSetlogSave } from "@/utils/format"; @@ -102,26 +103,32 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined width: 120, dataIndex: "POINT_TYPE", ellipsis: true, - hideInSearch: true, valueType: 'select', align: 'center', valueEnum: { "-2": "全部", "1": "累计", "-1": "消耗" - } + }, + initialValue: "-2" }, { title: "积分来源", width: 120, dataIndex: "POINT_SOURCE", ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', align: 'center', request: () => { return SCORETYPETree } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送" + // }, + // initialValue: "0" }, { title: "本次积分", @@ -141,24 +148,6 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', valueType: "digit" }, - { - title: "会员类型", - width: 120, - dataIndex: "MEMBERSHIP_TYPE", - hideInSearch: true, - ellipsis: true, - align: 'center', - valueType: 'select', - valueEnum: MEMBERSHIPTYPEYNObj - }, - { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", - hideInSearch: true, - ellipsis: true, - align: 'center', - }, { title: "获取时间", width: 150, @@ -167,7 +156,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', ellipsis: true, render: (_, record) => { - return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -210,6 +199,14 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', ellipsis: true, }, + { + title: "会员昵称", + width: 150, + dataIndex: "MEMBERSHIP_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, { title: "累计成长值", width: 120, @@ -234,11 +231,22 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined dataIndex: "GROWTH_SOURCE", align: 'center', ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', request: () => { return SCORETYPETree + }, + fieldProps: { + allowClear: true, // 允许清除已选中的值 + treeDefaultExpandAll: true, // 默认展开所有节点(可选) + showSearch: true, // 允许搜索(可选) + treeNodeFilterProp: 'title', // 按 title 搜索(可选) } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送", + // }, }, { title: "成长方式", @@ -247,39 +255,21 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined ellipsis: true, align: 'center', valueType: 'select', - hideInSearch: true, valueEnum: { "-2": "全部", "1": "积累", "-1": "消耗", }, - }, - { - title: "会员等级", - width: 120, - dataIndex: "MEMBERSHIP_LEVEL", - hideInSearch: true, - ellipsis: true, - align: 'center', - valueType: 'select', - valueEnum: MEMBERSHIPLEVELYNObj - }, - { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", - hideInSearch: true, - ellipsis: true, - align: 'center', + initialValue: "-2" }, { title: "操作时间", - width: 120, + width: 180, dataIndex: "OPERATE_DATE", align: 'center', hideInSearch: true, render: (_, record) => { - return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -680,6 +670,7 @@ const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined } data = await handleGetMEMBERGROWTHList(req); } + handleSetlogSave(`查询${selectTab === 1 ? '总积分' : selectTab === 2 ? '赚取积分' : selectTab === 3 ? '消耗积分' : selectTab === 4 ? '总成长值' : selectTab === 5 ? '赚取成长值' : selectTab === 6 ? '消耗成长值' : ''}会员等级汇总`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } diff --git a/src/pages/travelMember/MembershipTypeStatistics/index.tsx b/src/pages/travelMember/MembershipTypeStatistics/index.tsx index b390204..94f609b 100644 --- a/src/pages/travelMember/MembershipTypeStatistics/index.tsx +++ b/src/pages/travelMember/MembershipTypeStatistics/index.tsx @@ -11,6 +11,7 @@ import addIcon from '@/assets/detail/addIcon.png' import reduceIcon from '@/assets/detail/reduceIcon.png' import session from "@/utils/session"; import ProForm, { ProFormDateRangePicker } from "@ant-design/pro-form"; +import { handleSetlogSave } from "@/utils/format"; @@ -103,26 +104,32 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined width: 120, dataIndex: "POINT_TYPE", ellipsis: true, - hideInSearch: true, valueType: 'select', align: 'center', valueEnum: { "-2": "全部", "1": "累计", "-1": "消耗" - } + }, + initialValue: "-2" }, { title: "积分来源", width: 120, dataIndex: "POINT_SOURCE", ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', align: 'center', request: () => { return SCORETYPETree } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送" + // }, + // initialValue: "0" }, { title: "本次积分", @@ -142,24 +149,6 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', valueType: "digit" }, - { - title: "会员类型", - width: 120, - dataIndex: "MEMBERSHIP_TYPE", - hideInSearch: true, - ellipsis: true, - align: 'center', - valueType: 'select', - valueEnum: MEMBERSHIPTYPEYNObj - }, - { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", - hideInSearch: true, - ellipsis: true, - align: 'center', - }, { title: "获取时间", width: 150, @@ -168,7 +157,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', ellipsis: true, render: (_, record) => { - return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -212,6 +201,14 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined align: 'center', ellipsis: true, }, + { + title: "会员昵称", + width: 150, + dataIndex: "MEMBERSHIP_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, { title: "累计成长值", width: 120, @@ -236,11 +233,22 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined dataIndex: "GROWTH_SOURCE", align: 'center', ellipsis: true, - hideInSearch: true, valueType: 'treeSelect', request: () => { return SCORETYPETree + }, + fieldProps: { + allowClear: true, // 允许清除已选中的值 + treeDefaultExpandAll: true, // 默认展开所有节点(可选) + showSearch: true, // 允许搜索(可选) + treeNodeFilterProp: 'title', // 按 title 搜索(可选) } + // valueEnum: { + // "0": "全部", + // "1000": "消费赠送", + // "2000": "消费抵扣", + // "3000": "注册赠送", + // }, }, { title: "成长方式", @@ -249,39 +257,21 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined ellipsis: true, align: 'center', valueType: 'select', - hideInSearch: true, valueEnum: { "-2": "全部", "1": "积累", "-1": "消耗", }, - }, - { - title: "会员等级", - width: 120, - dataIndex: "MEMBERSHIP_LEVEL", - hideInSearch: true, - ellipsis: true, - align: 'center', - valueType: 'select', - valueEnum: MEMBERSHIPLEVELYNObj - }, - { - title: "会员名称", - width: 150, - dataIndex: "MEMBERSHIP_NAME", - hideInSearch: true, - ellipsis: true, - align: 'center', + initialValue: "-2" }, { title: "操作时间", - width: 120, + width: 180, dataIndex: "OPERATE_DATE", align: 'center', hideInSearch: true, render: (_, record) => { - return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, ] @@ -684,6 +674,7 @@ const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined } data = await handleGetMEMBERGROWTHList(req); } + handleSetlogSave(`查询${selectTab === 1 ? '总积分' : selectTab === 2 ? '赚取积分' : selectTab === 3 ? '消耗积分' : selectTab === 4 ? '总成长值' : selectTab === 5 ? '赚取成长值' : selectTab === 6 ? '消耗成长值' : ''}会员类型汇总`) // req = { // SearchParameter: { diff --git a/src/pages/travelMember/MerchantEvaluationManage/index.tsx b/src/pages/travelMember/MerchantEvaluationManage/index.tsx index 67eab57..cd392c3 100644 --- a/src/pages/travelMember/MerchantEvaluationManage/index.tsx +++ b/src/pages/travelMember/MerchantEvaluationManage/index.tsx @@ -4,31 +4,54 @@ import type { CurrentUser } from "umi"; import type { ConnectState } from "@/models/connect"; import React, { useRef, useState } from "react"; import type { FormInstance } from "antd"; -import { Button, message, Space, Spin, Tree } from "antd"; +import { Button, Col, message, Modal, Row, Space, Spin, Tree } from "antd"; import useRequest from "@ahooksjs/use-request"; import type { ActionType } from "@ant-design/pro-table"; import ProTable from "@ant-design/pro-table"; import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSelectTree"; import PageTitleBox from "@/components/PageTitleBox"; -import { handeGetCOMMENTList } from "../service"; +import { handeGetCOMMENTList, handeSynchroCOMMENT } from "../service"; import moment from 'moment' import session from "@/utils/session"; +import { handleSetlogSave } from "@/utils/format"; +import Draggable from "react-draggable"; +import ProForm, { ProFormText, ProFormTextArea } from "@ant-design/pro-form"; const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any }> = (props) => { + const draggleRef = React.createRef() const { currentUser, isComponent, parentDetail } = props const actionRef = useRef(); const formRef = useRef(); + const modalFormRef = useRef(); const [collapsible, setCollapsible] = useState(false) - + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + // 显示回复抽屉 + const [showDetailDrawer, setShowDetailDrawer] = useState(false) + // 点击的当前数据 + const [currentRow, setCurrentRow] = useState() const MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') - - // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() + 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), + }); + }; + const columns: any = [ { @@ -108,7 +131,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent ellipsis: true, align: "center", render: (_, record) => { - return record?.SALEBILL_ID ? '是' : '-' + return record?.SALEBILL_ID ? '是' : '否' } }, { @@ -118,6 +141,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + sorter: (a, b) => a.COMMENT_SCORE - b.COMMENT_SCORE, }, { title: "评价内容", @@ -126,6 +150,12 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent hideInSearch: true, ellipsis: true, align: "center", + render: (_, record) => { + return record?.COMMENT_CONTENT ? { + setCurrentRow(record) + setShowDetailDrawer(true) + }}>{record?.COMMENT_CONTENT} : "-" + } }, // { // title: "回复内容", @@ -137,6 +167,11 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent // }, ] + // 删除评论 + const handleDeleteEvaluation = async () => { + + } + return (
@@ -169,7 +204,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent const req: any = isComponent ? { SearchParameter: { OWNERUNIT_ID: currentUser?.OwnerUnitId, - PROVINCE_CODE: currentUser?.ProvinceCode, + // PROVINCE_CODE: currentUser?.ProvinceCode, COMMENT_ISVALID: 1, CREATE_DATE_Start: params?.CREATE_DATE_Start || "", CREATE_DATE_End: params?.CREATE_DATE_End || "", @@ -181,10 +216,11 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent Key: "SELLER_NAME,MEMBERSHIP_NAME", Value: params?.searchText || "" }, + SortStr: "CREATE_DATE desc" } : { SearchParameter: { OWNERUNIT_ID: currentUser?.OwnerUnitId, - PROVINCE_CODE: currentUser?.ProvinceCode, + // PROVINCE_CODE: currentUser?.ProvinceCode, COMMENT_ISVALID: 1, CREATE_DATE_Start: params?.CREATE_DATE_Start || "", CREATE_DATE_End: params?.CREATE_DATE_End || "", @@ -195,9 +231,13 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent Key: "SELLER_NAME,MEMBERSHIP_NAME", Value: params?.searchText || "" }, + SortStr: "CREATE_DATE desc" } const data = await handeGetCOMMENTList(req) console.log('datadatadatadatadata222', data); + + handleSetlogSave(`点击查询按钮`) + if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -210,6 +250,99 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent />
+ + + + + 评价回复 + + } + destroyOnClose={true} + width={900} + visible={showDetailDrawer} + afterClose={() => { + }} + bodyStyle={{ + maxHeight: '850px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + onCancel={() => { + setShowDetailDrawer(false) + setCurrentRow(undefined); + }} + footer={
+
+ +
+
+ + + +
+
} + modalRender={(modal) => { + return onDraggaleStart(event, uiData)} + handle=".MerchantEvaluationManage" + > +
{modal}
+
+ }} + > + + { + const req: any = { + + } + // const data = await handeSynchroCOMMENT(req) + + + }} + > + + + + + + + + + + + +
) } diff --git a/src/pages/travelMember/OrderAfterSalesManage/index.tsx b/src/pages/travelMember/OrderAfterSalesManage/index.tsx index ef3a053..e757ca9 100644 --- a/src/pages/travelMember/OrderAfterSalesManage/index.tsx +++ b/src/pages/travelMember/OrderAfterSalesManage/index.tsx @@ -14,6 +14,7 @@ import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form"; import orderIcon from '@/assets/detail/orderIcon.png' import closeIcon from '@/assets/detail/closeIcon.png' import './style.less' +import { handleSetlogSave } from "@/utils/format"; const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -68,7 +69,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => }; }, }, - initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')], + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], }, { title: "订单状态", @@ -119,6 +120,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => return record?.SALEBILL_CODE ? { setCurrentRow(record); handleModalVisible(true) + handleSetlogSave(`查询【${record?.ORDER_PERSON}】编码为${record?.SALEBILL_CODE}的订单`) }}> {record?.SALEBILL_CODE} : "" @@ -291,6 +293,7 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => // const data = await handeGetSALEBILLList(req); const data = await handeGetSaleBillWholeList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } diff --git a/src/pages/travelMember/OrderCategoryManage/index.tsx b/src/pages/travelMember/OrderCategoryManage/index.tsx index d804078..109ea2f 100644 --- a/src/pages/travelMember/OrderCategoryManage/index.tsx +++ b/src/pages/travelMember/OrderCategoryManage/index.tsx @@ -241,7 +241,6 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> = const result = await handlDeleteUSERDEFINEDTYPE(req) if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.USERDEFINEDTYPE_NAME}】失败`) } else { message.success('删除成功!'); actionRef.current?.reload() @@ -288,7 +287,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> = handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") - handleSetlogSave(`更新【${currentRow?.USERDEFINEDTYPE_NAME}】成功`) + handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '更新' : '新增'}【${data.Result_Data?.USERDEFINEDTYPE_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -297,7 +296,6 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> = actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.USERDEFINEDTYPE_NAME}】失败`) } } diff --git a/src/pages/travelMember/OrderProductManage/index.tsx b/src/pages/travelMember/OrderProductManage/index.tsx index 36bbe0e..c285c04 100644 --- a/src/pages/travelMember/OrderProductManage/index.tsx +++ b/src/pages/travelMember/OrderProductManage/index.tsx @@ -125,7 +125,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( // }; // }, // }, - // // initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')], + // // initialValue: [ moment().subtract(1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], // }, // { // title: '上级类别', @@ -356,7 +356,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( const data = await handeSyncSellerCommodityInfo({ list: [req] }) handleConfirmLoading(false) if (data.Result_Code === 100) { - handleSetlogSave(`更新【${currentRow?.COMMODITY_NAME}】成功`) + handleSetlogSave(`${currentRow?.COMMODITY_ID ? '更新' : '新增'}【${data.Result_Data?.COMMODITY_NAME}】成功`) message.success("同步成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -366,7 +366,6 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.COMMODITY_NAME}】失败`) } }; diff --git a/src/pages/travelMember/PointsRecordSearch/index.tsx b/src/pages/travelMember/PointsRecordSearch/index.tsx index 87c6671..7d59dea 100644 --- a/src/pages/travelMember/PointsRecordSearch/index.tsx +++ b/src/pages/travelMember/PointsRecordSearch/index.tsx @@ -126,6 +126,15 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo align: 'center', valueType: "digit" }, + { + title: "实付金额", + width: 120, + dataIndex: "PAY_AMOUNT", + hideInSearch: true, + ellipsis: true, + align: 'center', + valueType: "digit" + }, { title: "获取时间", width: 150, @@ -191,7 +200,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boo } const data = await handleGetPOINTRECORDList(req) handleSetlogSave(`点击查询按钮`) - + if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } diff --git a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx index 65d514e..f7345e7 100644 --- a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx +++ b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx @@ -202,10 +202,9 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) const result = await handeDeleteFIELDENUM(req) if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】类别失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】类别成功`) + handleSetlogSave(`删除【${currentRow?.FIELDENUM_NAME}】类别`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -233,7 +232,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】类别成功`) + handleSetlogSave(`${currentRow?.FIELDENUM_ID ? '更新' : '新增'}【${data.Result_Data?.FIELDENUM_NAME}】类别`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -242,7 +241,6 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】类别失败`) } } diff --git a/src/pages/travelMember/PointsRuleConfig/index.tsx b/src/pages/travelMember/PointsRuleConfig/index.tsx index e2d5e24..69f37bc 100644 --- a/src/pages/travelMember/PointsRuleConfig/index.tsx +++ b/src/pages/travelMember/PointsRuleConfig/index.tsx @@ -273,10 +273,9 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.SCORE_NAME}】类别失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除【${currentRow?.SCORE_NAME}】类别成功`) + handleSetlogSave(`删除【${currentRow?.SCORE_NAME}】类别`) actionRef.current?.reload() handleConfirmLoading(false) handleModalVisible(false) @@ -313,7 +312,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr const data = await handleSynchroSCORESETTING(req) if (data.Result_Code === 100) { - handleSetlogSave(`更新【${currentRow?.SCORE_NAME}】类别成功`) + handleSetlogSave(`${currentRow?.SCORESETTING_ID ? '更新' : '新增'}【${data.Result_Data?.SCORE_NAME}】类别`) message.success(data.Result_Desc) formRef?.current?.resetFields() setCurrentRow(undefined) @@ -321,7 +320,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr actionRef.current?.reload() } else { message.error(data.Result_Desc) - handleSetlogSave(`更新【${currentRow?.SCORE_NAME}】类别失败`) } } diff --git a/src/pages/travelMember/ProductListingManagement/index.tsx b/src/pages/travelMember/ProductListingManagement/index.tsx index a36e90c..94849ed 100644 --- a/src/pages/travelMember/ProductListingManagement/index.tsx +++ b/src/pages/travelMember/ProductListingManagement/index.tsx @@ -27,6 +27,7 @@ import LeftSelectMallType from './component/LeftSelectMallType'; import { handeDeleteCOMMODITY, handeDeleteRTCOMMODITY_MULTI, handeGetCOMMODITY_MULTIList, handeGetCOMMODITYDetail, handeGetCOMMODITYList, handeGetMERCHANTSList, handeGetRTCOMMODITY_MULTIList, handeSynchroCOMMODITY, handeSynchroRTCOMMODITYMULTIList, handleGetBRANDList, handlGetUSERDEFINEDTYPEList } from '../service'; import session from '@/utils/session'; import { deletePicture, uploadPicture } from '@/services/picture'; +import { handleSetlogSave } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -163,6 +164,13 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop hideInDescriptions: true, width: 300, ellipsis: true, + render: (_, record) => { + return record?.COMMODITY_NAME ? { + handleSetlogSave(`查看商品【${record?.COMMODITY_NAME}】信息`) + setCurrentRow({ ...record }); + handleModalVisible(true); + }}>{record?.COMMODITY_NAME} : "-" + } }, { dataIndex: 'COMMODITY_NATURE', @@ -235,40 +243,40 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop width: 200, ellipsis: true, }, - { - dataIndex: 'option', - title: '操作', - valueType: 'option', - align: 'center', - hideInSearch: true, - width: 120, - fixed: "right", - ellipsis: true, - render: (_, record) => { - return ( - - { - console.log('recordrecordrecord', record); + // { + // dataIndex: 'option', + // title: '操作', + // valueType: 'option', + // align: 'center', + // hideInSearch: true, + // width: 120, + // fixed: "right", + // ellipsis: true, + // render: (_, record) => { + // return ( + // + // { + // console.log('recordrecordrecord', record); - setCurrentRow({ ...record }); - handleModalVisible(true); - }} - > - 编辑 - - { - await handelDelete(record.COMMODITY_ID); - }} - > - 删除 - - - ); - }, - }, + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // await handelDelete(record.COMMODITY_ID); + // }} + // > + // 删除 + // + // + // ); + // }, + // }, ]; // 多规格表格的字段 @@ -447,6 +455,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除商品【${currentRow?.COMMODITY_NAME}】`) actionRef.current?.reload() } }; @@ -503,6 +512,8 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop await handleUploadShopImg(res, data.Result_Data) + handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '更新' : '新增'}商品【${data.Result_Data?.COMMODITY_NAME}】`) + message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -639,6 +650,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop } const data = await handeGetCOMMODITYList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -677,6 +689,14 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop ], }} pagination={{ defaultPageSize: 10 }} + rowSelection={{ + type: 'checkbox', + onChange: (rowKeys, rowDetail) => { + console.log('rowKeysrowKeysrowKeys', rowKeys); + console.log('rowDetailrowDetailrowDetail', rowKeys); + + }, + }} /> {/* 添加商品的悬浮框 */} @@ -705,7 +725,11 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop } destroyOnClose={true} - width={'70%'} + width={1400} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} visible={modalVisible} confirmLoading={confirmLoading} afterClose={() => { @@ -720,17 +744,22 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop setDetailImgList([]) // setBRAND_NAMEList([]) }} - bodyStyle={{ - maxHeight: '700px', // 你可以根据需要调整高度 - overflowY: 'auto', - }} footer={
{ currentRow ? - : "" +
+ + + +
+ : "" }
@@ -777,6 +806,7 @@ const COMMODITYTable: React.FC<{ currentUser: CurrentUser | undefined }> = (prop formRef={formRef} autoFocusFirstInput submitter={false} + labelCol={{ style: { width: 80 } }} preserve={false} request={async () => { if (currentRow?.COMMODITY_ID) { diff --git a/src/pages/travelMember/ProductSpecificationManage/index.tsx b/src/pages/travelMember/ProductSpecificationManage/index.tsx index 7e33a46..1e0eae0 100644 --- a/src/pages/travelMember/ProductSpecificationManage/index.tsx +++ b/src/pages/travelMember/ProductSpecificationManage/index.tsx @@ -24,6 +24,8 @@ import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚 import PageTitleBox from "@/components/PageTitleBox"; import { handeDeleteCOMMODITY_MULTI, handeSynchroCOMMODITY_MULTI, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service'; import { render } from 'react-dom'; +import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { handleSetlogSave } from '@/utils/format'; const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { @@ -69,7 +71,19 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine width: 200, ellipsis: true, render: (_, record) => { - return record?.COMMODITY_NAME || record?.USERDEFINEDTYPE_NAME || "-" + return record?.COMMODITY_NAME || record?.USERDEFINEDTYPE_NAME ? + { + if (record?.COMMODITY_MULTI_ID) { + setDataType(2) + } else { + setDataType(1) + } + + setCurrentRow({ ...record }); + handleModalVisible(true); + }}> + {record?.COMMODITY_NAME || record?.USERDEFINEDTYPE_NAME} + : "-" } }, { @@ -137,47 +151,47 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine return record?.USERDEFINEDTYPE_DATE ? moment(record?.USERDEFINEDTYPE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" } }, - { - dataIndex: 'option', - title: '操作', - width: 150, - valueType: 'option', - align: 'center', - hideInSearch: true, - render: (_, record) => { - return ( - - { - if (record?.COMMODITY_MULTI_ID) { - setDataType(2) - } else { - setDataType(1) - } - console.log('recordrecord', record); + // { + // dataIndex: 'option', + // title: '操作', + // width: 150, + // valueType: 'option', + // align: 'center', + // hideInSearch: true, + // render: (_, record) => { + // return ( + // + // { + // if (record?.COMMODITY_MULTI_ID) { + // setDataType(2) + // } else { + // setDataType(1) + // } + // console.log('recordrecord', record); - setCurrentRow({ ...record }); - handleModalVisible(true); - }} - > - 编辑 - - { - if (record?.COMMODITY_MULTI_ID) { - await handelDeleteSpecifications(record.COMMODITY_MULTI_ID); - } else { - await handelDelete(record.USERDEFINEDTYPE_ID); - } - }} - > - 删除 - - - ); - }, - }, + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // if (record?.COMMODITY_MULTI_ID) { + // await handelDeleteSpecifications(record.COMMODITY_MULTI_ID); + // } else { + // await handelDelete(record.USERDEFINEDTYPE_ID); + // } + // }} + // > + // 删除 + // + // + // ); + // }, + // }, ]; @@ -189,6 +203,12 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除类别【${currentRow.USERDEFINEDTYPE_NAME}】`) + handleConfirmLoading(false) + handleModalVisible(false) + setDataType(0) + formRef.current?.resetFields(); + setCurrentRow(undefined); actionRef.current?.reload() } }; @@ -200,6 +220,12 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除规格【${currentRow.COMMODITY_NAME}】`) + handleConfirmLoading(false) + handleModalVisible(false) + setDataType(0) + formRef.current?.resetFields(); + setCurrentRow(undefined); actionRef.current?.reload() } } @@ -234,6 +260,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") + handleSetlogSave(`${currentRow?.USERDEFINEDTYPE_ID ? '更新' : '新增'}类别【${data.Result_Data.USERDEFINEDTYPE_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -270,6 +297,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") + handleSetlogSave(`${currentRow?.COMMODITY_MULTI_ID ? '更新' : '新增'}规格【${data.Result_Data.COMMODITY_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -329,6 +357,7 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine const data = await handlGetUSERDEFINEDTYPEList(req); setTableData(data) + handleSetlogSave(`点击查询按钮`) if (data && data.length > 0) { let list: any = transformMultiRuleToChildren(data) console.log('listlistlistlist', list); @@ -421,6 +450,32 @@ const ProductSpecificationManage: React.FC<{ currentUser: CurrentUser | undefine
{modal}
}} + footer={ + { + if (currentRow?.COMMODITY_MULTI_ID) { + await handelDeleteSpecifications(currentRow.COMMODITY_MULTI_ID); + } else { + await handelDelete(currentRow.USERDEFINEDTYPE_ID); + } + }} + handleCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + setDataType(0) + formRef.current?.resetFields(); + setCurrentRow(undefined); + }} + handleOK={() => { + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + + /> + } > { @@ -175,6 +176,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined return { setCurrentRow({ ...record }); handleModalVisible(true); + handleSetlogSave(`查询商品【${record?.COMMODITY_NAME}】`) }}>{record?.COMMODITY_NAME || ""} } }, @@ -660,6 +662,7 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined PageSize: 999999, } const data = await handeGetCOMMODITYList(req); + handleSetlogSave(`点击查询按钮`) 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/SummaryOfReservation/SummaryOfReservation.less b/src/pages/travelMember/SummaryOfReservation/SummaryOfReservation.less new file mode 100644 index 0000000..b109b19 --- /dev/null +++ b/src/pages/travelMember/SummaryOfReservation/SummaryOfReservation.less @@ -0,0 +1,258 @@ +.SummaryOfReservationMain { + width: 100%; + + .SummaryOfReservationTop { + width: 100%; + background: #FFFFFF; + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + border-radius: 4px; + box-sizing: border-box; + padding: 16px; + + .SummaryOfReservationTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .SummaryOfReservationTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 18px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + margin-left: 12px; + position: relative; + } + + .SummaryOfReservationTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .SummaryOfReservationContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .SummaryOfReservationItemFirst { + // width: 280px; + // height: 180px; + // background-image: url('../../../assets/detail/staticSumTotalBg.png'); + // background-size: 100% 100%; + // background-repeat: no-repeat; + // box-sizing: border-box; + // padding: 26px 39px; + // margin-right: 16px; + + // .firstItemTitle { + // font-family: PingFangSC, PingFang SC; + // font-weight: 500; + // font-size: 18px; + // color: #FFFFFF; + // line-height: 13px; + // text-align: left; + // font-style: normal; + // } + + // .firstItemValue { + // font-family: DINAlternate, DINAlternate; + // font-weight: bold; + // font-size: 28px; + // color: #FFFFFF; + // line-height: 32px; + // text-align: left; + // font-style: normal; + // margin-top: 12px; + // } + // } + + .SummaryOfReservationItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .SummaryOfReservationOtherItem { + width: calc((100% - 112px) / 7); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + + .otherItemTitle { + height: 36px; + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 16px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + } + + .otherItemValue { + font-family: DINAlternate, DINAlternate; + font-weight: bold; + font-size: 32px; + color: #1492FF; + line-height: 38px; + text-align: left; + margin-top: 17px; + font-style: normal; + } + + .addLabel { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 12px; + color: rgba(0, 0, 0, 0.65); + line-height: 12px; + text-align: left; + font-style: normal; + margin-right: 5px; + margin-top: 10px; + } + + + .otherItemAddBox { + display: flex; + align-items: center; + margin-top: 10px; + + + .addIcon { + width: 7px; + height: 10px; + margin-right: 6px; + } + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 16px; + color: rgba(0, 0, 0, 0.65); + line-height: 16px; + text-align: center; + font-style: normal; + } + } + + // .otherBgIcon { + // width: 76px; + // height: 51px; + // position: absolute; + // top: 29px; + // right: 4px; + // background-image: url(../../../assets/detail/otherBgIcon.png); + // background-repeat: no-repeat; + // background-size: 100% 100%; + // } + } + + .SummaryOfReservationOtherItemSelect { + background-image: url('../../../assets/detail/staticSumTotalBg.png'); + background-size: 100% 100%; + background-repeat: no-repeat; + + .otherItemTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 16px; + color: #fff; + line-height: 18px; + text-align: left; + font-style: normal; + } + + .otherItemValue { + font-family: DINAlternate, DINAlternate; + font-weight: bold; + font-size: 32px; + color: #fff; + line-height: 38px; + text-align: left; + margin-top: 17px; + font-style: normal; + } + + .addLabel { + color: #fff; + } + + .otherItemAddBox { + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 14px; + color: #fff; + line-height: 16px; + text-align: center; + font-style: normal; + } + } + } + } + } + } + + + .SummaryOfReservationBottom { + width: 100%; + margin-top: 16px; + box-sizing: border-box; + background: #FFFFFF; + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + border-radius: 4px; + padding: 16px; + + .SummaryOfReservationTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .SummaryOfReservationTitle { + font-family: PingFangSC, PingFang SC; + font-weight: 600; + font-size: 18px; + color: #333333; + line-height: 18px; + text-align: left; + font-style: normal; + margin-left: 12px; + position: relative; + } + + .SummaryOfReservationTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + } +} \ No newline at end of file diff --git a/src/pages/travelMember/SummaryOfReservation/index.tsx b/src/pages/travelMember/SummaryOfReservation/index.tsx index b84dc29..6861d44 100644 --- a/src/pages/travelMember/SummaryOfReservation/index.tsx +++ b/src/pages/travelMember/SummaryOfReservation/index.tsx @@ -1,11 +1,567 @@ -// 预约订单汇总 +// 订单汇总统计 import { ConnectState } from "@/models/connect"; +import { useEffect, useRef, useState } from "react"; import { connect, CurrentUser } from "umi"; +import { handeGetGetOnlineOrderSummary, handeGetSaleBillWholeList } from "../service"; +import { Button, Col, FormInstance, Row, Tooltip } from "antd"; +import ProForm, { ProFormDateRangePicker } from "@ant-design/pro-form"; +import ProTable, { ActionType } from "@ant-design/pro-table"; +import moment from 'moment' +import './SummaryOfReservation.less' +import addIcon from '@/assets/detail/addIcon.png' +import reduceIcon from '@/assets/detail/reduceIcon.png' +import { handleSetlogSave } from "@/utils/format"; +import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; +import PageTitleBox from "@/components/PageTitleBox"; const SummaryOfReservation: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { - return ( -
+ const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + // 搜索参数 + const [searchParams, setSearchParams] = useState({ + StartDate: moment().startOf('M').format('YYYY-MM-DD'), + EndDate: moment().format('YYYY-MM-DD') + }) + // 当前顶部的选择到了第几个 + const [selectTab, setSelectTab] = useState(1) + // 顶部内容的对象值 + const [topData, setTopData] = useState() + const [modalVisible, handleModalVisible] = useState(); + const [currentRow, setCurrentRow] = useState(); + // 算的列表合计 + const [tableSumDetail, setTableSumDetail] = useState() + + + + const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + }, + { + title: '查询时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + ORDER_DATE_Start: value[0], + ORDER_DATE_End: value[1], + }; + }, + }, + initialValue: [moment().add(-1, 'M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + }, + { + dataIndex: "index", + title: "序号", + align: 'center', + hideInSearch: true, + valueType: "index", + width: 120, + ellipsis: true, + }, + { + dataIndex: 'SALEBILL_CODE', + title: '订单编号', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + render: (_, record) => { + return record?.SALEBILL_CODE ? record?.SALEBILL_CODE === '合计' ? '合计' : { + setCurrentRow(record); + handleModalVisible(true) + handleSetlogSave(`查看编号为【${record?.SALEBILL_CODE}】的订单`) + }}>{record?.SALEBILL_CODE} : "-" + } + }, + { + dataIndex: 'SHOPNAME', + title: '门店名称', + align: 'center', + hideInSearch: true, + width: 150, + ellipsis: true, + }, + { + dataIndex: 'ORDER_PERSON', + title: '下单人员', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + }, + { + dataIndex: 'TOTAL_COUNT', + title: '销售数量', + align: 'center', + hideInSearch: true, + width: 250, + ellipsis: true, + }, + { + dataIndex: 'ORDER_AMOUNT', + title: '订单金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'COUPON_AMOUNT', + title: '优惠金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'PAY_AMOUNT', + title: '实付金额', + align: 'center', + hideInSearch: true, + width: 120, + ellipsis: true, + }, + { + dataIndex: 'ORDER_DATE', + title: '订单时间', + align: 'center', + hideInSearch: true, + width: 170, + ellipsis: true, + render: (_, record) => { + return record?.SALEBILL_CODE === '合计' ? '' : record?.ORDER_DATE ? moment(record?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : '' + } + }, + { + dataIndex: 'SALEBILL_STATE', + title: '订单状态', + align: 'center', + width: 120, + ellipsis: true, + valueType: 'select', + valueEnum: { + "0": "全部", + "1005": "订单待支付", + "1010": "订单待制作", + "2000": "订单待取餐", + "3000": "订单已完成", + "8000": "退款申请中", + "8900": "订单已退款", + "9000": "订单已关闭", + "9999": "订单已撤销", + }, + initialValue: "0" + } + ] + + // 获取顶部的数据 + const handleGetTopData = async (StartDate?: string, EndDate?: string) => { + + const req: any = { + CalcType: 1, + OwnerUnitId: currentUser?.OwnerUnitId, + StartDate: StartDate || searchParams?.StartDate || "", + EndDate: EndDate || searchParams?.EndDate || "", + SalebillType: "6000", + MerchantId: "" + } + const data = await handeGetGetOnlineOrderSummary(req) + console.log('datadatadatadata', data); + if (data && data.length > 0) { + let obj: any = data[0] + setTopData(obj) + } else { + setTopData(null) + } + } + // 改变顶部的选择 + const handleChangeTab = (value: number) => { + setSelectTab(value) + actionRef.current?.reload() + } + // 关闭悬浮框 + const handleCloseModal = () => { + handleModalVisible(false) + setCurrentRow(undefined); + } + + useEffect(() => { + handleGetTopData() + }, []) + return ( +
+
+
+
预约点餐订单汇总
+
+ + + + { + console.log('values', values); + let [StartDate, EndDate] = ['', ''] + if (values.searchTime && values.searchTime.length > 0) { + [StartDate, EndDate] = values.searchTime + } + handleGetTopData(StartDate, EndDate) + setSearchParams({ + StartDate: StartDate, + EndDate: EndDate + }) + actionRef.current?.reload() + }} + > + + + + +
+ + +
+ +
+ + +
+ +
+
{ + handleChangeTab(1) + }}> +
实际销售金额(扣除退款)
+
{topData && topData?.TotalActualAmount ? topData?.TotalActualAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalActualAmount && topData?.TotalActualAmount.QOQData && topData?.TotalActualAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.TotalActualAmount && topData?.TotalActualAmount.QOQData && topData?.TotalActualAmount.summaryData ? + + {(((topData?.TotalActualAmount.summaryData - topData?.TotalActualAmount.QOQData) / topData?.TotalActualAmount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(2) + }}> +
成交销售金额
+
{topData && topData?.TotalSuccAmount ? topData?.TotalSuccAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalSuccAmount && topData?.TotalSuccAmount.QOQData && topData?.TotalSuccAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(3) + }}> +
成交订单笔数
+
{topData && topData?.TotalSuccTicket ? topData?.TotalSuccTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalSuccTicket && topData?.TotalSuccTicket.QOQData && topData?.TotalSuccTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(4) + }}> +
成交销售数量
+
{topData && topData?.TotalCount ? topData?.TotalCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalCount && topData?.TotalCount.QOQData && topData?.TotalCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(5) + }}> +
交易失败笔数
+
{topData && topData?.TotalFailureTicket ? topData?.TotalFailureTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalFailureTicket && topData?.TotalFailureTicket.QOQData && topData?.TotalFailureTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(6) + }}> +
退款订单笔数
+
{topData && topData?.TotalRefundTicket ? topData?.TotalRefundTicket.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalRefundTicket && topData?.TotalRefundTicket.QOQData && topData?.TotalRefundTicket.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(7) + }}> +
退款订单金额
+
{topData && topData?.TotalRefundAmount ? topData?.TotalRefundAmount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.TotalRefundAmount && topData?.TotalRefundAmount.QOQData && topData?.TotalRefundAmount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + 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) + '%'} + + : "-" + } +
+
+ {/* +
{ + handleChangeTab(8) + }}> +
用户访问量
+
{topData && topData?.VisitCount ? topData?.VisitCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.VisitCount && topData?.VisitCount.QOQData && topData?.VisitCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.VisitCount && topData?.VisitCount.QOQData && topData?.VisitCount.summaryData ? + // {topData && topData?.VisitCount ? topData?.VisitCount.QOQData : "-"} + + {(((topData?.VisitCount.summaryData - topData?.VisitCount.QOQData) / topData?.VisitCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(9) + }}> +
用户收藏量
+
{topData && topData?.CollectionCount ? topData?.CollectionCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.CollectionCount && topData?.CollectionCount.QOQData && topData?.CollectionCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.CollectionCount && topData?.CollectionCount.QOQData && topData?.CollectionCount.summaryData ? + // {topData && topData?.CollectionCount ? topData?.CollectionCount.QOQData : "-"} + + {(((topData?.CollectionCount.summaryData - topData?.CollectionCount.QOQData) / topData?.CollectionCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(10) + }}> +
商品数量
+
{topData && topData?.CommodityCount ? topData?.CommodityCount.summaryData : "-"}
+
环比增长
+
+ { + topData && topData?.CommodityCount && topData?.CommodityCount.QOQData && topData?.CommodityCount.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.CommodityCount && topData?.CommodityCount.QOQData && topData?.CommodityCount.summaryData ? + // {topData && topData?.CommodityCount ? topData?.CommodityCount.QOQData : "-"} + + {(((topData?.CommodityCount.summaryData - topData?.CommodityCount.QOQData) / topData?.CommodityCount.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
*/} + +
+
+ +
+ + + +
+ + `${record?.SALEBILL_CODE}-${record?.ORDER_DATE}`} + formRef={formRef} + bordered + actionRef={actionRef} + search={false} + options={false} + request={async (params, sorter) => { + const req = { + searchParameter: { + SALEBILL_TYPES: 6000, + OWNERUNIT_ID: currentUser?.OwnerUnitId, + ORDER_DATE_Start: searchParams?.StartDate || "", + ORDER_DATE_End: searchParams?.EndDate || "", + SALEBILL_STATES: selectTab == 1 ? '1010,2000,3000,8000' : + selectTab == 2 ? '1010,2000,3000,8000,8900' : + selectTab == 3 ? '1010,2000,3000,8000,8900' : + selectTab == 4 ? '1010,2000,3000,8000,8900' : + selectTab == 5 ? '9000,9999' : + selectTab == 6 ? '8900' : + selectTab == 7 ? '8900' : + selectTab == 8 ? '' : + selectTab == 9 ? '' : + selectTab == 10 ? '' : '', + SearchKeyValue: params?.searchText || "" + }, + PageIndex: 1, + PageSize: 999999, + SortStr: "ORDER_DATE desc", + } + const data = await handeGetSaleBillWholeList(req) + + handleSetlogSave(`点击查询按钮`) + console.log('datadatadatadatadata', data); + if (data.List && data.List.length > 0) { + let PAY_AMOUNTSUM: number = 0 + let ORDER_AMOUNTSUM: number = 0 + let COUPON_AMOUNTSUM: number = 0 + let TOTAL_COUNTSUM: number = 0 + data.List.forEach((item: any) => { + PAY_AMOUNTSUM += item.PAY_AMOUNT + ORDER_AMOUNTSUM += item.ORDER_AMOUNT + COUPON_AMOUNTSUM += item.COUPON_AMOUNT + TOTAL_COUNTSUM += item.TOTAL_COUNT + }) + + let sumTotal: any = { + PAY_AMOUNT: PAY_AMOUNTSUM.toFixed(2), + ORDER_AMOUNT: ORDER_AMOUNTSUM.toFixed(2), + COUPON_AMOUNT: COUPON_AMOUNTSUM.toFixed(2), + TOTAL_COUNT: TOTAL_COUNTSUM.toFixed(0), + SALEBILL_CODE: "合计", + ORDER_DATE: 1 + } + + let res: any = [{ + ...sumTotal, + children: data.List + }] + + return { data: res, success: true } + // , total: data.TotalCount + } + return { data: [], success: true } + }} + pagination={false} + columns={columns} + expandable={{ + defaultExpandedRowKeys: ["合计-1"], + // defaultExpandAllRows: true, // 默认展开所有行(包括合计行) + // indentSize: 0, // 可选:调整缩进大小 + }} + /> +
+ + +
) } diff --git a/src/pages/travelMember/SupplierClassification/index.tsx b/src/pages/travelMember/SupplierClassification/index.tsx index d5d4e5e..f1a7213 100644 --- a/src/pages/travelMember/SupplierClassification/index.tsx +++ b/src/pages/travelMember/SupplierClassification/index.tsx @@ -25,6 +25,8 @@ import { handlDeleteAUTOTYPE, handlDeleteUSERDEFINEDTYPE, handlGetNestingAUTOTYP import PageTitleBox from '@/components/PageTitleBox'; import { uploadPicture } from '@/services/picture'; import defaultIcon from '../../../assets/brand/defaultIcon.png' +import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { handleSetlogSave } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -97,6 +99,14 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> ellipsis: true, hideInSearch: true, hideInDescriptions: true, + render: (_, record) => { + return record?.AUTOTYPE_NAME ? { + setCurrentRow({ ...record }); + handleModalVisible(true); + }}> + {record?.AUTOTYPE_NAME} + : "-" + } }, { dataIndex: 'AUTOTYPE_CODE', @@ -146,37 +156,37 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "" } }, - { - dataIndex: 'option', - title: '操作', - width: 100, - ellipsis: true, - valueType: 'option', - align: 'center', - hideInSearch: true, - render: (_, record) => { - return ( - - { - setCurrentRow({ ...record }); - handleModalVisible(true); - }} - > - 编辑 - - { - handelDelete(record.AUTOTYPE_ID); - }} - > - 删除 - - - ); - }, - }, + // { + // dataIndex: 'option', + // title: '操作', + // width: 100, + // ellipsis: true, + // valueType: 'option', + // align: 'center', + // hideInSearch: true, + // render: (_, record) => { + // return ( + // + // { + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // handelDelete(record.AUTOTYPE_ID); + // }} + // > + // 删除 + // + // + // ); + // }, + // }, ]; // 预览上传后的图片 @@ -199,6 +209,12 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> } else { message.success('删除成功!'); actionRef.current?.reload() + handleSetlogSave(`删除【${currentRow?.AUTOTYPE_NAME}】`) + + handleConfirmLoading(false) + handleModalVisible(false) + setFormPRESALE_TYPE(false) + setFileList([]) } } @@ -234,6 +250,7 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> handleConfirmLoading(false) if (data.Result_Code === 100) { message.success("新增成功!") + handleSetlogSave(`${currentRow?.AUTOTYPE_ID ? '同步' : '新增'}【${data.Result_Data?.AUTOTYPE_NAME}】`) setCurrentRow(undefined) formRef?.current?.resetFields() handleModalVisible(false) @@ -275,6 +292,7 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> const data = await handlGetNestingAUTOTYPEList(req); console.log('datadatadatadatadata', data); if (data && data.length > 0) { + handleSetlogSave(`点击查询按钮`) setTypeTreeData(data) return { data: data, success: true, total: data.length } } @@ -317,6 +335,7 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> } destroyOnClose={true} width={900} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} visible={modalVisible} confirmLoading={confirmLoading} afterClose={() => { @@ -357,11 +380,30 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> formRef?.current?.submit() }) }} + footer={ { + await handelDelete(currentRow?.AUTOTYPE_ID) + }} + handleCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + setFormPRESALE_TYPE(false) + setFileList([]) + }} + handleOK={() => { + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + />} modalRender={(modal) => { return onDraggaleStart(event, uiData)} + handle={'.supplierClassBox'} >
{modal}
@@ -372,6 +414,7 @@ const SupplierClassification: React.FC<{ currentUser: CurrentUser | undefined }> formRef={formRef} autoFocusFirstInput submitter={false} + labelCol={{ style: { width: 80 } }} preserve={false} initialValues={currentRow ? currentRow : { OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), diff --git a/src/pages/travelMember/SupplierMerchantManage/index.tsx b/src/pages/travelMember/SupplierMerchantManage/index.tsx index fcca2ab..6143b14 100644 --- a/src/pages/travelMember/SupplierMerchantManage/index.tsx +++ b/src/pages/travelMember/SupplierMerchantManage/index.tsx @@ -13,6 +13,7 @@ import React from "react"; import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form"; import moment from 'moment' import ModalFooter from "../scenicSpotConfig/component/modalFooter"; +import { handleSetlogSave } from "@/utils/format"; const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { const { currentUser } = props @@ -208,6 +209,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); } else { message.success('删除成功!'); + handleSetlogSave(`删除【${currentRow?.MERCHANTS_NAME}】`) handleConfirmLoading(false) handleModalVisible(false) actionRef.current?.reload() @@ -241,6 +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}】`) message.success("新增成功!") setCurrentRow(undefined) formRef?.current?.resetFields() @@ -295,6 +298,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> setCurrentSearchText(params?.searchText || "") const data = await handeGetMERCHANTSList(req); console.log('datadatadatadatadata', data); + handleSetlogSave(`点击查询按钮`) if (data.List && data.List.length > 0) { return { data: data.List, success: true, total: data.TotalCount } } @@ -342,7 +346,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> onFocus={() => { }} onBlur={() => { }} > - {currentRow ? '更新商品管理' : '新建商品管理'} + {currentRow ? '更新商户信息' : '新建商户信息'}
} destroyOnClose={true} diff --git a/src/pages/travelMember/TradingLedger/index.tsx b/src/pages/travelMember/TradingLedger/index.tsx index aff15a5..b28c00f 100644 --- a/src/pages/travelMember/TradingLedger/index.tsx +++ b/src/pages/travelMember/TradingLedger/index.tsx @@ -17,6 +17,7 @@ import PageTitleBox from "@/components/PageTitleBox"; import { handeGetSupplierSaleBillList } from "../service"; import moment from 'moment' import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal"; +import { handleSetlogSave } from "@/utils/format"; const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { const { currentUser } = props @@ -87,6 +88,8 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { { setCurrentRow(record); handleModalVisible(true) + handleSetlogSave(`查询收货人【${record?.ORDER_PERSON}】编码【${record.SALEBILL_CODE}】订单`) + }}>{record?.SALEBILL_CODE} : "-" } }, @@ -319,6 +322,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { console.log('reqreqreqreq', req); const data = await handeGetSupplierSaleBillList(req) + handleSetlogSave(`点击查询按钮`) console.log('datadatadatadatadata', data); setReqDetailList(data) @@ -347,6 +351,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => { setTimeout(() => { setShowExportTable(true) setTimeout(() => { + handleSetlogSave('导出Excel') exportTable(e) }, 100) }, 100) diff --git a/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx b/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx index a5b107f..3d663be 100644 --- a/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx +++ b/src/pages/travelMember/memberInfor/component/LicensePlateManage.tsx @@ -46,6 +46,14 @@ const LicensePlateManage = ({ parentDetail }: DetailProps) => { hideInSearch: true, align: 'center', ellipsis: true, + }, + { + title: "会员证件号", + width: 150, + dataIndex: "CERTIFICATE_NUMBER", + hideInSearch: true, + align: 'center', + ellipsis: true, } ] @@ -73,8 +81,8 @@ const LicensePlateManage = ({ parentDetail }: DetailProps) => { } const data = await handeGetMemberShipLicenseList(req) console.log('datadatadata', data); - if (data && data.length > 0) { - return { data, success: true } + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } } return { data: [], success: true } }} diff --git a/src/pages/travelMember/memberInfor/component/memberDetail.tsx b/src/pages/travelMember/memberInfor/component/memberDetail.tsx index 91c3ae7..8948f52 100644 --- a/src/pages/travelMember/memberInfor/component/memberDetail.tsx +++ b/src/pages/travelMember/memberInfor/component/memberDetail.tsx @@ -309,6 +309,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU modalRef.current?.resetFields(); // setCurrentRow(undefined); }} + maskClosable={true} bodyStyle={{ maxHeight: '850px', // 你可以根据需要调整高度 overflowY: 'auto', @@ -396,7 +397,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU { setSelectTab(1) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的详细信息`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】详细信息`) }}>详情信息 { setSelectTab(2) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的消费记录`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】消费记录`) }}>消费记录 { setSelectTab(3) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的成长值记录`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】成长值记录`) }}>成长值记录 { setSelectTab(4) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的积分记录`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】积分记录`) }}>积分记录 { setSelectTab(5) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的地址管理`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】地址管理`) }}>地址管理 { setSelectTab(6) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的活动轨迹`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】活动轨迹`) }}>活动轨迹 { setSelectTab(7) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的车牌管理`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】车牌管理`) }}>车牌管理 { setSelectTab(8) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的优惠券管理`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】优惠券管理`) }}>优惠券管理 { setSelectTab(9) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的收藏商品`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】收藏商品`) }}>收藏商品 { setSelectTab(10) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的商家评价`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】商家评价`) }}>商家评价 { setSelectTab(11) - handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的商城评价`) + handleSetlogSave(`查看【${currentRow?.MEMBERSHIP_NAME}】商城评价`) }}>商城评价
diff --git a/src/pages/travelMember/memberInfor/component/style.less b/src/pages/travelMember/memberInfor/component/style.less index 702c1fb..50bdc7f 100644 --- a/src/pages/travelMember/memberInfor/component/style.less +++ b/src/pages/travelMember/memberInfor/component/style.less @@ -1,4 +1,7 @@ .memberInfoDetailModal { + width: 100%; + height: 100%; + .react-draggable { .ant-modal-content { border-radius: 16px; diff --git a/src/pages/travelMember/memberInfor/index.tsx b/src/pages/travelMember/memberInfor/index.tsx index 1a38e75..4ce686e 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 { handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service"; +import { handeGetMemberShipLicenseList, handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetMEMBERSHIPList, handleGetPOINTRECORDList } from "../service"; import session from "@/utils/session"; import moment from 'moment' import Draggable from "react-draggable"; @@ -107,7 +107,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { return { setCurrentRow(record) setShowDetailDrawer(true) - handleSetlogSave(`查看了${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】的会员信息`) + handleSetlogSave(`查看${record?.MEMBERSHIP_NAME}【${record?.MEMBERSHIP_ID}】会员信息`) }}> {record?.MEMBERSHIP_NAME || ""} @@ -158,9 +158,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { align: 'center', valueType: 'select', valueEnum: { - 1: '男', - 2: '女', - 0: '-' + 0: '男', + 1: '女', } }, { @@ -222,7 +221,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { { title: "车牌号", width: 150, - dataIndex: "LICENSEPLATE_NUMBER", + dataIndex: "PLATE_NUMBER", hideInSearch: true, ellipsis: true, align: 'center', @@ -677,7 +676,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE }, keyWord: { - Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS,LICENSEPLATE_NUMBER", + // PLATE_NUMBER + Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE,CERTIFICATE_NUMBER,MEMBERSHIP_CARD,MEMBERSHIP_ADDRESS", value: params?.MEMBERSHIP_NAME || "" }, PageIndex: params.current || 1, @@ -689,6 +689,8 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { handleSetlogSave(`查看了会员账户管理列表`) const data = await handleGetMEMBERSHIPList(req) + // 可以拿到车牌号的用户信息列表 + // const data = await handeGetMemberShipLicenseList(req) 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/scenicSpotConfig/index.tsx b/src/pages/travelMember/scenicSpotConfig/index.tsx index 4d03368..e042086 100644 --- a/src/pages/travelMember/scenicSpotConfig/index.tsx +++ b/src/pages/travelMember/scenicSpotConfig/index.tsx @@ -292,10 +292,9 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr if (result.Result_Code !== 100) { message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); - handleSetlogSave(`删除【${currentRow?.SCENICAREA_NAME}】信息失败`) } else { message.success('删除成功!'); - handleSetlogSave(`删除【${currentRow?.SCENICAREA_NAME}】信息成功`) + handleSetlogSave(`删除【${currentRow?.SCENICAREA_NAME}】`) handleConfirmLoading(false) handleModalVisible(false) setFileList([]) diff --git a/src/pages/travelMember/serverpartInfo/index.tsx b/src/pages/travelMember/serverpartInfo/index.tsx index 3067e0d..4d8e1f1 100644 --- a/src/pages/travelMember/serverpartInfo/index.tsx +++ b/src/pages/travelMember/serverpartInfo/index.tsx @@ -141,7 +141,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => { console.log('value', value); let serverpartObj = session.get('serverpartObj') - handleSetlogSave(`${serverpartObj && value && serverpartObj[value] ? `查看了${serverpartObj[value]}基础信息` : ""}`) + handleSetlogSave(`${serverpartObj && value && serverpartObj[value] ? `查看${serverpartObj[value]}基础信息` : ""}`) // 只有修改服务区的时候 触发刷新 setShowRightForm(false) @@ -309,7 +309,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => { const data = await handleSynchroSERVERPART(req) let serverpartObj = session.get('serverpartObj') - handleSetlogSave(`${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `保存${serverpartObj[currenMenu]}的基础信息` : ""}`) + handleSetlogSave(`${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `更新${serverpartObj[currenMenu]}的基础信息` : ""}`) if (res.carryingCapacity) { let carryReq: any = {} @@ -782,7 +782,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => { let serverpartObj = session.get('serverpartObj') if (res.Result_Code === 100) { message.success("上传成功!") - handleSetlogSave(`更新【${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `保存${serverpartObj[currenMenu]}的基础信息` : ""}${selectActiveKey === '1' ? '服务区图片' : selectActiveKey === '2' ? '母婴室图片' : selectActiveKey === '3' ? '司机之家图片' : selectActiveKey === '4' ? '住宿客房图片' : selectActiveKey === '5' ? '便利店图片' : ''}】成功`) + handleSetlogSave(`更新【${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `${serverpartObj[currenMenu]}基础信息` : ""}${selectActiveKey === '1' ? '服务区图片' : selectActiveKey === '2' ? '母婴室图片' : selectActiveKey === '3' ? '司机之家图片' : selectActiveKey === '4' ? '住宿客房图片' : selectActiveKey === '5' ? '便利店图片' : ''}】`) setConfirmLoading(false) setShowType(0) setShowUploadImgModal(false); @@ -794,7 +794,6 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => { }, 1000) } else { message.error(res.Result_Desc) - handleSetlogSave(`更新【${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `保存${serverpartObj[currenMenu]}的基础信息` : ""}${selectActiveKey === '1' ? '服务区图片' : selectActiveKey === '2' ? '母婴室图片' : selectActiveKey === '3' ? '司机之家图片' : selectActiveKey === '4' ? '住宿客房图片' : selectActiveKey === '5' ? '便利店图片' : ''}】失败`) } } else { setConfirmLoading(false) diff --git a/src/pages/travelMember/service.ts b/src/pages/travelMember/service.ts index 112a780..494c9c9 100644 --- a/src/pages/travelMember/service.ts +++ b/src/pages/travelMember/service.ts @@ -536,6 +536,17 @@ export async function handeGetCOMMENTList(params: any) { return data.Result_Data } +// 回复评论表 +export async function handeSynchroCOMMENT(params: any) { + const data = await requestEncryption(`/Comment/SynchroCOMMENT`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data.Result_Data +} // 服务区的图片 export async function handeGetPictureList(params: any) { @@ -834,7 +845,7 @@ export async function handeGetMemberShipLicenseList(params: any) { if (data.Result_Code !== 100) { return data } - return data.Result_Data.List + return data.Result_Data } // 获取会员优惠券表列表 @@ -861,3 +872,15 @@ export async function handeGetCommodityCollectionList(params: any) { return data.Result_Data.List } + +// 获取交易订单汇总报表 +export async function handeGetGetOnlineOrderSummary(params: any) { + const data = await requestEncryption(`/OnlineOrder/GetOnlineOrderSummary`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data.Result_Data.List +}