This commit is contained in:
BianLzhaoMin 2025-05-26 16:07:30 +08:00
parent 7ae0a102da
commit bfc7ebb742
1 changed files with 99 additions and 92 deletions

View File

@ -972,9 +972,9 @@ export default {
this.postList = response.data this.postList = response.data
}) })
}, },
submitForm(formName, submitType) { async submitForm(formName, submitType) {
this.loading = true this.loading = true
let isReturn = false let isReturn = true
if (submitType === '提交') { if (submitType === '提交') {
const param = { const param = {
...this.getParams(), ...this.getParams(),
@ -997,35 +997,35 @@ export default {
return false return false
} }
// //
try { // try {
const response = judgeIsFileComplete(param) // const response = await judgeIsFileComplete(param)
console.log('response=====', response) // console.log('response=====', response)
// if (response.msg === '') { // // if (response.msg === '') {
// // this.$message({
// // message: '',
// // type: 'error',
// // })
// // // return false
// // isReturn = true
// // }
// if (response.code == 500) {
// this.$message({ // this.$message({
// message: '', // message: response.msg,
// type: 'error', // type: 'error',
// }) // })
// // return false // // return false
// isReturn = true // isReturn = true
// } // }
if (response.code == 500) { // } catch (error) {
this.$message({ // this.$message({
message: response.msg, // message: '',
type: 'error', // type: 'error',
}) // })
// return false // // return false
isReturn = true // }
}
} catch (error) {
this.$message({
message: '文件检查失败,请稍后重试!',
type: 'error',
})
// return false
}
}
if (isReturn) return judgeIsFileComplete(param)
.then(res => {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (submitType === '提交' && !valid) { if (submitType === '提交' && !valid) {
return this.$modal.msgError('请完善全部上传信息') return this.$modal.msgError('请完善全部上传信息')
@ -1091,6 +1091,13 @@ export default {
} }
) )
}) })
})
.catch(error => {
console.log(error, '校验失败')
})
}
// if (isReturn) return
}, },
/** /**
* 提交审批 * 提交审批