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