This commit is contained in:
ylj20011123 2025-07-17 19:51:49 +08:00
parent 010680be5a
commit 8540a9d612
36 changed files with 2235 additions and 871 deletions

View File

@ -1,4 +1,4 @@
// 卡券适用规则
// 卡券适用规则 卡券规则设置
import { connect } from "umi";
import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect";
@ -19,6 +19,7 @@ import moment from 'moment'
import ProForm, { ProFormSelect, ProFormText } from "@ant-design/pro-form";
import './index.less'
import { handleSetlogSave } from "@/utils/format";
import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter";
const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) => {
@ -65,6 +66,12 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
align: 'center',
hideInSearch: true,
ellipsis: true,
render: (_, record) => {
return record?.COOPSHOP_RULE_NAME ? <a onClick={() => {
setShowDetail(true)
setCurrentRow(record)
}}>{record?.COOPSHOP_RULE_NAME}</a> : "-"
}
},
{
title: "关联门店",
@ -118,28 +125,28 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
return record?.CREATE_DATE ? moment(record?.CREATE_DATE).format('YYYY-MM-DD') : "-"
}
},
{
title: "操作",
dataIndex: "option",
width: 120,
fixed: 'right',
align: 'center',
hideInSearch: true,
ellipsis: true,
render: (_, record) => {
return <Space>
<a onClick={() => {
setShowDetail(true)
setCurrentRow(record)
}}></a>
<Popconfirm title={"确认删除该规则?"} onConfirm={async () => {
await handleDeleteShopRule(record?.COOPSHOP_RULE_ID)
}}>
<a></a>
</Popconfirm>
</Space>
}
}
// {
// title: "操作",
// dataIndex: "option",
// width: 120,
// fixed: 'right',
// align: 'center',
// hideInSearch: true,
// ellipsis: true,
// render: (_, record) => {
// return <Space>
// <a onClick={() => {
// setShowDetail(true)
// setCurrentRow(record)
// }}>编辑</a>
// <Popconfirm title={"确认删除该规则?"} onConfirm={async () => {
// await handleDeleteShopRule(record?.COOPSHOP_RULE_ID)
// }}>
// <a>删除</a>
// </Popconfirm>
// </Space>
// }
// }
]
// 同步规则记录
@ -192,10 +199,13 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
if (data.Result_Code === 100) {
message.success(data.Result_Desc)
actionRef.current?.reload()
ModalFormRef?.current?.resetFields()
setCurrentRow(undefined)
setShowDetail(false)
} else {
message.error(data.Result_Desc)
}
handleSetlogSave('卡券规则的删除')
// handleSetlogSave('卡券规则的删除')
}
return (
@ -278,7 +288,12 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
}}
destroyOnClose
confirmLoading={modalLoading}
width={'70%'}
// width={'70%'}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
title={currentRow?.COOPSHOP_RULE_ID ? currentRow?.COOPSHOP_RULE_NAME : "新增规则"}
onOk={() => {
ModalFormRef?.current?.validateFields().then(async (res) => {
@ -286,6 +301,24 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
await handleSynchroCOOPSHOPRULE(res)
})
}}
footer={<ModalFooter
hideDelete={!currentRow?.COOPSHOP_RULE_ID}
handleDelete={async () => {
await handleDeleteShopRule(currentRow?.COOPSHOP_RULE_ID)
}}
handleCancel={() => {
ModalFormRef?.current?.resetFields()
setCurrentRow(undefined)
setShowDetail(false)
}}
handleOK={() => {
ModalFormRef?.current?.validateFields().then(async (res) => {
console.log('res', res)
await handleSynchroCOOPSHOPRULE(res)
})
}}
/>}
>
<ProForm formRef={ModalFormRef} layout={'horizontal'} submitter={false} initialValues={{
@ -295,7 +328,9 @@ const CardCouponApplicRules: React.FC<{ currentUser: CurrentUser }> = (props) =>
UPDATE_DATE: moment().format('YYYY-MM-DD HH:mm:ss'),
OPERATINGUNIT_NAME: currentUser?.OwnerUnitId,
ISOFFLINE: currentRow?.ISOFFLINE || 0
}}>
}}
labelCol={{ style: { width: 80 } }}
>
<Divider orientation="left"></Divider>
<Row gutter={8}>
<Col span={12}>

View File

