From c9126f11b5edc263dc9e0eb8912878911da6fa1f Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Tue, 3 Jan 2023 16:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E9=AA=8C=E8=AF=81=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/business/process-edit.ftl | 9 +++++---- .../templates/admin/business/process-new.ftl | 15 +++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) 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