From 9f6d4a30b67d17244150cf5b9f3df8cbeccecb21 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Tue, 3 Jan 2023 18:53:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E4=BA=BA=E7=94=B5=E8=AF=9D?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=2011=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/admin/business/process-edit.ftl | 18 ++++++++++-------- .../templates/admin/business/process-new.ftl | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/main/resources/templates/admin/business/process-edit.ftl b/src/main/resources/templates/admin/business/process-edit.ftl index dcb7fb1..82e4011 100644 --- a/src/main/resources/templates/admin/business/process-edit.ftl +++ b/src/main/resources/templates/admin/business/process-edit.ftl @@ -126,7 +126,7 @@ - + @@ -308,9 +308,9 @@ 上传附件 <#--展示已经上传的文件-->
- - + {{attachment.name}} @@ -822,14 +822,14 @@ const processType = this.processType const supplierMaterialsForm = this.supplierMaterialsForm - if (fileList && fileList.length === 0) { - this.$message.error("未上传附件"); - return false - } - let validStatus = !needValid if (needValid) { // 校验表单 + if (fileList && fileList.length === 0) { + this.$message.error("未上传附件"); + return false + } + this.$refs["contractProcessForm"].validate((valid) => { if (valid) { if (processType === saleContract) { @@ -1074,6 +1074,8 @@ name: file.name }) + console.log(attachments) + console.log(scope.row['attachment']) this.$message.success("上传成功"); } else { diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index ec70c0f..8f0e773 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -233,7 +233,7 @@ - +
@@ -420,9 +420,9 @@ 上传附件 <#--展示已经上传的文件-->
- - + {{attachment.name}} @@ -990,12 +990,12 @@ this.$message.error("未选择项目"); return false } - if (fileList && fileList.length === 0) { - this.$message.error("未上传附件"); - return false - } let validStatus = !needValid if (needValid) { + if (fileList && fileList.length === 0) { + this.$message.error("未上传附件"); + return false + } // 校验表单 this.$refs["contractProcessForm"].validate((valid) => { if (valid) { @@ -1242,7 +1242,6 @@ handleSupplierMaterialFileUploaded(scope, response, file, fileList) { if (response.success) { - console.log(fileList) let attachments = scope.row['attachment'] if (isEmpty(attachments)) { attachments = [] @@ -1253,6 +1252,9 @@ name: file.name }) + console.log(attachments) + console.log(scope.row['attachment']) + this.$message.success("上传成功"); } else {