update 驳回备注验证
This commit is contained in:
@@ -359,6 +359,8 @@ export default {
|
||||
},
|
||||
// 获取页面参数
|
||||
async getPageParams (isValidate = true) {
|
||||
// 去除备注必填
|
||||
this.validatorRules.remarks.rules[0].required = false
|
||||
// 节点1判断表格是否有数据
|
||||
if (this.isInitiate && this.$refs.baseInfoTable.dataSource.length === 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
@@ -529,6 +531,15 @@ export default {
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.loading) return
|
||||
// 备注设置必填并校验(校验第一次正常,第二次校验就不提示,force配置项解决问题)
|
||||
this.validatorRules.remarks.rules[0].required = true
|
||||
this.$nextTick(() => {
|
||||
this.approvalInfoForm.validateFields(['commitText'], { force: true }, (err) => {
|
||||
if (err) {
|
||||
this.switchChange('base')
|
||||
}
|
||||
})
|
||||
})
|
||||
// 驳回需要填写备注
|
||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||
@@ -562,7 +573,7 @@ export default {
|
||||
for (const form of formList) {
|
||||
promiseList.push(
|
||||
new Promise((resolve, reject) => {
|
||||
form.validateFields((err, val) => {
|
||||
form.validateFields({ force: true }, (err, val) => {
|
||||
if (!err) {
|
||||
resolve(val)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user