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

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

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