@ -14,13 +14,14 @@ 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 { handleGetCOOPSHOP_RULEList, handleGetCOUPONList, handleSynchroCOUPONService } from "../service";
import { handleDeleteCOUPON, handleGetCOOPSHOP_RULEList, handleGetCOUPONList, handleSynchroCOUPONService } from "../service";
import ProForm, { ProFormDatePicker, ProFormSelect, ProFormText, ProFormTextArea, ProFormUploadButton } from "@ant-design/pro-form";
import session from "@/utils/session";
import './index.less'
import { handleSetlogSave } from "@/utils/format";
import moment from 'moment'
import { uploadPicture } from "@/services/picture";
import ModalFooter from "@/pages/travelMember/scenicSpotConfig/component/modalFooter";
const beforeUpload = (file: any) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
@ -102,6 +103,17 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
align: 'left',
hideInSearch: true,
ellipsis: true,
render: (_, record) => {
return record?.COUPON_NAME ? <a onClick={() => {
setShowDetail(true)
setCurrentRow(record)
if (record.COUPON_IMAGEURL) {
setFileList([
{ name: "-", url: record.COUPON_IMAGEURL }
])
}
}}>{record?.COUPON_NAME}</a> : "-"
}
},
{
title: "运营单位",
@ -138,39 +150,54 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
hideInSearch: true,
ellipsis: true,
},
{
title: "操作",
dataIndex: "options",
width: 120,
align: 'center',
hideInSearch: true,
render: (_, record) => {
return <Space>
<a onClick={() => {
console.log('record', record);
setShowDetail(true)
setCurrentRow(record)
if (record.COUPON_IMAGEURL) {
setFileList([
{ name: "-", url: record.COUPON_IMAGEURL }
])
}
}}>
</a>
<Popconfirm title={"确认删除该规则?"} onConfirm={async () => {
await handleDeleteShopRule(record?.COOPSHOP_RULE_ID)
}}>
<a></a>
</Popconfirm>
</Space>
}
}
// {
// title: "操作",
// dataIndex: "options",
// width: 120,
// align: 'center',
// hideInSearch: true,
// render: (_, record) => {
// return <Space>
// <a onClick={() => {
// console.log('record', record);
// setShowDetail(true)
// setCurrentRow(record)
// if (record.COUPON_IMAGEURL) {
// setFileList([
// { name: "-", url: record.COUPON_IMAGEURL }
// ])
// }
// }}>
// 编辑
// </a>
// <Popconfirm title={"确认删除该规则?"} onConfirm={async () => {
// await handleDeleteShopRule(record?.COOPSHOP_RULE_ID)
// }}>
// <a>删除</a>
// </Popconfirm>
// </Space>
// }
// }
]
// 删除的方法
const handleDeleteShopRule = async (id: any) => {
const req: any = {
COUPONId: id
}
const data = await handleDeleteCOUPON(req)
if (data.Result_Code === 100) {
message.success(data.Result_Desc)
actionRef.current?.reload()
ModalFormRef?.current?.resetFields()
setCurrentRow(null)
setShowDetail(false)
setFileList([])
} else {
message.error(data.Result_Desc)
}
}
@ -220,9 +247,6 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
handleSetlogSave(currentRow?.COOPSHOP_RULE_ID ? '卡券的编辑' : '卡券的新增')
}
return (
<div ref={(el) => {
// 打印报表
@ -254,7 +278,8 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
const req: any = {
SearchParameter: {
OWNERUNIT_ID: 911,
COUPON_TYPES: params?.COUPON_TYPES || ""
COUPON_TYPES: params?.COUPON_TYPES || "",
COUPON_ISVALID: 1
},
PageIndex: 1,
PageSize: 999999
@ -306,7 +331,11 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
setFileList([])
}}
confirmLoading={modalLoading}
width={'70%'}
width={900}
bodyStyle={{
height: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
destroyOnClose
title={currentRow?.COUPON_ID ? currentRow?.COUPON_NAME : "新增卡券"}
onOk={() => {
@ -314,9 +343,27 @@ const CardInformationManager: React.FC<{ currentUser: CurrentUser }> = (props) =
await handleSynchroCOUPON(res)
})
}}
footer={<ModalFooter
hideDelete={!currentRow?.COUPON_ID}
handleDelete={async () => {
await handleDeleteShopRule(currentRow?.COUPON_ID)
}}
handleCancel={() => {
ModalFormRef?.current?.resetFields()
setCurrentRow(null)
setShowDetail(false)
setFileList([])
}}
handleOK={() => {
ModalFormRef?.current?.validateFields().then(async (res) => {
await handleSynchroCOUPON(res)
})
}}
/>}
>
<div className="CardInformationManagerModalContent" style={{}}>
<ProForm formRef={ModalFormRef} layout={'horizontal'} submitter={false} initialValues={{
<ProForm formRef={ModalFormRef} layout={'horizontal'} submitter={false} labelCol={{ style: { width: 80 } }} initialValues={{
...currentRow,
OWNERUNIT_ID: currentRow?.OWNERUNIT_ID || currentUser?.OwnerUnitId,
COUPON_TYPE: currentRow?.COUPON_TYPE ? currentRow?.COUPON_TYPE : COUPONTYPEList && COUPONTYPEList.length > 0 ? COUPONTYPEList[0].value : "",

View File

@ -88,4 +88,17 @@ export async function handleSynchroCOUPONService(params: any) {
}
return data
}
// 删除卡券
export async function handleDeleteCOUPON(params: any) {
const data = await requestEncryption(`/Coupon/DeleteCOUPON`, {
method: 'POST',
data: {
...params,
requestEncryption: true
}
})
if (data.Result_Code !== 100) {
return []
}
return data
}

View File

@ -186,8 +186,9 @@ const saleRankReport: React.FC<{ currentUser: CurrentUser }> = (props) => {
"微信公众号": "微信公众号",
"驿商云客户端": "驿商云客户端",
"彩云驿出行": "彩云驿出行",
"出行平台": "出行平台",
},
initialValue: '驿商云平台'
initialValue: currentUser?.ProvinceCode === "530000" ? '出行平台' : '驿商云平台'
},
{
title: '操作系统',

View File

@ -28,6 +28,7 @@ import { deletePicture, uploadPicture } from '@/services/picture';
import { handleGetServerPartShopNewList } from '@/pages/basicManage/serviceArea/service';
import { handleGetServerpartShopList } from '@/pages/DataVerification/service';
import ModalFooter from '@/pages/travelMember/scenicSpotConfig/component/modalFooter';
import { handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
@ -136,10 +137,18 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
placeholder: "请输入商户名称"
}
},
{
dataIndex: 'SERVERPART_NAME',
title: '服务区名称',
align: 'center',
width: 200,
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'SELLER_NAME',
title: '商家名称',
width: 300,
width: 200,
align: 'center',
hideInSearch: true,
ellipsis: true,
@ -147,7 +156,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
return record?.SELLER_NAME ? <a onClick={() => {
setCurrentRow({ ...record });
handleModalVisible(true);
}}>{`${record?.SERVERPART_NAME || ""}${record?.SELLER_NAME}`}</a> : "-"
}}>{`${record?.SELLER_NAME}`}</a> : "-"
}
},
{
@ -631,6 +640,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
handleConfirmLoading(false)
if (data.Result_Code === 100) {
await handleUploadAllImage(res, data)
handleSetlogSave(`更新【${currentRow?.SELLER_NAME}】商家信息成功`)
message.success(data.Result_Desc)
formRef?.current?.resetFields()
handleConfirmLoading(false)
@ -644,6 +654,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.SELLER_NAME}】商家信息失败`)
}
};
@ -930,6 +941,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}
console.log('reqreqreqreq', req);
const data = await handleGetMEMBERADDRESSList(req);
handleSetlogSave(`点击查询按钮`)
console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
@ -947,6 +959,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
onClick={() => {
setShowAddModal(true)
// handleModalVisible(true);
handleSetlogSave(`点击新增服务区商家信息`)
}}
>
@ -1172,6 +1185,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}}></Button> */}
<Button type={"primary"} loading={revenueLoading} onClick={() => {
handleGetRevenueData()
handleSetlogSave(`点击获取营收按钮`)
}}></Button>
</div>
: <div></div>
@ -1245,6 +1259,10 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
}
setInteriorImageList(list3);
if (!currentRow?.SELLER_ID) {
handleGetRevenueData()
}
// if (currentRow?.SELLER_ID) {
// let req: any = {
@ -1354,164 +1372,198 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
await handleAddUpdate(newValue);
}}
>
<Row gutter={8}>
<Col span={8}>
<ProFormText
name="SELLER_NAME"
label="商家名称"
rules={[
{
required: true,
message: '请输入商家名称!'
}
]}
disabled={currentRow?.SELLER_NAME}
/>
</Col>
<Col span={8}>
<ProFormTreeSelect
name="SHOPTRADE"
label="门店业态"
request={() => {
return processTreeData(BUSINESSTRADEYNTree)
}}
fieldProps={{
treeDefaultExpandAll: true, // 默认展开所有节点
showSearch: true, // 可选:添加搜索功能
treeNodeFilterProp: 'label', // 可选:按标签搜索
}}
rules={[
{
required: true,
message: '请选择门店业态!'
}
]}
disabled={currentRow?.SHOPTRADE}
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_INDEX"
label="排序索引"
/>
</Col>
<Col span={8}>
<ProFormText
name="BUS_STARTDATE"
label="营业时间"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="SERVERPART_ID"
label="服务区名"
options={serverpartList}
rules={[
{
required: true,
message: '请选择服务区!'
}
]}
fieldProps={{
showSearch: true,
filterOption: (input, option) =>
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
}}
disabled={currentRow?.SERVERPART_ID}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ISSHOW"
label="小程序呈现"
options={[
{ label: "是", value: 1 },
{ label: "否", value: 0 },
]}
rules={[
{
required: true,
message: '请选择是否在小程序呈现'
}
]}
/>
</Col>
<Col span={8}>
<ProFormText
name="MONTHLYSALES"
label="上月销量"
/>
</Col>
<Col span={8}>
<ProFormText
name="CASHPAY"
label="月销售额"
/>
</Col>
<Col span={8}>
<ProFormText
name="PERCAPITA"
label="人均价格"
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_LINKMAN"
label="联系人员"
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_TELEPHONE"
label="商家电话"
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_ADDRESS"
label="商家地址"
/>
</Col>
<Col span={24}>
<ProFormText
name="SELF_COMMENT"
label="掌柜寄语"
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SELLER_DESC"
label="商家介绍"
/>
</Col>
</Row>
<Tabs
onChange={(e: any) => {
setSelectTab(e)
if (currentRow?.SELLER_ID) {
if (e === '1') {
handleSetlogSave(`查询【${currentRow?.SELLER_NAME}】商家信息`)
} else if (e === '2') {
handleSetlogSave(`查询【${currentRow?.SELLER_NAME}】门店信息`)
} else if (e === '3') {
handleSetlogSave(`查询【${currentRow?.SELLER_NAME}】评论信息`)
} else if (e === '4') {
handleSetlogSave(`查询【${currentRow?.SELLER_NAME}】商家图片`)
}
}
}}
activeKey={selectTab}
type="card"
items={[
{ label: "门店信息", key: "1" },
{ label: "评论信息", key: "2" },
{ label: "商家信息", key: "1" },
{ label: "门店信息", key: "2" },
{ label: "评论信息", key: "3" },
{ label: "商家图片", key: "4" },
]}
/>
<div style={{ display: selectTab === '1' ? 'block' : 'none' }}>
<Row gutter={8}>
<Col span={8}>
<ProFormText
name="SELLER_NAME"
label="商家名称"
rules={[
{
required: true,
message: '请输入商家名称!'
}
]}
disabled={currentRow?.SELLER_NAME}
/>
</Col>
<Col span={8}>
<ProFormTreeSelect
name="SHOPTRADE"
label="门店业态"
request={() => {
return processTreeData(BUSINESSTRADEYNTree)
}}
fieldProps={{
treeDefaultExpandAll: true, // 默认展开所有节点
showSearch: true, // 可选:添加搜索功能
treeNodeFilterProp: 'label', // 可选:按标签搜索
}}
rules={[
{
required: true,
message: '请选择门店业态!'
}
]}
disabled={currentRow?.SHOPTRADE}
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_INDEX"
label="排序索引"
/>
</Col>
<Col span={8}>
<ProFormText
name="BUS_STARTDATE"
label="营业时间"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="SERVERPART_ID"
label="服务区名"
options={serverpartList}
rules={[
{
required: true,
message: '请选择服务区!'
}
]}
fieldProps={{
showSearch: true,
filterOption: (input, option) =>
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
}}
disabled={currentRow?.SERVERPART_ID}
/>
</Col>
<Col span={8}>
<ProFormSelect
name="ISSHOW"
label="小程序呈现"
options={[
{ label: "是", value: 1 },
{ label: "否", value: 0 },
]}
rules={[
{
required: true,
message: '请选择是否在小程序呈现'
}
]}
/>
</Col>
<Col span={8}>
<ProFormText
name="MONTHLYSALES"
label="上月销量"
/>
</Col>
<Col span={8}>
<ProFormText
name="CASHPAY"
label="月销售额"
/>
</Col>
<Col span={8}>
<ProFormText
name="PERCAPITA"
label="人均价格"
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_LINKMAN"
label="联系人员"
rules={[
{
required: true,
message: '请输入联系人员'
}
]}
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_TELEPHONE"
label="商家电话"
rules={[
{
required: true,
message: '请输入商家电话'
}
]}
/>
</Col>
<Col span={8}>
<ProFormText
name="SELLER_ADDRESS"
label="商家地址"
/>
</Col>
<Col span={24}>
<ProFormText
name="SELF_COMMENT"
label="掌柜寄语"
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SELLER_DESC"
label="商家介绍"
rules={[
{
required: true,
message: '请输入商家介绍'
}
]}
/>
</Col>
</Row>
</div>
<ProTable
search={false}
options={false}
columns={shopColumns}
bordered
style={{ display: selectTab === '1' ? 'block' : 'none' }}
style={{ display: selectTab === '2' ? 'block' : 'none' }}
dataSource={currentShopData}
/>
<div style={{ display: selectTab === '1' ? 'block' : 'none' }}>
<div style={{ display: selectTab === '4' ? 'block' : 'none' }}>
<Row gutter={8}>
<Col span={8}>
<ProFormUploadButton
@ -1666,7 +1718,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
options={false}
bordered
columns={commentColumns}
style={{ display: selectTab === '2' ? 'block' : 'none' }}
style={{ display: selectTab === '3' ? 'block' : 'none' }}
request={async () => {
if (!currentRow?.SELLER_ID) {
return { data: [], success: true }
@ -1688,7 +1740,7 @@ const MerchantInformation: React.FC<{ currentUser: CurrentUser | undefined }> =
/>
</ProForm>
</Modal>
</div>
</div >
);
};
export default connect(({ user }: ConnectState) => ({

View File

@ -26,6 +26,8 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
// const [currentRow, setCurrentRow] = useState<any>();
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
// 订单详情
const [orderDetail, setOrderDetail] = useState<any>()
const onDraggaleStart = (event, uiData) => {
const { clientWidth, clientHeight } = window.document.documentElement;
@ -129,6 +131,16 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
layout={'horizontal'}
formRef={modalRef}
submitter={false}
// request={async () => {
// console.log('currentRow', currentRow);
// if (currentRow) {
// return {
// ...currentRow
// }
// } else {
// return {}
// }
// }}
initialValues={currentRow ? {
...currentRow,
ORDER_DATE: currentRow?.ORDER_DATE ? moment(currentRow?.ORDER_DATE).format('YYYY-MM-DD HH:mm:ss') : ''
@ -302,6 +314,14 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"ORDER_PERSON"}
label={"收货人"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
</Row>
</div>
</ProForm>
@ -325,6 +345,7 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
console.log('dasdas', data);
let obj: any = data.List && data.List.length > 0 ? data.List[0] : null
SALEBILL_ID = obj.SALEBILL_ID
setOrderDetail(obj)
modalRef.current?.setFieldsValue({
SALEBILL_CODE: obj.SALEBILL_CODE || "",
@ -344,7 +365,6 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
PACK_TYPE: obj.PACK_TYPE || "",
TAKE_NUMBER: obj.TAKE_NUMBER || "",
})
}
const req: any = {
@ -367,9 +387,9 @@ const OrderDetailModal = ({ modalVisible, handleCloseModal, currentRow }: Detail
<tr>
<td colSpan={2} style={{ textAlign: 'center', fontWeight: 'bold' }}></td>
<td />
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{currentRow?.TOTAL_COUNT || 0}</td>
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{orderDetail?.TOTAL_COUNT || 0}</td>
<td />
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{currentRow?.ORDER_AMOUNT?.toFixed(2) || '0.00'}</td>
<td style={{ textAlign: 'center', fontWeight: 'bold' }}>{orderDetail?.ORDER_AMOUNT?.toFixed(2) || '0.00'}</td>
</tr>
)
}}

View File

@ -18,10 +18,11 @@ import { handleGetCONSUMPTIONRECORDList } from "../service";
import moment from 'moment'
import session from "@/utils/session";
import OrderDetailModal from "../BookingMealOrder/components/orderDetailModal";
import { handleSetlogSave } from "@/utils/format";
const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any }> = (props) => {
const { currentUser, isComponent, parentDetail } = props
const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
@ -119,6 +120,14 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
}}>{record?.TICKET_CODE}</a> : "-"
}
},
{
title: "服务区名称",
width: 150,
dataIndex: "SERVERPART_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "门店名称",
width: 150,
@ -207,8 +216,13 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
}} >
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
{
isComponent ? '' : <LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} showYN={true} />
}
<div style={{
width: '100%',
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
@ -222,23 +236,45 @@ const ConsumptionRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
expandRowByClick: true
}}
headerTitle={<PageTitleBox props={props} />}
scroll={{ x: '100%', y: 'calc(100vh - 450px)' }}
search={{ span: 6 }}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6 }}
request={async (params) => {
const req: any = {
SearchParameter: {
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE
},
PageIndex: params?.current,
PageSize: params?.pageSize,
keyWord: {
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE",
Value: params?.searchText || ""
let req: any = {}
if (isComponent) {
req = {
SearchParameter: {
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID
},
PageIndex: params?.current,
PageSize: params?.pageSize,
sortStr: "CONSUMPTIONRECORD_DATE desc"
}
} else {
if (!selectedId) {
return
}
req = {
SearchParameter: {
SERVERPART_IDS: selectedId,
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
CONSUMPTIONRECORD_TYPE: params?.CONSUMPTIONRECORD_TYPE === '0' ? '' : params?.CONSUMPTIONRECORD_TYPE
},
PageIndex: params?.current,
PageSize: params?.pageSize,
keyWord: {
Key: "MEMBERSHIP_NAME,MEMBERSHIP_MOBILEPHONE",
Value: params?.searchText || ""
},
sortStr: "CONSUMPTIONRECORD_DATE desc"
}
}
const data = await handleGetCONSUMPTIONRECORDList(req)
handleSetlogSave(`点击查询按钮`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -17,10 +17,11 @@ import PageTitleBox from "@/components/PageTitleBox";
import { handleGetMEMBERGROWTHList } from "../service";
import moment from 'moment'
import session from "@/utils/session";
import { handleSetlogSave } from "@/utils/format";
const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any }> = (props) => {
const { currentUser, isComponent, parentDetail } = props
const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
@ -75,6 +76,14 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
align: 'center',
ellipsis: true,
},
{
title: "会员昵称",
width: 150,
dataIndex: "MEMBERSHIP_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "累计成长值",
width: 120,
@ -132,12 +141,12 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
},
{
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') : "-"
}
},
]
@ -169,9 +178,19 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
expandRowByClick: true
}}
headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6 }}
request={async (params) => {
const req: any = {
const req: any = isComponent ? {
searchParameter: {
OWNERUNIT_ID: 911,
SCORESETTING_STATE: 1,
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
},
PageIndex: params?.current,
PageSize: 20,
sortStr: "OPERATE_DATE desc"
} : {
searchParameter: {
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "",
@ -182,9 +201,12 @@ const GrowthValueRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props)
GROWTH_TYPE: params?.GROWTH_TYPE === "-2" ? '' : params?.GROWTH_TYPE
},
PageIndex: params?.current,
PageSize: 20
PageSize: 20,
sortStr: "OPERATE_DATE desc"
}
const data = await handleGetMEMBERGROWTHList(req);
handleSetlogSave(`点击查询按钮`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -28,7 +28,7 @@ import classNames from 'classnames';
import session from '@/utils/session';
import ModalFooter from '../../scenicSpotConfig/component/modalFooter';
import { handeDeleteFIELDENUM, handeGetFIELDEXPLAINList, handeGetNestingFIELDENUMList, handeSynchroFIELDENUM } from '../../service';
import { convertTreeToLabelValue } from '@/utils/format';
import { convertTreeToLabelValue, handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
@ -202,8 +202,10 @@ 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}】成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -231,6 +233,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
message.success("新增成功!")
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】成功`)
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
@ -239,6 +242,7 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】失败`)
}
}
@ -270,6 +274,8 @@ const GrowthConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
const data = await handeGetNestingFIELDENUMList(req);
console.log('dasjkdas', data);
handleSetlogSave(`查看了成长值枚举配置列表`)
if (data && data.length > 0) {
setTypeTreeData(data)
if (data && data.length > 0) {

View File

@ -26,6 +26,7 @@ import session from '@/utils/session';
import PageTitleBox from '@/components/PageTitleBox';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import GrowthConfig from './components/growthConfig';
import { handleSetlogSave } from '@/utils/format';
@ -93,6 +94,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
hideInDescriptions: true,
render: (_, record) => {
return record?.GROWTHSETTING_NAME ? <a onClick={() => {
handleSetlogSave(`查看了${record?.GROWTHSETTING_NAME}的规则详情`)
setCurrentRow({ ...record });
handleModalVisible(true);
}}>{record?.GROWTHSETTING_NAME}</a> : '-'
@ -227,8 +229,10 @@ 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}成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -256,12 +260,14 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
}
const data = await handleSynchroGROWTHSETTING(req);
if (data.Result_Code === 100) {
handleSetlogSave(`更新${currentRow?.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)
}
};
@ -297,6 +303,7 @@ const GrowthValueRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }>
}
const data = await handleGetGROWTHSETTINGList(req);
if (data.List && data.List.length > 0) {
handleSetlogSave(`查看了成长规则配置列表`)
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }

