From 5455a5c512d938c135f003f76a047aa2293aad6e Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Mon, 20 Apr 2026 17:07:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8D=E6=98=AF=E5=BF=85?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/eam/eamProjectInfoForConfirm.vue | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/views/modules/eam/eamProjectInfoForConfirm.vue b/src/views/modules/eam/eamProjectInfoForConfirm.vue index 4fdbf3e..1ae4480 100644 --- a/src/views/modules/eam/eamProjectInfoForConfirm.vue +++ b/src/views/modules/eam/eamProjectInfoForConfirm.vue @@ -2043,33 +2043,35 @@ export default { } }) let remark = this.confirmData.remark; - const formData = new FormData(); - //片接文件 - for (let i = 0; i < this.fileList.length; i++) { - formData.append("file",this.fileList[i].raw) - } - formData.append("folder", 'projectPDConfirmFiles'); - formData.append("orderRef1", this.confirmData.site); - formData.append("orderRef4", this.confirmData.orderRef1); - formData.append("orderRef2", this.confirmData.itemNo); - formData.append("orderRef3", this.confirmData.userid); - formData.append("orderRef5", this.confirmData.orderRef2); - formData.append("createdBy", this.$store.state.user.name); - formData.append("updatedBy", this.$store.state.user.name); - formData.append("remark", remark); - uploadProjectFile(formData).then(({data}) => { - if (data.code === 0) { - this.$message.success('操作成功'); - //清空文件上传记录 - this.$refs.uploadFile.clearFiles(); - this.closeFileUpdate(); - this.projectConfirmatorFileList = []; - }else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + if (this.fileList.length > 0) { + const formData = new FormData(); + //片接文件 + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) } - }) + formData.append("folder", 'projectPDConfirmFiles'); + formData.append("orderRef1", this.confirmData.site); + formData.append("orderRef4", this.confirmData.orderRef1); + formData.append("orderRef2", this.confirmData.itemNo); + formData.append("orderRef3", this.confirmData.userid); + formData.append("orderRef5", this.confirmData.orderRef2); + formData.append("createdBy", this.$store.state.user.name); + formData.append("updatedBy", this.$store.state.user.name); + formData.append("remark", remark); + uploadProjectFile(formData).then(({data}) => { + if (data.code === 0) { + this.$message.success('操作成功'); + //清空文件上传记录 + this.$refs.uploadFile.clearFiles(); + this.closeFileUpdate(); + this.projectConfirmatorFileList = []; + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, closeFileUpdate() {