Commit 2acbb19d authored by XieZhiXiong's avatar XieZhiXiong

关闭按钮条件判断

parent 60fea057
......@@ -29,6 +29,7 @@ import {
MEMBER_OUTER_STATUS,
MEMBER_OUTER_STATUS_UNCOMMITTED,
MEMBER_OUTER_STATUS_SUCCESS,
MEMBER_OUTER_STATUS_FAILED,
} from '@/constants';
import StatusTag from '../components/StatusTag';
import { importSchema, auditModalSchema } from './schema';
......@@ -48,7 +49,10 @@ const MemberMaintain: React.FC<[]> = () => {
const [visibleModal, setVisibleModal] = useState(false);
const handleDelete = (memberId: number, validateId: number) => {
const mesInstance = message.loading('正在删除');
const mesInstance = message.loading({
content: '正在删除',
duration: 0,
});
PublicApi.postMemberAbilitySubDelete({
memberId,
validateId,
......@@ -147,7 +151,7 @@ const MemberMaintain: React.FC<[]> = () => {
align: 'center',
render: (text: any, record: any) => (
<>
{/* 外部审核状态等于 待提交 可进行提交、及编辑操作 */}
{/* 外部审核状态等于 待提交 可进行提交操作 */}
{record.outerStatus === MEMBER_OUTER_STATUS_UNCOMMITTED && (
<>
<Button
......@@ -156,6 +160,14 @@ const MemberMaintain: React.FC<[]> = () => {
>
提交审核
</Button>
</>
)}
{/* 外部审核状态等于 待提交 或者 审核失败 可进行编辑操作 */}
{(
record.outerStatus === MEMBER_OUTER_STATUS_UNCOMMITTED ||
record.outerStatus === MEMBER_OUTER_STATUS_FAILED
) && (
<>
<Button
type="link"
onClick={() =>
......@@ -187,13 +199,6 @@ const MemberMaintain: React.FC<[]> = () => {
},
];
const rowSelection = {
onChange: (selectedRowKeys: any, selectedRows: any) => {
setSelectedRowKeys(selectedRowKeys);
},
selectedRowKeys: selectedRowKeys,
};
const menu = (
<Menu onClick={e => handleMenuClick(e)}>
<Menu.Item key="1" icon={<DeleteOutlined />}>
......@@ -279,7 +284,6 @@ const MemberMaintain: React.FC<[]> = () => {
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
rowSelection={rowSelection}
controlRender={
<NiceForm
actions={formActions}
......
......@@ -24,10 +24,8 @@ import StatusTag from '../components/StatusTag';
import { PublicApi } from '@/services/api';
import {
MEMBER_STATUS_NORMAL,
MEMBER_STATUS_FROZEN,
MEMBER_STATUS,
MEMBER_OUTER_STATUS,
MEMBER_INNER_STATUS_SUCCESS,
MEMBER_OUTER_STATUS_SUCCESS,
} from '@/constants';
import { maintianSchema } from './schema';
import {
......@@ -133,7 +131,10 @@ const MemberMaintain: React.FC<[]> = () => {
align: 'center',
render: (text, record) => (
<>
{/* {record.innerStatus === MEMBER_INNER_STATUS_SUCCESS && ( */}
{(
record.innerStatus === MEMBER_INNER_STATUS_SUCCESS &&
record.outerStatus === MEMBER_OUTER_STATUS_SUCCESS
) && (
<Link to={`/memberCenter/memberAbility/manage/frozen?id=${record.memberId}&validateId=${record.validateId}`}>
<Button
type="link"
......@@ -141,7 +142,7 @@ const MemberMaintain: React.FC<[]> = () => {
{record.status === MEMBER_STATUS_NORMAL ? '冻结' : '解冻'}
</Button>
</Link>
{/* )} */}
)}
</>
),
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment