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

29943 北电]违纪-违纪上报辅导员,驳回修改的处分不生效

上级 72f93674
...@@ -6,6 +6,7 @@ import { callbackSubmitData } from '@/webPublic/one_stop_public/models/callbackE ...@@ -6,6 +6,7 @@ import { callbackSubmitData } from '@/webPublic/one_stop_public/models/callbackE
import { getModal } from '@/webPublic/one_stop_public/utils/utils'; import { getModal } from '@/webPublic/one_stop_public/utils/utils';
import { isJSON } from '@/webPublic/one_stop_public/copy'; import { isJSON } from '@/webPublic/one_stop_public/copy';
import beforeAuditSubmit from '@/webPublic/one_stop_public/utils/beforeAuditSubmit'; import beforeAuditSubmit from '@/webPublic/one_stop_public/utils/beforeAuditSubmit';
import beforeApplySubmit from '@/webPublic/one_stop_public/utils/beforeApplySubmit';
const Modal = getModal(); const Modal = getModal();
...@@ -75,6 +76,7 @@ const submitValues = ({ ...@@ -75,6 +76,7 @@ const submitValues = ({
preHandle(values); // 引入 import {preHandle} from '@/webPublic/one_stop_public/utils/myutils.js' preHandle(values); // 引入 import {preHandle} from '@/webPublic/one_stop_public/utils/myutils.js'
// console.log(JSON.stringify(values)); // console.log(JSON.stringify(values));
// return ; // return ;
let payload = { let payload = {
taskIds: [taskId], // 接口里面的taskId 任务Id taskIds: [taskId], // 接口里面的taskId 任务Id
// taskIds: [this.state.taskId], // 接口里面的taskId 任务Id // taskIds: [this.state.taskId], // 接口里面的taskId 任务Id
...@@ -101,63 +103,71 @@ const submitValues = ({ ...@@ -101,63 +103,71 @@ const submitValues = ({
}; };
payload = callbackSubmitData(payload); payload = callbackSubmitData(payload);
const beforeAuditSubmitFunc = (valuesPayload = {}) => { // 提交数据到审批接口
beforeAuditSubmit(valuesPayload).then((resParams) => {
if (!resParams) {
that.setState({
isSumbitLoading: false,
});
return false;
} else {
dispatch({
type: 'affair/getExamineProcess',
payload: resParams,
callback: (val) => {
if (val) {
// that.getInit();
that.setState({
isHandle: false,
isSumbitLoading: false,
isSign: checked,
});
Modal.success({
title: '操作成功',
content: (
<div>
<p>操作成功,点击确认刷新页面!</p>
</div>
),
onOk: () => {
that.props.getFormDetailData();
},
okText: '确认',
});
} else {
openToast('error', '失败', '请稍后重试');
}
},
});
}
});
};
/** /**
* 29943 北电]违纪-违纪上报辅导员,驳回修改的处分不生效 * 29943 北电]违纪-违纪上报辅导员,驳回修改的处分不生效
* * */
* */ const taskInfo = that.state?.data?.taskInfo;
const taskInfo = that.state?.data?.taskInfo; if (
if(Array.isArray(taskInfo) && Array.isArray(taskInfo) &&
taskInfo.length >= 2 && taskInfo.length >= 2 &&
taskInfo[0].taskDefKey && taskInfo[0].taskDefKey &&
taskInfo[0].taskDefKey === taskInfo[taskInfo.length - 1].taskDefKey){ taskInfo[0].taskDefKey === taskInfo[taskInfo.length - 1].taskDefKey
console.log('驳回到发起人了,并且发起人重新提交了'); ) {
console.log(payload); console.log('驳回到发起人了,并且发起人重新提交了 则执行这个发起回调');
// return; beforeApplySubmit({
} appId: window.smartFormGlobalProps.data.appId,
content: payload.taskForm,
/** }).then((res) => {
* 29943 北电]违纪-违纪上报辅导员,驳回修改的处分不生效 if (res && res.content && isJSON(res.content)) {
* payload.taskForm = res.content;
* */ }
beforeAuditSubmitFunc(payload); // 提交数据到审批接口
});
beforeAuditSubmit(payload).then((resParams) => { } else {
if (!resParams) { beforeAuditSubmitFunc(payload); // 提交数据到审批接口
that.setState({ }
isSumbitLoading: false, /**
}); * 29943 北电]违纪-违纪上报辅导员,驳回修改的处分不生效
return false; * */
} else {
dispatch({
type: 'affair/getExamineProcess',
payload: resParams,
callback: (val) => {
if (val) {
// that.getInit();
that.setState({
isHandle: false,
isSumbitLoading: false,
isSign: checked,
});
Modal.success({
title: '操作成功',
content: (
<div>
<p>操作成功,点击确认刷新页面!</p>
</div>
),
onOk: () => {
that.props.getFormDetailData();
},
okText: '确认',
});
} else {
openToast('error', '失败', '请稍后重试');
}
},
});
}
});
}, },
); );
}; };
......
...@@ -134,7 +134,7 @@ export default class ChildForm extends React.Component { ...@@ -134,7 +134,7 @@ export default class ChildForm extends React.Component {
const rights = this.props.rights; const rights = this.props.rights;
const { disabled } = json; const { disabled } = json;
const isEdit = !disabled && isEditProps; // 29128 北电]资助-新生入学资助管理-批次设置,2张图2问题不要详情改编辑只能修改是否启用 const isEdit = !disabled && isEditProps; // 29128 北电]资助-新生入学资助管理-批次设置,2张图2问题不要详情改编辑只能修改是否启用
console.log(objs); // console.log(objs);
if (datas == null) { if (datas == null) {
return <div>还没有配置子表单key</div>; return <div>还没有配置子表单key</div>;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论