Commit 2acbb19d authored by XieZhiXiong's avatar XieZhiXiong

关闭按钮条件判断

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