|
@@ -1,5 +1,14 @@
|
|
|
import React, { useState, useRef, useEffect } from 'react';
|
|
|
-import { Button, DatePicker, Input, Select, Space, Table, message } from 'antd';
|
|
|
+import {
|
|
|
+ Button,
|
|
|
+ DatePicker,
|
|
|
+ Input,
|
|
|
+ Select,
|
|
|
+ Space,
|
|
|
+ Table,
|
|
|
+ message,
|
|
|
+ Modal,
|
|
|
+} from 'antd';
|
|
|
import styles from './index.less';
|
|
|
import ContractModal, { Type } from './component/Modal';
|
|
|
import { PageContainer } from '@ant-design/pro-components';
|
|
@@ -41,6 +50,7 @@ const ConteactManager = (props) => {
|
|
|
const parentIdRef = useRef(0);
|
|
|
const [fileViewerVisible, setFileViewerVisible] = useState(false);
|
|
|
const [fileViewerData, setFileViewerData] = useState();
|
|
|
+ const [modal, contextHolder] = Modal.useModal();
|
|
|
|
|
|
const showBtn = (record, type) => {
|
|
|
let bool = false;
|
|
@@ -196,21 +206,32 @@ const ConteactManager = (props) => {
|
|
|
增补
|
|
|
</a>
|
|
|
)} */}
|
|
|
- <a
|
|
|
- onClick={() => {
|
|
|
- typeRef.current = Type.cancel;
|
|
|
- setDetail(record);
|
|
|
- setVisible(true);
|
|
|
- }}
|
|
|
- >
|
|
|
- 作废
|
|
|
- </a>
|
|
|
+ {record.status == 3 && (
|
|
|
+ <a
|
|
|
+ onClick={() => {
|
|
|
+ typeRef.current = Type.cancel;
|
|
|
+ setDetail(record);
|
|
|
+ setVisible(true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 作废
|
|
|
+ </a>
|
|
|
+ )}
|
|
|
</Space>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
|
|
|
+ const config = {
|
|
|
+ title: '提示!',
|
|
|
+ content: (
|
|
|
+ <>
|
|
|
+ 将合同(含附件)的原件和相关资料交给集团档案管理部门或分子公司合同专员才能完成合同存档,请注意及时存档。
|
|
|
+ </>
|
|
|
+ ),
|
|
|
+ };
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
dispatch({
|
|
|
type: 'user/fetch',
|
|
@@ -234,8 +255,10 @@ const ConteactManager = (props) => {
|
|
|
manual: true,
|
|
|
onSuccess: () => {
|
|
|
message.success('添加成功');
|
|
|
+
|
|
|
setVisible(false);
|
|
|
run(searchData);
|
|
|
+ // modal.confirm(config);
|
|
|
},
|
|
|
onError: () => {
|
|
|
message.success('添加失败');
|