提交 3a2e2915 作者: ZhangLingKun

Merge branch 'develop'

...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#VITE_REQUEST_BASE_URL='https://www.iuav.shop' #VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#测试服 #测试服
VITE_REQUEST_BASE_URL='https://test.iuav.shop' VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='https://120.25.213.190'
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn' #VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='/api' #VITE_REQUEST_BASE_URL='/api'
#旧版接口地址 #旧版接口地址
......
...@@ -14,4 +14,4 @@ patches: ...@@ -14,4 +14,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag: bc9cd408e635ff1422c33129fc8f96d1853de9c0 newTag: ad200dc1515c0c4aabd0709d354c997064ba1b19
...@@ -39,3 +39,33 @@ export type activityDataType = InterFunction< ...@@ -39,3 +39,33 @@ export type activityDataType = InterFunction<
>; >;
// 活动-编辑 // 活动-编辑
export type activityEditType = InterFunction<addActivityItemType & { id: number }, null>; export type activityEditType = InterFunction<addActivityItemType & { id: number }, null>;
// 后台——签到调整
export type DataInfoType = InterFunction<
{
id: number;
integral: number;
period: number;
status: boolean;
userContinuousCheckInVO: Array<{
bonusPoints: number;
numberOfDays: number;
}>;
},
NonNullable<unknown>
>;
// 小程序签到列表
export type SignInListType = InterFunction<
NonNullable<unknown>,
{
id: number;
integral: number;
period: number;
status: boolean;
userContinuousCheckInVO: Array<{
bonusPoints: number;
numberOfDays: number;
id: number;
signInId: number;
}>;
}[]
>;
...@@ -3,7 +3,9 @@ import { ...@@ -3,7 +3,9 @@ import {
activityDataType, activityDataType,
activityEditType, activityEditType,
addActivityType, addActivityType,
DataInfoType,
endActivityType, endActivityType,
SignInListType,
splitCouponDownType, splitCouponDownType,
} from '../interface/activityManage'; } from '../interface/activityManage';
import axios from '../request'; import axios from '../request';
...@@ -40,4 +42,11 @@ export class ActivityManageAPI { ...@@ -40,4 +42,11 @@ export class ActivityManageAPI {
static getActivityData: activityDataType = (params) => { static getActivityData: activityDataType = (params) => {
return axios.get('malluser/activity/dataInfo', { params }); return axios.get('malluser/activity/dataInfo', { params });
}; };
// 活动后台——签到调整
static DataInfo: DataInfoType = (params) => {
return axios.post('/userapp/insertSignIn', params);
};
// 小程序签到列表
static SignInList: SignInListType = (params) => axios.get('/userapp/SignInList', { params });
} }
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { limitEntity } from '@/api/modules/role'; import { limitEntity } from '@/api/modules/role';
function useOptionShow(id: number) { function useOptionShow(id: number) {
......
/* eslint-disable */
// @ts-nocheck
import { FC, ForwardedRef, forwardRef, useState, useImperativeHandle } from 'react'; import { FC, ForwardedRef, forwardRef, useState, useImperativeHandle } from 'react';
import { DatePicker, Form, Input, message, Modal, Radio, Select, Upload } from 'antd'; import { DatePicker, Form, Input, message, Modal, Radio, Select, Upload } from 'antd';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
......
...@@ -13,7 +13,7 @@ import useOperate from '~/common/hook/optionHook'; ...@@ -13,7 +13,7 @@ import useOperate from '~/common/hook/optionHook';
// 活动数据-类型 // 活动数据-类型
type dataType = (ReturnType<activityDataType> extends Promise<infer T> ? T : never)['result']; type dataType = (ReturnType<activityDataType> extends Promise<infer T> ? T : never)['result'];
const ActivityList: FC<{}> = () => { const ActivityList: FC = () => {
const activityRef = useRef(); const activityRef = useRef();
const tableColumns: ColumnsType<activityItemType> = [ const tableColumns: ColumnsType<activityItemType> = [
...@@ -31,21 +31,21 @@ const ActivityList: FC<{}> = () => { ...@@ -31,21 +31,21 @@ const ActivityList: FC<{}> = () => {
title: '活动类型', title: '活动类型',
align: 'center', align: 'center',
dataIndex: 'activityType', dataIndex: 'activityType',
render: (text: string, record: activityItemType) => ( render: (_text: string, record: activityItemType) => (
<div>{record.activityType === 1 ? '裂变活动' : '普通活动'}</div> <div>{record.activityType === 1 ? '裂变活动' : '普通活动'}</div>
), ),
}, },
{ {
title: '是否展示', title: '是否展示',
align: 'center', align: 'center',
render: (text: number, record: activityItemType) => ( render: (_text: number, record: activityItemType) => (
<div>{record.show ? '展示' : '隐藏'}</div> <div>{record.show ? '展示' : '隐藏'}</div>
), ),
}, },
{ {
title: '推广简图', title: '推广简图',
align: 'center', align: 'center',
render: (text: string, record: activityItemType) => ( render: (_text: string, record: activityItemType) => (
<Image src={record.activityImg} width={50} /> <Image src={record.activityImg} width={50} />
), ),
}, },
...@@ -62,13 +62,13 @@ const ActivityList: FC<{}> = () => { ...@@ -62,13 +62,13 @@ const ActivityList: FC<{}> = () => {
{ {
title: '状态', title: '状态',
align: 'center', align: 'center',
render: (text: string, record: activityItemType) => render: (_text: string, record: activityItemType) =>
record.activityStatus === 1 ? '进行中' : '已下线', record.activityStatus === 1 ? '进行中' : '已下线',
}, },
{ {
title: '有效期', title: '有效期',
align: 'center', align: 'center',
render: (text: string, record: activityItemType) => ( render: (_text: string, record: activityItemType) => (
<div> <div>
<div>起:{record.startTime}</div> <div>起:{record.startTime}</div>
<div>止:{record.endTime}</div> <div>止:{record.endTime}</div>
...@@ -78,7 +78,7 @@ const ActivityList: FC<{}> = () => { ...@@ -78,7 +78,7 @@ const ActivityList: FC<{}> = () => {
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
render: (text: string, record: activityItemType, index: number) => ( render: (_text: string, record: activityItemType, _index: number) => (
<> <>
<Button <Button
type='link' type='link'
......
import React, { FC, useEffect } from 'react';
import { Form, InputNumber, Modal, ModalProps } from 'antd';
import { InterDataType } from '~/api/interface';
import { SignInListType } from '~/api/interface/activityManage';
// 参数
interface selfProps {
data?: InterDataType<SignInListType>[0]['userContinuousCheckInVO'][0];
onSubmit: (data: InterDataType<SignInListType>[0]['userContinuousCheckInVO'][0]) => void;
}
const AddOrEditModal: FC<ModalProps & selfProps> = ({ open, onCancel, title, data, onSubmit }) => {
// 表单钩子
const [editForm] = Form.useForm();
// 提交数据
const handleSubmit = async () => {
const valid = await editForm.validateFields();
if (!valid) return;
onSubmit({
...data,
...valid,
});
};
// 关闭弹窗
const handleCancel = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
editForm.resetFields();
onCancel?.(e);
};
// 组件挂载
useEffect(() => {
if (data) {
editForm.setFieldsValue(data);
} else {
editForm.resetFields();
}
// console.log('组件挂载 --->', data);
}, [open]);
return (
<Modal open={open} onCancel={(e) => handleCancel(e)} title={title} onOk={handleSubmit}>
<Form labelCol={{ span: 6 }} wrapperCol={{ span: 16 }} form={editForm}>
<Form.Item
label='连续签到天数'
name='numberOfDays'
rules={[
{ required: true, message: '请输入连续签到天数' },
{ pattern: /^[0-9]*$/g, message: '请输入整数' },
]}
>
<InputNumber min={1} max={100} placeholder='请输入连续签到天数' addonAfter={'天'} />
</Form.Item>
<Form.Item
label='奖励积分'
name='bonusPoints'
rules={[
{ required: true, message: '请输入奖励积分' },
{ pattern: /^[0-9]*$/g, message: '请输入整数' },
]}
>
<InputNumber min={1} max={10000} placeholder='请输入奖励积分' addonAfter={'积分'} />
</Form.Item>
</Form>
</Modal>
);
};
export default AddOrEditModal;
import { useEffect, useState } from 'react';
import { Button, Form, InputNumber, message, Modal, Switch, Table } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import AddOrEditModal from './comp/addOrEditModal';
import { ActivityManageAPI } from '~/api';
import { InterDataType } from '~/api/interface';
import { SignInListType } from '~/api/interface/activityManage';
const RewardsManageView = () => {
// 表单钩子
const [formRefs] = Form.useForm();
// 连续签到信息
const [signInfoList, setSignInfoList] =
useState<InterDataType<SignInListType>[0]['userContinuousCheckInVO']>();
// 签到信息
const [signData, setSignData] = useState<InterDataType<SignInListType>[0]>();
// 获取签到设置
const getDataInfo = async () => {
const res = await ActivityManageAPI.SignInList();
if (res && res.code === '200') {
if (!res.result?.length) return;
setSignInfoList(res.result[0]?.userContinuousCheckInVO || []);
setSignData(res.result[0]);
formRefs.setFieldsValue({
period: res.result[0].period,
integral: res.result[0].integral,
status: res.result[0].status,
});
}
};
// 需要编辑的数据
const [editData, setEditData] =
useState<InterDataType<SignInListType>[0]['userContinuousCheckInVO'][0]>();
// 编辑弹窗是否展示
const [addEditShow, setAddEditShow] = useState(false);
// 提交数据
const handleSubmit = async () => {
const valid = await formRefs.validateFields();
if (!valid) return;
const res = await ActivityManageAPI.DataInfo({
...valid,
userContinuousCheckInVO: signInfoList?.map((i) => (i.signInId ? i : { ...i, id: undefined })),
id: signData?.id,
});
if (res && res.code === '200') {
message.success('操作成功');
await getDataInfo();
}
// console.log('提价数据 --->', valid);
};
// 删除数据
const handleDelete = (record: InterDataType<SignInListType>[0]) => {
Modal.confirm({
title: '提示',
content: '请确认是否删除?',
onOk: () => {
setSignInfoList(signInfoList?.filter((item) => item.id !== record.id));
message.success('删除成功').then();
},
});
};
// 组件挂载
useEffect(() => {
getDataInfo().then();
}, []);
return (
<>
<div className='rewards-form' style={{ width: '90%' }}>
<Form
labelCol={{ span: 3 }}
wrapperCol={{ offset: 1 }}
form={formRefs}
initialValues={{ show: 1, activityType: 1 }}
>
<Form.Item
label='是否启用'
name='status'
rules={[{ required: true, message: '请选择是否启用' }]}
valuePropName='checked'
>
<Switch />
</Form.Item>
<Form.Item
label='签到周期'
name='period'
rules={[
{ required: true, message: '请输入签到周期' },
{ pattern: /^[0-9]*$/g, message: '请输入整数' },
]}
extra='签到周期需在7-100天内'
>
<InputNumber min={7} max={100} placeholder='请输入签到周期' addonAfter={'天'} />
</Form.Item>
<Form.Item
label='每日奖励'
name='integral'
rules={[
{ required: true, message: '请输入每日签到奖励' },
{ pattern: /^[0-9]*$/g, message: '请输入整数' },
]}
>
<InputNumber min={1} max={10000} placeholder='请输入每日签到奖励' addonAfter={'积分'} />
</Form.Item>
<Form.Item label='连续签到' wrapperCol={{ offset: 1, span: 20 }}>
<Button
type={'primary'}
icon={<PlusOutlined />}
style={{ marginBottom: '16px' }}
onClick={() => setAddEditShow(true)}
>
添加连续签到奖励
</Button>
<Table
size={'small'}
bordered
rowKey='id'
columns={[
{
title: '连续签到天数',
dataIndex: 'numberOfDays',
align: 'center',
width: '100px',
render: (text: string) => `${text}天`,
},
{
title: '奖励积分',
dataIndex: 'bonusPoints',
align: 'center',
width: '100px',
render: (text: string) => `${text}分`,
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
width: '100px',
fixed: 'right',
render: (_value, record) => (
<>
<Button
type={'link'}
onClick={() => {
setEditData(record);
setAddEditShow(true);
}}
>
编辑
</Button>
<Button
type={'link'}
danger
onClick={() =>
handleDelete(record as unknown as InterDataType<SignInListType>[0])
}
>
删除
</Button>
</>
),
},
]}
dataSource={signInfoList}
/>
</Form.Item>
</Form>
</div>
<div
className='rewards-action'
style={{ width: '100%', display: 'flex', justifyContent: 'center' }}
>
<Button type={'primary'} onClick={handleSubmit}>
保存
</Button>
</div>
<AddOrEditModal
open={addEditShow}
title={editData ? '编辑' : '添加'}
data={editData}
onCancel={() => {
setAddEditShow(false);
setEditData(undefined);
}}
onSubmit={(e) => {
// 判断是新增还是编辑
if (signInfoList?.find((i) => i.id === e.id)) {
setSignInfoList(signInfoList?.map((i) => (i.id === e.id ? e : i)));
} else {
// 如果是新增,判断连续签到天数不能重复
if (signInfoList?.find((i) => i.numberOfDays === e.numberOfDays)) {
message.warning('连续签到天数不能重复').then();
return;
}
// 判断连续签到天数不能大于签到周期
if (signData?.period && e.numberOfDays > signData?.period) {
message.warning('连续签到天数不能大于签到周期').then();
return;
}
setSignInfoList([...(signInfoList || []), { ...e, id: new Date().getTime() }]);
}
setAddEditShow(false);
setEditData(undefined);
}}
/>
</>
);
};
export default RewardsManageView;
...@@ -168,7 +168,8 @@ function EquipmentOrderView() { ...@@ -168,7 +168,8 @@ function EquipmentOrderView() {
{ {
title: '商品', title: '商品',
align: 'center', align: 'center',
width: '20%', width: '300px',
fixed: 'left',
render: (_text, record) => ( render: (_text, record) => (
<TableItem <TableItem
tr={ tr={
...@@ -196,7 +197,7 @@ function EquipmentOrderView() { ...@@ -196,7 +197,7 @@ function EquipmentOrderView() {
{ {
title: '租期', title: '租期',
align: 'center', align: 'center',
width: '15%', width: '200px',
render: (_text, record) => ( render: (_text, record) => (
<TableItem <TableItem
tr={ tr={
...@@ -213,10 +214,12 @@ function EquipmentOrderView() { ...@@ -213,10 +214,12 @@ function EquipmentOrderView() {
title: '数量', title: '数量',
align: 'center', align: 'center',
dataIndex: 'wareNum', dataIndex: 'wareNum',
width: 100,
render: (text) => <TableItem tr={text} />, render: (text) => <TableItem tr={text} />,
}, },
{ {
title: '单价', title: '单价',
width: 200,
align: 'center', align: 'center',
dataIndex: 'unitPrice', dataIndex: 'unitPrice',
render: (text) => <TableItem tr={<span>¥{text?.toLocaleString()}</span>} />, render: (text) => <TableItem tr={<span>¥{text?.toLocaleString()}</span>} />,
...@@ -251,7 +254,7 @@ function EquipmentOrderView() { ...@@ -251,7 +254,7 @@ function EquipmentOrderView() {
title: '订单状态', title: '订单状态',
dataIndex: 'statusCode', dataIndex: 'statusCode',
align: 'center', align: 'center',
width: '10%', width: '100px',
render: (text: number) => ( render: (text: number) => (
<TableItem tr={tranStatusList.find((v) => v.value === String(text))?.label} /> <TableItem tr={tranStatusList.find((v) => v.value === String(text))?.label} />
), ),
...@@ -260,7 +263,7 @@ function EquipmentOrderView() { ...@@ -260,7 +263,7 @@ function EquipmentOrderView() {
title: '押金', title: '押金',
dataIndex: 'deposit', dataIndex: 'deposit',
align: 'center', align: 'center',
width: '10%', width: '200px',
render: (text: number, record) => ( render: (text: number, record) => (
<TableItem <TableItem
tr={ tr={
...@@ -287,7 +290,7 @@ function EquipmentOrderView() { ...@@ -287,7 +290,7 @@ function EquipmentOrderView() {
title: '实付款', title: '实付款',
dataIndex: 'orderTotalAmount', dataIndex: 'orderTotalAmount',
align: 'center', align: 'center',
width: '10%', width: '200px',
render: (text, record) => ( render: (text, record) => (
<TableItem <TableItem
tr={ tr={
...@@ -314,6 +317,7 @@ function EquipmentOrderView() { ...@@ -314,6 +317,7 @@ function EquipmentOrderView() {
title: '推荐人', title: '推荐人',
dataIndex: 'userName', dataIndex: 'userName',
align: 'center', align: 'center',
width: 200,
render: (_text, _record) => <TableItem tr={''} />, render: (_text, _record) => <TableItem tr={''} />,
}, },
{ {
......
...@@ -117,11 +117,11 @@ function ProductOrderView() { ...@@ -117,11 +117,11 @@ function ProductOrderView() {
getTableList(); getTableList();
}; };
// 订单状态筛选 // 订单状态筛选
const statusChangeEvent = (i: number) => { const statusChangeEvent = (item: { label: string; value: number }, i: number) => {
pagination.current = 1; pagination.current = 1;
pagination.pageSize = 10; pagination.pageSize = 10;
setStatusCodeButtonIndex(i); setStatusCodeButtonIndex(i);
query = { ...query, statusCode: tranStatusList[i].value }; query = { ...query, statusCode: item.value };
getTableList(); getTableList();
}; };
// 跳转订单详情 // 跳转订单详情
...@@ -134,7 +134,12 @@ function ProductOrderView() { ...@@ -134,7 +134,12 @@ function ProductOrderView() {
if (result) { if (result) {
const list = result.map((item) => ({ value: item.code, label: item.status })); const list = result.map((item) => ({ value: item.code, label: item.status }));
setOrderStatusList(list); setOrderStatusList(list);
setTranStatusList([{ label: '全部', value: undefined }, ...list]); setTranStatusList([
{ label: '全部', value: undefined },
...(userInfo.companyInfoVO.companyType === 0
? list
: list.filter((v) => ![200, 300, 420].includes(v.value as number))),
]);
} }
}); });
}; };
...@@ -231,15 +236,8 @@ function ProductOrderView() { ...@@ -231,15 +236,8 @@ function ProductOrderView() {
title: '订单金额(元)', title: '订单金额(元)',
dataIndex: 'orderTotalAmount', dataIndex: 'orderTotalAmount',
align: 'center', align: 'center',
render: (text) => ( width: 280,
<TableItem tr={<div className='goods-text'>{text?.toLocaleString()}</div>} /> render: (text, record) => (
),
},
{
title: '数量',
align: 'center',
width: '15%',
render: (_text, record) => (
<TableItem <TableItem
td={ td={
<div> <div>
...@@ -247,6 +245,16 @@ function ProductOrderView() { ...@@ -247,6 +245,16 @@ function ProductOrderView() {
<span>{record.createTime}</span> <span>{record.createTime}</span>
</div> </div>
} }
tr={<div className='goods-text'>{text?.toLocaleString()}</div>}
/>
),
},
{
title: '数量',
align: 'center',
width: '100px',
render: (_text, record) => (
<TableItem
tr={record.skuDTOList.map((v) => ( tr={record.skuDTOList.map((v) => (
<div key={v.id} className='goods-text'> <div key={v.id} className='goods-text'>
{v.orderNum} {v.orderNum}
...@@ -258,6 +266,7 @@ function ProductOrderView() { ...@@ -258,6 +266,7 @@ function ProductOrderView() {
{ {
title: '单价', title: '单价',
align: 'center', align: 'center',
width: '200px',
render: (_text, record) => ( render: (_text, record) => (
<TableItem <TableItem
tr={record.skuDTOList.map((v) => ( tr={record.skuDTOList.map((v) => (
...@@ -272,12 +281,14 @@ function ProductOrderView() { ...@@ -272,12 +281,14 @@ function ProductOrderView() {
title: '订单类型', title: '订单类型',
align: 'center', align: 'center',
dataIndex: 'orderType', dataIndex: 'orderType',
width: '100px',
render: (text) => ( render: (text) => (
<TableItem tr={<div className='goods-text'>{text ? '意向订单' : '正常订单'}</div>} /> <TableItem tr={<div className='goods-text'>{text ? '意向订单' : '正常订单'}</div>} />
), ),
}, },
{ {
title: '实际支付', title: '实际支付',
width: '200px',
dataIndex: 'otherAmount', dataIndex: 'otherAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
...@@ -286,6 +297,7 @@ function ProductOrderView() { ...@@ -286,6 +297,7 @@ function ProductOrderView() {
}, },
{ {
title: '抵扣云享金', title: '抵扣云享金',
width: '200px',
dataIndex: 'shareAmount', dataIndex: 'shareAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
...@@ -294,6 +306,7 @@ function ProductOrderView() { ...@@ -294,6 +306,7 @@ function ProductOrderView() {
}, },
{ {
title: '抵扣佣金', title: '抵扣佣金',
width: '200px',
dataIndex: 'salaryAmount', dataIndex: 'salaryAmount',
align: 'center', align: 'center',
render: (text) => ( render: (text) => (
...@@ -304,7 +317,7 @@ function ProductOrderView() { ...@@ -304,7 +317,7 @@ function ProductOrderView() {
title: '买家', title: '买家',
dataIndex: 'uid', dataIndex: 'uid',
align: 'center', align: 'center',
width: '10%', width: '200px',
render: (_text: any, record) => ( render: (_text: any, record) => (
<TableItem <TableItem
tr={ tr={
...@@ -333,6 +346,7 @@ function ProductOrderView() { ...@@ -333,6 +346,7 @@ function ProductOrderView() {
title: '订单状态', title: '订单状态',
dataIndex: 'statusCode', dataIndex: 'statusCode',
align: 'center', align: 'center',
width: '100px',
render: (text) => ( render: (text) => (
<TableItem tr={<div>{orderStatusList.find((i) => i.value === text)?.label || text}</div>} /> <TableItem tr={<div>{orderStatusList.find((i) => i.value === text)?.label || text}</div>} />
), ),
...@@ -340,11 +354,13 @@ function ProductOrderView() { ...@@ -340,11 +354,13 @@ function ProductOrderView() {
{ {
title: '推荐人', title: '推荐人',
dataIndex: 'userName', dataIndex: 'userName',
width: '100px',
align: 'center', align: 'center',
render: (_text) => <TableItem tr={<div className='goods-text'>--</div>} />, render: (_text) => <TableItem tr={<div className='goods-text'>--</div>} />,
}, },
{ {
title: '订单交期', title: '订单交期',
width: '100px',
dataIndex: 'deliveryTime', dataIndex: 'deliveryTime',
align: 'center', align: 'center',
render: (text: string) => ( render: (text: string) => (
...@@ -375,7 +391,7 @@ function ProductOrderView() { ...@@ -375,7 +391,7 @@ function ProductOrderView() {
dataIndex: 'action', dataIndex: 'action',
// align: 'right', // align: 'right',
fixed: 'right', fixed: 'right',
width: '10%', width: '100px',
onHeaderCell: () => ({ onHeaderCell: () => ({
style: { style: {
textAlign: 'center', textAlign: 'center',
...@@ -437,15 +453,12 @@ function ProductOrderView() { ...@@ -437,15 +453,12 @@ function ProductOrderView() {
searchData={onFinish} searchData={onFinish}
sufFixBtn={ sufFixBtn={
<> <>
{(userInfo.companyInfoVO.companyType === 0 {tranStatusList.map((i, j) => {
? tranStatusList
: tranStatusList.filter((v) => ![200, 300, 420].includes(v.value as number))
)?.map((i, j) => {
return ( return (
<Button <Button
key={j} key={j}
type={j === statusCodeButtonIndex ? 'primary' : 'default'} type={j === statusCodeButtonIndex ? 'primary' : 'default'}
onClick={() => statusChangeEvent(j)} onClick={() => statusChangeEvent(i, j)}
style={{ marginTop: '5px' }} style={{ marginTop: '5px' }}
> >
{i.label} {i.label}
......
...@@ -2,6 +2,7 @@ import { FC } from 'react'; ...@@ -2,6 +2,7 @@ import { FC } from 'react';
import { Form, Input, Modal, ModalProps, Select } from 'antd'; import { Form, Input, Modal, ModalProps, Select } from 'antd';
import { Uploader } from '~/components/uploader'; import { Uploader } from '~/components/uploader';
import { UploadOutlined } from '@ant-design/icons'; import { UploadOutlined } from '@ant-design/icons';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface selfProps {} interface selfProps {}
const AddOrEditTagModal: FC<ModalProps & selfProps> = ({ open, onCancel }) => { const AddOrEditTagModal: FC<ModalProps & selfProps> = ({ open, onCancel }) => {
......
...@@ -37,6 +37,8 @@ import { ...@@ -37,6 +37,8 @@ import {
AccountBookOutlined, AccountBookOutlined,
EnvironmentOutlined, EnvironmentOutlined,
BarChartOutlined, BarChartOutlined,
FireOutlined,
InsertRowAboveOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Spin } from 'antd'; import { Spin } from 'antd';
...@@ -169,6 +171,7 @@ import AccountLimit from '~/pages/systemManage/limitManage/roleList'; //账号 ...@@ -169,6 +171,7 @@ import AccountLimit from '~/pages/systemManage/limitManage/roleList'; //账号
import LimitInfo from '~/pages/systemManage/limitManage/limitInfo'; import LimitInfo from '~/pages/systemManage/limitManage/limitInfo';
import CustomListDetail from '~/pages/customManage/customList/detail'; import CustomListDetail from '~/pages/customManage/customList/detail';
import ServiceCategoryDetail from '~/pages/categoryManage/serviceCategoryList/detail'; import ServiceCategoryDetail from '~/pages/categoryManage/serviceCategoryList/detail';
import RewardsManageView from '~/pages/activityManage/rewardsManage';
const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressManage')); const AddressManageView = React.lazy(() => import('~/pages/systemManage/addressManage'));
// const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表 // const IndustryListView = React.lazy(() => import('~/pages/mallManage/industryManage/industryList')); //行业列表
...@@ -506,6 +509,28 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -506,6 +509,28 @@ export const routerList: Array<RouteObjectType> = [
], ],
}, },
{ {
path: '/activityManage',
element: <LayoutView />,
errorElement: <ErrorPage />,
meta: {
id: 500,
icon: <FireOutlined />,
title: '营销管理',
},
children: [
{
path: '/activityManage/rewardsManage',
element: withLoadingComponent(<RewardsManageView />),
errorElement: <ErrorPage />,
meta: {
id: 510,
title: '签到奖励',
icon: <InsertRowAboveOutlined />,
},
},
],
},
{
path: '/forumManage', path: '/forumManage',
element: <LayoutView />, element: <LayoutView />,
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论