diff --git a/src/main/resources/templates/admin/business/process-edit.ftl b/src/main/resources/templates/admin/business/process-edit.ftl index 19f5d99..a66c172 100644 --- a/src/main/resources/templates/admin/business/process-edit.ftl +++ b/src/main/resources/templates/admin/business/process-edit.ftl @@ -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 diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index b760357..99488aa 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -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