附件验证提示优化

master
Harry Yang 2023-01-03 16:21:01 +08:00
parent 579603df55
commit c9126f11b5
2 changed files with 16 additions and 8 deletions

View File

@ -806,15 +806,16 @@
const processType = this.processType
const supplierMaterialsForm = this.supplierMaterialsForm
if (fileList && fileList.length === 0) {
this.$message.error("未上传附件");
return false
}
let validStatus = !needValid
if (needValid) {
// 校验表单
this.$refs["contractProcessForm"].validate((valid) => {
if (valid) {
if (fileList.length === 0) {
this.$message.error("未上传附件");
return false
}
if (processType === saleContract) {
if (!this.checkExpirationDate()) {
return false

View File

@ -832,6 +832,9 @@
this.filteredProcurementDetails = []
},
resetProjectNo() {
this.processForm.projectNo = ""
},
/**
* 搜索项目
* @param q 用户输入的字符串
@ -855,6 +858,7 @@
}
})
.catch(({ response }) => {
this.resetProjectNo()
if (response) {
parseJSON(response)
.then(json => {
@ -932,6 +936,8 @@
})
.catch(({ response }) => {
// 加载失败重置
this.resetProjectNo()
if (response) {
parseJSON(response)
.then(json => {
@ -975,15 +981,16 @@
this.$message.error("未选择项目");
return false
}
if (fileList && fileList.length === 0) {
this.$message.error("未上传附件");
return false
}
let validStatus = !needValid
if (needValid) {
// 校验表单
this.$refs["contractProcessForm"].validate((valid) => {
if (valid) {
if (fileList.length === 0) {
this.$message.error("未上传附件");
return false
}
if (processType === saleContract) {
if (!this.checkExpirationDate()) {
return false