|
@@ -33,6 +33,7 @@ import EllipsisText from './component/EllipsisText';
|
|
|
import { stringify } from 'qs';
|
|
|
import { audit, createAduit } from '@/services/boom';
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
|
+import DraftModal from './component/DraftModal';
|
|
|
|
|
|
const ConteactManager = (props) => {
|
|
|
const { dispatch } = props;
|
|
@@ -44,10 +45,8 @@ const ConteactManager = (props) => {
|
|
|
current: 1,
|
|
|
name: '',
|
|
|
});
|
|
|
- const {
|
|
|
- initialState,
|
|
|
- } = useModel('@@initialState');
|
|
|
- const user = initialState?.user || {}
|
|
|
+ const { initialState } = useModel('@@initialState');
|
|
|
+ const user = initialState?.user || {};
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
const [detail, setDetail] = useState({});
|
|
|
const [data, setData] = useState([]);
|
|
@@ -58,6 +57,8 @@ const ConteactManager = (props) => {
|
|
|
const [fileViewerData, setFileViewerData] = useState();
|
|
|
const [modal, contextHolder] = Modal.useModal();
|
|
|
|
|
|
+ const [draftOpen, setDraftOpen] = useState(false);
|
|
|
+
|
|
|
const showBtn = (record, type) => {
|
|
|
let bool = false;
|
|
|
switch (type) {
|
|
@@ -377,6 +378,12 @@ const ConteactManager = (props) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+ const handleDraftOpen = (data) => {
|
|
|
+ setDraftOpen(false);
|
|
|
+ setDetail(data);
|
|
|
+ setVisible(true);
|
|
|
+ };
|
|
|
+
|
|
|
const handleQueryChildren = async (req) => {
|
|
|
const res = await queryGetContractList(req);
|
|
|
if (res?.data?.list) {
|
|
@@ -421,7 +428,7 @@ const ConteactManager = (props) => {
|
|
|
|
|
|
const handlerReCall = async (id) => {
|
|
|
modal.confirm({
|
|
|
- icon: <ExclamationCircleOutlined />,
|
|
|
+ icon: <ExclamationCircleOutl ined />,
|
|
|
title: '提示:',
|
|
|
content: <div>确定撤回合同存档审批!</div>,
|
|
|
onOk: async () => {
|
|
@@ -517,6 +524,7 @@ const ConteactManager = (props) => {
|
|
|
</Button>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ className={styles.searchBtnSty}
|
|
|
onClick={() => {
|
|
|
typeRef.current = Type.add;
|
|
|
setDetail({});
|
|
@@ -525,6 +533,9 @@ const ConteactManager = (props) => {
|
|
|
>
|
|
|
新增
|
|
|
</Button>
|
|
|
+ <Button type="primary" onClick={() => setDraftOpen(true)}>
|
|
|
+ 草稿箱
|
|
|
+ </Button>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
className={styles.exportBtnSty}
|
|
@@ -567,6 +578,11 @@ const ConteactManager = (props) => {
|
|
|
setFileViewerVisible(false);
|
|
|
}}
|
|
|
/>
|
|
|
+ <DraftModal
|
|
|
+ open={draftOpen}
|
|
|
+ onOk={handleDraftOpen}
|
|
|
+ onCancel={() => setDraftOpen(false)}
|
|
|
+ />
|
|
|
{contextHolder}
|
|
|
</PageContent>
|
|
|
);
|