提交 e7dfe0b7 authored 作者: 钟是志's avatar 钟是志

30305 所有申请应用--学生填错后,在审核前可以撤回一次

上级 1f112437
......@@ -248,6 +248,7 @@ export default class List extends Component {
noSelectRow: !listConfig.selectRows,
onSelectRow: this.handleSelectRows,
scroll: { x: window.location.href.includes('Portal/#/') ? 'max-content' : true },
selectType: 'radio',
};
// console.log(tableProps);
if (!listConfig.paging) {
......
......@@ -5,7 +5,7 @@
*
* */
import { message } from 'antd';
import { message, Modal } from 'antd';
import React, { useEffect, useState, } from 'react';
import * as service from '../publicApiService';
import * as destructionFunc from '../destruction';
......@@ -18,8 +18,9 @@ import List from './List';
import pageSetting from './pageSetting';
import ButtonDiy from '@/baseComponent/ButtonDiy';
import Shell from '@/baseComponent/Shell';
import { deepCopy } from '@/webPublic/zyd_public/utils/utils';
import { deepCopy, getIsBei_Dian } from '@/webPublic/zyd_public/utils/utils';
import ApplyForZyd from '@/webPublic/one_stop_public/ForZydApply/index';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
export default function index(props) {
......@@ -32,7 +33,7 @@ export default function index(props) {
}, 100);
}, [props.location.pathname]);
if(!show){
if (!show) {
return null;
}
if (state.justApply) {
......@@ -151,6 +152,58 @@ class AffairPage extends React.Component {
if (canApply === false || isCloseStart) {
return [...otherButtons];
}
let reBack = [];
if (getIsBei_Dian()) {
reBack.push({
type: 'chehui',
name: '撤回',
buttonType: 'danger',
component: 'Normal',
handleClick: (selectRows, formValues, getPage, search, columns) => {
if (!selectRows || !selectRows.length || selectRows.length !== 1) {
message.warning('请选择一条需要撤回的数据!');
return false;
}
if (!selectRows[0].isBack) {
message.warning('流程已被审核,无法撤回');
return false;
}
Modal.confirm({
title: '撤回',
content: '确定撤回吗?',
okText: '确认',
cancelText: '取消',
onOk: () => {
return uaaRequest('/UnifiedAppFormApi/regressionProcess', {
taskIds: [selectRows[0].taskId],
})
.then((res) => {
if (res) {
Modal.info({
title: '提示',
content: '撤回成功, 点击详情可再次编辑并提交申请',
});
getPage();
} else {
message.info('操作失败');
return false;
}
});
// dispatch({
// type: 'urge/GetRecall',
// payload: {
// taskIds: [id],
// },
// callback: () => {
// openToast('success', '成功', '撤回成功');
// this.getInit();
// },
// });
},
});
},
});
}
return [
{
......@@ -168,6 +221,7 @@ class AffairPage extends React.Component {
);
},
},
...reBack,
...otherButtons,
];
};
......
......@@ -31,6 +31,7 @@ export default class ButtonListDom extends Component {
<ButtonDiy
name={item.name}
key={item.type}
type={item.buttonType}
className={item.className || 'defaultBule'}
handleClick={() => {
item.handleClick(selectRows, formValues, getPage, search, columns);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论