View File

@ -29,8 +29,8 @@ import session from '@/utils/session';
import LeftSelectMallType from '../ProductListingManagement/component/LeftSelectMallType';
const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props
const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined, isComponent?: boolean, parentDetail?: any }> = (props) => {
const { currentUser, isComponent, parentDetail } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [currentRow, setCurrentRow] = useState<COMMODITYModel>();
@ -249,16 +249,20 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> =
return (
<div>
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectMallType setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} setData={setLeftTreeData} />
{
isComponent ? '' :
<LeftSelectMallType setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} setData={setLeftTreeData} />
}
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
}}>
{/* 最外层的列表 */}
<ProTable<COMMODITYModel>
scroll={{ x: "100%", y: 'calc(100vh - 370px)' }}
scroll={{ x: "100%", y: isComponent ? '300px' : 'calc(100vh - 370px)' }}
rowKey={(record) => {
return `${record?.COMMODITY_ID}`
}}
@ -266,10 +270,10 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> =
bordered
headerTitle={<PageTitleBox props={props} />} // 列表表头
actionRef={actionRef}
search={{ span: 6, labelWidth: 'auto' }}
search={isComponent ? false : { span: 6, labelWidth: 'auto' }}
// 请求数据
request={async (params, sorter) => {
const req: any = {
const req: any = isComponent ? {
searchParameter: {
OWNERUNIT_ID: currentUser?.OwnerUnitId,
PROVINCE_CODE: currentUser?.ProvinceCode,
@ -280,8 +284,18 @@ const MallEvaluationManage: React.FC<{ currentUser: CurrentUser | undefined }> =
PageIndex: 1,
PageSize: 999999,
SortStr: "CREATE_DATE desc",
} : {
searchParameter: {
OWNERUNIT_ID: currentUser?.OwnerUnitId,
PROVINCE_CODE: currentUser?.ProvinceCode,
ISVALID: 1,
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
},
PageIndex: 1,
PageSize: 999999,
SortStr: "CREATE_DATE desc",
keyWord: {
Key: "SELLER_NAME,MEMBERSHIP_NAME",
Key: "MEMBERSHIP_NAME",
Value: params?.searchText || ""
},
}

View File

@ -9,6 +9,7 @@ import Draggable from "react-draggable";
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";
type DetailProps = {
currentBigRow: any
@ -51,7 +52,7 @@ const AddressDetail = ({ currentBigRow, currentUser }: DetailProps) => {
return record?.USER_NAME ? <a
onClick={() => {
console.log('record', record);
handleSetlogSave(`查看【${record?.ADDRESS || ""}】地址信息`)
setProvince(record?.RECEIVE_PROVINCE)
setCity(record?.RECEIVE_CITY)
setCounty(record?.RECEIVE_COUNTY)
@ -227,10 +228,13 @@ 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()
handleSetlogSave(`删除【${currentRow?.ADDRESS || ""}】成功`)
handleConfirmLoading(false)
handleModalVisible(false)
setProvince("")
@ -274,12 +278,14 @@ const AddressDetail = ({ currentBigRow, currentUser }: DetailProps) => {
}
const data = await handleSynchroMEMBERADDRESS(req);
if (data.Result_Code === 100) {
handleSetlogSave(`更新【${currentRow?.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)
}
};

View File

@ -22,6 +22,7 @@ import type { FormInstance } from 'antd';
import { handeGetMemberAddressCombineList, handleDeleteMEMBERADDRESS, handleGetMEMBERADDRESSList, handleSynchroMEMBERADDRESS } from '../service';
import PageTitleBox from '@/components/PageTitleBox';
import AddressDetail from './components/addressDetail';
import { handleSetlogSave } from '@/utils/format';
@ -432,6 +433,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
});
console.log('resultresultresult', result);
if (result.Result_Code !== 100) {
message.error(`${result.Result_Desc}` || `${result.Result_Code}:删除失败`);
} else {
message.success('删除成功!');
@ -521,6 +523,7 @@ const MemberAddress: React.FC<{ currentUser: CurrentUser | undefined }> = (props
console.log('reqreqreqreqreqreqreq', req);
const data = await handeGetMemberAddressCombineList(req)
console.log('datadatadatadatadata', data);
handleSetlogSave(`查询了会员地址管理列表`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -9,6 +9,7 @@ import { handeGetPointGrowthSummary, handleGetMEMBERGROWTHList, handleGetPOINTRE
import moment from 'moment'
import addIcon from '@/assets/detail/addIcon.png'
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";
@ -329,9 +330,10 @@ const MemberSummaryStatistics: React.FC<{ currentUser: CurrentUser | undefined }
<div className="MemberSummaryStatisticsItemOther">
<div className={selectTab === 1 ? 'MemberSummaryStatisticsOtherItem MemberSummaryStatisticsOtherItemSelect' : 'MemberSummaryStatisticsOtherItem'} onClick={() => {
handleChangeTab(1)
}}>
<div className={selectTab === 1 ? 'MemberSummaryStatisticsOtherItem MemberSummaryStatisticsOtherItemSelect' : 'MemberSummaryStatisticsOtherItem'}
onClick={() => {
handleChangeTab(1)
}}>
<div className="otherItemTitle"></div>
<div className="otherItemValue">{topData && topData?.TotalPoint ? topData?.TotalPoint.summaryData : "-"}</div>
<div className="otherItemAddBox">

View File

@ -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) => {
@ -164,8 +165,10 @@ 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}】成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -201,6 +204,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}】成功`)
message.success("新增成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
@ -210,6 +214,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.AUTOTYPE_NAME}】失败`)
}
}
@ -240,6 +245,7 @@ const MemberTagManage: React.FC<{ currentUser: CurrentUser | undefined }> = (pro
}
const data = await handeGetNestingAUTOTYPEList(req);
console.log('datadatadatadatadata', data);
handleSetlogSave(`点击查询按钮`)
if (data && data.length > 0) {
setTypeTreeData(data)
return { data: data, success: true, total: data.length }

View File

@ -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) => {
@ -200,8 +201,10 @@ 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}】成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -228,6 +231,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
const data = await handeSynchroFIELDENUM(req)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】成功`)
message.success("新增成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
@ -237,6 +241,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】失败`)
}
}
@ -266,6 +271,7 @@ const MembershipLevelManage: React.FC<{ currentUser: CurrentUser | undefined }>
SearchKey: ""
}
const data = await handeGetNestingFIELDENUMList(req);
handleSetlogSave(`点击查询按钮`)
console.log('datadatadatadatadata', data);
if (data && data.length > 0) {
setTypeTreeData(data)

View File

@ -15,8 +15,9 @@ import moment from 'moment'
import session from "@/utils/session";
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser, isComponent?: boolean, parentDetail?: any }> = (props) => {
const { currentUser, isComponent, parentDetail } = props
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const [collapsible, setCollapsible] = useState<boolean>(false)
@ -52,7 +53,7 @@ const MerchantEvaluationManage: 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: "序号",
@ -139,9 +140,13 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
return (
<div>
<div style={{ backgroundColor: '#fff', display: 'flex' }}>
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
{
isComponent ? '' :
<LeftSelectTree setSelectedId={setSelectedId} setCollapsible={setCollapsible} collapsible={collapsible} />
}
<div style={{
width: !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
width: isComponent ? '100%' : !collapsible ? 'calc(100% - 300px)' : 'calc(100% - 60px)',
paddingTop: 0,
paddingBottom: 0,
paddingRight: 0
@ -154,14 +159,29 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
expandable={{
expandRowByClick: true
}}
scroll={{ x: "100%", y: "calc(100vh - 410px)" }}
scroll={{ x: "100%", y: isComponent ? '300px' : "calc(100vh - 410px)" }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
search={isComponent ? false : { span: 6 }}
request={async (params) => {
if (!selectedId) {
if (!selectedId && !isComponent) {
return
}
const req: any = {
const req: any = isComponent ? {
SearchParameter: {
OWNERUNIT_ID: currentUser?.OwnerUnitId,
PROVINCE_CODE: currentUser?.ProvinceCode,
COMMENT_ISVALID: 1,
CREATE_DATE_Start: params?.CREATE_DATE_Start || "",
CREATE_DATE_End: params?.CREATE_DATE_End || "",
MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
},
PageIndex: 1,
PageSize: 999999,
keyWord: {
Key: "SELLER_NAME,MEMBERSHIP_NAME",
Value: params?.searchText || ""
},
} : {
SearchParameter: {
OWNERUNIT_ID: currentUser?.OwnerUnitId,
PROVINCE_CODE: currentUser?.ProvinceCode,
@ -177,7 +197,7 @@ const MerchantEvaluationManage: React.FC<{ currentUser: CurrentUser }> = (props)
},
}
const data = await handeGetCOMMENTList(req)
console.log('datadatadatadatadata', data);
console.log('datadatadatadatadata222', data);
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -27,6 +27,7 @@ import { uploadPicture } from '@/services/picture';
import defaultIcon from '../../../assets/brand/defaultIcon.png'
import classNames from 'classnames';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import { handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
@ -240,9 +241,11 @@ 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()
handleSetlogSave(`删除【${currentRow?.USERDEFINEDTYPE_NAME}】成功`)
handleConfirmLoading(false)
handleModalVisible(false)
@ -285,6 +288,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
handleConfirmLoading(false)
if (data.Result_Code === 100) {
message.success("新增成功!")
handleSetlogSave(`更新【${currentRow?.USERDEFINEDTYPE_NAME}】成功`)
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
@ -293,6 +297,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.USERDEFINEDTYPE_NAME}】失败`)
}
}
@ -322,6 +327,7 @@ const OrderCategoryManage: React.FC<{ currentUser: CurrentUser | undefined }> =
// SearchKey: ""
}
const data = await handlGetUSERDEFINEDTYPEList(req);
handleSetlogSave(`点击查询按钮`)
console.log('datadatadatadatadata', data);
if (data && data.length > 0) {
setTypeTreeData(data)

View File

@ -30,6 +30,7 @@ import OrderCategoryManage from '../OrderCategoryManage';
import session from '@/utils/session';
import OrderCategoryTreeMultiple from './components/OrderCategoryTreeMultiple';
import Item from 'antd/lib/list/Item';
import { handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
@ -355,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}】成功`)
message.success("同步成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
@ -365,6 +366,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.COMMODITY_NAME}】失败`)
}
};
@ -480,6 +482,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
console.log('reqreqreqreq', req);
const data = await handeGetSellerCommodityList(req);
handleSetlogSave(`点击查询按钮`)
// const data = await handeGetCOMMODITYList(req);
console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) {
@ -585,6 +588,7 @@ const OrderProductManage: React.FC<{ currentUser: CurrentUser | undefined }> = (
formRef={formRef}
autoFocusFirstInput
submitter={false}
labelCol={{ style: { width: 80 } }}
preserve={false}
request={async () => {
if (currentRow) {

View File

@ -17,10 +17,11 @@ import { handleGetCONSUMPTIONRECORDList, handleGetPOINTRECORDList } from "../ser
import PageTitleBox from "@/components/PageTitleBox";
import moment from 'moment'
import session from "@/utils/session";
import { handleSetlogSave } from "@/utils/format";
const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { currentUser } = props
const PointsRecordSearch: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any }> = (props) => {
const { currentUser, isComponent, parentDetail } = props
const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
@ -133,7 +134,7 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
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') : "-"
}
},
]
@ -163,9 +164,19 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
expandRowByClick: true
}}
headerTitle={<PageTitleBox props={props} />}
search={{ span: 6 }}
search={isComponent ? false : { span: 6 }}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
request={async (params) => {
const req: any = {
const req: any = isComponent ? {
SearchParameter: {
OWNERUNIT_ID: 911,
MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
},
PageIndex: params?.current,
PageSize: 20,
sortstr: "OPERATE_DATE desc",
} : {
SearchParameter: {
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
OPERATE_DATE_Start: params?.OPERATE_DATE_Start || "",
@ -179,6 +190,8 @@ const PointsRecordSearch: React.FC<{ currentUser: CurrentUser }> = (props) => {
sortstr: "OPERATE_DATE desc",
}
const data = await handleGetPOINTRECORDList(req)
handleSetlogSave(`点击查询按钮`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -28,7 +28,7 @@ import classNames from 'classnames';
import session from '@/utils/session';
import { handeDeleteFIELDENUM, handeGetFIELDEXPLAINList, handeGetNestingFIELDENUMList, handeSynchroFIELDENUM } from '../service';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import { convertTreeToLabelValue } from '@/utils/format';
import { convertTreeToLabelValue, handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
@ -202,8 +202,10 @@ 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}】类别成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -231,6 +233,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
handleConfirmLoading(false)
if (data.Result_Code === 100) {
message.success("新增成功!")
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】类别成功`)
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
@ -239,6 +242,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.FIELDENUM_NAME}】类别失败`)
}
}
@ -269,6 +273,7 @@ const PointConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
}
const data = await handeGetNestingFIELDENUMList(req);
console.log('datadatadata', data);
handleSetlogSave(`查询成长值枚举配置`)
if (data && data.length > 0) {
setTypeTreeData(data)

View File

@ -26,6 +26,7 @@ import session from '@/utils/session';
import PageTitleBox from '@/components/PageTitleBox';
import ModalFooter from '../scenicSpotConfig/component/modalFooter';
import PointConfig from './PointConfig';
import { handleSetlogSave } from '@/utils/format';
@ -272,8 +273,10 @@ 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}】类别成功`)
actionRef.current?.reload()
handleConfirmLoading(false)
handleModalVisible(false)
@ -310,6 +313,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
const data = await handleSynchroSCORESETTING(req)
if (data.Result_Code === 100) {
handleSetlogSave(`更新【${currentRow?.SCORE_NAME}】类别成功`)
message.success(data.Result_Desc)
formRef?.current?.resetFields()
setCurrentRow(undefined)
@ -317,6 +321,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
actionRef.current?.reload()
} else {
message.error(data.Result_Desc)
handleSetlogSave(`更新【${currentRow?.SCORE_NAME}】类别失败`)
}
}
@ -353,6 +358,7 @@ const PointsRuleConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
}
setSearchParams(searchWholeParams)
const data = await handleGetSCORESETTINGList(searchWholeParams);
handleSetlogSave(`点击查询按钮`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -1,4 +1,4 @@
// 注册留存分析
// 注册留存分析 用户行为记录分析
import { connect, Link } from "umi";
import type { CurrentUser } from "umi";
@ -18,8 +18,8 @@ import PageTitleBox from "@/components/PageTitleBox";
import { handleGetBEHAVIORRECORDList } from "@/pages/Setting/OperationLog/service";
const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) => {
const { dispatch, children, currentUser } = props
const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser, isComponent?: Boolean, parentDetail?: any }> = (props) => {
const { dispatch, children, currentUser, isComponent, parentDetail } = props
const downloadBtnRef = useRef<any>()
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
@ -115,6 +115,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
{
title: '操作人员',
hideInSearch: true,
align: 'center',
dataIndex: 'USER_NAME',
ellipsis: true,
width: 120,
@ -128,12 +129,14 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
title: '操作地址',
hideInSearch: true,
dataIndex: 'USER_LOGINIP',
align: 'center',
width: 150,
},
{
title: '操作地点',
hideInSearch: true,
dataIndex: 'USER_LOGINPLACE',
align: 'center',
width: 160,
ellipsis: true,
},
@ -149,11 +152,11 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
// }
// },
{
title: '操作内容',
title: <div style={{ textAlign: 'center' }}></div>,
hideInSearch: true,
dataIndex: 'BEHAVIORRECORD_EXPLAIN',
width: 250,
align: 'center',
align: 'left',
ellipsis: true,
},
// {
@ -169,6 +172,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
title: '操作日期',
width: 160,
valueType: 'date',
align: 'center',
dataIndex: 'BEHAVIORRECORD_TIME',
initialValue: moment(),
render: (_, record) => {
@ -180,6 +184,7 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
width: 160,
dataIndex: 'SOURCE_PLATFORM',
valueType: 'select',
align: 'center',
valueEnum: {
// "驿商云平台": "驿商云平台",
// "数智化看板": "数智化看板",
@ -203,13 +208,13 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
hideInSearch: true,
dataIndex: 'BROWSER_VERSION',
},
{
title: '接口信息',
width: 150,
hideInSearch: true,
dataIndex: 'REQUEST_INFO',
ellipsis: true,
},
// {
// title: '接口信息',
// width: 150,
// hideInSearch: true,
// dataIndex: 'REQUEST_INFO',
// ellipsis: true,
// },
// {
// title: '调用入参',
// width: 150,
@ -252,14 +257,24 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
const res: any = formRef.current?.getFieldsValue()
console.log('resresres', res);
let params: any = {
BEHAVIORRECORD_TIME: moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD'),
SOURCE_PLATFORM: res.SOURCE_PLATFORM,
BEHAVIORRECORD_TYPE: res.BEHAVIORRECORD_TYPE,
BEHAVIORRECORD_TIME: res && res.BEHAVIORRECORD_TIME ? moment(res.BEHAVIORRECORD_TIME._d).format('YYYY-MM-DD') : "",
SOURCE_PLATFORM: res && res.SOURCE_PLATFORM ? res.SOURCE_PLATFORM : "",
BEHAVIORRECORD_TYPE: res && res.BEHAVIORRECORD_TYPE ? res.BEHAVIORRECORD_TYPE : "",
...res
}
setTableLoading(true)
const req: any = {
console.log('isComponentisComponent', isComponent);
const req: any = isComponent ? {
SearchParameter: {
SOURCE_PLATFORMS: '彩云驿出行',
USER_MOBILEPHONE: parentDetail?.MEMBERSHIP_MOBILEPHONE
},
SortStr: 'BEHAVIORRECORD_TIME desc',
PageIndex: 1,
PageSize: 999999
} : {
SearchParameter: {
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
@ -276,34 +291,40 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
}
setSearchParams(params)
const data = await handleGetBEHAVIORRECORDList(req)
setReqDetailList(data)
setTableData(data)
setTableLoading(false)
if (isComponent) {
const allReq: any = {
SearchParameter: {
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
},
SortStr: 'BEHAVIORRECORD_TIME desc',
KeyWord: {
Key: 'BEHAVIORRECORD_ROUTNAME,USER_NAME,VISIT_CHANNELS,BEHAVIORRECORD_PREROUT',
Value: params?.searchValue || ''
},
PageIndex: 1,
PageSize: 999999
} else {
const allReq: any = {
SearchParameter: {
BEHAVIORRECORD_TIME_Start: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
BEHAVIORRECORD_TIME_End: moment(params?.BEHAVIORRECORD_TIME).format('YYYY-MM-DD'),
SOURCE_PLATFORMS: params?.SOURCE_PLATFORM,
// BEHAVIORRECORD_TYPE: params?.BEHAVIORRECORD_TYPE
},
SortStr: 'BEHAVIORRECORD_TIME desc',
KeyWord: {
Key: 'BEHAVIORRECORD_ROUTNAME,USER_NAME,VISIT_CHANNELS,BEHAVIORRECORD_PREROUT',
Value: params?.searchValue || ''
},
PageIndex: 1,
PageSize: 999999
}
const allData = await handleGetBEHAVIORRECORDList(allReq)
setReqDetailList(data)
setTableData(allData)
setIsFirst(false)
}
const allData = await handleGetBEHAVIORRECORDList(allReq)
setTableData(allData)
setIsFirst(false)
}
useEffect(async () => {
handleGetTableData()
}, [])
// useEffect(async () => {
// handleGetTableData()
// }, [])
return (
<div ref={(el) => {
@ -371,16 +392,16 @@ const RegistrationRetentionAnalysis: React.FC<{ currentUser: CurrentUser }> = (p
expandable={{
expandRowByClick: true
}}
scroll={{ y: 'calc(100vh - 450px)' }}
headerTitle={<PageTitleBox props={props} />} // 列表表头
search={{ span: 6 }}
scroll={{ x: '100%', y: isComponent ? '300px' : 'calc(100vh - 430px)' }}
search={isComponent ? false : { span: 6 }}
pagination={{ pageSize: 100 }}
dataSource={tableData}
loading={tableLoading}
request={async (params) => {
if (!isFirst) {
handleGetTableData()
}
handleGetTableData()
// if (!isFirst) {
// handleGetTableData()
// }
// console.log('data', data);
// if (data && data.length > 0) {

View File

@ -1,4 +1,4 @@
// 商城交易台账
// 商城交易台账 交易台账管理
import { connect } from "umi";
import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect";
@ -78,7 +78,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
{
dataIndex: 'SALEBILL_CODE',
title: <div style={{ textAlign: 'center' }}></div>,
align: 'left',
align: 'center',
width: 220,
ellipsis: true,
hideInSearch: true,
@ -90,6 +90,14 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
}}>{record?.SALEBILL_CODE}</a> : "-"
}
},
{
dataIndex: 'PAYMENT_CODE',
title: <div style={{ textAlign: 'center' }}></div>,
align: 'center',
width: 220,
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'COMMODITY_NAME',
title: <div style={{ textAlign: 'center' }}></div>,
@ -117,7 +125,6 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
title: "订单状态",
dataIndex: "SALEBILL_STATE",
width: 150,
hideInSearch: true,
ellipsis: true,
valueType: "select",
valueEnum: {
@ -167,6 +174,14 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: "center",
initialValue: '0',
},
{
dataIndex: 'ORDER_PERSON',
title: '收货人',
align: 'center',
width: 150,
ellipsis: true,
hideInSearch: true,
},
{
dataIndex: 'ORDER_DATE',
title: '下单时间',
@ -281,7 +296,7 @@ const TradingLedger: React.FC<{ currentUser: CurrentUser }> = (props) => {
const req: any = {
SearchParameter: {
SALEBILL_IDS: "",
SALEBILL_TYPES: params?.SALEBILL_TYPE === '0' ? '' : params?.SALEBILL_TYPE,
SALEBILL_TYPES: params?.SALEBILL_TYPE === '0' ? '3000,3001,3002,3010' : params?.SALEBILL_TYPE,
MEMBERSHIP_IDS: "",
MERCHANTS_IDS: "",
// PROVINCE_CODE: currentUser?.ProvinceCode,

View File

@ -0,0 +1,159 @@
// 会员优惠券
import { connect } from "umi";
import type { ConnectState } from "@/models/connect";
import PageTitleBox from "@/components/PageTitleBox";
import ProTable, { ActionType } from "@ant-design/pro-table";
import { useRef, useState } from "react";
import { FormInstance, Image } from "antd";
import { handeGetCommodityCollectionList, handeGetCOUPON_SENDList, handeGetMemberShipLicenseList } from "../../service";
import moment from 'moment'
type DetailProps = {
parentDetail?: any
currentUser?: any
}
const CollectProducts = ({ parentDetail, currentUser }: DetailProps) => {
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
// 文件列表
const [fileList, setFileList] = useState<any>([])
const [imagePreviewVisible, setImagePreviewVisible] = useState<boolean>(false) // 预览图片
const columns: any = [
{
title: "商品图片",
width: 150,
dataIndex: "list_img",
hideInSearch: true,
align: 'center',
ellipsis: true,
render: (_, record) => {
return record?.list_img ? <img style={{ width: '50px', height: '50px', cursor: 'pointer' }} src={record?.list_img} onClick={() => {
setFileList([{ url: record?.list_img }])
setImagePreviewVisible(true)
}} /> : "-"
}
},
{
title: "商品分类",
width: 150,
dataIndex: "USERDEFINEDTYPE_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "品牌名称",
width: 150,
dataIndex: "BRAND_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "商品名称",
width: 250,
dataIndex: "COMMODITY_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "商品单位",
width: 250,
dataIndex: "COMMODITY_UNIT",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "商品规格",
width: 250,
dataIndex: "COMMODITY_RULE",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "商品价格",
width: 250,
dataIndex: "COMMODITY_MEMBERPRICE",
hideInSearch: true,
align: 'center',
ellipsis: true,
}
]
const handleChangePreview = (val: any) => {
setImagePreviewVisible(val)
}
return (
<div>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
search={false}
scroll={{ x: "100%", y: '300px' }}
// headerTitle={<PageTitleBox props={props} />} // 列表表头
request={async (params) => {
const req: any = {
ProvinceCode: currentUser?.ProvinceCode,
OwnerUnitId: currentUser?.OwnerUnitId,
MemberShipId: parentDetail?.MEMBERSHIP_ID,
AppGuid: "wxee018fb96955552a",
PageIndex: params?.current,
PageSize: params?.pageSize,
SortStr: 'COMMODITY_MEMBERPRICE desc',
}
const data = await handeGetCommodityCollectionList(req)
console.log('datadatadata', data);
if (data && data.length > 0) {
return { data, success: true }
}
return { data: [], success: true }
}}
pagination={{
defaultPageSize: 20,
showTotal: (total) => `${total} 条记录`
}}
// toolbar={{
// actions: [
// ]
// }}
/>
{/* 图片预览组件 */}
{
fileList && fileList.length > 0 && <div style={{ display: 'none' }}>
<Image.PreviewGroup
preview={{
visible: imagePreviewVisible,
onVisibleChange: vis => {
handleChangePreview(vis)
}
}}>
{
fileList.map((n) => <Image src={n.url} key={n.url} />)
}
</Image.PreviewGroup>
</div>
}
</div>
)
}
export default connect(({ user, }: ConnectState) => ({
currentUser: user.currentUser,
}))(CollectProducts);

View File

@ -0,0 +1,95 @@
// 车牌管理
import { connect } from "umi";
import type { ConnectState } from "@/models/connect";
import PageTitleBox from "@/components/PageTitleBox";
import ProTable, { ActionType } from "@ant-design/pro-table";
import { useRef } from "react";
import { FormInstance } from "antd";
import { handeGetMemberShipLicenseList } from "../../service";
type DetailProps = {
parentDetail?: any
}
const LicensePlateManage = ({ parentDetail }: DetailProps) => {
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const columns: any = [
{
title: "会员姓名",
width: 150,
dataIndex: "MEMBERSHIP_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "车辆类型",
width: 150,
dataIndex: "VEHICLE_TYPE",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "车牌号码",
width: 150,
dataIndex: "PLATE_NUMBER",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "手机号码",
width: 150,
dataIndex: "MEMBERSHIP_MOBILEPHONE",
hideInSearch: true,
align: 'center',
ellipsis: true,
}
]
return (
<div>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
search={false}
scroll={{ x: "100%", y: '300px' }}
// headerTitle={<PageTitleBox props={props} />} // 列表表头
request={async (params) => {
const req: any = {
searchParameter: {
MEMBERSHIP_ID: parentDetail?.MEMBERSHIP_ID,
OWNERUNIT_ID: 911,
},
PageIndex: 1,
PageSize: 20,
}
const data = await handeGetMemberShipLicenseList(req)
console.log('datadatadata', data);
if (data && data.length > 0) {
return { data, success: true }
}
return { data: [], success: true }
}}
// toolbar={{
// actions: [
// ]
// }}
/>
</div>
)
}
export default connect(({ user, }: ConnectState) => ({
currentUser: user.currentUser,
}))(LicensePlateManage);

View File

@ -0,0 +1,128 @@
// 会员优惠券
import { connect } from "umi";
import type { ConnectState } from "@/models/connect";
import PageTitleBox from "@/components/PageTitleBox";
import ProTable, { ActionType } from "@ant-design/pro-table";
import { useRef } from "react";
import { FormInstance } from "antd";
import { handeGetCOUPON_SENDList, handeGetMemberShipLicenseList } from "../../service";
import moment from 'moment'
type DetailProps = {
parentDetail?: any
}
const MemberDiscounts = ({ parentDetail }: DetailProps) => {
const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>();
const columns: any = [
{
title: "优惠券名称",
width: 150,
dataIndex: "COUPON_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "优惠券状态",
width: 150,
dataIndex: "COUPON_STATE",
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: {
"0": { text: '未使用', status: 'processing' },
"1": { text: '已使用', status: 'success' },
"2": { text: '失效', status: 'error' }
}
},
{
title: "使用说明",
width: 250,
dataIndex: "COUPON_DESC",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "优惠形式",
width: 150,
dataIndex: "COUPON_TYPE",
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: {
"1000": "满减券",
"2000": "折扣券",
"3000": "抵扣券",
"4000": "兑换券",
}
},
{
title: "有效期至",
width: 180,
dataIndex: "VALID_END_TIME",
hideInSearch: true,
align: 'center',
ellipsis: true,
render: (_, record) => {
return record?.VALID_END_TIME ? moment(record?.VALID_END_TIME).format('YYYY-MM-DD HH:mm:ss') : "-"
}
},
{
title: "适用门店",
width: 250,
dataIndex: "COOPSHOP_DESC",
hideInSearch: true,
align: 'center',
ellipsis: true,
}
]
return (
<div>
<ProTable
actionRef={actionRef}
formRef={formRef}
columns={columns}
bordered
expandable={{
expandRowByClick: true
}}
search={false}
scroll={{ x: "100%", y: '300px' }}
// headerTitle={<PageTitleBox props={props} />} // 列表表头
request={async (params) => {
const req: any = {
searchParameter: {
MEMBERSHIP_IDS: parentDetail?.MEMBERSHIP_ID,
// OWNERUNIT_ID: 911,
},
PageIndex: 1,
PageSize: 999999,
}
const data = await handeGetCOUPON_SENDList(req)
console.log('datadatadata', data);
if (data && data.length > 0) {
return { data, success: true }
}
return { data: [], success: true }
}}
// toolbar={{
// actions: [
// ]
// }}
/>
</div>
)
}
export default connect(({ user, }: ConnectState) => ({
currentUser: user.currentUser,
}))(MemberDiscounts);

View File

@ -0,0 +1,732 @@
// 会员详情组件
import { connect } from "umi";
import type { ConnectState } from "@/models/connect";
import { Col, FormInstance, Modal, Row } from "antd";
import { useEffect, useRef, useState } from "react";
import Draggable from "react-draggable";
import React from "react";
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
import moment from 'moment';
import memberInfoIcon from '@/assets/detail/memberInfoIcon.png'
import closeIcon from '@/assets/detail/closeIcon.png'
import session from "@/utils/session";
import memberDetailIcon from '@/assets/detail/memberDetailIcon.png'
import ProTable from "@ant-design/pro-table";
import { handleGetCONSUMPTIONRECORDList, handleGetMEMBERGROWTHList, handleGetPOINTRECORDList } from "../../service";
import AddressDetail from "../../MemberAddress/components/addressDetail";
import './style.less'
import ConsumptionRecordSearch from "../../ConsumptionRecordSearch";
import GrowthValueRecordSearch from "../../GrowthValueRecordSearch";
import PointsRecordSearch from "../../PointsRecordSearch";
import RegistrationRetentionAnalysis from "../../RegistrationRetentionAnalysis";
import LicensePlateManage from "./LicensePlateManage";
import MemberDiscounts from "./MemberDiscounts";
import CollectProducts from "./CollectProducts";
import MerchantEvaluationManage from "../../MerchantEvaluationManage";
import MallEvaluationManage from "../../MallEvaluationManage";
import { handleSetlogSave } from "@/utils/format";
type DetailProps = {
showDetailDrawer: boolean
currentRow: any
handleCloseModal: any
currentUser: any
}
const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentUser }: DetailProps) => {
const modalRef = useRef<FormInstance>();
const draggleRef = React.createRef<any>()
// 弹出框拖动效果
const [bounds, setBounds] = useState<{ left: number, right: number, top: number, bottom: number }>() // 移动的位置
const [disabled, setDraggleDisabled] = useState<boolean>() // 是否拖动
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
let MEMBERSHIPLEVELYNList = session.get('MEMBERSHIPLEVELYNList');
let COMPANY_STATEList = session.get('COMPANY_STATEList');
let SCORETYPETree = session.get('SCORETYPETree')
let CONSUMPTIONRECORDTYPEObj = session.get('CONSUMPTIONRECORDTYPEObj')
// 当前选中在详情里面要查看的内容
const [selectTab, setSelectTab] = useState<number>(1)
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),
});
};
// 消费的列表
let consumptionColumns: any = [
{
title: "服务区名称",
width: 150,
dataIndex: "SERVERPART_NAME",
hideInSearch: true,
ellipsis: true,
align: 'center'
},
{
title: "门店名称",
width: 150,
dataIndex: "SHOPNAME",
hideInSearch: true,
ellipsis: true,
align: 'center'
},
{
title: "消费类型",
width: 120,
dataIndex: "CONSUMPTIONRECORD_TYPE",
hideInSearch: true,
ellipsis: true,
valueType: 'select',
valueEnum: CONSUMPTIONRECORDTYPEObj,
align: 'center'
},
{
title: "订单金额",
width: 120,
dataIndex: "CONSUME_AMOUNT",
hideInSearch: true,
valueType: 'digit',
ellipsis: true,
align: 'center'
},
{
title: "消费金额",
width: 120,
dataIndex: "CONSUME_PRICE",
hideInSearch: true,
valueType: 'digit',
ellipsis: true,
align: 'center'
},
{
title: "消费积分",
width: 120,
dataIndex: "CONSUME_SCORE",
hideInSearch: true,
valueType: 'digit',
ellipsis: true,
align: 'center'
},
{
title: "实付金额",
width: 120,
dataIndex: "PAY_AMOUNT",
hideInSearch: true,
valueType: 'digit',
ellipsis: true,
align: 'center'
},
{
title: "优惠金额",
width: 150,
dataIndex: "COUPON_AMOUNT",
hideInSearch: true,
ellipsis: true,
align: 'center'
},
{
title: "消费时间 ",
width: 150,
dataIndex: "CONSUMPTIONRECORD_DATE",
hideInSearch: true,
align: 'center',
render: (_, record) => {
return record?.CONSUMPTIONRECORD_DATE ? moment(record?.CONSUMPTIONRECORD_DATE).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
]
// 积分的列表
let PointColumns: any = [
{
title: "服务区名称",
width: 150,
dataIndex: "SERVERPART_NAME",
hideInSearch: true,
ellipsis: true,
align: 'center'
},
{
title: "门店名称",
width: 150,
dataIndex: "SHOPNAME",
hideInSearch: true,
ellipsis: true,
align: 'center'
},
{
title: "积分方式",
width: 120,
dataIndex: "POINT_TYPE",
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: 'select',
valueEnum: {
"1": "累计",
"-1": "消耗"
},
},
{
title: "积分来源",
width: 120,
dataIndex: "POINT_SOURCE",
hideInSearch: true,
ellipsis: true,
valueType: 'treeSelect',
align: 'center',
request: () => {
return SCORETYPETree
}
},
{
title: "本次积分",
width: 120,
dataIndex: "CURRENT_POINT",
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: "digit"
},
{
title: "累计积分",
width: 120,
dataIndex: "MEMBERSHIP_POINT",
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: "digit"
},
{
title: "获取时间",
width: 120,
dataIndex: "CREATE_DATE",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
]
// 成长值的列表
let GrowthValueColumns: any = [
{
title: "服务区名称",
width: 150,
dataIndex: "SERVERPART_NAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "门店名称",
width: 150,
dataIndex: "SHOPNAME",
hideInSearch: true,
align: 'center',
ellipsis: true,
},
{
title: "累计成长值",
width: 120,
dataIndex: "MEMBERSHIP_GROWTH",
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: 'digit'
},
{
title: "本次成长值",
width: 120,
dataIndex: "CURRENT_GROWTH",
hideInSearch: true,
ellipsis: true,
align: 'center',
valueType: 'digit'
},
{
title: "成长来源",
width: 120,
dataIndex: "GROWTH_SOURCE",
hideInSearch: true,
ellipsis: true,
valueType: 'treeSelect',
align: 'center',
request: () => {
return SCORETYPETree
}
},
{
title: "成长方式",
width: 120,
dataIndex: "GROWTH_TYPE",
hideInSearch: true,
align: 'center',
ellipsis: true,
valueType: 'select',
valueEnum: {
"1": "积累",
"-1": "消耗",
}
},
{
title: "操作时间",
width: 120,
dataIndex: "OPERATE_DATE",
align: 'center',
hideInSearch: true,
render: (_, record) => {
return record?.OPERATE_DATE ? moment(record?.OPERATE_DATE).format('YYYY-MM-DD') : "-"
}
},
]
useEffect(() => {
if (showDetailDrawer) {
setSelectTab(1)
}
}, [showDetailDrawer])
return (
<Modal
className="memberInfoDetailModal"
title={false}
closeIcon={<div></div>}
destroyOnClose={true}
width={1200}
visible={showDetailDrawer}
footer={false}
afterClose={() => {
modalRef.current?.resetFields();
// setCurrentRow(undefined);
}}
bodyStyle={{
maxHeight: '850px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
onCancel={() => {
// setShowDetailDrawer(false)
// setCurrentRow(undefined);
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle=".modalTop"
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={modalRef}
submitter={false}
initialValues={currentRow ? {
...currentRow,
MEMBERSHIP_BIRTHDAY: currentRow?.MEMBERSHIP_BIRTHDAY ? moment(currentRow?.MEMBERSHIP_BIRTHDAY).format('YYYY-MM-DD') : '',
ADDTIME: currentRow?.ADDTIME ? moment(currentRow?.ADDTIME).format('YYYY-MM-DD') : '',
} : {}}
>
<div className="modalTop" style={{ position: 'fixed', background: '#fff', borderTopLeftRadius: "16px", borderTopRightRadius: "16px", zIndex: 999, borderBottom: '1px solid #D5D8DE' }}>
<div className="modalTopLeft">
<img className="memberIcon" src={memberInfoIcon} />
<span className="modalTitle"></span>
</div>
<div className="modalTopRight">
<img className="memberIcon" src={closeIcon} onClick={() => {
setSelectTab(0)
handleCloseModal()
}} />
</div>
</div>
<div className="topDetail" style={{ paddingTop: '90px' }}>
<div className="topDetailLeft">
<img className="headerImage" src={currentRow?.MEMBERSHIP_HEADIMAGEURL || "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"} />
</div>
<div className="topDetailRight">
<div className="topDetailRightTop">
<span className="detailName">{currentRow?.MEMBERSHIP_NAME || "-"}</span>
<span className="detailSex">{currentRow?.MEMBERSHIP_SEX === 1 ? '男' : currentRow?.MEMBERSHIP_SEX === 2 ? '女' : ''}</span>
{
currentRow?.MEMBERSHIP_TYPE && MEMBERSHIPTYPEYNObj && MEMBERSHIPTYPEYNObj[currentRow?.MEMBERSHIP_TYPE] ?
<span className="memberType">{MEMBERSHIPTYPEYNObj[currentRow?.MEMBERSHIP_TYPE]}</span> : ""
}
</div>
<div className="topDetailItem">
<Row gutter={8}>
<Col span={8} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_SEX"}
label={"性别"}
readonly
options={[{ label: "男", value: 1 }, { label: "女", value: 2 }, { label: "-", value: 0 }]}
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"CERTIFICATE_NUMBER"}
label={"身份证号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_MOBILEPHONE"}
label={"联系电话"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"LICENSEPLATE_NUMBER"}
label={"车牌号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_BIRTHDAY"}
label={"会员生日"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"ADDTIME"}
label={"注册时间"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
{/* <Col span={16} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_ADDRESS"}
label={"联系地址"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col> */}
</Row>
</div>
</div>
</div>
<div className="carNavBox">
<img className="carNavIcon" src={memberDetailIcon} />
<span className={selectTab === 1 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(1)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的详细信息`)
}}></span>
<span className={selectTab === 2 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(2)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的消费记录`)
}}></span>
<span className={selectTab === 3 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(3)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的成长值记录`)
}}></span>
<span className={selectTab === 4 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(4)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的积分记录`)
}}></span>
<span className={selectTab === 5 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(5)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的地址管理`)
}}></span>
<span className={selectTab === 6 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(6)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的活动轨迹`)
}}></span>
<span className={selectTab === 7 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(7)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的车牌管理`)
}}></span>
<span className={selectTab === 8 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(8)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的优惠券管理`)
}}></span>
<span className={selectTab === 9 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(9)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的收藏商品`)
}}></span>
<span className={selectTab === 10 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(10)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的商家评价`)
}}></span>
<span className={selectTab === 11 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(11)
handleSetlogSave(`查看了${currentRow?.MEMBERSHIP_NAME}的商城评价`)
}}></span>
</div>
<div className="bottomDetailBox" style={{ display: selectTab === 1 ? 'block' : "none" }}>
<Row gutter={8}>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_CARD"}
label={"会员卡号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_CODE"}
label={"会员编码"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_LEVEL"}
label={"会员等级"}
readonly
style={{ marginBottom: '16px' }}
options={[
...MEMBERSHIPLEVELYNList
]}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"ACCOUNT_BALANCE"}
label={"账户余额"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_POINT"}
label={"会员积分"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_STATE"}
label={"会员状态"}
readonly
style={{ marginBottom: '16px' }}
options={COMPANY_STATEList}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"ISPLUS"}
label={"付费会员"}
readonly
style={{ marginBottom: '16px' }}
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"PLUS_EXPIRYDATE"}
label={"付费有效期"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"RECOMMEND_NAME"}
label={"推荐人"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
{/* <Col span={18} className="memberInfoDetailItem">
<ProFormText
name={"ADDTIME"}
label={"添加时间"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col> */}
<Col span={24} className="memberInfoDetailItem">
<ProFormTextArea
name={"MEMBERSHIP_DESC"}
label={"备注说明"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
</Row>
</div>
{/* 消费记录 */}
{
selectTab === 2 ? <ConsumptionRecordSearch isComponent={true} parentDetail={currentRow} /> : "-"
// selectTab === 2 ? <ProTable
// // headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>消费记录</span>}
// search={false}
// options={false}
// bordered
// columns={consumptionColumns}
// scroll={{ x: '100%', y: '350px' }}
// request={async (params: any) => {
// const req: any = {
// SearchParameter: {
// MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
// OWNERUNIT_ID: 911
// },
// PageIndex: params.current,
// PageSize: params?.pageSize,
// SortStr: "CONSUMPTIONRECORD_DATE desc"
// }
// const data = await handleGetCONSUMPTIONRECORDList(req)
// if (data.List && data.List.length > 0) {
// return { data: data.List, success: true, total: data.TotalCount }
// }
// return { data: [], success: true }
// }}
// pagination={{
// defaultPageSize: 20,
// showTotal: (total) => `共 ${total} 条记录`
// }}
// /> : ""
}
{/* 成长值记录 */}
{
selectTab === 3 ?
<GrowthValueRecordSearch isComponent={true} parentDetail={currentRow} /> : '-'
// <ProTable
// // headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>积分记录</span>}
// search={false}
// options={false}
// bordered
// scroll={{ x: '100%', y: '350px' }}
// columns={PointColumns}
// request={async (params: any) => {
// const req: any = {
// SearchParameter: {
// MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
// OWNERUNIT_ID: 911
// },
// PageIndex: params.current,
// PageSize: params?.pageSize,
// SortStr: "OPERATE_DATE desc"
// }
// const data = await handleGetPOINTRECORDList(req)
// console.log('22222', data);
// if (data.List && data.List.length > 0) {
// return { data: data.List, success: true, total: data.TotalCount }
// }
// return { data: [], success: true }
// }}
// pagination={{
// defaultPageSize: 20,
// showTotal: (total) => `共 ${total} 条记录`
// }}
// />
// : ""
}
{
selectTab === 4 ?
<PointsRecordSearch isComponent={true} parentDetail={currentRow} />
// <ProTable
// // headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>成长值记录</span>}
// search={false}
// options={false}
// bordered
// scroll={{ x: '100%', y: '350px' }}
// columns={GrowthValueColumns}
// request={async (params: any) => {
// const req: any = {
// SearchParameter: {
// MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
// PROVINCE_CODE: currentUser?.ProvinceCode || "",
// OWNERUNIT_ID: 911
// },
// PageIndex: params.current,
// PageSize: params?.pageSize,
// SortStr: "OPERATE_DATE desc"
// }
// const data = await handleGetMEMBERGROWTHList(req)
// console.log('33333', data);
// if (data.List && data.List.length > 0) {
// return { data: data.List, success: true, total: data.TotalCount }
// }
// return { data: [], success: true }
// }}
// pagination={{
// defaultPageSize: 20,
// showTotal: (total) => `共 ${total} 条记录`
// }}
// />
: ''
}
{/* 地址管理 */}
{
selectTab === 5 ? <AddressDetail currentBigRow={currentRow} currentUser={currentUser} /> : ''
}
{/* 活动轨迹 */}
{
selectTab === 6 ? <RegistrationRetentionAnalysis isComponent={true} parentDetail={currentRow} /> : ""
}
{/* 车牌管理 */}
{
selectTab === 7 ? <LicensePlateManage parentDetail={currentRow} /> : ""
}
{/* 会员优惠券 */}
{
selectTab === 8 ? <MemberDiscounts parentDetail={currentRow} /> : ""
}
{/* 会员收藏 */}
{
selectTab === 9 ? <CollectProducts parentDetail={currentRow} /> : ""
}
{/* 商家评价 */}
{
selectTab === 10 ? <MerchantEvaluationManage isComponent={true} parentDetail={currentRow} /> : ""
}
{/* 商城评价 */}
{
selectTab === 11 ? <MallEvaluationManage isComponent={true} parentDetail={currentRow} /> : ""
}
</ProForm>
</Modal>
)
}
export default connect(({ user, }: ConnectState) => ({
currentUser: user.currentUser,
}))(MemberDetail);

View File

@ -0,0 +1,194 @@
.memberInfoDetailModal {
.react-draggable {
.ant-modal-content {
border-radius: 16px;
.ant-modal-body {
padding: 0;
height: 800px;
overflow-y: auto;
overflow: hidden;
.ant-form {
.modalTop {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #D5D8DE;
box-sizing: border-box;
padding-bottom: 10px;
box-sizing: border-box;
padding: 30px 20px;
.modalTopLeft {
display: flex;
align-items: center;
.memberIcon {
width: 18px;
height: 18px;
margin-right: 5px;
}
.modalTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 18px;
color: rgba(0, 0, 0, 0.85);
line-height: 18px;
text-align: left;
font-style: normal;
}
}
.modalTopRight {
width: 18px;
height: 18px;
.memberIcon {
width: 18px;
height: 18px;
cursor: pointer;
}
}
}
.topDetail {
width: 100%;
display: flex;
box-sizing: border-box;
padding: 30px 28px;
.topDetailLeft {
width: 120px;
height: 120px;
margin-right: 28px;
.headerImage {
width: 120px;
height: 120px;
border-radius: 50%;
overflow: hidden;
}
}
.topDetailRight {
width: calc(100% - 148px);
height: 120px;
box-sizing: border-box;
padding: 8px 0;
.topDetailRightTop {
.detailName {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 20px;
color: #333333;
line-height: 14px;
text-align: left;
font-style: normal;
}
.detailSex {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 20px;
color: #333333;
line-height: 14px;
text-align: left;
font-style: normal;
margin-left: 8px;
}
.memberType {
font-family: PingFangSC, PingFang SC;
font-size: 14px;
color: #fff;
line-height: 14px;
text-align: left;
font-style: normal;
padding: 2px 8px;
background: linear-gradient(0deg, #A13B00 0%, #D7AB0E 100%);
border-radius: 4px;
}
}
.topDetailItem {
width: 100%;
margin-top: 16px;
.ant-row {
.memberInfoDetailItem {
.ant-form-item {
margin-bottom: 12px;
}
}
}
}
}
}
.carNavBox {
width: calc(100% - 42px);
background-color: #F3F4F8;
border-radius: 8px;
display: flex;
align-items: center;
margin-left: 21px;
box-sizing: border-box;
padding: 12px 16px;
margin-bottom: 12px;
.carNavIcon {
width: 30px;
height: 26px;
margin-right: 8px;
}
.carNavTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 12px;
text-align: left;
font-style: normal;
padding: 0 10px;
cursor: pointer;
}
.selectCarNavTitle {
position: relative;
}
.selectCarNavTitle::after {
content: "";
position: absolute;
bottom: -10px;
left: 50%;
transform: translateX(-50%);
width: 2rem;
height: 2px;
background-color: #2B7CF0;
}
}
.bottomDetailBox {
width: calc(100% - 42px);
margin-left: 30px;
box-sizing: border-box;
margin-top: 26px;
}
}
}
.ant-modal-body::-webkit-scrollbar {
width: 0;
display: none;
}
}
}
}

View File

@ -19,11 +19,12 @@ import session from "@/utils/session";
import moment from 'moment'
import Draggable from "react-draggable";
import ProForm, { ProFormSelect, ProFormText, ProFormTextArea } from "@ant-design/pro-form";
import './style.less'
import memberInfoIcon from '@/assets/detail/memberInfoIcon.png'
import closeIcon from '@/assets/detail/closeIcon.png'
import memberDetailIcon from '@/assets/detail/memberDetailIcon.png'
import AddressDetail from "../MemberAddress/components/addressDetail";
import { handleSetlogSave } from "@/utils/format";
import MemberDetail from "./component/memberDetail";
@ -41,7 +42,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
const [printIndex, setPrintIndex] = useState<number>(new Date().getTime())
let MEMBERSHIP_TYPEObj = session.get('MEMBERSHIP_TYPEObj');
let MEMBERSHIPTYPEYNObj = session.get('MEMBERSHIPTYPEYNObj');
let MEMBERSHIP_LEVELList = session.get('MEMBERSHIP_LEVELList');
let COMPANY_STATEObj = session.get('COMPANY_STATEObj');
let COMPANY_STATEList = session.get('COMPANY_STATEList');
@ -106,6 +107,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
return <a onClick={() => {
setCurrentRow(record)
setShowDetailDrawer(true)
handleSetlogSave(`查看了${record?.MEMBERSHIP_NAME}${record?.MEMBERSHIP_ID}】的会员信息`)
}}>
{record?.MEMBERSHIP_NAME || ""}
</a>
@ -123,10 +125,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: 'center',
valueType: 'select',
valueEnum: {
...MEMBERSHIP_TYPEObj,
0: '全部'
...MEMBERSHIPTYPEYNObj,
},
initialValue: "0"
// initialValue: "0"
},
{
title: "会员类型",
@ -137,8 +138,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: 'center',
valueType: 'select',
valueEnum: {
...MEMBERSHIP_TYPEObj,
0: '-'
...MEMBERSHIPTYPEYNObj,
},
},
{
@ -235,7 +235,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
align: 'center',
valueType: 'select',
valueEnum: MEMBERSHIPLEVELYNObj,
initialValue: "0"
// initialValue: "0"
},
{
title: "会员积分",
@ -672,7 +672,7 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
SearchParameter: {
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911,
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "0" ? "" : params?.MEMBERSHIP_TYPE,
MEMBERSHIP_TYPE: params?.MEMBERSHIP_TYPE === "0" ? "0" : params?.MEMBERSHIP_TYPE,
MEMBERSHIP_LEVEL: params?.MEMBERSHIP_LEVEL === "0" ? "" : params?.MEMBERSHIP_LEVEL,
MEMBERSHIP_STATE: params?.MEMBERSHIP_STATE
},
@ -685,6 +685,9 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
sortstr: sortstr.length ? sortstr.toString() : "",
}
setSearchParams(params)
handleSetlogSave(`查看了会员账户管理列表`)
const data = await handleGetMEMBERSHIPList(req)
console.log('datadatadatadatadata', data);
if (data.List && data.List.length > 0) {
@ -717,390 +720,11 @@ const memberInfor: React.FC<{ currentUser: CurrentUser }> = (props) => {
</div>
</div>
<Modal
className="memberInfoDetailModal"
title={false}
// title={
// <div
// className="modal-drag-title"
// style={{
// width: '100%',
// cursor: 'move',
// }}
// onMouseOver={() => {
// if (disabled) {
// setDraggleDisabled(false)
// }
// }}
// onMouseOut={() => {
// setDraggleDisabled(true)
// }}
// onFocus={() => { }}
// onBlur={() => { }}
// >
// {'会员详情'}
// </div>
// }
closeIcon={<div></div>}
destroyOnClose={true}
width={1200}
visible={showDetailDrawer}
footer={false}
afterClose={() => {
modalRef.current?.resetFields();
setCurrentRow(undefined);
}}
bodyStyle={{
maxHeight: '700px', // 你可以根据需要调整高度
overflowY: 'auto',
}}
onCancel={() => {
setShowDetailDrawer(false)
setCurrentRow(undefined);
}}
modalRender={(modal) => {
return <Draggable
disabled={disabled}
bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle=".modalTop"
>
<div ref={draggleRef}>{modal}</div>
</Draggable>
}}
>
<ProForm
layout={'horizontal'}
formRef={modalRef}
submitter={false}
initialValues={currentRow ? {
...currentRow,
MEMBERSHIP_BIRTHDAY: currentRow?.MEMBERSHIP_BIRTHDAY ? moment(currentRow?.MEMBERSHIP_BIRTHDAY).format('YYYY-MM-DD') : '',
ADDTIME: currentRow?.ADDTIME ? moment(currentRow?.ADDTIME).format('YYYY-MM-DD') : '',
} : {}}
>
<div className="modalTop" style={{ position: 'fixed', background: '#fff', borderTopLeftRadius: "16px", borderTopRightRadius: "16px", zIndex: 999, borderBottom: '1px solid #D5D8DE' }}>
<div className="modalTopLeft">
<img className="memberIcon" src={memberInfoIcon} />
<span className="modalTitle"></span>
</div>
<div className="modalTopRight">
<img className="memberIcon" src={closeIcon} onClick={() => {
handleCloseModal()
}} />
</div>
</div>
<div className="topDetail" style={{ paddingTop: '90px' }}>
<div className="topDetailLeft">
<img className="headerImage" src={currentRow?.MEMBERSHIP_HEADIMAGEURL || "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"} />
</div>
<div className="topDetailRight">
<div className="topDetailRightTop">
<span className="detailName">{currentRow?.MEMBERSHIP_NAME || "-"}</span>
<span className="detailSex">{currentRow?.MEMBERSHIP_SEX === 1 ? '男' : currentRow?.MEMBERSHIP_SEX === 2 ? '女' : ''}</span>
{
currentRow?.MEMBERSHIP_TYPE && MEMBERSHIP_TYPEObj && MEMBERSHIP_TYPEObj[currentRow?.MEMBERSHIP_TYPE] ?
<span className="memberType">{MEMBERSHIP_TYPEObj[currentRow?.MEMBERSHIP_TYPE]}</span> : ""
}
</div>
<div className="topDetailItem">
<Row gutter={8}>
<Col span={8} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_SEX"}
label={"性别"}
readonly
options={[{ label: "男", value: 1 }, { label: "女", value: 2 }, { label: "-", value: 0 }]}
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"CERTIFICATE_NUMBER"}
label={"身份证号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_MOBILEPHONE"}
label={"联系电话"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"LICENSEPLATE_NUMBER"}
label={"车牌号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_BIRTHDAY"}
label={"会员生日"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={8} className="memberInfoDetailItem">
<ProFormText
name={"ADDTIME"}
label={"注册时间"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
{/* <Col span={16} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_ADDRESS"}
label={"联系地址"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col> */}
</Row>
</div>
</div>
</div>
<div className="carNavBox">
<img className="carNavIcon" src={memberDetailIcon} />
<span className={selectTab === 1 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(1)
}}></span>
<span className={selectTab === 2 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(2)
}}></span>
<span className={selectTab === 3 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(3)
}}></span>
<span className={selectTab === 4 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(4)
}}></span>
<span className={selectTab === 5 ? "carNavTitle selectCarNavTitle" : "carNavTitle"} onClick={() => {
setSelectTab(5)
}}></span>
</div>
<div className="bottomDetailBox" style={{ display: selectTab === 1 ? 'block' : "none" }}>
<Row gutter={8}>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_CARD"}
label={"会员卡号"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_CODE"}
label={"会员编码"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_LEVEL"}
label={"会员等级"}
readonly
style={{ marginBottom: '16px' }}
options={[
...MEMBERSHIP_LEVELList,
{ label: "VIP会员", value: 9000 }
]}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"ACCOUNT_BALANCE"}
label={"账户余额"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"MEMBERSHIP_POINT"}
label={"会员积分"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"MEMBERSHIP_STATE"}
label={"会员状态"}
readonly
style={{ marginBottom: '16px' }}
options={COMPANY_STATEList}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormSelect
name={"ISPLUS"}
label={"付费会员"}
readonly
style={{ marginBottom: '16px' }}
options={[{ label: "是", value: 1 }, { label: "否", value: 0 }]}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"PLUS_EXPIRYDATE"}
label={"付费有效期"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
<Col span={6} className="memberInfoDetailItem">
<ProFormText
name={"RECOMMEND_NAME"}
label={"推荐人"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
{/* <Col span={18} className="memberInfoDetailItem">
<ProFormText
name={"ADDTIME"}
label={"添加时间"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col> */}
<Col span={24} className="memberInfoDetailItem">
<ProFormTextArea
name={"MEMBERSHIP_DESC"}
label={"备注说明"}
readonly
style={{ marginBottom: '16px' }}
/>
</Col>
</Row>
</div>
{
selectTab === 2 ? <ProTable
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>消费记录</span>}
search={false}
options={false}
bordered
columns={consumptionColumns}
scroll={{ x: '100%', y: '350px' }}
request={async (params: any) => {
const req: any = {
SearchParameter: {
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911
},
PageIndex: params.current,
PageSize: params?.pageSize,
SortStr: "CONSUMPTIONRECORD_DATE desc"
}
const data = await handleGetCONSUMPTIONRECORDList(req)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }
}}
pagination={{
defaultPageSize: 20,
showTotal: (total) => `${total} 条记录`
}}
/> : ""
}
{
selectTab === 3 ?
<ProTable
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>积分记录</span>}
search={false}
options={false}
bordered
scroll={{ x: '100%', y: '350px' }}
columns={PointColumns}
request={async (params: any) => {
const req: any = {
SearchParameter: {
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911
},
PageIndex: params.current,
PageSize: params?.pageSize,
SortStr: "OPERATE_DATE desc"
}
const data = await handleGetPOINTRECORDList(req)
console.log('22222', data);
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }
}}
pagination={{
defaultPageSize: 20,
showTotal: (total) => `${total} 条记录`
}}
/>
: ""
}
{
selectTab === 4 ?
<ProTable
// headerTitle={<span style={{ color: "#1890ff", fontSize: 14, fontWeight: 600 }}>成长值记录</span>}
search={false}
options={false}
bordered
scroll={{ x: '100%', y: '350px' }}
columns={GrowthValueColumns}
request={async (params: any) => {
const req: any = {
SearchParameter: {
MEMBERSHIP_IDS: currentRow?.MEMBERSHIP_ID,
PROVINCE_CODE: currentUser?.ProvinceCode || "",
OWNERUNIT_ID: 911
},
PageIndex: params.current,
PageSize: params?.pageSize,
SortStr: "OPERATE_DATE desc"
}
const data = await handleGetMEMBERGROWTHList(req)
console.log('33333', data);
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}
return { data: [], success: true }
}}
pagination={{
defaultPageSize: 20,
showTotal: (total) => `${total} 条记录`
}}
/>
: ''
}
{
selectTab === 5 ? <AddressDetail currentBigRow={currentRow} currentUser={currentUser} /> : ''
}
</ProForm>
</Modal>
{/* 会员详情 */}
<MemberDetail showDetailDrawer={showDetailDrawer}
currentRow={currentRow}
handleCloseModal={handleCloseModal}
currentUser={currentUser} />
{/* <Drawer
width={'80%'}

View File

@ -26,6 +26,7 @@ import { handeDeleteSCENICAREA, handeGetSCENICAREAList, handeSynchroSCENICAREA }
import session from '@/utils/session';
import { deletePicture, uploadPicture } from '@/services/picture';
import ModalFooter from './component/modalFooter';
import { handleSetlogSave } from '@/utils/format';
const beforeUpload = (file: any) => {
@ -291,8 +292,10 @@ 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}】信息成功`)
handleConfirmLoading(false)
handleModalVisible(false)
setFileList([])
@ -313,7 +316,7 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
})
}
if (currentRow?.USERDEFINEDTYPE_ID) {
if (currentRow?.SCENICAREA_ID) {
req = {
...currentRow,
...res,
@ -350,7 +353,10 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
console.log('formData', formData);
await uploadPicture(formData)
}
message.success("新增成功!")
handleSetlogSave(`${currentRow?.SCENICAREA_ID ? `更新${currentRow?.SCENICAREA_NAME}景区` : `新增${data.Result_Data.SCENICAREA_NAME}`}信息`)
message.success("更新成功!")
setCurrentRow(undefined)
formRef?.current?.resetFields()
handleModalVisible(false)
@ -396,6 +402,9 @@ const scenicSpotConfig: React.FC<{ currentUser: CurrentUser | undefined }> = (pr
}
const data = await handeGetSCENICAREAList(req);
console.log('datadatadatadatadata', data);
handleSetlogSave(`查看了景区信息配置列表`)
if (data.List && data.List.length > 0) {
return { data: data.List, success: true, total: data.TotalCount }
}

View File

@ -42,7 +42,7 @@ const SERVERPARTTable = ({ currentRow, onShow, onRef, pageType }: DetailProps) =
// 片区的tab
const [areaTabList, setAreaTabList] = useState<any>()
// 选择的tab
const [selectTab, setSelectTab] = useState<any>()
const [selectTab, setSelectTab] = useState<any>('基础信息')
const shopregionObj: any = session.get('shopregionObj')
const LOADBEARINGList = session.get('LOADBEARINGList')
@ -87,20 +87,20 @@ const SERVERPARTTable = ({ currentRow, onShow, onRef, pageType }: DetailProps) =
if (list && list.length > 0) {
const obj: any = session.get('shopregionObj')
const res: any = []
const res: any = [{ label: "基础信息", key: '基础信息' }]
list.forEach((item: any, index: number) => {
if (item.SERVERPART_REGION) {
res.push({ label: obj[item.SERVERPART_REGION], value: item.SERVERPART_REGION.toString(), key: item.SERVERPART_REGION.toString() })
if (index === 0) {
setSelectTab(item.SERVERPART_REGION.toString())
// setSelectTab(item.SERVERPART_REGION.toString())
}
}
})
console.log('resresresres', res);
setSelectTab('基础信息');
setAreaTabList(res)
} else {
setAreaTabList([])
setAreaTabList([{ label: "基础信息", key: '基础信息' }])
setSelectTab(null)
}
}
@ -113,7 +113,8 @@ const SERVERPARTTable = ({ currentRow, onShow, onRef, pageType }: DetailProps) =
useEffect(() => {
// 确保 areaTabList 更新后selectTab 也正确设置
if (areaTabList && areaTabList.length > 0 && !selectTab) {
setSelectTab(areaTabList[0].key);
// setSelectTab(areaTabList[0].key);
setSelectTab('基础信息');
}
}, [areaTabList, selectTab]);
@ -247,169 +248,169 @@ const SERVERPARTTable = ({ currentRow, onShow, onRef, pageType }: DetailProps) =
</Row>
</div>
<Divider orientation="left"></Divider>
<Row>
<Col span={8}>
<ProFormText
name="SERVERPART_NAME"
label="服务区名称"
disabled
/>
</Col>
<Col span={8}>
<Form.Item
name="SERVERPART_TYPE"
label="服务区类型"
>
<TreeSelect
placeholder="请选择服务区类型"
dropdownStyle={{ maxHeight: 300, overflow: 'auto' }}
treeData={serverpart_typeTree}
allowClear
<div style={{ display: selectTab === '基础信息' ? 'block' : 'none' }}>
<Divider orientation="left"></Divider>
<Row>
<Col span={8}>
<ProFormText
name="SERVERPART_NAME"
label="服务区名称"
disabled
/>
</Form.Item>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_CODE"
label="服务区编码"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="EXPRESSWAY_NAME"
label="所在高速"
/>
</Col>
<Col span={8}>
<ProFormText
name="CENTERSTAKE_NUM"
label="中心桩号"
/>
</Col>
<Col span={8}>
<ProFormDigit
width="lg"
name="SERVERPART_INDEX"
label="服务区索引"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="carryingCapacity"
label="承载情况"
options={LOADBEARINGList}
/>
</Col>
<Col span={16}>
<ProFormTextArea
name="SERVERPART_DESC"
label="路段说明"
labelCol={{ span: 3 }}
wrapperCol={{ span: 21 }}
/>
</Col>
<Col span={8}>
<ProFormText
name="MANAGERCOMPANY"
label="管理单位"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_ADDRESS"
label="市区县镇"
/>
</Col>
<Col span={8}>
<ProFormDatePicker
name="STARTDATE"
label="运营时间"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_X"
label="经  度"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_Y"
label="纬  度"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="WATERINTAKE_TYPE"
label="取水形式"
fieldProps={{
options: [{ label: '自来水', value: 1 }, { label: '井水', value: 2 }]
}}
/>
</Col>
<Col span={8}>
<ProFormText
name="OWNEDCOMPANY"
label="产权单位"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="TAXPAYER_IDENTIFYCODE"
label="信用代码"
disabled
/>
</Col>
<Col span={8}>
<ProFormSelect
name="SEWAGEDISPOSAL_TYPE"
label="污水处理形式"
fieldProps={{
options: [{ label: '市政', value: 1 }, { label: '污水处理设备', value: 2 }]
}}
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SERVERPART_INFO"
label="服务区说明"
labelCol={{ span: 2 }}
wrapperCol={{ span: 22 }}
/>
</Col>
</Row>
<Divider orientation="left"></Divider>
<Row>
<Col span={8}>
<ProFormText
name="FLOORAREA"
label="占地面积"
/>
</Col>
<Col span={8}>
<ProFormText
name="SHAREAREA"
label="停车场面积"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_AREA"
label="建筑面积"
/>
</Col>
</Row>
</Col>
<Col span={8}>
<Form.Item
name="SERVERPART_TYPE"
label="服务区类型"
>
<TreeSelect
placeholder="请选择服务区类型"
dropdownStyle={{ maxHeight: 300, overflow: 'auto' }}
treeData={serverpart_typeTree}
allowClear
disabled
/>
</Form.Item>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_CODE"
label="服务区编码"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="EXPRESSWAY_NAME"
label="所在高速"
/>
</Col>
<Col span={8}>
<ProFormText
name="CENTERSTAKE_NUM"
label="中心桩号"
/>
</Col>
<Col span={8}>
<ProFormDigit
width="lg"
name="SERVERPART_INDEX"
label="服务区索引"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="carryingCapacity"
label="承载情况"
options={LOADBEARINGList}
/>
</Col>
<Col span={16}>
<ProFormTextArea
name="SERVERPART_DESC"
label="路段说明"
labelCol={{ span: 3 }}
wrapperCol={{ span: 21 }}
/>
</Col>
<Col span={8}>
<ProFormText
name="MANAGERCOMPANY"
label="管理单位"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_ADDRESS"
label="市区县镇"
/>
</Col>
<Col span={8}>
<ProFormDatePicker
name="STARTDATE"
label="运营时间"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_X"
label="经  度"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_Y"
label="纬  度"
/>
</Col>
<Col span={8}>
<ProFormSelect
name="WATERINTAKE_TYPE"
label="取水形式"
fieldProps={{
options: [{ label: '自来水', value: 1 }, { label: '井水', value: 2 }]
}}
/>
</Col>
<Col span={8}>
<ProFormText
name="OWNEDCOMPANY"
label="产权单位"
disabled
/>
</Col>
<Col span={8}>
<ProFormText
name="TAXPAYER_IDENTIFYCODE"
label="信用代码"
disabled
/>
</Col>
<Col span={8}>
<ProFormSelect
name="SEWAGEDISPOSAL_TYPE"
label="污水处理形式"
fieldProps={{
options: [{ label: '市政', value: 1 }, { label: '污水处理设备', value: 2 }]
}}
/>
</Col>
<Col span={24}>
<ProFormTextArea
name="SERVERPART_INFO"
label="服务区说明"
labelCol={{ span: 2 }}
wrapperCol={{ span: 22 }}
/>
</Col>
</Row>
<Divider orientation="left"></Divider>
<Row>
<Col span={8}>
<ProFormText
name="FLOORAREA"
label="占地面积"
/>
</Col>
<Col span={8}>
<ProFormText
name="SHAREAREA"
label="停车场面积"
/>
</Col>
<Col span={8}>
<ProFormText
name="SERVERPART_AREA"
label="建筑面积"
/>
</Col>
</Row>
</div>
<div style={{ width: '100%', boxSizing: 'border-box', padding: '0 48px', fontSize: '16px', fontWeight: 600 }}>{shopregionObj[selectTab] || ""}</div>
<div style={{ display: areaTabList && areaTabList.length > 0 && selectTab === areaTabList[0].key ? 'block' : 'none' }}>
<div style={{ display: areaTabList && areaTabList.length > 0 && selectTab === areaTabList[1].key ? 'block' : 'none' }}>
<Divider orientation="left"></Divider>
<Row>
<Col span={8}>
@ -665,7 +666,7 @@ const SERVERPARTTable = ({ currentRow, onShow, onRef, pageType }: DetailProps) =
</Row>
</div>
<div style={{ display: areaTabList && areaTabList.length > 1 && selectTab === areaTabList[1].key ? 'block' : 'none' }}>
<div style={{ display: areaTabList && areaTabList.length > 1 && selectTab === areaTabList[2].key ? 'block' : 'none' }}>
{/* <Divider orientation="left">对向信息</Divider> */}
<div style={{ display: 'none' }}>
<Row>

View File

@ -22,6 +22,7 @@ import Draggable from "react-draggable";
import searchIcon from '@/assets/ai/searchIcon.png'
import close from '@/assets/ai/close.png'
import './style.less'
import { handleSetlogSave } from "@/utils/format";
const beforeUpload = (file: any) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
@ -137,6 +138,11 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
setSelectedId('')
setCurrenRegion('')
console.log('value', value);
let serverpartObj = session.get('serverpartObj')
handleSetlogSave(`${serverpartObj && value && serverpartObj[value] ? `查看了${serverpartObj[value]}基础信息` : ""}`)
// 只有修改服务区的时候 触发刷新
setShowRightForm(false)
setTimeout(() => {
@ -302,6 +308,8 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
const data = await handleSynchroSERVERPART(req)
let serverpartObj = session.get('serverpartObj')
handleSetlogSave(`${serverpartObj && currenMenu && serverpartObj[currenMenu] ? `保存${serverpartObj[currenMenu]}的基础信息` : ""}`)
if (res.carryingCapacity) {
let carryReq: any = {}
@ -658,6 +666,7 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
<Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
setShowType(0)
setShowUploadImgModal(true)
handleSetlogSave(`点击服务区设施图片上传`)
}}></Button>
{/* <Button type={'primary'} style={{ marginRight: '8px' }} onClick={() => {
@ -770,8 +779,10 @@ const serverpartInfo: React.FC<{ currentUser: CurrentUser }> = (props) => {
console.log('formData', formData);
let res = await uploadPicture(formData)
console.log('resresresres', res);
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' ? '便利店图片' : ''}】成功`)
setConfirmLoading(false)
setShowType(0)
setShowUploadImgModal(false);
@ -783,6 +794,7 @@ 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)

View File

@ -824,3 +824,40 @@ export async function handeGetPointGrowthSummary(params: any) {
return data.Result_Data.List
}
// 获取会员即车牌信息
export async function handeGetMemberShipLicenseList(params: any) {
const data = await requestEncryption(`/Member/GetMemberShipLicenseList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List
}
// 获取会员优惠券表列表
export async function handeGetCOUPON_SENDList(params: any) {
const data = await requestEncryption(`/Coupon/GetCOUPON_SENDList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List
}
// 用户收藏的商品
export async function handeGetCommodityCollectionList(params: any) {
const data = await requestEncryption(`/Member/GetCommodityCollectionList`, {
method: 'POST',
data: { ...params, requestEncryption: true }
})
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List
}

View File

@ -510,17 +510,24 @@ export const secondsToHuman = (seconds: number) => {
// 封装一个只要传入操作事项的就可以记录日志
export const handleSetlogSave = async (str: string) => {
export const handleSetlogSave = async (str?: string) => {
const currentUser = session.get('currentUser')
const basicInfo = session.get('basicInfo')
const browserVersion = session.get('browserVersion')
const systemBasin = session.get('systemBasin')
let nowMenu = session.get("currentMenu")
synchroBehaviorRecord({
USER_ID: currentUser?.ID,
USER_NAME: currentUser?.Name,
BEHAVIORRECORD_TYPE: "2000",
BEHAVIORRECORD_EXPLAIN: str,
BEHAVIORRECORD_EXPLAIN: str || "",
BEHAVIORRECORD_ROUT: nowMenu.pathname,
BEHAVIORRECORD_ROUTNAME: nowMenu.name,
BEHAVIORRECORD_TIME: moment().format('YYYY-MM-DD HH:mm:ss'),
// REQUEST_INFO: str || "",
OWNERUNIT_ID: currentUser?.OwnerUnitId,
OWNERUNIT_NAME: currentUser?.OwnerUnitName,
BUSINESSMAN_ID: currentUser?.BUSINESSMAN_ID,