提交 6a85a7fa 作者: ZhangLingKun

Merge branch 'develop' into 1.1.4

...@@ -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: ad200dc1515c0c4aabd0709d354c997064ba1b19 newTag: 14772f8788209f9b1f126639bb73e51b9256c3b7
...@@ -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/admin newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/admin
newTag: e622090a5db3a73133cf616865a134ee51cb7c85 newTag: e3cbdbdf930c1e808ada6e9262291201d82ff082
...@@ -9,6 +9,7 @@ export type listAppUserType = InterListFunction< ...@@ -9,6 +9,7 @@ export type listAppUserType = InterListFunction<
phoneNum?: string; phoneNum?: string;
startTime?: string; startTime?: string;
realAuthStatus?: number; realAuthStatus?: number;
xzAuthStatus?: number;
}, },
{ {
id: number; id: number;
...@@ -49,6 +50,7 @@ export type listAppUserType = InterListFunction< ...@@ -49,6 +50,7 @@ export type listAppUserType = InterListFunction<
userAccountId: number; userAccountId: number;
}; };
inviteCount: number; inviteCount: number;
xzAuthStatus: number;
} }
>; >;
// 加盟标签列表 // 加盟标签列表
...@@ -268,3 +270,13 @@ export type authDetailType = InterFunction< ...@@ -268,3 +270,13 @@ export type authDetailType = InterFunction<
>; >;
//实名认证-更新备注 //实名认证-更新备注
export type authRemarkType = InterFunction<{ id: number; remark: string }, any>; export type authRemarkType = InterFunction<{ id: number; remark: string }, any>;
// 商家列表-数据统计
export type listAppUserCountType = InterFunction<
any,
{
failAuditSum: number;
passAuditSum: number;
unAuditedSum: number;
}
>;
...@@ -69,3 +69,12 @@ export type updateAuditStatusType = InterFunction< ...@@ -69,3 +69,12 @@ export type updateAuditStatusType = InterFunction<
>; >;
//飞手审批不通过原因列表 //飞手审批不通过原因列表
export type backListReasonType = InterFunction<any, { id: number; reason: string }[]>; export type backListReasonType = InterFunction<any, { id: number; reason: string }[]>;
// 飞手审批数据统计
export type getPilotAuditSumType = InterFunction<
any,
{
failPilotAuditSum: number;
passPilotAuditSum: number;
unAuditedPilotSum: number;
}
>;
...@@ -2,7 +2,7 @@ import { InterFunction, InterListFunction } from '~/api/interface'; ...@@ -2,7 +2,7 @@ import { InterFunction, InterListFunction } from '~/api/interface';
//论坛-列表 //论坛-列表
export type forumListType = InterListFunction< export type forumListType = InterListFunction<
{ keyword?: string }, { keyword?: string; status?: number },
{ {
id: number; id: number;
description: string; description: string;
...@@ -142,3 +142,12 @@ export type updateGambitType = InterFunction< ...@@ -142,3 +142,12 @@ export type updateGambitType = InterFunction<
}, },
any any
>; >;
// 话题-状态个数统计
export type countGambitType = InterFunction<
any,
{
failAuditSum: number;
passAuditSum: number;
unAuditedSum: number;
}
>;
...@@ -11,6 +11,7 @@ import { ...@@ -11,6 +11,7 @@ import {
deleteApplyTag, deleteApplyTag,
editUserApplyTag, editUserApplyTag,
editUserApplyTagDetails, editUserApplyTagDetails,
listAppUserCountType,
listAppUserType, listAppUserType,
listAuthPageType, listAuthPageType,
listUserApplyTag, listUserApplyTag,
...@@ -67,4 +68,7 @@ export class CustomManageAPI { ...@@ -67,4 +68,7 @@ export class CustomManageAPI {
// 客户-实名认证更新备注 // 客户-实名认证更新备注
static updateRemark: authRemarkType = (params) => static updateRemark: authRemarkType = (params) =>
axios.get('/userapp/real-name-auth/updateRemark', { params }); axios.get('/userapp/real-name-auth/updateRemark', { params });
// 商家列表-数据统计
static getListAppUserCount: listAppUserCountType = () =>
axios.get('/userapp/cooperation/getAuditSum');
} }
...@@ -4,6 +4,7 @@ import { ...@@ -4,6 +4,7 @@ import {
backListPilotType, backListPilotType,
backListReasonType, backListReasonType,
backPilotLogListType, backPilotLogListType,
getPilotAuditSumType,
updateAuditStatusType, updateAuditStatusType,
updateRemarkType, updateRemarkType,
} from '~/api/interface/flyerCenterType'; } from '~/api/interface/flyerCenterType';
...@@ -28,4 +29,7 @@ export class FlyerCenterAPI { ...@@ -28,4 +29,7 @@ export class FlyerCenterAPI {
axios.post('/userapp/pilot/updateAuditStatus', data); axios.post('/userapp/pilot/updateAuditStatus', data);
// 飞手审批不通过原因 // 飞手审批不通过原因
static getBackListReason: backListReasonType = () => axios.get('/userapp/pilot/backListReason'); static getBackListReason: backListReasonType = () => axios.get('/userapp/pilot/backListReason');
// 飞手审批数据统计
static getPilotAuditSum: getPilotAuditSumType = () =>
axios.get('/userapp/pilot/getPilotAuditSum');
} }
import { import {
addGambitType, addGambitType,
checkDynamicType, checkDynamicType,
countGambitType,
deleteForumType, deleteForumType,
deleteGambitType, deleteGambitType,
forumDetailType, forumDetailType,
...@@ -41,4 +42,7 @@ export class ForumManageAPI { ...@@ -41,4 +42,7 @@ export class ForumManageAPI {
// 话题-编辑 // 话题-编辑
static updateGambit: updateGambitType = (data) => static updateGambit: updateGambitType = (data) =>
axios.post('/release/gambit/updateGambit', data); axios.post('/release/gambit/updateGambit', data);
// 话题-统计个数
static getCountGambit: countGambitType = () =>
axios.get('/release/backstage/forum/getDynamicAuditSum');
} }
...@@ -38,7 +38,14 @@ interface selfProps { ...@@ -38,7 +38,14 @@ interface selfProps {
type: number; //0:采购订单,1:商城订单 type: number; //0:采购订单,1:商城订单
} }
const SureOrder: FC<ModalProps & selfProps> = ({ open, onOk, onCancel, orderItem, type }) => { const SureOrder: FC<ModalProps & selfProps> = ({
open,
onOk,
onCancel,
orderItem,
type,
updateContract,
}) => {
const navigate = useNavigate(); const navigate = useNavigate();
const [orderInfoForm] = Form.useForm<{ const [orderInfoForm] = Form.useForm<{
orderTotalAmount: number; orderTotalAmount: number;
......
.custom-identity{
.data-statistics{
display: flex;
align-items: center;
color: red;
justify-content: flex-end;
}
}
...@@ -3,15 +3,19 @@ import SearchBox from '~/components/search-box'; ...@@ -3,15 +3,19 @@ import SearchBox from '~/components/search-box';
import { CustomManageAPI } from '~/api'; import { CustomManageAPI } from '~/api';
import { Button, message, Modal, Rate, Table } from 'antd'; import { Button, message, Modal, Rate, Table } from 'antd';
import { ColumnsType } from 'antd/es/table'; import { ColumnsType } from 'antd/es/table';
import { InterListType, InterReqListType } from '~/api/interface'; import { InterDataType, InterListType, InterReqListType } from '~/api/interface';
import { listUserApplyTag } from '~/api/interface/customManageType'; import { listAppUserCountType, listUserApplyTag } from '~/api/interface/customManageType';
import ApprovalModal from './comp/approvalModal'; import ApprovalModal from './comp/approvalModal';
import AddEditModal from '~/pages/customManage/customIdentity/comp/addEditModal'; import AddEditModal from '~/pages/customManage/customIdentity/comp/addEditModal';
import './index.scss';
// 列表类型 // 列表类型
type TableType = InterListType<listUserApplyTag>; type TableType = InterListType<listUserApplyTag>;
// 请求的参数 // 请求的参数
type ReqType = InterReqListType<listUserApplyTag>; type ReqType = InterReqListType<listUserApplyTag>;
// 统计数据返回类型
type statisticsDataType = InterDataType<listAppUserCountType>;
// 搜索表单的数据 // 搜索表单的数据
let query: ReqType = {}; let query: ReqType = {};
// 审批状态 // 审批状态
...@@ -40,6 +44,9 @@ const CustomIdentityView = () => { ...@@ -40,6 +44,9 @@ const CustomIdentityView = () => {
current: 1, current: 1,
totalPage: 0, totalPage: 0,
}); });
// 数据统计
const [statisticsData, setStatisticsDataType] = useState<statisticsDataType>();
// 加载列表 // 加载列表
const getTableList = async (value = {}) => { const getTableList = async (value = {}) => {
// 只需要修改这个地方的接口即可 // 只需要修改这个地方的接口即可
...@@ -91,13 +98,24 @@ const CustomIdentityView = () => { ...@@ -91,13 +98,24 @@ const CustomIdentityView = () => {
tableData.length === 1 ? pagination.current - 1 : pagination.current, tableData.length === 1 ? pagination.current - 1 : pagination.current,
pagination.pageSize, pagination.pageSize,
); );
getListAppUserCount();
} }
}, },
}); });
}; };
// 商家加盟状态数据统计
const getListAppUserCount = () => {
CustomManageAPI.getListAppUserCount().then(({ result }) => {
if (result) {
setStatisticsDataType(result);
}
});
};
useEffect(() => { useEffect(() => {
getCooperationList().then(); getCooperationList().then();
getTableList().then(); getTableList().then();
getListAppUserCount();
}, []); }, []);
// 表格结构 // 表格结构
const columns: ColumnsType<TableType[0]> = [ const columns: ColumnsType<TableType[0]> = [
...@@ -192,7 +210,7 @@ const CustomIdentityView = () => { ...@@ -192,7 +210,7 @@ const CustomIdentityView = () => {
}, },
]; ];
return ( return (
<> <div className='custom-identity'>
<SearchBox <SearchBox
search={[ search={[
{ {
...@@ -223,6 +241,22 @@ const CustomIdentityView = () => { ...@@ -223,6 +241,22 @@ const CustomIdentityView = () => {
}, },
]} ]}
searchData={onFinish} searchData={onFinish}
sufFixBtn={
<div className='data-statistics'>
<div>
<span>已通过:</span>
<span>{statisticsData?.passAuditSum || 0}</span>
</div>
<div>
<span>审批中:</span>
<span>{statisticsData?.unAuditedSum || 0}</span>
</div>
<div>
<span>未通过:</span>
<span>{statisticsData?.failAuditSum || 0}</span>
</div>
</div>
}
/> />
<Table <Table
size='small' size='small'
...@@ -250,6 +284,7 @@ const CustomIdentityView = () => { ...@@ -250,6 +284,7 @@ const CustomIdentityView = () => {
setApprovalModalVisible(false); setApprovalModalVisible(false);
setEditData(undefined); setEditData(undefined);
paginationChange(pagination.current, pagination.pageSize); paginationChange(pagination.current, pagination.pageSize);
getListAppUserCount();
}} }}
/> />
{/*编辑弹窗*/} {/*编辑弹窗*/}
...@@ -263,7 +298,7 @@ const CustomIdentityView = () => { ...@@ -263,7 +298,7 @@ const CustomIdentityView = () => {
paginationChange(pagination.current, pagination.pageSize); paginationChange(pagination.current, pagination.pageSize);
}} }}
/> />
</> </div>
); );
}; };
......
...@@ -123,15 +123,15 @@ function CustomListView() { ...@@ -123,15 +123,15 @@ function CustomListView() {
render: (text: number) => (text ? '已认证' : '未认证'), render: (text: number) => (text ? '已认证' : '未认证'),
}, },
{ {
title: '认证企业',
dataIndex: 'companyName',
align: 'center',
},
{
title: '企业认证', title: '企业认证',
dataIndex: 'companyAuthStatus', dataIndex: 'companyAuthStatus',
align: 'center', align: 'center',
render: (text) => (text === 0 ? '未认证' : '已认证'), render: (text, record) => (
<>
<div>{text === 0 ? '未认证' : '已认证'}</div>
<div style={{ color: 'rgb(22,119,255)' }}>{record.companyName}</div>
</>
),
}, },
{ {
title: '电子签约认证', title: '电子签约认证',
...@@ -140,6 +140,12 @@ function CustomListView() { ...@@ -140,6 +140,12 @@ function CustomListView() {
render: (_text) => `未认证`, render: (_text) => `未认证`,
}, },
{ {
title: '提现认证',
dataIndex: 'xzAuthStatus',
align: 'center',
render: (text: number) => (text ? '已认证' : '未认证'),
},
{
title: '用户来源', title: '用户来源',
dataIndex: 'portType', dataIndex: 'portType',
align: 'center', align: 'center',
...@@ -273,6 +279,16 @@ function CustomListView() { ...@@ -273,6 +279,16 @@ function CustomListView() {
{ value: 1, label: '已认证' }, { value: 1, label: '已认证' },
], ],
}, },
{
label: '提现认证',
name: 'xzAuthStatus',
type: 'Select',
placeholder: '请选择认证状态',
options: [
{ value: 0, label: '未认证' },
{ value: 1, label: '已认证' },
],
},
]} ]}
searchData={onFinish} searchData={onFinish}
/> />
......
.flyer-list{
.data-statistics{
display: flex;
align-items: center;
color: red;
justify-content: flex-end;
}
}
...@@ -4,10 +4,11 @@ import { ColumnsType } from 'antd/es/table'; ...@@ -4,10 +4,11 @@ import { ColumnsType } from 'antd/es/table';
import { CommonAPI, FlyerCenterAPI } from '~/api'; import { CommonAPI, FlyerCenterAPI } from '~/api';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { InterDataType, InterReqListType, PaginationProps } from '~/api/interface'; import { InterDataType, InterReqListType, PaginationProps } from '~/api/interface';
import { backListPilotType } from '~/api/interface/flyerCenterType'; import { backListPilotType, getPilotAuditSumType } from '~/api/interface/flyerCenterType';
import { getSecondDistrictInfoType } from '~/api/interface/commonType'; import { getSecondDistrictInfoType } from '~/api/interface/commonType';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import UpdateRemarkModal from './components/updateRemarkModal'; import UpdateRemarkModal from './components/updateRemarkModal';
import './index.scss';
//飞手列表返回类型 //飞手列表返回类型
type flyerListType = InterDataType<backListPilotType>['list']; type flyerListType = InterDataType<backListPilotType>['list'];
...@@ -15,6 +16,8 @@ type flyerListType = InterDataType<backListPilotType>['list']; ...@@ -15,6 +16,8 @@ type flyerListType = InterDataType<backListPilotType>['list'];
type flyerListParameters = InterReqListType<backListPilotType>; type flyerListParameters = InterReqListType<backListPilotType>;
//地址返回数据 //地址返回数据
type locationType = InterDataType<getSecondDistrictInfoType>; type locationType = InterDataType<getSecondDistrictInfoType>;
// 飞手审批数据统计返回类型
type statisticsDataType = InterDataType<getPilotAuditSumType>;
const FlyerList = () => { const FlyerList = () => {
const navigate = useNavigate(); const navigate = useNavigate();
...@@ -146,6 +149,8 @@ const FlyerList = () => { ...@@ -146,6 +149,8 @@ const FlyerList = () => {
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
//修改备注弹窗 //修改备注弹窗
const [updateRemarkModalShow, setUpdateRemarkModalShow] = useState<boolean>(false); const [updateRemarkModalShow, setUpdateRemarkModalShow] = useState<boolean>(false);
// 飞手审批数据统计
const [approveStatistics, setApproveStatistics] = useState<statisticsDataType>();
//飞手列表 //飞手列表
const getFlyerList = (query?: flyerListParameters) => { const getFlyerList = (query?: flyerListParameters) => {
...@@ -185,6 +190,12 @@ const FlyerList = () => { ...@@ -185,6 +190,12 @@ const FlyerList = () => {
setQuery({ ...value, areaNumber: value.areaNumber ? value.areaNumber[1] : undefined }); setQuery({ ...value, areaNumber: value.areaNumber ? value.areaNumber[1] : undefined });
getFlyerList({ ...value, areaNumber: value.areaNumber ? value.areaNumber[1] : undefined }); getFlyerList({ ...value, areaNumber: value.areaNumber ? value.areaNumber[1] : undefined });
}; };
// 获取飞手审批数据统计
const getFlyerApproveStatistics = () => {
FlyerCenterAPI.getPilotAuditSum().then(({ result }) => {
setApproveStatistics(result);
});
};
//获取地域数据 //获取地域数据
const getSecondDistrictInfo = () => { const getSecondDistrictInfo = () => {
CommonAPI.getSecondDistrictInfo().then(({ result }) => { CommonAPI.getSecondDistrictInfo().then(({ result }) => {
...@@ -205,11 +216,11 @@ const FlyerList = () => { ...@@ -205,11 +216,11 @@ const FlyerList = () => {
}; };
//飞手审批页面 //飞手审批页面
const toFlyerApprove = (record: flyerListType[0]) => { const toFlyerApprove = (record: flyerListType[0]) => {
navigate({ pathname: '/flyerCenter/flyerDetail', search: `id=${record.id}&isApprove=1` }); navigate({ pathname: '/customManage/flyerDetail', search: `id=${record.id}&isApprove=1` });
}; };
//飞手详情页面 //飞手详情页面
const toFlyerDetail = (record: flyerListType[0]) => { const toFlyerDetail = (record: flyerListType[0]) => {
navigate({ pathname: '/flyerCenter/flyerApprove', search: `id=${record.id}` }); navigate({ pathname: '/customManage/flyerApprove', search: `id=${record.id}` });
}; };
//修改备注 //修改备注
const updateRemarkClick = (record: flyerListType[0]) => { const updateRemarkClick = (record: flyerListType[0]) => {
...@@ -228,6 +239,7 @@ const FlyerList = () => { ...@@ -228,6 +239,7 @@ const FlyerList = () => {
getFlyerList(); getFlyerList();
getAbilityList(); getAbilityList();
getSecondDistrictInfo(); getSecondDistrictInfo();
getFlyerApproveStatistics();
}, []); }, []);
return ( return (
...@@ -240,6 +252,22 @@ const FlyerList = () => { ...@@ -240,6 +252,22 @@ const FlyerList = () => {
认证日志 认证日志
</Button> </Button>
} }
sufFixBtn={
<div className='data-statistics'>
<div>
<span>已通过:</span>
<span>{approveStatistics?.passPilotAuditSum || 0}</span>
</div>
<div>
<span>审批中:</span>
<span>{approveStatistics?.unAuditedPilotSum || 0}</span>
</div>
<div>
<span>未通过:</span>
<span>{approveStatistics?.failPilotAuditSum || 0}</span>
</div>
</div>
}
/> />
<Table <Table
bordered bordered
......
...@@ -40,7 +40,7 @@ const ApplyStatusModal: FC<ModalProps & selfProps> = ({ ...@@ -40,7 +40,7 @@ const ApplyStatusModal: FC<ModalProps & selfProps> = ({
onCancel(); onCancel();
}; };
return ( return (
<Modal title='审批' open={open} onOk={handleOk} onCancel={handleCancel}> <Modal title='提现审批' open={open} onOk={handleOk} onCancel={handleCancel}>
<Form <Form
form={form} form={form}
initialValues={{ applyStatus: 1 }} initialValues={{ applyStatus: 1 }}
...@@ -49,8 +49,8 @@ const ApplyStatusModal: FC<ModalProps & selfProps> = ({ ...@@ -49,8 +49,8 @@ const ApplyStatusModal: FC<ModalProps & selfProps> = ({
> >
<Form.Item label='状态' name='applyStatus'> <Form.Item label='状态' name='applyStatus'>
<Radio.Group> <Radio.Group>
<Radio value={1}>提现成功</Radio> <Radio value={1}>同意</Radio>
<Radio value={2}>提现失败</Radio> <Radio value={2}>拒绝</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Form.Item label='备注' name='remark'> <Form.Item label='备注' name='remark'>
......
...@@ -104,7 +104,7 @@ const WithDrawManage = () => { ...@@ -104,7 +104,7 @@ const WithDrawManage = () => {
dataIndex: 'tradeResult', dataIndex: 'tradeResult',
}, },
{ {
title: '时间', title: '申请时间',
align: 'center', align: 'center',
dataIndex: 'createTime', dataIndex: 'createTime',
}, },
......
.dynamic-list{ .dynamic-list{
.data-statistics{
display: flex;
align-items: center;
color: red;
justify-content: flex-end;
}
.forum-description{ .forum-description{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -5,12 +5,12 @@ import { useEffect, useState } from 'react'; ...@@ -5,12 +5,12 @@ import { useEffect, useState } from 'react';
import DynamicDetailModal from './components/dynamicDetailModal'; import DynamicDetailModal from './components/dynamicDetailModal';
import { ForumManageAPI } from '~/api'; import { ForumManageAPI } from '~/api';
import { InterDataType, InterListType, InterReqListType, PaginationProps } from '~/api/interface'; import { InterDataType, InterListType, InterReqListType, PaginationProps } from '~/api/interface';
import { forumDetailType, forumListType } from '~/api/interface/forumManageType'; import { countGambitType, forumDetailType, forumListType } from '~/api/interface/forumManageType';
import './index.scss'; import './index.scss';
// 动态审核状态 // 动态审核状态
const checkStatusList = [ const checkStatusList = [
{ label: '审核中', value: 0 }, { label: '待审核', value: 0 },
{ label: '审核通过', value: 1 }, { label: '审核通过', value: 1 },
{ label: '审核不通过', value: 2 }, { label: '审核不通过', value: 2 },
]; ];
...@@ -21,6 +21,8 @@ type forumType = InterListType<forumListType>; ...@@ -21,6 +21,8 @@ type forumType = InterListType<forumListType>;
type forumParameters = InterReqListType<forumListType>; type forumParameters = InterReqListType<forumListType>;
//论坛详情返回类型 //论坛详情返回类型
type detailType = InterDataType<forumDetailType>; type detailType = InterDataType<forumDetailType>;
//论坛统计数据返回类型
type getCountGambitType = InterDataType<countGambitType>;
const DynamicList = () => { const DynamicList = () => {
const searchColumnsData: searchColumns[] = [ const searchColumnsData: searchColumns[] = [
{ {
...@@ -29,6 +31,13 @@ const DynamicList = () => { ...@@ -29,6 +31,13 @@ const DynamicList = () => {
name: 'keyword', name: 'keyword',
placeholder: '用户名称/用户UID/用户手机号码', placeholder: '用户名称/用户UID/用户手机号码',
}, },
{
label: '状态',
type: 'Select',
name: 'status',
placeholder: '帖子状态',
options: checkStatusList,
},
]; ];
const tableColumns: ColumnsType<forumType[0]> = [ const tableColumns: ColumnsType<forumType[0]> = [
{ {
...@@ -127,6 +136,7 @@ const DynamicList = () => { ...@@ -127,6 +136,7 @@ const DynamicList = () => {
const [forumDetail, setForumDetail] = useState<detailType>(); const [forumDetail, setForumDetail] = useState<detailType>();
const [query, setQuery] = useState<forumParameters>(); const [query, setQuery] = useState<forumParameters>();
const [dynamicDetailModalShow, setDynamicDetailModalShow] = useState<boolean>(false); const [dynamicDetailModalShow, setDynamicDetailModalShow] = useState<boolean>(false);
const [countGambit, setCountGambit] = useState<getCountGambitType>();
//动态列表 //动态列表
const getDynamicList = (query?: forumParameters) => { const getDynamicList = (query?: forumParameters) => {
...@@ -153,6 +163,14 @@ const DynamicList = () => { ...@@ -153,6 +163,14 @@ const DynamicList = () => {
pagination.pageSize = pageSize; pagination.pageSize = pageSize;
getDynamicList(query); getDynamicList(query);
}; };
// 获取动态不同状态个数
const getCountGambit = () => {
ForumManageAPI.getCountGambit().then(({ result }) => {
if (result) {
setCountGambit(result);
}
});
};
//强制删除论坛 //强制删除论坛
const deleteForumClick = (record: forumType[0]) => { const deleteForumClick = (record: forumType[0]) => {
Modal.confirm({ Modal.confirm({
...@@ -166,6 +184,7 @@ const DynamicList = () => { ...@@ -166,6 +184,7 @@ const DynamicList = () => {
pagination.pageNo -= 1; pagination.pageNo -= 1;
} }
getDynamicList(query); getDynamicList(query);
getCountGambit();
} }
}); });
}, },
...@@ -202,6 +221,17 @@ const DynamicList = () => { ...@@ -202,6 +221,17 @@ const DynamicList = () => {
} }
}); });
}; };
// 审核请求
const replyReq = async (record: forumType[0], status: boolean) => {
const res = await ForumManageAPI.checkDynamic({ dynamicId: record.id, status });
if (res && res.code === '200') {
message.success('操作成功');
paginationChange(pagination.pageNo, pagination.pageSize);
Modal.destroyAll();
getCountGambit();
}
};
// 是否确认审核 // 是否确认审核
const handleCheckStatus = (record: forumType[0]) => { const handleCheckStatus = (record: forumType[0]) => {
Modal.confirm({ Modal.confirm({
...@@ -209,29 +239,51 @@ const DynamicList = () => { ...@@ -209,29 +239,51 @@ const DynamicList = () => {
content: `请确认是否审核通过?通过后动态将展示在论坛列表`, content: `请确认是否审核通过?通过后动态将展示在论坛列表`,
okText: '审核通过', okText: '审核通过',
cancelText: '审核不通过', cancelText: '审核不通过',
onOk: async () => { closable: true,
const res = await ForumManageAPI.checkDynamic({ dynamicId: record.id, status: true }); maskClosable: true,
if (res && res.code === '200') { footer: (
message.success('操作成功'); <div style={{ textAlign: 'right', marginTop: '10px' }}>
paginationChange(pagination.pageNo, pagination.pageSize); <Button
} type='default'
}, style={{ marginRight: '10px' }}
onCancel: async () => { onClick={() => replyReq(record, false)}
const res = await ForumManageAPI.checkDynamic({ dynamicId: record.id, status: false }); >
if (res && res.code === '200') { 审核不通过
message.success('操作成功'); </Button>
paginationChange(pagination.pageNo, pagination.pageSize); <Button type='primary' onClick={() => replyReq(record, true)}>
} 审核通过
}, </Button>
</div>
),
}); });
}; };
// 组件挂载 // 组件挂载
useEffect(() => { useEffect(() => {
getDynamicList(); getDynamicList();
getCountGambit();
}, []); }, []);
return ( return (
<div className='dynamic-list'> <div className='dynamic-list'>
<SearchBox search={searchColumnsData} searchData={searchSuccess} /> <SearchBox
search={searchColumnsData}
searchData={searchSuccess}
sufFixBtn={
<div className='data-statistics'>
<div>
<span>审核通过:</span>
<span>{countGambit?.passAuditSum || 0}</span>
</div>
<div>
<span>待审核:</span>
<span>{countGambit?.unAuditedSum || 0}</span>
</div>
<div>
<span>审核不通过:</span>
<span>{countGambit?.failAuditSum || 0}</span>
</div>
</div>
}
/>
<Table <Table
size={'small'} size={'small'}
bordered bordered
......
...@@ -155,6 +155,12 @@ const TopicList = () => { ...@@ -155,6 +155,12 @@ const TopicList = () => {
</Button> </Button>
} }
searchData={searchSuccess} searchData={searchSuccess}
sufFixBtn={
<div style={{ color: 'red', textAlign: 'right' }}>
<span>话题总个数:</span>
<span>{pagination.totalCount}</span>
</div>
}
/> />
<Table <Table
bordered bordered
......
...@@ -332,7 +332,7 @@ function EquipmentOrderView() { ...@@ -332,7 +332,7 @@ function EquipmentOrderView() {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
width: '130px', width: '150px',
onHeaderCell: () => ({ onHeaderCell: () => ({
style: { style: {
textAlign: 'center', textAlign: 'center',
......
...@@ -117,7 +117,7 @@ function ProductOrderView() { ...@@ -117,7 +117,7 @@ function ProductOrderView() {
getTableList(); getTableList();
}; };
// 订单状态筛选 // 订单状态筛选
const statusChangeEvent = (item: { label: string; value: number }, i: number) => { const statusChangeEvent = (item: { label: string; value: number | undefined }, i: number) => {
pagination.current = 1; pagination.current = 1;
pagination.pageSize = 10; pagination.pageSize = 10;
setStatusCodeButtonIndex(i); setStatusCodeButtonIndex(i);
...@@ -391,7 +391,7 @@ function ProductOrderView() { ...@@ -391,7 +391,7 @@ function ProductOrderView() {
dataIndex: 'action', dataIndex: 'action',
// align: 'right', // align: 'right',
fixed: 'right', fixed: 'right',
width: '100px', width: '150px',
onHeaderCell: () => ({ onHeaderCell: () => ({
style: { style: {
textAlign: 'center', textAlign: 'center',
......
...@@ -102,15 +102,15 @@ export const PointList = () => { ...@@ -102,15 +102,15 @@ export const PointList = () => {
title: '积分总额', title: '积分总额',
dataIndex: 'totalPoints', dataIndex: 'totalPoints',
align: 'center', align: 'center',
render: (text: string, record) => { },
return ( {
<> title: '操作',
<Button type='link' onClick={() => handleDetail(record)}> align: 'center',
{text} render: (_text: any, record) => (
</Button> <Button type='link' onClick={() => handleDetail(record)}>
</> 详情
); </Button>
}, ),
}, },
]; ];
useEffect(() => { useEffect(() => {
......
...@@ -151,11 +151,11 @@ const AddInstitutionsView = React.lazy( ...@@ -151,11 +151,11 @@ const AddInstitutionsView = React.lazy(
); //机构上传 ); //机构上传
//飞手中心 //飞手中心
const FlyerListView = React.lazy(() => import('~/pages/flyerCenter/flyerManage/flyerList')); //飞手列表 const FlyerListView = React.lazy(() => import('~/pages/customManage/flyerManage/flyerList')); //飞手列表
const FlyerAuthDailyView = React.lazy( const FlyerAuthDailyView = React.lazy(
() => import('~/pages/flyerCenter/flyerManage/flyerAuthDaily'), () => import('~/pages/customManage/flyerManage/flyerAuthDaily'),
); //飞手认证日志; ); //飞手认证日志;
const FlyerDetailsView = React.lazy(() => import('~/pages/flyerCenter/flyerManage/flyerDetail')); //飞手详情、飞手审批 const FlyerDetailsView = React.lazy(() => import('~/pages/customManage/flyerManage/flyerDetail')); //飞手详情、飞手审批
// 系统管理 // 系统管理
import AccountManageView from '~/pages/systemManage/accountManage'; import AccountManageView from '~/pages/systemManage/accountManage';
...@@ -251,7 +251,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -251,7 +251,7 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 200, id: 200,
icon: <TeamOutlined />, icon: <TeamOutlined />,
title: '户管理', title: '户管理',
}, },
children: [ children: [
{ {
...@@ -260,7 +260,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -260,7 +260,7 @@ export const routerList: Array<RouteObjectType> = [
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 220, id: 220,
title: '户列表', title: '户列表',
icon: <SolutionOutlined />, icon: <SolutionOutlined />,
}, },
}, },
...@@ -321,39 +321,17 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -321,39 +321,17 @@ export const routerList: Array<RouteObjectType> = [
}, },
}, },
{ {
path: '/customManage/customIdentity', path: '/customManage/flyerList',
element: withLoadingComponent(<CustomIdentityView />),
errorElement: <ErrorPage />,
meta: {
id: 240,
title: '加盟入驻',
icon: <AuditOutlined />,
},
},
],
},
{
path: '/flyerCenter',
element: <LayoutView />,
errorElement: <ErrorPage />,
meta: {
id: 1800,
icon: <UserOutlined />,
title: '飞手中心',
},
children: [
{
path: '/flyerCenter/flyerList',
element: withLoadingComponent(<FlyerListView />), element: withLoadingComponent(<FlyerListView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 1810, id: 1810,
title: '飞手管理', title: '飞手管理',
icon: <UserOutlined />, icon: <SolutionOutlined />,
}, },
}, },
{ {
path: '/flyerCenter/flyerAuthDaily', path: '/customManage/flyerAuthDaily',
element: withLoadingComponent(<FlyerAuthDailyView />), element: withLoadingComponent(<FlyerAuthDailyView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
...@@ -365,7 +343,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -365,7 +343,7 @@ export const routerList: Array<RouteObjectType> = [
}, },
}, },
{ {
path: '/flyerCenter/flyerDetail', path: '/customManage/flyerDetail',
element: withLoadingComponent(<FlyerDetailsView />), element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
...@@ -377,7 +355,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -377,7 +355,7 @@ export const routerList: Array<RouteObjectType> = [
}, },
}, },
{ {
path: '/flyerCenter/flyerApprove', path: '/customManage/flyerApprove',
element: withLoadingComponent(<FlyerDetailsView />), element: withLoadingComponent(<FlyerDetailsView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
...@@ -388,6 +366,16 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -388,6 +366,16 @@ export const routerList: Array<RouteObjectType> = [
pid: 1810, pid: 1810,
}, },
}, },
{
path: '/customManage/customIdentity',
element: withLoadingComponent(<CustomIdentityView />),
errorElement: <ErrorPage />,
meta: {
id: 240,
title: '商家管理',
icon: <AuditOutlined />,
},
},
], ],
}, },
{ {
...@@ -550,26 +538,26 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -550,26 +538,26 @@ export const routerList: Array<RouteObjectType> = [
meta: { meta: {
id: 600, id: 600,
icon: <MessageOutlined />, icon: <MessageOutlined />,
title: '论坛管理', title: '社群管理',
}, },
children: [ children: [
{ {
path: '/forumManage/dynamicList', path: '/forumManage/topicList',
element: withLoadingComponent(<DynamicListView />), element: withLoadingComponent(<TopicListView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 610, id: 620,
title: '动态列表', title: '话题列表',
icon: <ThunderboltOutlined />, icon: <ThunderboltOutlined />,
}, },
}, },
{ {
path: '/forumManage/topicList', path: '/forumManage/dynamicList',
element: withLoadingComponent(<TopicListView />), element: withLoadingComponent(<DynamicListView />),
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 620, id: 610,
title: '话题列表', title: '帖子列表',
icon: <ThunderboltOutlined />, icon: <ThunderboltOutlined />,
}, },
}, },
...@@ -689,7 +677,7 @@ export const routerList: Array<RouteObjectType> = [ ...@@ -689,7 +677,7 @@ export const routerList: Array<RouteObjectType> = [
errorElement: <ErrorPage />, errorElement: <ErrorPage />,
meta: { meta: {
id: 850, id: 850,
title: '需求订单', title: '任务订单',
icon: <CreditCardOutlined />, icon: <CreditCardOutlined />,
}, },
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论