From 010680be5a4190ec7ef9bfce4d6733847eb2fb1c Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Wed, 16 Jul 2025 20:46:34 +0800 Subject: [PATCH] update --- config/routes.ts | 25 +- src/assets/detail/addIcon.png | Bin 0 -> 268 bytes src/assets/detail/otherBgIcon.png | Bin 0 -> 2589 bytes src/assets/detail/reduceIcon.png | Bin 0 -> 249 bytes src/assets/detail/staticSumTotalBg.png | Bin 0 -> 17371 bytes .../MerchantInformation/index.tsx | 44 +- .../NewProductApproval/index.tsx | 21 + .../ProductChangeInfoApproval/index.tsx | 81 +- .../ProductChangePriceApproval/index.tsx | 558 +++++++++++++- .../productControl/shopCommodity/index.tsx | 4 +- .../travelMember/BookingMealOrder/index.tsx | 11 +- .../travelMember/BuriedPointConfig/index.tsx | 481 ++++++++++++ .../ConsumptionRecordSearch/index.tsx | 18 +- .../GrowthValueRecordSearch/index.tsx | 6 + .../components/growthConfig.tsx | 14 + .../GrowthValueRuleConfig/index.tsx | 20 +- .../MallEvaluationManage/index.tsx | 34 +- .../travelMember/MallOrderManage/index.tsx | 12 + .../travelMember/MemberAddress/index.tsx | 10 +- .../MemberSummaryStatistics.less | 253 ++++++ .../MemberSummaryStatistics/index.tsx | 551 +++++++++++++ .../travelMember/MemberTagManage/index.tsx | 484 +++++++++++- .../MembershipLevelStatistics.less | 258 +++++++ .../MembershipLevelStatistics/index.tsx | 702 +++++++++++++++++ .../MembershipTypeStatistics.less | 258 +++++++ .../MembershipTypeStatistics/index.tsx | 728 ++++++++++++++++++ .../MerchantEvaluationManage/index.tsx | 18 + .../OrderAfterSalesManage/index.tsx | 13 + .../travelMember/OrderProductManage/index.tsx | 49 +- .../PointsRuleConfig/PointConfig.tsx | 15 + .../travelMember/PointsRuleConfig/index.tsx | 22 +- .../RegistrationRetentionAnalysis/index.tsx | 59 +- .../ShoppingMallProductSearch/index.tsx | 12 + .../SupplierMerchantManage/index.tsx | 4 +- src/pages/travelMember/memberInfor/index.tsx | 22 +- .../travelMember/scenicSpotConfig/index.tsx | 12 + src/pages/travelMember/service.ts | 101 ++- src/utils/format.ts | 19 + 38 files changed, 4800 insertions(+), 119 deletions(-) create mode 100644 src/assets/detail/addIcon.png create mode 100644 src/assets/detail/otherBgIcon.png create mode 100644 src/assets/detail/reduceIcon.png create mode 100644 src/assets/detail/staticSumTotalBg.png create mode 100644 src/pages/travelMember/BuriedPointConfig/index.tsx create mode 100644 src/pages/travelMember/MemberSummaryStatistics/MemberSummaryStatistics.less create mode 100644 src/pages/travelMember/MemberSummaryStatistics/index.tsx create mode 100644 src/pages/travelMember/MembershipLevelStatistics/MembershipLevelStatistics.less create mode 100644 src/pages/travelMember/MembershipLevelStatistics/index.tsx create mode 100644 src/pages/travelMember/MembershipTypeStatistics/MembershipTypeStatistics.less create mode 100644 src/pages/travelMember/MembershipTypeStatistics/index.tsx diff --git a/config/routes.ts b/config/routes.ts index d8e23d8..7400967 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -999,7 +999,30 @@ export default [ name: 'TradingLedger', component: './travelMember/TradingLedger/index' }, - + // 埋点配置 + { + path: 'BuriedPointConfig', + name: 'BuriedPointConfig', + component: './travelMember/BuriedPointConfig/index' + }, + // 会员类型统计 + { + path: 'MembershipTypeStatistics', + name: 'MembershipTypeStatistics', + component: './travelMember/MembershipTypeStatistics/index' + }, + // 会员等级统计 + { + path: 'MembershipLevelStatistics', + name: 'MembershipLevelStatistics', + component: './travelMember/MembershipLevelStatistics/index' + }, + // 会员汇总统计 + { + path: 'MemberSummaryStatistics', + name: 'MemberSummaryStatistics', + component: './travelMember/MemberSummaryStatistics/index' + }, ] }, { diff --git a/src/assets/detail/addIcon.png b/src/assets/detail/addIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..48d76c9c18055157e58826945c1ee3aa3103299a GIT binary patch literal 268 zcmV+n0rUQeP)Px##z{m$R47wb&#_8^VHC#k|MP03@Ful1G$}NMe%cn)1=Ljt=B#Vb6?g$PXV6vD z1td7yM^n(&;1bk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SKd&K{F|lZ#XEf;^f4W>B$zx|##1bY%9uRpBYnRDZ?o(2vvas@Hfvy(YD-&PSr#v zs-rsS!Ah_5KAmGi;{-oAnSrL;?tIw-3H7Q*w_P%Bu)a;WlJ%lzJJ-Pmz&1BS9Dd<np!IBo5f663ZO zFT^sBbZub-jI6}N*$_%u*x}=8>&RIm(E=F)e>pJn|pM zfXIDtl;GqSD3J`&zZ8Xsz}q#YlcDRt@lP_y=*)V-ZMT=VE?RF&z`PO%E~i~7V6?Dd z0;!bkL_f>n^NOJ8>vUYYs^ijCyVXv>Hr?r+u!AxsU_NqS%svw>i)DnySy+Cvr61`c3!8{S2iJ|;`wsz$Y9w#{;tK;I8!UjD8ht^dJ%KhTY^^qiC6FFyD0LaH}T%))KMv81#pT)t!YV4_7 zi!GkTj-gFvVYCok(){;CdUVZzmqSt=n=4W~d)ahG$^M9GC3xwKov}ybx@BGd}O2GWXuK_UyKM4o%3;*XWQQ|SNCHM)f_if02JM&9 zhj`NVk~}z=hqBpoEvlMQ<+ELHo3X% zk#uTdiG)7JbJ0Gj+@twE?+gQ@GKdnrQum8)faNI+ni=d!9sn;#(59`$qa#uLSe}pX z*33gCUtSsVVOi7mQIm~CQoknB6EF%IHxwA9vvjHIG!G+1|8ryn&wbDbH7r68`(V^6 zcy@IV4Y@nWaxe%Or45FIhI=VsRDV)pIb*=+4v^jmGa0ztj~6I|F8%>F0izP6xHOvV z?VmcA#AE;JMy6gttWJi|DC7Os>XKcH;Ohk20KyVBFALz;%L8tgnKAjB4j5_r(5_B&c?HD75+2@AgZmn0zD4bn z@J$KK>E>^Q+#E2M)aQWB0dq;frTCnMxdirq%voP_k@AE900000NkvXXu0mjfH|*oY literal 0 HcmV?d00001 diff --git a/src/assets/detail/reduceIcon.png b/src/assets/detail/reduceIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..26bbf581b3c65527e85e8525fcd5425e1ff4002e GIT binary patch literal 249 zcmVPx#vq?ljR47wb&QA&f0Tjpa?;}<-Hp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nJsX9YObR3 zXIa0~|6|}IV(qqH;b(#!vvyaZJjV7taTLC1SCM`+UXMQx-z%E2uoFy1E*;`Q^@1H% zr4tT}9SoI?wd-%tv-9}56v3!5VqlnpS=L~jWc;B=ywT1UdHLySBObeg%Fj=PT zX3@w-m%wM4ZcP@A##Rw(MHrRJe!|D8s#1-IbMu)gm_Hk1{6+Zf92M|BL3|&~th&g^ zCsHqp47%;wads8ySBw2B3BDX=YcTIFZQ#R>{&^!?eID=oVvvD*2 eYJ4&N^8W)Jnc_<6lsqv20000 = // 定义列表字段内容 const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入商户名称" + } + }, { dataIndex: 'SELLER_NAME', title: '商家名称', @@ -759,7 +767,8 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = CASHPAY: obj.TotalRevenue.Revenue_Amount || "0", PERCAPITA: obj.TotalRevenue.Ticket_Count ? (obj.TotalRevenue.Revenue_Amount / obj.TotalRevenue.Ticket_Count).toFixed(2) : "0", }) - + } else { + message.error('暂无数据!') } } @@ -913,6 +922,11 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = }, PageIndex: params.current, PageSize: params.pageSize, + keyWord: { + Key: "SELLER_NAME", + Value: params?.searchText || "" + }, + } console.log('reqreqreqreq', req); const data = await handleGetMEMBERADDRESSList(req); @@ -997,20 +1011,20 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> = onOk={async () => { // 提交框内的数据 handleModalOk() }} - // footer={ { - // await handelDelete(currentRow?.SELLER_ID) - // }} - // handleCancel={() => { - // setShowAddModal(false) - // setSelectRowKeys(null) - // setSelectRowDetail(null) - // setSelectAssociationServerpart(null) - // }} - // handleOK={() => { - // handleModalOk() - // }} />} + // footer={ { + // await handelDelete(currentRow?.SELLER_ID) + // }} + // handleCancel={() => { + // setShowAddModal(false) + // setSelectRowKeys(null) + // setSelectRowDetail(null) + // setSelectAssociationServerpart(null) + // }} + // handleOK={() => { + // handleModalOk() + // }} />} >
diff --git a/src/pages/reports/productControl/NewProductApproval/index.tsx b/src/pages/reports/productControl/NewProductApproval/index.tsx index ee5bce9..79632db 100644 --- a/src/pages/reports/productControl/NewProductApproval/index.tsx +++ b/src/pages/reports/productControl/NewProductApproval/index.tsx @@ -883,6 +883,14 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props return list }} disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)} + fieldProps={{ + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} + /> 1000 && ApprovalType !== 0 ? "none" : "" }}> @@ -1238,6 +1246,14 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props } console.log('newList', newList); + // 如果进入到了添加商品 里面选了服务区 会 带给外面的表单 + if (res.SERVERPART_ID) { + modalFormRef.current?.setFieldsValue({ + ServerpartId: res.SERVERPART_ID + }) + + + } setShopData(newList) setShowAddShopModal(false) @@ -1330,6 +1346,11 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props setCommodityList([]) setCustomClassList([]) } + }, + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); } }} /> diff --git a/src/pages/reports/productControl/ProductChangeInfoApproval/index.tsx b/src/pages/reports/productControl/ProductChangeInfoApproval/index.tsx index b8515bb..50e2fb0 100644 --- a/src/pages/reports/productControl/ProductChangeInfoApproval/index.tsx +++ b/src/pages/reports/productControl/ProductChangeInfoApproval/index.tsx @@ -303,6 +303,18 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props dataIndex: "COMMODITY_NAME", ellipsis: true, align: 'center', + render: (_, record) => { + return record?.COMMODITY_NAME ? { + let obj: any = {} + if (shopData && shopData.length > 0) { + obj = shopData.filter((item: any) => item.COMMODITY_ID === record?.COMMODITY_ID)[0] + } + setEditSelectRow(obj) + setEditShopModal(true) + }}> + {record?.COMMODITY_NAME} + : "-" + } }, { title: "条码", @@ -416,6 +428,14 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props // 选择商品的表格结构 const selectShopColumns: any = [ + { + title: "商品查询", + dataIndex: "searchText", + hideInTable: true, + fieldProp: { + fieldholder: "请输入商品名称" + } + }, { title:
序号
, width: 70, @@ -428,10 +448,10 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props width: 150, ellipsis: true, align: 'center', - dataIndex: 'SERVERPART_NAME', + dataIndex: 'SERVERPART_ID', hideInSearch: true, valueType: "select", - valueEnum: ServerpartIdsList + valueEnum: ServerpartIdsList, }, { title:
商品业态
, @@ -439,11 +459,15 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props ellipsis: true, dataIndex: 'BUSINESSTYPE', align: 'center', - hideInSearch: true, valueType: 'select', request: async () => { return await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE', sessionName: 'SHOPTRADE', notformate: true }) + }, + fieldProps: { + showSearch: true, + filterOption: (input, option) => + (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), } }, { @@ -500,10 +524,10 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props width: 100, ellipsis: true, dataIndex: 'COMMODITY_STATE', - hideInSearch: true, align: 'center', valueType: 'select', valueEnum: { 0: { text: '无效', status: 'error' }, 1: { text: '有效', status: 'success' }, 2: { text: '不可选', status: 'default' } }, + initialValue: '1', }, { title:
审核时间
, @@ -1020,6 +1044,13 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props return list }} disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)} + fieldProps={{ + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} /> 1000 && ApprovalType !== 0 ? "none" : "" }}> @@ -1349,10 +1380,11 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props }} > { let formRes = modalFormRef.current?.getFieldsValue() @@ -1395,6 +1427,45 @@ const ProductChangeInfoApproval: React.FC<{ currentUser: CurrentUser }> = (props wrapClassName={'shopModal'} destroyOnClose title={'编辑商品'} + footer={ + currentRow?.BusinessProcess_State > 1000 ? '' : +
+ {/* 审批过程中只能看 所以把底部隐藏 这样即使修改也没用 */} +
+
+ + + +
+
+ } onOk={() => { modalShopFormRef.current?.validateFields().then(async (res: any) => { let oldData: any = shopData && shopData.length > 0 ? JSON.parse(JSON.stringify(shopData)) : [] diff --git a/src/pages/reports/productControl/ProductChangePriceApproval/index.tsx b/src/pages/reports/productControl/ProductChangePriceApproval/index.tsx index 1c7ddd3..9636c9d 100644 --- a/src/pages/reports/productControl/ProductChangePriceApproval/index.tsx +++ b/src/pages/reports/productControl/ProductChangePriceApproval/index.tsx @@ -64,6 +64,31 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop const [InitiateApplication, setInitiateApplication] = useState(false) // 显示类型 const [showDetailType, setShowDetailType] = useState() + // 商品业态 的枚举 + const [BUSINESSTYPESHOPTRADE, setBUSINESSTYPESHOPTRADE] = useState() + // 选择的商品数据 + const [currentShopRow, setCurrentShopRow] = useState() + // 显示编辑商品的悬浮框 + const [editShopModal, setShowEditShopModal] = useState(false); + // 商品业态的搜索框内容 + const [commodityList, setCommodityList] = useState([]) + const [selectSERVERPARTID, setSelectSERVERPARTID] = useState() + const [selectBUSINESSTYPE, setSelectBUSINESSTYPE] = useState() + + const [treeView, setTreeView] = useState() + const [customClassList, setCustomClassList] = useState() + + // 加载服务区树 + const { loading: treeLoading, data: treeViews } = useRequest(async () => { + const req = { + PROVINCE_CODE: currentUser?.ProvinceCode, + COMMODITYTYPE_VALID: 1, + ShowCode: true + } + const data = await handleGetNestingCOMMODITYTYPETree(req) + setTreeView(data) + return data + }) const { loading: CommodityLoading, data: CommodityData } = useRequest(async () => { const data = await getFieldEnumTree({ FieldExplainField: 'CommodityTypeIds' }) @@ -279,6 +304,14 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop dataIndex: "COMMODITY_NAME", ellipsis: true, align: 'center', + render: (_, record) => { + return record?.COMMODITY_NAME ? { + setCurrentShopRow(record) + setShowEditShopModal(true) + }}> + {record?.COMMODITY_NAME} + : "-" + } }, { title: "条码", @@ -389,9 +422,16 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop }, }, ] - // 选择商品的表格结构 const selectShopColumns: any = [ + { + title: "商品查询", + dataIndex: "searchText", + hideInTable: true, + fieldProp: { + fieldholder: "请输入商品名称" + } + }, { title:
序号
, width: 70, @@ -415,11 +455,15 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop ellipsis: true, dataIndex: 'BUSINESSTYPE', align: 'center', - hideInSearch: true, valueType: 'select', request: async () => { - return await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE', sessionName: 'SHOPTRADE', notformate: true }) - + const BUSINESSTYPERes = await getFieldEnum({ FieldExplainField: 'BUSINESSTYPE', sessionName: 'SHOPTRADE', notformate: true }) + return BUSINESSTYPERes + }, + fieldProps: { + showSearch: true, + filterOption: (input, option) => + (option?.label ?? '').toLowerCase().includes(input.toLowerCase()), } }, { @@ -438,6 +482,14 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop align: 'left', dataIndex: 'COMMODITY_NAME', hideInSearch: true, + // render: (_, record) => { + // return record?.COMMODITY_NAME ? { + // setCurrentShopRow(record) + // setShowEditShopModal(true) + // }}> + // {record?.COMMODITY_NAME} + // : "-" + // } }, { title:
商品条码
, @@ -476,10 +528,10 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop width: 100, ellipsis: true, dataIndex: 'COMMODITY_STATE', - hideInSearch: true, align: 'center', valueType: 'select', valueEnum: { 0: { text: '无效', status: 'error' }, 1: { text: '有效', status: 'success' }, 2: { text: '不可选', status: 'default' } }, + initialValue: '1', }, { title:
审核时间
, @@ -522,6 +574,40 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop }, []) + // 拿到对应的商品业态 + const handleGetCommodity = async (id: any) => { + const req: any = { + ProvinceCode: currentUser?.ProvinceCode, + ServerpartId: id + } + const data = await handleGetServerpartShopTrade(req) + console.log('data', data) + setCommodityList(data) + } + + // 请求自定义类的选择列表 + const handleGetCustomClassList = async (id: any) => { + const req: any = { + SearchParameter: { + USERDEFINEDTYPE_STATE: 1, + SERVERPART_ID: id, + BUSINESSTYPE: selectBUSINESSTYPE + }, + PageIndex: 1, + PageSize: 999999, + pageSize: 999999, + } + const data = await handleGetUSERDEFINEDTYPEList(req) + if (data && data.length > 0) { + const list: any = [] + data.forEach((item: any) => { + list.push({ label: item.USERDEFINEDTYPE_NAME, value: item.USERDEFINEDTYPE_ID }) + }) + setCustomClassList(list) + } + console.log('data', data) + } + return (
@@ -852,15 +938,12 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop } }} > - { - console.log('currentRowcurrentRowdsada', currentRow); - if (currentRow?.BusinessApproval_ID) { const req: any = { BUSINESSAPPROVALId: currentRow?.BusinessApproval_ID, @@ -1008,6 +1091,13 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop return list }} disabled={currentRow?.BusinessProcess_State > 1000 || (currentRow?.BusinessApproval_ID && currentRow?.ApproveStaff_ID !== currentUser?.ID)} + fieldProps={{ + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} /> 1000 && ApprovalType !== 0 ? "none" : "" }}> @@ -1349,22 +1439,25 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop }} > { + request={async (params) => { let formRes = modalFormRef.current?.getFieldsValue() const req: any = { SearchType: 3, + ShopTrade: params?.BUSINESSTYPE || "", ProvinceCode: currentUser?.ProvinceCode, // CommodityTypeId: currenMenu, - CommodityState: 1, + CommodityState: params?.COMMODITY_STATE || "", ServerpartID: formRes?.ServerpartId, PageIndex: 1, PageSize: 999999, - SortStr: "OPERATE_DATE desc" + SortStr: "OPERATE_DATE desc", + SearchKey: "COMMODITY_NAME", + SearchValue: params?.searchText || "" // PageSize: 20 } const data = await handleGetCommodityList(req) @@ -1388,6 +1481,447 @@ const ProductChangePriceApproval: React.FC<{ currentUser: CurrentUser }> = (prop }} /> + + + {/* 新增商品的悬浮框 */} + { + modalShopFormRef.current?.validateFields().then(async (res: any) => { + setShowEditShopModal(false) + setCommodityList([]) + setCurrentShopRow(undefined) + }) + }} + footer={false} + onCancel={() => { + setShowEditShopModal(false) + setCommodityList([]) + setCurrentShopRow(undefined) + }} + > + + { + // !currentShopRow?.COMMODITY_ID && + if (currentShopRow?.SERVERPART_ID) { + await handleGetCommodity(currentShopRow?.SERVERPART_ID) + } + return { + ...currentShopRow, + BUSINESSTYPE: currentShopRow?.BUSINESSTYPE.toString(), + COMMODITY_GRADE: Number(currentShopRow?.COMMODITY_GRADE), + ADDTIME: moment(currentShopRow?.ADDTIME).format('YYYY-MM-DD HH:mm:ss') + } + }} + disabled={currentRow?.BusinessProcess_State === 9000} + > +
商品基本信息
+ + + + + + + + + + { + const data = await getServerpartTree(currentUser?.ProvinceCode, currentUser?.CityAuthority, true, true, true) + const list: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + if (item.children && item.children.length > 0) { + item.children.forEach((subItem: any) => { + list.push({ label: subItem.label, value: subItem.value }) + }) + } + }) + data.forEach((item: any) => { + list.push({ label: item.label, value: item.value }) + }) + } + return list + }} + rules={[ + { + required: true, + message: '请选择服务区', + }, + ]} + fieldProps={{ + onChange: async (e: any) => { + console.log('e', e) + if (e) { + setSelectSERVERPARTID(e) + await handleGetCommodity(e) + if (selectBUSINESSTYPE) { + await handleGetCustomClassList(e) + } + } else { + setSelectSERVERPARTID(undefined) + setCommodityList([]) + setCustomClassList([]) + } + }, + showSearch: true, // 启用搜索框 + filterOption: (inputValue: any, option: any) => { + // 通过 label 搜索 + return option.label.toLowerCase().includes(inputValue.toLowerCase()); + } + }} + /> + + + { + if (e) { + setSelectBUSINESSTYPE(e) + if (selectSERVERPARTID) { + await handleGetCustomClassList(e) + } + } else { + setSelectBUSINESSTYPE(undefined) + } + } + }} + /> + + + { + return treeView + }} + fieldProps={{ + treeDefaultExpandAll: true + }} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
商品状态信息
+ + + + + + + + + + + + + + + + + + + + + + +
商品价格信息
+ + + + + + + + + + + + + + + + + + + + + +
商品进销信息
+ + + + + + + + + + + +
+
) } diff --git a/src/pages/reports/productControl/shopCommodity/index.tsx b/src/pages/reports/productControl/shopCommodity/index.tsx index 7756b63..caa5e76 100644 --- a/src/pages/reports/productControl/shopCommodity/index.tsx +++ b/src/pages/reports/productControl/shopCommodity/index.tsx @@ -306,9 +306,9 @@ const shopCommodity: React.FC<{ currentUser: CurrentUser }> = (props) => { const req: any = { ...params, SearchType: 4, - ProvinceCode: currentUser?.USER_PROVINCE, + ProvinceCode: currentUser?.ProvinceCode, ServerpartShopID: selectedId, - CommodityState: 1, + CommodityState: params?.COMMODITY_STATE, PageIndex: 1, PageSize: 999999, pageSize: 999999 diff --git a/src/pages/travelMember/BookingMealOrder/index.tsx b/src/pages/travelMember/BookingMealOrder/index.tsx index 58afea2..3bd669f 100644 --- a/src/pages/travelMember/BookingMealOrder/index.tsx +++ b/src/pages/travelMember/BookingMealOrder/index.tsx @@ -55,6 +55,11 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr }; const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + }, { title: '查询时间', dataIndex: 'search_date', @@ -85,11 +90,10 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr title: '订单编号', align: 'center', hideInSearch: true, - width: 200, + width: 250, ellipsis: true, render: (_, record) => { return record?.SALEBILL_CODE ? { - console.log('recordrecordrecordrecord', record); setCurrentRow(record); handleModalVisible(true) }}>{record?.SALEBILL_CODE} : "-" @@ -267,7 +271,8 @@ const BookingMealOrder: React.FC<{ currentUser: CurrentUser | undefined }> = (pr SALEBILL_TYPES: 6000, ORDER_DATE_Start: params?.ORDER_DATE_Start || "", ORDER_DATE_End: params?.ORDER_DATE_End || "", - SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2000,3000" : params?.SALEBILL_STATE + SALEBILL_STATES: params?.SALEBILL_STATE === "0" ? "1010,2000,3000" : params?.SALEBILL_STATE, + SearchKeyValue: params?.searchText || "" }, PageIndex: 1, PageSize: 999999, diff --git a/src/pages/travelMember/BuriedPointConfig/index.tsx b/src/pages/travelMember/BuriedPointConfig/index.tsx new file mode 100644 index 0000000..e22284f --- /dev/null +++ b/src/pages/travelMember/BuriedPointConfig/index.tsx @@ -0,0 +1,481 @@ +// 埋点配置 +import React, { useRef, useState, Suspense } from 'react'; +import moment from 'moment'; // 时间相关引用,没有使用可以删除 +import numeral from "numeral"; // 数字相关引用,没有使用可以删除 +import { connect } from 'umi'; + +import useRequest from '@ahooksjs/use-request'; // 请求数据的引用 +import Draggable from 'react-draggable'; +import SubMenu from "antd/lib/menu/SubMenu"; +import ProTable from '@ant-design/pro-table'; +import ProDescriptions from '@ant-design/pro-descriptions'; +import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from '@ant-design/pro-form'; +import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; +import { PageContainer } from '@ant-design/pro-layout'; +import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect } from 'antd'; + +import type { CurrentUser } from "umi"; +import type { ConnectState } from '@/models/connect'; +import type { ActionType, ProColumns } from '@ant-design/pro-table'; +import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; +import type { FormInstance } from 'antd'; + +import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除 +import PageTitleBox from "@/components/PageTitleBox"; +import { handeDeleteWECHATAPPBURYPOINT, handeGetWECHATAPPBURYPOINTList, handeGetWECHATAPPSIGNList, handeSynchroWECHATAPPBURYPOINT } from '../service'; +import ModalFooter from '../scenicSpotConfig/component/modalFooter'; + + +const BuriedPointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + const [currentRow, setCurrentRow] = useState(); + const [showDetail, setShowDetail] = useState(); + const [modalVisible, handleModalVisible] = useState(); + const [confirmLoading, handleConfirmLoading] = useState(false) // 弹出框的内容表单是否在提交 + const [searchParams, setSearchParams] = useState(); + + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + const draggleRef = React.createRef() + // 获取小程序的列表 + const [WECHATAPP_APPID, setWECHATAPP_APPID] = 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 = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldprop: { + placeholder: "请输入页面路径/模块名称" + } + }, + { + dataIndex: 'WECHATAPP_APPID', + title: '小程序类别', + hideInTable: true, + valueType: 'select', + request: async () => { + const req: any = { + SearchParameter: { + OWNERUNIT_ID: currentUser?.OwnerUnitId, + // PROVINCE_CODE: currentUser?.ProvinceCode + }, + PageIndex: 1, + PageSize: 99, + } + const data = await handeGetWECHATAPPSIGNList(req) + console.log('datadsda', data); + let list: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + list.push({ label: item.WECHATAPPSIGN_NAME, value: item.WECHATAPP_APPID }) + }) + } + setWECHATAPP_APPID(list) + return list + }, + initialValue: "wxee018fb96955552a" + }, + { + dataIndex: 'WECHATAPP_ROUTE', + width: 300, + title:
小程序页面路径
, + align: 'left', + ellipsis: true, + hideInSearch: true, + render: (_, record) => { + return record?.WECHATAPP_ROUTE ? { + setCurrentRow({ ...record }); + handleModalVisible(true); + }}>{record?.WECHATAPP_ROUTE} : "-" + } + }, + { + dataIndex: 'WECHATAPP_MOULD', + title: '小程序模板', + width: 150, + ellipsis: true, + align: 'center', + hideInSearch: true, + }, + { + dataIndex: 'WECHATAPP_APPID', + title: '小程序APPID', + align: 'center', + width: 150, + ellipsis: true, + hideInSearch: true, + }, + { + dataIndex: 'WECHATAPPSIGN_NAME', + title: '小程序名称', + align: 'center', + width: 150, + ellipsis: true, + hideInSearch: true, + }, + { + dataIndex: 'ISSHOW', + // title: '小程序埋点是显示', + title: '有效状态', + align: 'center', + width: 150, + ellipsis: true, + hideInSearch: true, + valueType: "select", + valueEnum: { + "1": "有效", + "0": "无效" + } + }, + { + dataIndex: 'UPDATE_STAFF_NAME', + title: '修改人员名称', + width: 150, + ellipsis: true, + align: 'center', + hideInSearch: true, + }, + { + dataIndex: 'UPDATE_DATE', + title: '修改时间', + valueType: 'date', + width: 150, + ellipsis: true, + align: 'center', + hideInSearch: true, + render: (_, record) => { + return record?.UPDATE_DATE ? moment(record?.UPDATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "-" + } + }, + // { + // dataIndex: 'option', + // title: '操作', + // valueType: 'option', + // hideInSearch: true, + // render: (_, record) => { + // return ( + // + // { + // setCurrentRow(record); + // setShowDetail(true); + // }} + // > + // 查看 + // + // { + // setCurrentRow({ ...record }); + // handleModalVisible(true); + // }} + // > + // 编辑 + // + // { + // await handelDelete(record.WECHATAPPBURYPOINT_ID); + // }} + // > + + // 删除 + // + // + // ); + // }, + // }, + ]; + + const handelDelete = async (id: number) => { + const result = await handeDeleteWECHATAPPBURYPOINT({ WECHATAPPBURYPOINTId: id }); + + if (result.Result_Code !== 100) { + message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); + } else { + message.success('删除成功!'); + actionRef.current?.reload() + } + }; + + const handleAddUpdate = async (res: any) => { + + let req: any = {} + if (currentRow?.WECHATAPPBURYPOINT_ID) { + req = { + ...currentRow, + ...res, + UPDATE_STAFF_ID: currentUser?.ID, + UPDATE_STAFF_NAME: currentUser?.Name, + UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + } + } else { + req = { + ...res, + CREATE_STAFF_ID: currentUser?.ID, + CREATE_STAFF_NAME: currentUser?.Name, + CREATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + UPDATE_STAFF_ID: currentUser?.ID, + UPDATE_STAFF_NAME: currentUser?.Name, + UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss') + } + } + const data = await handeSynchroWECHATAPPBURYPOINT(req) + handleConfirmLoading(false) + if (data.Result_Code === 100) { + message.success("新增成功!") + setCurrentRow(undefined) + formRef?.current?.resetFields() + handleModalVisible(false) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + }; + + return ( +
+
+ { + return `${record?.WECHATAPPBURYPOINT_ID}` + }} + formRef={formRef} + headerTitle={} // 列表表头 + actionRef={actionRef} + search={{ span: 6, labelWidth: 'auto' }} + bordered + // 请求数据 + request={async (params, sorter) => { + const req = { + SearchParameter: { + // WECHATAPP_APPID: "wxee018fb96955552a" + WECHATAPP_APPID: params?.WECHATAPP_APPID || "", + ISSHOW: 1 + }, + PageIndex: 1, + PageSize: 999, + keyWord: { + Key: "WECHATAPP_ROUTE,WECHATAPP_MOULD", + value: params?.searchText || "" + }, + SortStr: "UPDATE_DATE desc", + } + console.log('reqreqreqreqreq', req); + + const data = await handeGetWECHATAPPBURYPOINTList(req); + console.log('datadatadatadatadata', data); + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } + } + return { data: [], success: true } + }} + columns={columns} + toolbar={{ + actions: [ + // 新增按钮 + , + ], + }} + pagination={{ defaultPageSize: 20 }} + /> + { + setCurrentRow(undefined); + setShowDetail(false); + }} + closable={false} + > + {currentRow?.WECHATAPPBURYPOINT_ID && ( + ({ + data: currentRow || {}, + })} + params={{ + id: currentRow?.WECHATAPPBURYPOINT_ID, + }} + columns={columns} + /> + )} + + { + if (disabled) { + setDraggleDisabled(false) + } + }} + onMouseOut={() => { + setDraggleDisabled(true) + }} + + onFocus={() => { }} + onBlur={() => { }} + > + {currentRow ? '更新小程序埋点配置' : '新建小程序埋点配置'} +
+ } + destroyOnClose={true} + width={900} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + visible={modalVisible} + confirmLoading={confirmLoading} + afterClose={() => { + formRef.current?.resetFields(); + setCurrentRow(undefined); + }} + onCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + }} + footer={ { + console.log('currentRow', currentRow); + + await handelDelete(currentRow?.WECHATAPPBURYPOINT_ID) + }} + handleCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + formRef.current?.resetFields(); + setCurrentRow(undefined); + }} + handleOK={() => { + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + + />} + + onOk={async () => { // 提交框内的数据 + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + modalRender={(modal) => { + return onDraggaleStart(event, uiData)} + handle='.buriedPointConfig' + > +
{modal}
+
+ }} + > + { + let newValue: any = { ...values }; + if (currentRow) { + // 编辑数据 + newValue = { ...values, WECHATAPPBURYPOINT_ID: currentRow.WECHATAPPBURYPOINT_ID }; + } + // 如果有开关,要把开关的代码写进去 + const success = await handleAddUpdate(newValue); + + handleConfirmLoading(false) + if (success) { + if (actionRef.current) { + actionRef.current.reload(); + } + handleModalVisible(false); + } + }} + > + + + + + + + + + + + + + + + + + + + +
+
+ ); +}; +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(BuriedPointConfig); diff --git a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx index a04ad45..6e429c3 100644 --- a/src/pages/travelMember/ConsumptionRecordSearch/index.tsx +++ b/src/pages/travelMember/ConsumptionRecordSearch/index.tsx @@ -47,6 +47,14 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) const [searchParams, setSearchParams] = useState() const columns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true, + fieldprop: { + placeholder: "请输入用户昵称/手机号" + } + }, { title: '查询时间', dataIndex: 'search_date', @@ -224,7 +232,11 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE }, PageIndex: params?.current, - PageSize: 20 + PageSize: params?.pageSize, + keyWord: { + Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE", + Value: params?.searchText || "" + } } const data = await handleGetCONSUMPTIONRECORDList(req) if (data.List && data.List.length > 0) { @@ -237,6 +249,10 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) ] }} + pagination={{ + defaultPageSize: 20, + showTotal: (total) => `共 ${total} 条记录` + }} />
diff --git a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx index 5a79aa3..725961b 100644 --- a/src/pages/travelMember/GrowthValueRecordSearch/index.tsx +++ b/src/pages/travelMember/GrowthValueRecordSearch/index.tsx @@ -102,6 +102,12 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) valueType: 'treeSelect', request: () => { return SCORETYPETree + }, + fieldProps: { + allowClear: true, // 允许清除已选中的值 + treeDefaultExpandAll: true, // 默认展开所有节点(可选) + showSearch: true, // 允许搜索(可选) + treeNodeFilterProp: 'title', // 按 title 搜索(可选) } // valueEnum: { // "0": "全部", diff --git a/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx b/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx index 19f1316..c093d6d 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/components/growthConfig.tsx @@ -28,6 +28,7 @@ import classNames from 'classnames'; import session from '@/utils/session'; import ModalFooter from '../../scenicSpotConfig/component/modalFooter'; import { handeDeleteFIELDENUM, handeGetFIELDEXPLAINList, handeGetNestingFIELDENUMList, handeSynchroFIELDENUM } from '../../service'; +import { convertTreeToLabelValue } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -267,8 +268,21 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); + console.log('dasjkdas', data); + if (data && data.length > 0) { setTypeTreeData(data) + if (data && data.length > 0) { + const obj: any = {} + const list: any = [] + data.forEach((item: any) => { + list.push({ label: item.FIELDENUM_NAME, value: item.FIELDENUM_VALUE }) + obj[item.FIELDENUM_VALUE] = item.FIELDENUM_NAME + }) + session.set('GROWTHTYPEList', list); + session.set('GROWTHTYPEObj', obj); + session.set('GROWTHTYPETree', convertTreeToLabelValue(data, 'FIELDENUM_NAME', 'FIELDENUM_VALUE')); + } return { data: data, success: true, total: data.length } } return { data: [], success: true } diff --git a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx index ab83949..3e6b51e 100644 --- a/src/pages/travelMember/GrowthValueRuleConfig/index.tsx +++ b/src/pages/travelMember/GrowthValueRuleConfig/index.tsx @@ -1,4 +1,4 @@ -// 成长值规则配置 +// 成长值规则配置 成长规则配置 import React, { useRef, useState, Suspense } from 'react'; import moment from 'moment'; // 时间相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除 @@ -78,7 +78,11 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> align: 'center', hideInSearch: true, valueType: 'select', - valueEnum: GROWTHTYPEObj + // valueEnum: GROWTHTYPEObj + request: () => { + let GROWTHTYPEList = session.get('GROWTHTYPEList') + return GROWTHTYPEList + } }, { dataIndex: 'GROWTHSETTING_NAME', @@ -287,6 +291,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> OWNERUNIT_ID: 911, GROWTHSETTING_STATE: params?.GROWTHSETTING_STATE }, + SortStr: "PROMOTION_LEVEL desc", PageIndex: 1, PageSize: 20 } @@ -432,7 +437,10 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> labelCol={{ style: { width: 80 } }} initialValues={{ ...currentRow, - SCORESETTING_STATE: (currentRow?.GROWTHSETTING_STATE || currentRow?.GROWTHSETTING_STATE === 0) ? currentRow?.GROWTHSETTING_STATE : 1 + SCORESETTING_STATE: (currentRow?.GROWTHSETTING_STATE || currentRow?.GROWTHSETTING_STATE === 0) ? currentRow?.GROWTHSETTING_STATE : 1, + GROWTHSETTING_TYPE: currentRow?.GROWTHSETTING_TYPE ? currentRow?.GROWTHSETTING_TYPE.toString() : "", + MEMBERSHIP_LEVEL: currentRow?.MEMBERSHIP_LEVEL ? currentRow?.MEMBERSHIP_LEVEL.toString() : "", + PROMOTION_LEVEL: currentRow?.PROMOTION_LEVEL ? currentRow?.PROMOTION_LEVEL.toString() : "", }} onFinish={async (values) => { let newValue: any = { ...values }; @@ -457,7 +465,11 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> message: '请选择规则类型' } ]} - options={GROWTHTYPEList} + request={() => { + let GROWTHTYPEList = session.get('GROWTHTYPEList') + return GROWTHTYPEList + }} + // options={GROWTHTYPEList} /> diff --git a/src/pages/travelMember/MallEvaluationManage/index.tsx b/src/pages/travelMember/MallEvaluationManage/index.tsx index 137c127..e11446c 100644 --- a/src/pages/travelMember/MallEvaluationManage/index.tsx +++ b/src/pages/travelMember/MallEvaluationManage/index.tsx @@ -63,6 +63,30 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> = // 定义列表字段内容 const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入评价人员/商家名称" + } + }, + { + title: '评价时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value) => { + return { + CREATE_DATE_Start: value[0], + CREATE_DATE_End: value[1], + }; + }, + }, + initialValue: [moment().format('YYYY-MM-DD'), moment().add(-1, 'M').format('YYYY-MM-DD')], + }, { dataIndex: 'index', title: '序号', @@ -249,11 +273,17 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> = searchParameter: { OWNERUNIT_ID: currentUser?.OwnerUnitId, PROVINCE_CODE: currentUser?.ProvinceCode, - ISVALID: 1 + ISVALID: 1, + CREATE_DATE_Start: params?.CREATE_DATE_Start || "", + CREATE_DATE_End: params?.CREATE_DATE_End || "", }, PageIndex: 1, PageSize: 999999, - SortStr: "CREATE_DATE desc" + SortStr: "CREATE_DATE desc", + keyWord: { + Key: "SELLER_NAME,MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, } const data = await handeGetMALLCOMMENTList(req) console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/MallOrderManage/index.tsx b/src/pages/travelMember/MallOrderManage/index.tsx index 52600fd..b358337 100644 --- a/src/pages/travelMember/MallOrderManage/index.tsx +++ b/src/pages/travelMember/MallOrderManage/index.tsx @@ -47,6 +47,14 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { }; const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入供货商/购买的商品/收货人" + } + }, { title: '查询时间', dataIndex: 'search_date', @@ -360,6 +368,10 @@ const MallOrderManage: React.FC<{ currentUser: CurrentUser }> = (props) => { PageIndex: 1, PageSize: 999999, SortStr: "ORDER_DATE desc", + keyWord: { + Key: "MERCHANTS_NAME,ORDER_PERSON,ORDER_PERSONTEL,SALEBILL_CODE,COMMODITY_NAME", + Value: params?.searchText || "" + }, } console.log('reqreqreqreqreq', req); diff --git a/src/pages/travelMember/MemberAddress/index.tsx b/src/pages/travelMember/MemberAddress/index.tsx index 99fe50f..e706bf7 100644 --- a/src/pages/travelMember/MemberAddress/index.tsx +++ b/src/pages/travelMember/MemberAddress/index.tsx @@ -84,7 +84,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props align: 'center', hideInTable: true, fieldProps: { - placeholder: "输入收货人名称" + placeholder: "输入收货人名称/手机号" } }, { @@ -512,9 +512,9 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props OwnerUnitId: currentUser?.OwnerUnitId || "", Isvalid: 1, PageIndex: params.current, - PageSize: params.pageSize, + PageSize: params?.pageSize, SortStr: "CREATE_DATE desc", - SearchKeyName: "USER_NAME", + SearchKeyName: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE", SearchKeyValue: params?.searchText || "" } @@ -530,6 +530,10 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props toolbar={{ actions: [] }} + pagination={{ + defaultPageSize: 20, + showTotal: (total) => `共 ${total} 条记录` + }} /> {/* 这里和 会员详情里面的同步 如果有什么修改 记得一起改 */} diff --git a/src/pages/travelMember/MemberSummaryStatistics/MemberSummaryStatistics.less b/src/pages/travelMember/MemberSummaryStatistics/MemberSummaryStatistics.less new file mode 100644 index 0000000..11266bf --- /dev/null +++ b/src/pages/travelMember/MemberSummaryStatistics/MemberSummaryStatistics.less @@ -0,0 +1,253 @@ +.MemberSummaryStatisticsMain { + width: 100%; + + .MemberSummaryStatisticsTop { + 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; + + .MemberSummaryStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MemberSummaryStatisticsTitle { + 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; + } + + .MemberSummaryStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .MemberSummaryStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .MemberSummaryStatisticsItemFirst { + // 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; + // } + // } + + .MemberSummaryStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .MemberSummaryStatisticsOtherItem { + width: calc((100% - 96px) / 6); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + + .otherItemTitle { + 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; + } + + .otherItemAddBox { + display: flex; + align-items: center; + margin-top: 29px; + + .addLabel { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 12px; + color: rgba(0, 0, 0, 0.65); + line-height: 12px; + text-align: center; + font-style: normal; + margin-right: 5px; + } + + .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%; + // } + } + + .MemberSummaryStatisticsOtherItemSelect { + 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; + } + + .otherItemAddBox { + .addLabel { + color: #fff; + } + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 16px; + color: #fff; + line-height: 16px; + text-align: center; + font-style: normal; + } + } + } + } + } + } + + + .MemberSummaryStatisticsBottom { + 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; + + .MemberSummaryStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MemberSummaryStatisticsTitle { + 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; + } + + .MemberSummaryStatisticsTitle::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/MemberSummaryStatistics/index.tsx b/src/pages/travelMember/MemberSummaryStatistics/index.tsx new file mode 100644 index 0000000..2910b2c --- /dev/null +++ b/src/pages/travelMember/MemberSummaryStatistics/index.tsx @@ -0,0 +1,551 @@ +// 会员汇总统计 +import { ConnectState } from "@/models/connect"; +import { connect, CurrentUser } from "umi"; +import './MemberSummaryStatistics.less' +import ProTable, { ActionType } from "@ant-design/pro-table"; +import { useEffect, useRef, useState } from "react"; +import { Button, Col, FormInstance, Row, Tooltip } from "antd"; +import { handeGetPointGrowthSummary, handleGetMEMBERGROWTHList, handleGetPOINTRECORDList } from "../service"; +import moment from 'moment' +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"; + + + +const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + + // 顶部内容的对象值 + const [topData, setTopData] = useState() + // 当前顶部的选择到了第几个 + const [selectTab, setSelectTab] = useState(1) + // 搜索参数 + const [searchParams, setSearchParams] = useState({ + StartDate: moment().startOf('M').format('YYYY-MM-DD'), + EndDate: moment().format('YYYY-MM-DD') + }) + + let SCORETYPETree = session.get('SCORETYPETree') + // 主表隐藏的字段 + const [columnsStateMap, setColumnsStateMap] = useState({ + TotalPointQOQData: { show: false }, + EarnPointQOQData: { show: false }, + ConsumePointQOQData: { show: false }, + TotalGrowthQOQData: { show: false }, + EarnGrowthQOQData: { show: false }, + ConsumeGrowthQOQData: { show: false }, + }) + + // 积分的columns + const columns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + { + title: '查询时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value: any) => { + return { + StartDate: value[0], + EndDate: value[1], + }; + }, + }, + initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + }, + { + title: "积分方式", + width: 120, + dataIndex: "POINT_TYPE", + ellipsis: true, + hideInSearch: true, + valueType: 'select', + align: 'center', + valueEnum: { + "-2": "全部", + "1": "累计", + "-1": "消耗" + } + }, + { + title: "积分来源", + width: 120, + dataIndex: "POINT_SOURCE", + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + align: 'center', + request: () => { + return SCORETYPETree + } + }, + { + title: "本次积分", + width: 120, + dataIndex: "CURRENT_POINT", + hideInSearch: true, + ellipsis: true, + align: 'center', + valueType: "digit" + }, + { + title: "累计积分", + width: 120, + dataIndex: "MEMBERSHIP_POINT", + hideInSearch: true, + ellipsis: true, + align: 'center', + valueType: "digit" + }, + { + title: "会员名称", + width: 150, + dataIndex: "MEMBERSHIP_NAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + }, + { + title: "获取时间", + width: 150, + dataIndex: "CREATE_DATE", + hideInSearch: true, + align: 'center', + ellipsis: true, + render: (_, record) => { + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + + // 成长值的columns + const growthColumns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + { + title: '查询时间', + dataIndex: 'search_date', + valueType: 'dateRange', + hideInTable: true, + hideInDescriptions: true, + search: { + transform: (value: any) => { + return { + StartDate: value[0], + EndDate: value[1], + }; + }, + }, + initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "累计成长值", + width: 120, + dataIndex: "MEMBERSHIP_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "本次成长值", + width: 120, + dataIndex: "CURRENT_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "成长来源", + width: 120, + dataIndex: "GROWTH_SOURCE", + align: 'center', + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + request: () => { + return SCORETYPETree + } + }, + { + title: "成长方式", + width: 120, + dataIndex: "GROWTH_TYPE", + ellipsis: true, + align: 'center', + valueType: 'select', + hideInSearch: true, + valueEnum: { + "-2": "全部", + "1": "积累", + "-1": "消耗", + }, + }, + { + title: "会员名称", + width: 150, + dataIndex: "MEMBERSHIP_NAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + }, + { + title: "操作时间", + width: 120, + dataIndex: "OPERATE_DATE", + align: 'center', + hideInSearch: true, + render: (_, record) => { + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + + useEffect(() => { + handleGetTopData() + }, []) + // 获取顶部的数据 + const handleGetTopData = async (StartDate?: string, EndDate?: string) => { + const req: any = { + CalcType: 1, // 1 汇总 2 会员等级 3 会员类型 + OwnerUnitId: currentUser?.OwnerUnitId, + StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", + EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + PointSource: "", + ServerpartId: "", + MemberShipId: "", + MembershipType: "", + MembershipLevel: "", + MembershipTarget: "" + } + const data = await handeGetPointGrowthSummary(req) + console.log('datadatadatadatadata', data); + let sumObj: any = data[0] + setTopData(sumObj) + } + + // 改变顶部的选择 + const handleChangeTab = (value: number) => { + setSelectTab(value) + actionRef.current?.reload() + } + + + 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?.TotalPoint ? topData?.TotalPoint.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.TotalPoint && topData?.TotalPoint.QOQData && topData?.TotalPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.TotalPoint && topData?.TotalPoint.QOQData && topData?.TotalPoint.summaryData ? + // {topData && topData?.TotalPoint ? topData?.TotalPoint.QOQData : "-"} + + {(((topData?.TotalPoint.summaryData - topData?.TotalPoint.QOQData) / topData?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleChangeTab(2) + }}> +
赚取积分
+
{topData && topData?.EarnPoint ? topData?.EarnPoint.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.EarnPoint && topData?.EarnPoint.QOQData && topData?.EarnPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.EarnPoint && topData?.EarnPoint.QOQData && topData?.EarnPoint.summaryData ? + // {topData && topData?.EarnPoint ? topData?.EarnPoint.QOQData : "-"} + + {(((topData?.EarnPoint.summaryData - topData?.EarnPoint.QOQData) / topData?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleChangeTab(3) + }}> +
消耗积分
+
{topData && topData?.ConsumePoint ? topData?.ConsumePoint.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.ConsumePoint && topData?.ConsumePoint.QOQData && topData?.ConsumePoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.ConsumePoint && topData?.ConsumePoint.QOQData && topData?.ConsumePoint.summaryData ? + // {topData && topData?.ConsumePoint ? topData?.ConsumePoint.QOQData : "-"} + + {(((topData?.ConsumePoint.summaryData - topData?.ConsumePoint.QOQData) / topData?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleChangeTab(4) + }}> +
总成长值
+
{topData && topData?.TotalGrowth ? topData?.TotalGrowth.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.TotalGrowth && topData?.TotalGrowth.QOQData && topData?.TotalGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.TotalGrowth && topData?.TotalGrowth.QOQData && topData?.TotalGrowth.summaryData ? + // {topData && topData?.TotalGrowth ? topData?.TotalGrowth.QOQData : "-"} + + {(((topData?.TotalGrowth.summaryData - topData?.TotalGrowth.QOQData) / topData?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+
+ +
{ + handleChangeTab(5) + }}> +
赚取成长值
+
{topData && topData?.EarnGrowth ? topData?.EarnGrowth.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.EarnGrowth && topData?.EarnGrowth.QOQData && topData?.EarnGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.EarnGrowth && topData?.EarnGrowth.QOQData && topData?.EarnGrowth.summaryData ? + // {topData && topData?.EarnGrowth ? topData?.EarnGrowth.QOQData : "-"} + + {(((topData?.EarnGrowth.summaryData - topData?.EarnGrowth.QOQData) / topData?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + + + : "" + } +
+ {/*
*/} +
+ +
{ + handleChangeTab(6) + }}> +
消耗成长值
+
{topData && topData?.ConsumeGrowth ? topData?.ConsumeGrowth.summaryData : "-"}
+
+ 环比增长 + { + topData && topData?.ConsumeGrowth && topData?.ConsumeGrowth.QOQData && topData?.ConsumeGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + topData && topData?.ConsumeGrowth && topData?.ConsumeGrowth.QOQData && topData?.ConsumeGrowth.summaryData ? + // {topData && topData?.ConsumeGrowth ? topData?.ConsumeGrowth.QOQData : "-"} + + {(((topData?.ConsumeGrowth.summaryData - topData?.ConsumeGrowth.QOQData) / topData?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+
+
+
+ + +
+ { + // 判断当前选择的 1、2、3为积分的 4、5、6 为成长值的 + let req: any = {} + let data: any = {} + + const params = searchParams; + + + if (selectTab <= 3) { + req = { + SearchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: params?.StartDate || "", + OPERATE_DATE_End: params?.EndDate || "", + OWNERUNIT_ID: 911, + POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '', + POINT_SOURCE: '' + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + } + data = await handleGetPOINTRECORDList(req) + } else { + req = { + searchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: params?.StartDate || "", + OPERATE_DATE_End: params?.EndDate || "", + OWNERUNIT_ID: 911, + SCORESETTING_STATE: 1, + GROWTH_SOURCES: "", + GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '' + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + } + data = await handleGetMEMBERGROWTHList(req); + } + // if (searchParams.StartDate !== params?.StartDate || searchParams.EndDate !== params?.EndDate) { + // await handleGetTopData(params?.StartDate, params?.EndDate) + // } + setSearchParams(params) + + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } + } + return { data: [], success: true } + }} + columnsState={{ + value: columnsStateMap, + onChange: setColumnsStateMap, + }} + /> +
+ +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(MemberSummaryStatistics); \ No newline at end of file diff --git a/src/pages/travelMember/MemberTagManage/index.tsx b/src/pages/travelMember/MemberTagManage/index.tsx index 95ce740..3142c8f 100644 --- a/src/pages/travelMember/MemberTagManage/index.tsx +++ b/src/pages/travelMember/MemberTagManage/index.tsx @@ -1,15 +1,485 @@ // 会员标签管理 -import { ConnectState } from "@/models/connect"; -import { connect, CurrentUser } from "umi"; +import React, { useRef, useState, Suspense } from 'react'; +import moment from 'moment'; // 时间相关引用,没有使用可以删除 +import numeral from "numeral"; // 数字相关引用,没有使用可以删除 +import { connect } from 'umi'; -const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { - return ( -
+import useRequest from '@ahooksjs/use-request'; // 请求数据的引用 +import Draggable from 'react-draggable'; +import SubMenu from "antd/lib/menu/SubMenu"; +import ProTable from '@ant-design/pro-table'; +import ProDescriptions from '@ant-design/pro-descriptions'; +import ProForm, { ProFormDatePicker, ProFormDateTimePicker, ProFormDateTimeRangePicker, ProFormDigit, ProFormMoney, ProFormSelect, ProFormText, ProFormTextArea, ProFormTreeSelect, ProFormUploadButton } from '@ant-design/pro-form'; +import { MenuFoldOutlined, PlusOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; +import { PageContainer } from '@ant-design/pro-layout'; +import { Button, Col, Drawer, message, Row, Popconfirm, Space, Image, Modal, Form, Switch, Upload, Tooltip, Descriptions, TreeSelect } from 'antd'; -
- ) +import type { CurrentUser } from "umi"; +import type { ConnectState } from '@/models/connect'; +import type { ActionType, ProColumns } from '@ant-design/pro-table'; +import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; +import type { FormInstance } from 'antd'; + +import { getFieldEnumTree, getFieldEnumName } from "@/services/options"; // 枚举的引用,没有使用可以删除 +import { handeDeleteAUTOTYPE, handeDeleteFIELDENUM, handeGetFIELDENUMList, handeGetFIELDEXPLAINList, handeGetNestingAUTOTYPEList, handeGetNestingFIELDENUMList, handeSynchroAUTOTYPE, handeSynchroFIELDENUM, handlDeleteUSERDEFINEDTYPE, handlGetUSERDEFINEDTYPEList, handlSynchroUSERDEFINEDTYPE } from '../service'; +import PageTitleBox from '@/components/PageTitleBox'; +import { uploadPicture } from '@/services/picture'; +import defaultIcon from '../../../assets/brand/defaultIcon.png' +import classNames from 'classnames'; +import session from '@/utils/session'; +import ModalFooter from '../scenicSpotConfig/component/modalFooter'; + + +const beforeUpload = (file: any) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; + if (!isJpgOrPng) { + message.error('请上传JPEG、jpg、png格式的图片文件!'); + } + const isLt2M = file.size / 1024 / 1024 < 2; + if (!isLt2M) { + message.error('图片大小不超过 2MB!'); + } + return isJpgOrPng && isLt2M; } + +const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const { confirm } = Modal; + const actionRef = useRef(); + const formRef = useRef(); + const [currentRow, setCurrentRow] = useState(); + const [showDetail, setShowDetail] = useState(); + const [modalVisible, handleModalVisible] = useState(); + const [confirmLoading, handleConfirmLoading] = useState(false) // 弹出框的内容表单是否在提交 + const [searchParams, setSearchParams] = useState(); + // 分类的树形结构数据 + const [typeTreeData, setTypeTreeData] = useState() + // 表单里面的是否预售 + const [formPRESALE_TYPE, setFormPRESALE_TYPE] = useState(false) + + // 弹出框拖动效果 + const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置 + const [disabled, setDraggleDisabled] = useState() // 是否拖动 + const draggleRef = React.createRef() + + let AFTERSALETYPEObj = session.get('AFTERSALETYPEObj') + const { data: FIELDEXPLAIN_ID } = useRequest(async () => { + const req: any = { + SearchParameter: { + FIELDEXPLAIN_FIELD: "MEMBERSHIP_LEVEL_YN" + } + } + const data = await handeGetFIELDEXPLAINList(req) + if (data && data.length > 0) { + let obj: any = data[0] + return obj.FIELDEXPLAIN_ID + } + }) + // 文件列表 + const [fileList, setFileList] = useState([]) + const [imagePreviewVisible, setImagePreviewVisible] = useState(false) // 预览图片 + + 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 = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + }, + { + dataIndex: 'AUTOTYPE_NAME', + title: '类别名称', + align: 'center', + width: 300, + ellipsis: true, + hideInSearch: true, + hideInDescriptions: true, + render: (_, record) => { + return { + setCurrentRow({ ...record }); + handleModalVisible(true); + }} + >{record?.AUTOTYPE_NAME || ""} + } + }, + { + dataIndex: 'AUTOTYPE_INDEX', + title: '类别索引', + align: 'center', + width: 120, + ellipsis: true, + hideInSearch: true, + }, + { + dataIndex: 'AUTOTYPE_VALID', + title: '有效状态', + align: 'center', + width: 120, + ellipsis: true, + valueType: "select", + valueEnum: { + "1": "有效", + "0": "无效" + }, + initialValue: "1" + }, + { + dataIndex: 'AUTOTYPE_DESC', + title: '备注说明', + align: 'center', + ellipsis: true, + hideInSearch: true, + }, + ]; + + // 预览上传后的图片 + const handlePreview = async () => { + setFileList(fileList) + setImagePreviewVisible(true) + }; + const handleChangePreview = (val: any) => { + setImagePreviewVisible(val) + } + + // 删除点餐类别 + const handelDelete = async (id: any) => { + const req: any = { + AUTOTYPEId: id + } + const result = await handeDeleteAUTOTYPE(req) + if (result.Result_Code !== 100) { + message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`); + } else { + message.success('删除成功!'); + actionRef.current?.reload() + handleConfirmLoading(false) + handleModalVisible(false) + setFormPRESALE_TYPE(false) + setFileList([]) + } + } + + // 同步点餐列表 + const handleAddUpdate = async (res: any) => { + let req: any = {} + if (currentRow?.FIELDENUM_ID) { + req = { + ...currentRow, + ...res, + AUTOTYPE_TYPEID: 2000, + AUTOTYPE_TYPENAME: "会员标签", + STAFF_ID: currentUser?.ID, + STAFF_NAME: currentUser?.Name, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + } + } else { + req = { + ...res, + AUTOTYPE_TYPEID: 2000, + AUTOTYPE_TYPENAME: "会员标签", + STAFF_ID: currentUser?.ID, + STAFF_NAME: currentUser?.Name, + OPERATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'), + ADDTIME: moment().format('YYYY-MM-DD HH:mm:ss'), + } + } + const data = await handeSynchroAUTOTYPE(req) + handleConfirmLoading(false) + if (data.Result_Code === 100) { + message.success("新增成功!") + setCurrentRow(undefined) + formRef?.current?.resetFields() + handleModalVisible(false) + setFormPRESALE_TYPE(false) + setFileList([]) + actionRef.current?.reload() + } else { + message.error(data.Result_Desc) + } + } + + return ( + + { + return `${record?.AUTOTYPE_PID}-${record?.AUTOTYPE_ID}` + }} + formRef={formRef} + headerTitle={} // 列表表头 + actionRef={actionRef} + search={{ span: 6, labelWidth: 'auto' }} + bordered + // 请求数据 + request={async (params, sorter) => { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: params?.AUTOTYPE_VALID, + SearchKey: params?.searchText || "" + } + const data = await handeGetNestingAUTOTYPEList(req); + console.log('datadatadatadatadata', data); + if (data && data.length > 0) { + setTypeTreeData(data) + return { data: data, success: true, total: data.length } + } + return { data: [], success: true } + }} + columns={columns} + toolbar={{ + actions: [ + // 新增按钮 + , + ], + }} + /> + + {/* 图片预览组件 */} + {fileList && fileList.length > 0 &&
+ { + handleChangePreview(vis) + } + }}> + { + fileList.map((n) => ) + } + +
} + + + { + if (disabled) { + setDraggleDisabled(false) + } + }} + onMouseOut={() => { + setDraggleDisabled(true) + }} + + onFocus={() => { }} + onBlur={() => { }} + > + {currentRow ? '更新会员标签类别' : '新建会员标签类别'} + + } + destroyOnClose={true} + width={900} + bodyStyle={{ + height: '700px', // 你可以根据需要调整高度 + overflowY: 'auto', + }} + visible={modalVisible} + confirmLoading={confirmLoading} + afterClose={() => { + formRef.current?.resetFields(); + setCurrentRow(undefined); + }} + 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() + }) + }} + + />} + onCancel={() => { + handleConfirmLoading(false) + handleModalVisible(false) + setFormPRESALE_TYPE(false) + setFileList([]) + }} + + onOk={async () => { // 提交框内的数据 + formRef?.current?.validateFields().then(() => { + handleConfirmLoading(true) + formRef?.current?.submit() + }) + }} + modalRender={(modal) => { + return onDraggaleStart(event, uiData)} + handle='.membershipLevel' + > +
{modal}
+
+ }} + > + { + let newValue = { ...values }; + if (currentRow) { + // 编辑数据 + newValue = { ...values, FIELDENUM_ID: currentRow.FIELDENUM_ID }; + } + + // 如果有开关,要把开关的代码写进去 + await handleAddUpdate(newValue); + + handleConfirmLoading(false) + setFormPRESALE_TYPE(false) + }} + > + + + { + if (typeTreeData && typeTreeData.length > 0) { + let list: any = [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }, ...typeTreeData] + return list + } else { + const req = { + AUTOTYPE_TYPEID: '2000', + AUTOTYPE_PID: "", + OWNERUNIT_ID: currentUser?.OwnerUnitId, + AUTOTYPE_VALID: 1, + SearchKey: "" + } + const data = await handeGetNestingAUTOTYPEList(req); + if (data && data.length > 0) { + data.unshirft({ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }) + setTypeTreeData(data) + return data + } else { + return [{ AUTOTYPE_NAME: "默认类别", AUTOTYPE_ID: -1 }] + } + } + }} + fieldProps={{ + fieldNames: { + label: 'AUTOTYPE_NAME', + value: 'AUTOTYPE_ID', + children: 'children' + }, + showSearch: true, + filterTreeNode: (input, node) => + (node.AUTOTYPE_NAME || '').toLowerCase().includes(input.toLowerCase()) + }} + rules={[ + { + required: true, + message: "请选择上级类别" + } + ]} + /> + + + + + + + + + + + + + + + + + +
+
+ ); +}; export default connect(({ user }: ConnectState) => ({ currentUser: user.currentUser }))(MemberTagManage); \ No newline at end of file diff --git a/src/pages/travelMember/MembershipLevelStatistics/MembershipLevelStatistics.less b/src/pages/travelMember/MembershipLevelStatistics/MembershipLevelStatistics.less new file mode 100644 index 0000000..3eb3399 --- /dev/null +++ b/src/pages/travelMember/MembershipLevelStatistics/MembershipLevelStatistics.less @@ -0,0 +1,258 @@ +.MembershipLevelStatisticsMain { + width: 100%; + height: calc(100vh - 150px); + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + background: #FFFFFF; + border-radius: 4px; + overflow-y: auto; + + .MembershipLevelStatisticsTop { + 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; + + .MembershipLevelStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipLevelStatisticsTitle { + 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; + } + + .MembershipLevelStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .MembershipLevelStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .MembershipLevelStatisticsItemFirst { + // 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; + // } + // } + + .MembershipLevelStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipLevelStatisticsOtherItem { + width: calc((100% - 96px) / 6); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + + .otherItemTitle { + 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; + } + + .otherItemAddBox { + display: flex; + align-items: center; + margin-top: 29px; + + .addLabel { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 12px; + color: rgba(0, 0, 0, 0.65); + line-height: 12px; + text-align: center; + font-style: normal; + margin-right: 5px; + } + + .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%; + } + } + + .MembershipLevelStatisticsOtherItemSelect { + 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; + } + + .otherItemAddBox { + .addLabel { + color: #fff; + } + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 16px; + color: #fff; + line-height: 16px; + text-align: center; + font-style: normal; + } + } + } + } + } + } + + + .MembershipLevelStatisticsBottom { + 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; + + .MembershipLevelStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipLevelStatisticsTitle { + 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; + } + + .MembershipLevelStatisticsTitle::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/MembershipLevelStatistics/index.tsx b/src/pages/travelMember/MembershipLevelStatistics/index.tsx new file mode 100644 index 0000000..d47d04a --- /dev/null +++ b/src/pages/travelMember/MembershipLevelStatistics/index.tsx @@ -0,0 +1,702 @@ +// 会员汇总统计 +import { ConnectState } from "@/models/connect"; +import { connect, CurrentUser } from "umi"; +import './MembershipLevelStatistics.less' +import ProTable, { ActionType } from "@ant-design/pro-table"; +import { useEffect, useRef, useState } from "react"; +import { Button, Col, Drawer, FormInstance, Row, Spin, Tabs, Tooltip } from "antd"; +import { handeGetPointGrowthSummary, handleGetMEMBERGROWTHList, handleGetPOINTRECORDList } from "../service"; +import moment from 'moment' +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"; + + + +const MembershipLevelStatistics: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + + // 顶部内容的对象值 + const [topData, setTopData] = useState() + // 当前顶部的选择到了第几个 + const [selectTab, setSelectTab] = useState(1) + // 搜索参数 + const [searchParams, setSearchParams] = useState({ + StartDate: moment().startOf('M').format('YYYY-MM-DD'), + EndDate: moment().format('YYYY-MM-DD') + }) + // 选择的大的tab + const [selectBigTab, setSelectBigTab] = useState('1') + // 大tab能切换的内容 + const [tabList, setTabList] = useState([]) + // 判断是不是第一次进入页面 + const [isFirst, setIsFirst] = useState(true) + // 数据的加载效果 + const [topLoading, setTopLoading] = useState(false) + // 当前选中的是第几个数据 + const [currentIndex, setCurrentIndex] = useState() + const [currentRow, setCurrentRow] = useState() + // 抽屉显示的值 + const [currentDrawerTitle, setCurrentDrawerTitle] = useState('') + + let SCORETYPETree = session.get('SCORETYPETree') + let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') + // 主表隐藏的字段 + const [columnsStateMap, setColumnsStateMap] = useState({ + TotalPointQOQData: { show: false }, + EarnPointQOQData: { show: false }, + ConsumePointQOQData: { show: false }, + TotalGrowthQOQData: { show: false }, + EarnGrowthQOQData: { show: false }, + ConsumeGrowthQOQData: { show: false }, + }) + // 显示详情抽屉 + const [showDetail, setShowDetail] = useState(false) + // 顶部的数组内容 + const [topListData, setTopListData] = useState([]) + // 积分的columns + const columns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + // { + // title: '查询时间', + // dataIndex: 'search_date', + // valueType: 'dateRange', + // hideInTable: true, + // hideInDescriptions: true, + // search: { + // transform: (value: any) => { + // return { + // StartDate: value[0], + // EndDate: value[1], + // }; + // }, + // }, + // initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + // }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + }, + { + title: "积分方式", + width: 120, + dataIndex: "POINT_TYPE", + ellipsis: true, + hideInSearch: true, + valueType: 'select', + align: 'center', + valueEnum: { + "-2": "全部", + "1": "累计", + "-1": "消耗" + } + }, + { + title: "积分来源", + width: 120, + dataIndex: "POINT_SOURCE", + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + align: 'center', + request: () => { + return SCORETYPETree + } + }, + { + title: "本次积分", + width: 120, + dataIndex: "CURRENT_POINT", + hideInSearch: true, + ellipsis: true, + align: 'center', + valueType: "digit" + }, + { + title: "累计积分", + width: 120, + dataIndex: "MEMBERSHIP_POINT", + hideInSearch: true, + ellipsis: true, + 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, + dataIndex: "CREATE_DATE", + hideInSearch: true, + align: 'center', + ellipsis: true, + render: (_, record) => { + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + // 成长值的columns + const growthColumns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + // { + // title: '查询时间', + // dataIndex: 'search_date', + // valueType: 'dateRange', + // hideInTable: true, + // hideInDescriptions: true, + // search: { + // transform: (value: any) => { + // return { + // StartDate: value[0], + // EndDate: value[1], + // }; + // }, + // }, + // initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + // }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "累计成长值", + width: 120, + dataIndex: "MEMBERSHIP_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "本次成长值", + width: 120, + dataIndex: "CURRENT_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "成长来源", + width: 120, + dataIndex: "GROWTH_SOURCE", + align: 'center', + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + request: () => { + return SCORETYPETree + } + }, + { + title: "成长方式", + width: 120, + dataIndex: "GROWTH_TYPE", + 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', + }, + { + title: "操作时间", + width: 120, + dataIndex: "OPERATE_DATE", + align: 'center', + hideInSearch: true, + render: (_, record) => { + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + + + + useEffect(() => { + const initData = async () => { + await handleGetTopData(); + // 使用最新的selectBigTab值触发表格加载 + // actionRef.current?.reload(); + }; + initData(); + }, []) + + // 获取顶部的数据 + const handleGetTopData = async (StartDate?: string, EndDate?: string) => { + const req: any = { + CalcType: 2, // 1 汇总 2 会员等级 3 会员类型 + OwnerUnitId: currentUser?.OwnerUnitId, + StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", + EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + PointSource: "", + ServerpartId: "", + MemberShipId: "", + MembershipType: "", + MembershipLevel: "", + MembershipTarget: "" + } + setTopLoading(true) + const data = await handeGetPointGrowthSummary(req) + setTopLoading(false) + console.log('datadatadatadatadata', data); + let sumObj: any = data[0] + setTopListData(data) + setTopData(sumObj) + + let list: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + list.push({ label: item.StatisticalName && MEMBERSHIPLEVELYNObj && MEMBERSHIPLEVELYNObj[item.StatisticalName] ? MEMBERSHIPLEVELYNObj[item.StatisticalName.toString()] : "", value: item.StatisticalName, key: item.StatisticalName }) + }) + } + console.log('listlistlistlist', list); + + // 使用函数形式的setState确保获取到最新值 + return new Promise((resolve) => { + setTabList(list); + const newTabKey = list[0]?.key || '1'; + setSelectBigTab(newTabKey); + resolve(newTabKey); + }); + } + + // 改变顶部的选择 + const handleChangeTab = (value: number) => { + // 立即更新状态 + setSelectTab(value); + // 使用setTimeout确保状态更新后再触发表格重新加载 + setTimeout(() => { + actionRef.current?.reload(); + }, 0); + } + + // 判断当前是点击看哪个的详情 + const handleShowDetail = (index: number, obj: any) => { + setCurrentIndex(index) + setCurrentRow(obj) + let item: any = topListData[index] + let type: string = obj.TotalPoint ? '总积分' : obj.EarnPoint ? '赚取积分' : obj.ConsumePoint ? '消耗积分' : obj.TotalGrowth ? '总成长值' : obj.EarnGrowth ? '赚取成长值' : obj.ConsumeGrowth ? '消耗成长值' : '' + let typeTab: number = obj.TotalPoint ? 1 : obj.EarnPoint ? 2 : obj.ConsumePoint ? 3 : obj.TotalGrowth ? 4 : obj.EarnGrowth ? 5 : obj.ConsumeGrowth ? 6 : 0 + console.log('typetypetype', type); + + setSelectTab(typeTab) + let str: string = `${item.StatisticalName && MEMBERSHIPLEVELYNObj && MEMBERSHIPLEVELYNObj[item.StatisticalName] ? MEMBERSHIPLEVELYNObj[item.StatisticalName.toString()] : ""}${type}` + setCurrentDrawerTitle(str) + setShowDetail(true) + } + + + return ( +
+ + {/* { + // 立即更新状态,确保UI立即响应 + setSelectBigTab(e); + // 使用setTimeout确保状态更新后再触发表格重新加载 + setTimeout(() => { + actionRef.current?.reload(); + }, 0); + }} + items={tabList} + /> */} + { + topLoading ? +
+
+ + 加载中... +
+
: '' + } + +
+ + + { + 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() + }} + > + + + + +
+ + +
+ +
+
+ + { + topListData && topListData.length > 0 ? + topListData.map((item: any, index: number) => { + return
+
+
{item.StatisticalName && MEMBERSHIPLEVELYNObj && MEMBERSHIPLEVELYNObj[item.StatisticalName] ? MEMBERSHIPLEVELYNObj[item.StatisticalName.toString()] : ""}
+
+ +
+
+
{ + handleShowDetail(index, { + TotalPoint: item?.TotalPoint + }) + }}> +
总积分
+
{item && item?.TotalPoint ? item?.TotalPoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? + // {item && item?.TotalPoint ? item?.TotalPoint.QOQData : "-"} + + {(((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleShowDetail(index, { + EarnPoint: item?.EarnPoint + }) + }}> +
赚取积分
+
{item && item?.EarnPoint ? item?.EarnPoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? + // {item && item?.EarnPoint ? item?.EarnPoint.QOQData : "-"} + + {(((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + ConsumePoint: item?.ConsumePoint + }) + }}> +
消耗积分
+
{item && item?.ConsumePoint ? item?.ConsumePoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? + // {item && item?.ConsumePoint ? item?.ConsumePoint.QOQData : "-"} + + {(((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + TotalGrowth: item?.TotalGrowth + }) + }}> +
总成长值
+
{item && item?.TotalGrowth ? item?.TotalGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? + // {item && item?.TotalGrowth ? item?.TotalGrowth.QOQData : "-"} + + {(((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+
+ +
{ + handleShowDetail(index, { + EarnGrowth: item?.EarnGrowth + }) + }}> +
赚取成长值
+
{item && item?.EarnGrowth ? item?.EarnGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? + // {item && item?.EarnGrowth ? item?.EarnGrowth.QOQData : "-"} + + {(((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + ConsumeGrowth: item?.ConsumeGrowth + }) + }}> +
消耗成长值
+
{item && item?.ConsumeGrowth ? item?.ConsumeGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? + // {item && item?.ConsumeGrowth ? item?.ConsumeGrowth.QOQData : "-"} + + {(((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+
+
+
+ }) : "" + } + + + { + setCurrentIndex(null) + setCurrentRow(null) + setSelectTab(0) + setCurrentDrawerTitle('') + setShowDetail(false) + }} + > + { + // 判断当前选择的 1、2、3为积分的 4、5、6 为成长值的 + let req: any = {} + let data: any = {} + + // 确保使用最新的状态值 + const currentTabValue = topListData[currentIndex].StatisticalName; + const currentSelectTab = selectTab; + + if (selectTab <= 3) { + req = { + SearchParameter: { + MEMBERSHIP_TYPE: currentTabValue || "", + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: searchParams?.StartDate || "", + OPERATE_DATE_End: searchParams?.EndDate || "", + OWNERUNIT_ID: 911, + POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '', + POINT_SOURCE: '' + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + } + data = await handleGetPOINTRECORDList(req) + } else { + req = { + searchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: searchParams?.StartDate || "", + OPERATE_DATE_End: searchParams?.EndDate || "", + OWNERUNIT_ID: 911, + SCORESETTING_STATE: 1, + GROWTH_SOURCES: "", + GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '' + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + } + data = await handleGetMEMBERGROWTHList(req); + } + + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } + } + return { data: [], success: true } + }} + columnsState={{ + value: columnsStateMap, + onChange: setColumnsStateMap, + }} + /> + + +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(MembershipLevelStatistics); \ No newline at end of file diff --git a/src/pages/travelMember/MembershipTypeStatistics/MembershipTypeStatistics.less b/src/pages/travelMember/MembershipTypeStatistics/MembershipTypeStatistics.less new file mode 100644 index 0000000..3028746 --- /dev/null +++ b/src/pages/travelMember/MembershipTypeStatistics/MembershipTypeStatistics.less @@ -0,0 +1,258 @@ +.MembershipTypeStatisticsMain { + width: 100%; + height: calc(100vh - 150px); + box-shadow: 0px 0px 6px 0px rgba(31, 48, 95, 0.2); + background: #FFFFFF; + border-radius: 4px; + overflow-y: auto; + + .MembershipTypeStatisticsTop { + 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; + + .MembershipTypeStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipTypeStatisticsTitle { + 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; + } + + .MembershipTypeStatisticsTitle::after { + content: ""; + width: 4px; + height: 18px; + background: #1492FF; + border-radius: 2px; + position: absolute; + left: -12px; + top: 50%; + transform: translateY(-50%); + } + } + + .MembershipTypeStatisticsContentBox { + width: 100%; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: space-between; + + // .MembershipTypeStatisticsItemFirst { + // 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; + // } + // } + + .MembershipTypeStatisticsItemOther { + width: 100%; + height: 180px; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipTypeStatisticsOtherItem { + width: calc((100% - 96px) / 6); + height: 100%; + background: #F6F9FF; + border-radius: 8px; + box-sizing: border-box; + padding: 29px 24px; + position: relative; + cursor: pointer; + + .otherItemTitle { + 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; + } + + .otherItemAddBox { + display: flex; + align-items: center; + margin-top: 29px; + + .addLabel { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 12px; + color: rgba(0, 0, 0, 0.65); + line-height: 12px; + text-align: center; + font-style: normal; + margin-right: 5px; + } + + .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%; + } + } + + .MembershipTypeStatisticsOtherItemSelect { + 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; + } + + .otherItemAddBox { + .addLabel { + color: #fff; + } + + .addValue { + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 16px; + color: #fff; + line-height: 16px; + text-align: center; + font-style: normal; + } + } + } + } + } + } + + + .MembershipTypeStatisticsBottom { + 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; + + .MembershipTypeStatisticsTitleBox { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .MembershipTypeStatisticsTitle { + 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; + } + + .MembershipTypeStatisticsTitle::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/MembershipTypeStatistics/index.tsx b/src/pages/travelMember/MembershipTypeStatistics/index.tsx new file mode 100644 index 0000000..b390204 --- /dev/null +++ b/src/pages/travelMember/MembershipTypeStatistics/index.tsx @@ -0,0 +1,728 @@ +// 会员汇总统计 +import { ConnectState } from "@/models/connect"; +import { connect, CurrentUser } from "umi"; +import './MembershipTypeStatistics.less' +import ProTable, { ActionType } from "@ant-design/pro-table"; +import { useEffect, useRef, useState } from "react"; +import { Button, Col, Drawer, FormInstance, Row, Spin, Tabs, Tooltip } from "antd"; +import { handeGetPointGrowthSummary, handleGetMEMBERGROWTHList, handleGetPOINTRECORDList } from "../service"; +import moment from 'moment' +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"; + + + +const MembershipTypeStatistics: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { + const { currentUser } = props + const actionRef = useRef(); + const formRef = useRef(); + + // 顶部内容的对象值 + const [topData, setTopData] = useState() + // 顶部的数组内容 + const [topListData, setTopListData] = useState([]) + // 当前顶部的选择到了第几个 + const [selectTab, setSelectTab] = useState(1) + // 搜索参数 + const [searchParams, setSearchParams] = useState({ + StartDate: moment().startOf('M').format('YYYY-MM-DD'), + EndDate: moment().format('YYYY-MM-DD') + }) + // 选择的大的tab + const [selectBigTab, setSelectBigTab] = useState('1') + // 大tab能切换的内容 + const [tabList, setTabList] = useState([]) + // 判断是不是第一次进入页面 + const [isFirst, setIsFirst] = useState(true) + // 数据的加载效果 + const [topLoading, setTopLoading] = useState(false) + // 当前选中的是第几个数据 + const [currentIndex, setCurrentIndex] = useState() + const [currentRow, setCurrentRow] = useState() + // 抽屉显示的值 + const [currentDrawerTitle, setCurrentDrawerTitle] = useState('') + + let SCORETYPETree = session.get('SCORETYPETree') + let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj') + let MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') + // 主表隐藏的字段 + const [columnsStateMap, setColumnsStateMap] = useState({ + TotalPointQOQData: { show: false }, + EarnPointQOQData: { show: false }, + ConsumePointQOQData: { show: false }, + TotalGrowthQOQData: { show: false }, + EarnGrowthQOQData: { show: false }, + ConsumeGrowthQOQData: { show: false }, + }) + // 显示详情抽屉 + const [showDetail, setShowDetail] = useState(false) + + // 积分的columns + const columns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + // { + // title: '查询时间', + // dataIndex: 'search_date', + // valueType: 'dateRange', + // hideInTable: true, + // hideInDescriptions: true, + // search: { + // transform: (value: any) => { + // return { + // StartDate: value[0], + // EndDate: value[1], + // }; + // }, + // }, + // initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + // }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + ellipsis: true, + align: 'center', + }, + { + title: "积分方式", + width: 120, + dataIndex: "POINT_TYPE", + ellipsis: true, + hideInSearch: true, + valueType: 'select', + align: 'center', + valueEnum: { + "-2": "全部", + "1": "累计", + "-1": "消耗" + } + }, + { + title: "积分来源", + width: 120, + dataIndex: "POINT_SOURCE", + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + align: 'center', + request: () => { + return SCORETYPETree + } + }, + { + title: "本次积分", + width: 120, + dataIndex: "CURRENT_POINT", + hideInSearch: true, + ellipsis: true, + align: 'center', + valueType: "digit" + }, + { + title: "累计积分", + width: 120, + dataIndex: "MEMBERSHIP_POINT", + hideInSearch: true, + ellipsis: true, + 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, + dataIndex: "CREATE_DATE", + hideInSearch: true, + align: 'center', + ellipsis: true, + render: (_, record) => { + return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + + // 成长值的columns + const growthColumns: any = [ + { + title: '查询内容', + dataIndex: 'searchText', + hideInTable: true + }, + // { + // title: '查询时间', + // dataIndex: 'search_date', + // valueType: 'dateRange', + // hideInTable: true, + // hideInDescriptions: true, + // search: { + // transform: (value: any) => { + // return { + // StartDate: value[0], + // EndDate: value[1], + // }; + // }, + // }, + // initialValue: [moment().startOf('M').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], + // }, + { + title: "服务区名称", + width: 150, + dataIndex: "SERVERPART_NAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "门店名称", + width: 150, + dataIndex: "SHOPNAME", + hideInSearch: true, + align: 'center', + ellipsis: true, + }, + { + title: "累计成长值", + width: 120, + dataIndex: "MEMBERSHIP_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "本次成长值", + width: 120, + dataIndex: "CURRENT_GROWTH", + hideInSearch: true, + align: 'center', + ellipsis: true, + valueType: 'digit' + }, + { + title: "成长来源", + width: 120, + dataIndex: "GROWTH_SOURCE", + align: 'center', + ellipsis: true, + hideInSearch: true, + valueType: 'treeSelect', + request: () => { + return SCORETYPETree + } + }, + { + title: "成长方式", + width: 120, + dataIndex: "GROWTH_TYPE", + 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', + }, + { + title: "操作时间", + width: 120, + dataIndex: "OPERATE_DATE", + align: 'center', + hideInSearch: true, + render: (_, record) => { + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-" + } + }, + ] + + + + useEffect(() => { + const initData = async () => { + await handleGetTopData(); + // 使用最新的selectBigTab值触发表格加载 + actionRef.current?.reload(); + }; + initData(); + }, []) + // 获取顶部的数据 + const handleGetTopData = async (StartDate?: string, EndDate?: string) => { + const req: any = { + CalcType: 3, // 1 汇总 2 会员等级 3 会员类型 + OwnerUnitId: currentUser?.OwnerUnitId, + StartDate: StartDate ? StartDate : searchParams?.StartDate ? searchParams?.StartDate : "", + EndDate: EndDate ? EndDate : searchParams?.EndDate ? searchParams?.EndDate : "", + PointSource: "", + ServerpartId: "", + MemberShipId: "", + MembershipType: "", + MembershipLevel: "", + MembershipTarget: "" + } + setTopLoading(true) + const data = await handeGetPointGrowthSummary(req) + setTopLoading(false) + console.log('datadatadatadatadata', data); + let sumObj: any = data[0] + setTopListData(data) + setTopData(sumObj) + + let list: any = [] + if (data && data.length > 0) { + data.forEach((item: any) => { + list.push({ label: item.StatisticalName && MEMBERSHIPTYPEYNObj && MEMBERSHIPTYPEYNObj[item.StatisticalName] ? MEMBERSHIPTYPEYNObj[item.StatisticalName.toString()] : "", value: item.StatisticalName, key: item.StatisticalName }) + }) + } + console.log('listlistlistlist', list); + + // 使用函数形式的setState确保获取到最新值 + return new Promise((resolve) => { + setTabList(list); + const newTabKey = list[0]?.key || '1'; + setSelectBigTab(newTabKey); + resolve(newTabKey); + }); + } + + // 改变顶部的选择 + const handleChangeTab = (value: number) => { + // 立即更新状态 + setSelectTab(value); + // 使用setTimeout确保状态更新后再触发表格重新加载 + setTimeout(() => { + actionRef.current?.reload(); + }, 0); + } + + // 判断当前是点击看哪个的详情 + const handleShowDetail = (index: number, obj: any) => { + setCurrentIndex(index) + setCurrentRow(obj) + let item: any = topListData[index] + let type: string = obj.TotalPoint ? '总积分' : obj.EarnPoint ? '赚取积分' : obj.ConsumePoint ? '消耗积分' : obj.TotalGrowth ? '总成长值' : obj.EarnGrowth ? '赚取成长值' : obj.ConsumeGrowth ? '消耗成长值' : '' + let typeTab: number = obj.TotalPoint ? 1 : obj.EarnPoint ? 2 : obj.ConsumePoint ? 3 : obj.TotalGrowth ? 4 : obj.EarnGrowth ? 5 : obj.ConsumeGrowth ? 6 : 0 + console.log('typetypetype', type); + + setSelectTab(typeTab) + let str: string = `${item.StatisticalName && MEMBERSHIPTYPEYNObj && MEMBERSHIPTYPEYNObj[item.StatisticalName] ? MEMBERSHIPTYPEYNObj[item.StatisticalName.toString()] : ""}${type}` + setCurrentDrawerTitle(str) + setShowDetail(true) + } + + + return ( +
+ {/* { + // 立即更新状态,确保UI立即响应 + setSelectBigTab(e); + // 使用setTimeout确保状态更新后再触发表格重新加载 + setTimeout(() => { + actionRef.current?.reload(); + }, 0); + }} + items={tabList} + /> */} + + + { + topLoading ? +
+
+ + 加载中... +
+
: '' + } +
+ + + { + 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() + }} + > + + + + +
+ + +
+ +
+
+ + { + topListData && topListData.length > 0 ? + topListData.map((item: any, index: number) => { + return
+
+
{item.StatisticalName && MEMBERSHIPTYPEYNObj && MEMBERSHIPTYPEYNObj[item.StatisticalName] ? MEMBERSHIPTYPEYNObj[item.StatisticalName.toString()] : ""}
+
+ +
+
+
{ + handleShowDetail(index, { + TotalPoint: item?.TotalPoint + }) + }}> +
总积分
+
{item && item?.TotalPoint ? item?.TotalPoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.TotalPoint && item?.TotalPoint.QOQData && item?.TotalPoint.summaryData ? + // {item && item?.TotalPoint ? item?.TotalPoint.QOQData : "-"} + + {(((item?.TotalPoint.summaryData - item?.TotalPoint.QOQData) / item?.TotalPoint.QOQData) * 100).toFixed(2) + '%'} + + : "-" + } +
+
+ +
{ + handleShowDetail(index, { + EarnPoint: item?.EarnPoint + }) + }}> +
赚取积分
+
{item && item?.EarnPoint ? item?.EarnPoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.EarnPoint && item?.EarnPoint.QOQData && item?.EarnPoint.summaryData ? + // {item && item?.EarnPoint ? item?.EarnPoint.QOQData : "-"} + + {(((item?.EarnPoint.summaryData - item?.EarnPoint.QOQData) / item?.EarnPoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + ConsumePoint: item?.ConsumePoint + }) + }}> +
消耗积分
+
{item && item?.ConsumePoint ? item?.ConsumePoint.summaryData : "-"}
+
+ 环比增长 + { + item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.ConsumePoint && item?.ConsumePoint.QOQData && item?.ConsumePoint.summaryData ? + // {item && item?.ConsumePoint ? item?.ConsumePoint.QOQData : "-"} + + {(((item?.ConsumePoint.summaryData - item?.ConsumePoint.QOQData) / item?.ConsumePoint.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + TotalGrowth: item?.TotalGrowth + }) + }}> +
总成长值
+
{item && item?.TotalGrowth ? item?.TotalGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.TotalGrowth && item?.TotalGrowth.QOQData && item?.TotalGrowth.summaryData ? + // {item && item?.TotalGrowth ? item?.TotalGrowth.QOQData : "-"} + + {(((item?.TotalGrowth.summaryData - item?.TotalGrowth.QOQData) / item?.TotalGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+
+ +
{ + handleShowDetail(index, { + EarnGrowth: item?.EarnGrowth + }) + }}> +
赚取成长值
+
{item && item?.EarnGrowth ? item?.EarnGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.EarnGrowth && item?.EarnGrowth.QOQData && item?.EarnGrowth.summaryData ? + // {item && item?.EarnGrowth ? item?.EarnGrowth.QOQData : "-"} + + {(((item?.EarnGrowth.summaryData - item?.EarnGrowth.QOQData) / item?.EarnGrowth.QOQData) * 100).toFixed(2) + '%'} + + + : "" + } +
+ {/*
*/} +
+ +
{ + handleShowDetail(index, { + ConsumeGrowth: item?.ConsumeGrowth + }) + }}> +
消耗成长值
+
{item && item?.ConsumeGrowth ? item?.ConsumeGrowth.summaryData : "-"}
+
+ 环比增长 + { + item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? + 0 ? addIcon : reduceIcon} /> : "" + } + { + item && item?.ConsumeGrowth && item?.ConsumeGrowth.QOQData && item?.ConsumeGrowth.summaryData ? + // {item && item?.ConsumeGrowth ? item?.ConsumeGrowth.QOQData : "-"} + + {(((item?.ConsumeGrowth.summaryData - item?.ConsumeGrowth.QOQData) / item?.ConsumeGrowth.QOQData) * 100).toFixed(2) + '%'} + + : "" + } +
+ {/*
*/} +
+
+
+
+ }) : "" + } + + + + + + { + setCurrentIndex(null) + setCurrentRow(null) + setSelectTab(0) + setCurrentDrawerTitle('') + setShowDetail(false) + }} + > + { + // 判断当前选择的 1、2、3为积分的 4、5、6 为成长值的 + let req: any = {} + let data: any = {} + + // 确保使用最新的状态值 + const currentTabValue = topListData[currentIndex].StatisticalName; + const currentSelectTab = selectTab; + + if (selectTab <= 3) { + req = { + SearchParameter: { + MEMBERSHIP_TYPE: currentTabValue || "", + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: searchParams?.StartDate || "", + OPERATE_DATE_End: searchParams?.EndDate || "", + OWNERUNIT_ID: 911, + POINT_TYPE: selectTab === 1 ? '' : selectTab === 2 ? '1' : selectTab === 3 ? '-1' : '', + POINT_SOURCE: '' + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + } + data = await handleGetPOINTRECORDList(req) + } else { + req = { + searchParameter: { + // PROVINCE_CODE: currentUser?.ProvinceCode || "", + OPERATE_DATE_Start: searchParams?.StartDate || "", + OPERATE_DATE_End: searchParams?.EndDate || "", + OWNERUNIT_ID: 911, + SCORESETTING_STATE: 1, + GROWTH_SOURCES: "", + GROWTH_TYPE: selectTab === 4 ? '' : selectTab === 5 ? '1' : selectTab === 6 ? '-1' : '' + }, + keyWord: { + Key: "MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, + PageIndex: params?.current, + PageSize: 20, + sortstr: "OPERATE_DATE desc", + } + data = await handleGetMEMBERGROWTHList(req); + } + + // req = { + // SearchParameter: { + // MEMBERSHIP_TYPE: currentTabValue || "", + // // PROVINCE_CODE: currentUser?.ProvinceCode || "", + // OPERATE_DATE_Start: params?.StartDate || "", + // OPERATE_DATE_End: params?.EndDate || "", + // OWNERUNIT_ID: 911, + // POINT_TYPE: currentSelectTab === 1 ? '' : currentSelectTab === 2 ? '1' : currentSelectTab === 3 ? '-1' : '', + // POINT_SOURCE: '' + // }, + // PageIndex: params?.current, + // PageSize: 20, + // sortstr: "OPERATE_DATE desc", + // } + + // console.log('请求参数:', req); + // data = await handleGetPOINTRECORDList(req) + + // if (searchParams.StartDate !== params?.StartDate || searchParams.EndDate !== params?.EndDate) { + // await handleGetTopData(params?.StartDate, params?.EndDate) + // } + // setSearchParams(params) + + if (data.List && data.List.length > 0) { + return { data: data.List, success: true, total: data.TotalCount } + } + return { data: [], success: true } + }} + columnsState={{ + value: columnsStateMap, + onChange: setColumnsStateMap, + }} + /> + +
+ ) +} + +export default connect(({ user }: ConnectState) => ({ + currentUser: user.currentUser +}))(MembershipTypeStatistics); \ No newline at end of file diff --git a/src/pages/travelMember/MerchantEvaluationManage/index.tsx b/src/pages/travelMember/MerchantEvaluationManage/index.tsx index dcac0c6..df15102 100644 --- a/src/pages/travelMember/MerchantEvaluationManage/index.tsx +++ b/src/pages/travelMember/MerchantEvaluationManage/index.tsx @@ -12,6 +12,7 @@ import LeftSelectTree from "@/pages/reports/settlementAccount/component/leftSele import PageTitleBox from "@/components/PageTitleBox"; import { handeGetCOMMENTList } from "../service"; import moment from 'moment' +import session from "@/utils/session"; const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) => { @@ -21,11 +22,22 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) const [collapsible, setCollapsible] = useState(false) + const MEMBERSHIPLEVELYNObj = session.get('MEMBERSHIPLEVELYNObj') + + // 树相关的属性和方法 const [selectedId, setSelectedId] = useState() const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入评价人员/商家名称" + } + }, { title: '评价时间', dataIndex: 'search_date', @@ -84,6 +96,8 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) hideInSearch: true, ellipsis: true, align: "center", + valueType: "select", + valueEnum: MEMBERSHIPLEVELYNObj }, { title: "消费评价", @@ -157,6 +171,10 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) }, PageIndex: 1, PageSize: 999999, + keyWord: { + Key: "SELLER_NAME,MEMBERSHIP_NAME", + Value: params?.searchText || "" + }, } const data = await handeGetCOMMENTList(req) console.log('datadatadatadatadata', data); diff --git a/src/pages/travelMember/OrderAfterSalesManage/index.tsx b/src/pages/travelMember/OrderAfterSalesManage/index.tsx index 1a95647..ef3a053 100644 --- a/src/pages/travelMember/OrderAfterSalesManage/index.tsx +++ b/src/pages/travelMember/OrderAfterSalesManage/index.tsx @@ -46,6 +46,14 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入购买的商品/订单编号/联系电话/会员名称" + } + }, { title: '查询时间', dataIndex: 'search_date', @@ -272,6 +280,11 @@ const OrderAfterSalesManage: React.FC<{ currentUser: CurrentUser }> = (props) => PageIndex: 1, PageSize: 999999, SortStr: "ORDER_DATE desc", + keyWord: { + Key: "ORDER_PERSON,ORDER_PERSONTEL,SALEBILL_CODE,COMMODITY_NAME", + Value: params?.searchText || "" + }, + } console.log('reqreqreqreqreq', req); diff --git a/src/pages/travelMember/OrderProductManage/index.tsx b/src/pages/travelMember/OrderProductManage/index.tsx index 79b4c05..8990f75 100644 --- a/src/pages/travelMember/OrderProductManage/index.tsx +++ b/src/pages/travelMember/OrderProductManage/index.tsx @@ -101,23 +101,31 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( }; // 定义列表字段内容 const columns: any = [ - { - title: '查询时间', - dataIndex: 'search_date', - valueType: 'dateRange', + dataIndex: 'searchText', + title: '查询内容', hideInTable: true, - hideInDescriptions: true, - search: { - transform: (value) => { - return { - OPERATE_DATE_Start: value[0], - OPERATE_DATE_End: value[1], - }; - }, - }, - // initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')], + fieldProp: { + placeholder: "请输入商品名称" + } }, + + // { + // title: '查询时间', + // dataIndex: 'search_date', + // valueType: 'dateRange', + // hideInTable: true, + // hideInDescriptions: true, + // search: { + // transform: (value) => { + // return { + // OPERATE_DATE_Start: value[0], + // OPERATE_DATE_End: value[1], + // }; + // }, + // }, + // // initialValue: [moment().format('YYYY-MM-DD'), moment().subtract(1, 'M').format('YYYY-MM-DD')], + // }, // { // title: '上级类别', // align: 'center', @@ -432,7 +440,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( { - return `${record?.USERDEFINEDTYPE_PID}-${record?.USERDEFINEDTYPE_ID}` + return `${record?.COMMODITY_ID}-${record?.OPERATE_DATE}` }} formRef={formRef} headerTitle={} // 列表表头 @@ -457,12 +465,17 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = ( SELLER_IDS: selectedId || "", UPPER_STATE: params?.UPPER_STATE === "-1" ? "" : params?.UPPER_STATE, - OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "", - OPERATE_DATE_End: params?.OPERATE_DATE_End || "", + // OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "", + // OPERATE_DATE_End: params?.OPERATE_DATE_End || "", }, PageIndex: 1, PageSize: 999999, - SortStr: "OPERATE_DATE desc" + SortStr: "OPERATE_DATE desc", + keyWord: { + Key: "COMMODITY_NAME", + Value: params?.searchText || "" + }, + } console.log('reqreqreqreq', req); diff --git a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx index 4bae423..36458eb 100644 --- a/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx +++ b/src/pages/travelMember/PointsRuleConfig/PointConfig.tsx @@ -28,6 +28,7 @@ import classNames from 'classnames'; import session from '@/utils/session'; import { handeDeleteFIELDENUM, handeGetFIELDEXPLAINList, handeGetNestingFIELDENUMList, handeSynchroFIELDENUM } from '../service'; import ModalFooter from '../scenicSpotConfig/component/modalFooter'; +import { convertTreeToLabelValue } from '@/utils/format'; const beforeUpload = (file: any) => { @@ -267,8 +268,22 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props) SearchKey: "" } const data = await handeGetNestingFIELDENUMList(req); + console.log('datadatadata', data); + if (data && data.length > 0) { setTypeTreeData(data) + if (data && data.length > 0) { + const obj: any = {} + const list: any = [] + data.forEach((item: any) => { + list.push({ label: item.label, value: item.value }) + obj[item.value] = item.label + }) + session.set('SCORETYPEList', list); + session.set('SCORETYPEObj', obj); + session.set('SCORETYPETree', convertTreeToLabelValue(data, "FIELDENUM_NAME", "FIELDENUM_VALUE")) + } + return { data: data, success: true, total: data.length } } return { data: [], success: true } diff --git a/src/pages/travelMember/PointsRuleConfig/index.tsx b/src/pages/travelMember/PointsRuleConfig/index.tsx index d80131a..dcf4a75 100644 --- a/src/pages/travelMember/PointsRuleConfig/index.tsx +++ b/src/pages/travelMember/PointsRuleConfig/index.tsx @@ -79,6 +79,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr hideInSearch: true, valueType: 'treeSelect', request: () => { + let SCORETYPETree = session.get('SCORETYPETree') return SCORETYPETree } // valueEnum: SCORETYPEObj @@ -103,7 +104,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr title: '会员等级', width: 120, align: 'center', - hideInSearch: true, valueType: 'select', valueEnum: MEMBERSHIPLEVELYNObj }, @@ -112,7 +112,6 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr title: '会员类型', width: 120, align: 'center', - hideInSearch: true, valueType: 'select', valueEnum: MEMBERSHIPTYPEYNObj }, @@ -206,13 +205,13 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr initialValue: "1" }, { - dataIndex: 'ADDTIME', - title: '添加时间', + dataIndex: 'OPERATE_DATE', + title: '操作时间', width: 150, align: 'center', hideInSearch: true, render: (_, record) => { - return record?.ADDTIME ? moment(record?.ADDTIME).format('YYYY-MM-DD HH:mm:ss') : "" + return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD HH:mm:ss') : "" } }, // { @@ -340,15 +339,17 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr search={{ span: 6, labelWidth: 'auto' }} // 请求数据 request={async (params, sorter) => { - const searchWholeParams = { searchParameter: { PROVINCE_CODE: currentUser?.ProvinceCode || "", OWNERUNIT_ID: 911, - SCORESETTING_STATE: params?.SCORESETTING_STATE + SCORESETTING_STATE: params?.SCORESETTING_STATE, + MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE || "", + MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL || "", }, PageIndex: 1, - PageSize: 20 + PageSize: 999999, + SortStr: "OPERATE_DATE desc" } setSearchParams(searchWholeParams) const data = await handleGetSCORESETTINGList(searchWholeParams); @@ -382,7 +383,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr ], }} - pagination={{ defaultPageSize: 10 }} + // pagination={{ defaultPageSize: 10 }} /> = (pr name="SCORE_TYPE" label="积分类别" request={async () => { + let SCORETYPETree = session.get('SCORETYPETree') return SCORETYPETree }} fieldProps={{ @@ -620,7 +622,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr > - + ); }; export default connect(({ user }: ConnectState) => ({ diff --git a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx index 75ed906..2c78611 100644 --- a/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx +++ b/src/pages/travelMember/RegistrationRetentionAnalysis/index.tsx @@ -78,25 +78,24 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p hideInSearch: true, ellipsis: true, dataIndex: 'BEHAVIORRECORD_ROUTNAME', - render: (_, record) => { - // return record?.BEHAVIORRECORD_ROUTNAME ? { - // console.log('record', record); - // const req: any = { - // key: record.BEHAVIORRECORD_ROUT, - // path: record.BEHAVIORRECORD_ROUT, - // title: record.BEHAVIORRECORD_ROUTNAME, - // children: children - // } - // console.log('req', req); - // handleTabsPanes(req) - // }}> - // {record?.BEHAVIORRECORD_ROUTNAME || ""} - // : "-" - - return record?.BEHAVIORRECORD_ROUTNAME ? - {record?.BEHAVIORRECORD_ROUTNAME} - : "" - } + // render: (_, record) => { + // return record?.BEHAVIORRECORD_ROUTNAME ? { + // console.log('record', record); + // const req: any = { + // key: record.BEHAVIORRECORD_ROUT, + // path: record.BEHAVIORRECORD_ROUT, + // title: record.BEHAVIORRECORD_ROUTNAME, + // children: children + // } + // console.log('req', req); + // handleTabsPanes(req) + // }}> + // {record?.BEHAVIORRECORD_ROUTNAME || ""} + // : "-" + // return record?.BEHAVIORRECORD_ROUTNAME ? + // {record?.BEHAVIORRECORD_ROUTNAME} + // : "" + // } }, { title: '操作类型', @@ -138,17 +137,17 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p width: 160, ellipsis: true, }, - { - title: '响应时间(s)', - hideInSearch: true, - dataIndex: 'BEHAVIORRECORD_DURATION', - width: 120, - align: 'center', - sorter: (a, b) => a.BEHAVIORRECORD_DURATION - b.BEHAVIORRECORD_DURATION, - render: (_, record) => { - return `${record?.BEHAVIORRECORD_DURATION ? record?.BEHAVIORRECORD_DURATION : ""}` - } - }, + // { + // title: '响应时间(s)', + // hideInSearch: true, + // dataIndex: 'BEHAVIORRECORD_DURATION', + // width: 120, + // align: 'center', + // sorter: (a, b) => a.BEHAVIORRECORD_DURATION - b.BEHAVIORRECORD_DURATION, + // render: (_, record) => { + // return `${record?.BEHAVIORRECORD_DURATION ? record?.BEHAVIORRECORD_DURATION : ""}` + // } + // }, { title: '操作内容', hideInSearch: true, diff --git a/src/pages/travelMember/ShoppingMallProductSearch/index.tsx b/src/pages/travelMember/ShoppingMallProductSearch/index.tsx index ba2e2d4..6e504b3 100644 --- a/src/pages/travelMember/ShoppingMallProductSearch/index.tsx +++ b/src/pages/travelMember/ShoppingMallProductSearch/index.tsx @@ -122,6 +122,14 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined // 定义列表字段内容 const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldProp: { + placeholder: "请输入品牌名称/商品名称" + } + }, { dataIndex: 'index', title: '序号', @@ -644,6 +652,10 @@ const ShoppingMallProductSearch: React.FC<{ currentUser: CurrentUser | undefined COMMODITY_TYPE: 4000, COMMODITY_STATE: 1, }, + keyWord: { + Key: "BRAND_NAME,COMMODITY_NAME", + Value: params?.searchText || "" + }, PageIndex: 1, PageSize: 999999, } diff --git a/src/pages/travelMember/SupplierMerchantManage/index.tsx b/src/pages/travelMember/SupplierMerchantManage/index.tsx index 9f62a3e..fcca2ab 100644 --- a/src/pages/travelMember/SupplierMerchantManage/index.tsx +++ b/src/pages/travelMember/SupplierMerchantManage/index.tsx @@ -325,6 +325,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> disabled={disabled} bounds={bounds} onStart={(event, uiData) => onDraggaleStart(event, uiData)} + handle=".SupplierMerchantManageModalTitle" >
{modal}
@@ -486,7 +488,7 @@ const SupplierMerchantManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { headerTitle={} search={{ span: 6 }} request={async (params, sorter) => { + console.log('paramsparamsparams', params); + const sortstr = Object.keys(sorter).map(n => { const value = sorter[n] return value ? `${n} ${value.replace('end', '')}` : '' @@ -679,7 +681,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { value: params?.MEMBERSHIP_NAME || "" }, PageIndex: params.current || 1, - PageSize: 20, + PageSize: params?.pageSize, sortstr: sortstr.length ? sortstr.toString() : "", } setSearchParams(params) @@ -1008,7 +1010,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { OWNERUNIT_ID: 911 }, PageIndex: params.current, - PageSize: 20, + PageSize: params?.pageSize, SortStr: "CONSUMPTIONRECORD_DATE desc" } const data = await handleGetCONSUMPTIONRECORDList(req) @@ -1017,6 +1019,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { } return { data: [], success: true } }} + pagination={{ + defaultPageSize: 20, + showTotal: (total) => `共 ${total} 条记录` + }} /> : "" } @@ -1037,7 +1043,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { OWNERUNIT_ID: 911 }, PageIndex: params.current, - PageSize: 20, + PageSize: params?.pageSize, SortStr: "OPERATE_DATE desc" } const data = await handleGetPOINTRECORDList(req) @@ -1047,6 +1053,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { } return { data: [], success: true } }} + pagination={{ + defaultPageSize: 20, + showTotal: (total) => `共 ${total} 条记录` + }} /> : "" } @@ -1068,7 +1078,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { OWNERUNIT_ID: 911 }, PageIndex: params.current, - PageSize: 20, + PageSize: params?.pageSize, SortStr: "OPERATE_DATE desc" } const data = await handleGetMEMBERGROWTHList(req) @@ -1078,6 +1088,10 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => { } return { data: [], success: true } }} + pagination={{ + defaultPageSize: 20, + showTotal: (total) => `共 ${total} 条记录` + }} /> : '' } diff --git a/src/pages/travelMember/scenicSpotConfig/index.tsx b/src/pages/travelMember/scenicSpotConfig/index.tsx index adbc1d2..1cb45a8 100644 --- a/src/pages/travelMember/scenicSpotConfig/index.tsx +++ b/src/pages/travelMember/scenicSpotConfig/index.tsx @@ -85,6 +85,14 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr // 定义列表字段内容 const columns: any = [ + { + dataIndex: 'searchText', + title: '查询内容', + hideInTable: true, + fieldprop: { + placeholder: '请输入景区名称/景区位置' + } + }, { dataIndex: 'SCENICAREA_NAME', title: '景区名称', @@ -379,6 +387,10 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr SCENICAREA_TYPES: params?.SCENICAREA_TYPE, SCENICAREA_STATES: params?.SCENICAREA_STATE, }, + keyWord: { + Key: "SCENICAREA_NAME,SCENICAREA_LOCATION", + Value: params?.searchText || "" + }, PageIndex: 1, PageSize: 999999, } diff --git a/src/pages/travelMember/service.ts b/src/pages/travelMember/service.ts index 7bc2c1c..beb0bc1 100644 --- a/src/pages/travelMember/service.ts +++ b/src/pages/travelMember/service.ts @@ -724,4 +724,103 @@ export async function handeGetSupplierSaleBillList(params: any) { return [] } return data.Result_Data.List -} \ No newline at end of file +} + + +// 拿到埋点的配置数据 +export async function handeGetWECHATAPPBURYPOINTList(params: any) { + const data = await requestEncryption(`/WeChat/GetWECHATAPPBURYPOINTList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return [] + } + return data.Result_Data +} + +// 同步小程序埋点配置 +export async function handeSynchroWECHATAPPBURYPOINT(params: any) { + const data = await requestEncryption(`/WeChat/SynchroWECHATAPPBURYPOINT`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} + +// 删除小程序埋点配置 +export async function handeDeleteWECHATAPPBURYPOINT(params: any) { + const data = await requestEncryption(`/WeChat/DeleteWECHATAPPBURYPOINT`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} + +// 拿到所有小程序的列表 +export async function handeGetWECHATAPPSIGNList(params: any) { + const data = await requestEncryption(`/WeChat/GetWECHATAPPSIGNList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data.Result_Data.List +} + + +// 获取自定义类别表嵌套列表 +export async function handeGetNestingAUTOTYPEList(params: any) { + const data = await requestEncryption(`/Member/GetNestingAUTOTYPEList`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return wrapTreeNode(data.Result_Data.List) +} + +// 同步自定义列表 +export async function handeSynchroAUTOTYPE(params: any) { + const data = await requestEncryption(`/Member/SynchroAUTOTYPE`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} + +// 删除自定义类别表 +export async function handeDeleteAUTOTYPE(params: any) { + const data = await requestEncryption(`/Member/DeleteAUTOTYPE`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data +} + +// 新增三个统计报表页面 +export async function handeGetPointGrowthSummary(params: any) { + const data = await requestEncryption(`/Member/GetPointGrowthSummary`, { + method: 'POST', + data: { ...params, requestEncryption: true } + }) + if (data.Result_Code !== 100) { + return data + } + return data.Result_Data.List +} + diff --git a/src/utils/format.ts b/src/utils/format.ts index 0992a3e..cd646c6 100644 --- a/src/utils/format.ts +++ b/src/utils/format.ts @@ -531,4 +531,23 @@ export const handleSetlogSave = async (str: string) => { BROWSER_VERSION: browserVersion, OPERATING_SYSTEM: systemBasin }) +} + + +export function convertTreeToLabelValue( + tree: T[], + labelKey: keyof T, + valueKey: keyof T, + childrenKey: keyof T = 'children' as keyof T +): any[] { + return tree.map((item: any) => { + const node: any = { + label: item[labelKey], + value: item[valueKey] + }; + if (Array.isArray(item[childrenKey]) && item[childrenKey].length > 0) { + node.children = convertTreeToLabelValue(item[childrenKey], labelKey, valueKey, childrenKey); + } + return node; + }); } \ No newline at end of file