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

26589 毕业生毕业去向中签约和改签审核拒绝必须要填审批说明

上级 2cf7dcc1
......@@ -36,7 +36,7 @@ import styles from './styles.less';
import TrunToDetail from './trunToDetail';
import Countersign from './components/Countersign';
import ChildTaskModel from './ChildTaskModel';
import { checkNeedFormValidateFieldsAndScroll, must, submitValues } from './splitDetailSplit';
import { checkNeedFormValidateFieldsAndScroll, must, submitValues, checkNeedWriteAuditInfo } from './splitDetailSplit';
import { queryApiVersion, queryApiActionPath } from '@/webPublic/one_stop_public/utils/queryConfig';
import { isJSON } from '@/webPublic/zyd_public/utils/utils';
......@@ -319,6 +319,14 @@ export default class GetDetail extends Component {
btnValue,
});
let checkNeedWrite = checkNeedWriteAuditInfo({
btns,
btnValue,
});
if(checkNeedWrite && !value){
message.warning('请填写审批说明');
return false;
}
const argumentsSubmitValue = {
isCloseFlowPath,
radiovalue,
......@@ -338,12 +346,12 @@ export default class GetDetail extends Component {
handleUser,
};
if (!checkSumbitInfo) {
if (!checkSumbitInfo) { // 如果不需要校验 直接提交数据
const values = this.props.form.getFieldsValue();
argumentsSubmitValue.values = values;
submitValues(argumentsSubmitValue);
} else {
this.props.form.validateFieldsAndScroll((err, values) => {
this.props.form.validateFieldsAndScroll((err, values) => { // 校验是否填了必填字段
if (!err) {
argumentsSubmitValue.values = values;
submitValues(argumentsSubmitValue);
......@@ -921,7 +929,7 @@ export default class GetDetail extends Component {
<div className={styles.buttonList}>
{isHandle === true ? (
<>
<BtnOk
<BtnOk // 审批按钮和弹窗
Sign={!!setData?.userSign}
isSumbitLoading={isSumbitLoading}
isSecond={isSecond}
......@@ -1027,7 +1035,7 @@ export default class GetDetail extends Component {
value={trunData}
init={this.getInit}
/>
{data?.appName && (
{data?.appName && ( // 加签
<Countersign
taskId={data.taskId}
data={data}
......
......@@ -33,6 +33,20 @@ const checkNeedFormValidateFieldsAndScroll = ({
return checkSumbitInfo;
};
// 校验是否该按钮需要填写审批意见
const checkNeedWriteAuditInfo = ({
btns,
btnValue,
}) => {
let btnInfo = btns.find(g => g.value + '' === btnValue + '');
let needWrite = false;
if (btnInfo && btnInfo.needAuditInfo === true) {
needWrite = true; // 26589 毕业生毕业去向中签约和改签审核拒绝必须要填审批说明
}
return needWrite;
}
const submitValues = ({
values,
isCloseFlowPath,
......@@ -122,4 +136,4 @@ const submitValues = ({
},
);
};
export { must, checkNeedFormValidateFieldsAndScroll, submitValues };
export { must, checkNeedFormValidateFieldsAndScroll, submitValues, checkNeedWriteAuditInfo };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论