From 2f1d4df459170738dc10da124070e926f2a307b1 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 2 Aug 2024 13:37:07 +0800 Subject: [PATCH] =?UTF-8?q?2024-08-02=20=E9=87=87=E9=9B=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/qc/qcItem.vue | 8 ++++---- src/views/modules/qc/qc_SOP_upload_file.vue | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/views/modules/qc/qcItem.vue b/src/views/modules/qc/qcItem.vue index 72a1ff7..7c04300 100644 --- a/src/views/modules/qc/qcItem.vue +++ b/src/views/modules/qc/qcItem.vue @@ -1380,10 +1380,6 @@ this.$message.warning('请选择检验方法!') return } - // if ((this.modalData.samplingProgrammeNo === '' || this.modalData.samplingProgrammeNo == null) && (this.modalData.itemSamplingQuantity === '' || this.modalData.itemSamplingQuantity == null) && (this.modalData.defaultSamplingProportion === '' || this.modalData.defaultSamplingProportion == null)) { - // this.$message.warning('抽样方案、抽样数量、抽样比例至少选择一项!') - // return - // } if ((this.modalData.samplingProgrammeNo !== '' && this.modalData.samplingProgrammeNo != null) && (this.modalData.samplingLevelNo === '' || this.modalData.samplingLevelNo == null)) { this.$message.warning('请选择检验水平!') return @@ -1396,6 +1392,10 @@ this.$message.warning('请选择采集数据方式!') return } + if (this.modalData.collectionFlag === 'Y' && (this.modalData.collectionMethodList.some(value => value === 'file') && this.modalData.collectionMethodList.some(value => value === 'plc'))) { + this.$message.warning('文件数据采集和PLC数据采集只能选一个!') + return + } this.modalData.collectionSource = this.modalData.collectionSourceList.join(',') this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',') //this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',') diff --git a/src/views/modules/qc/qc_SOP_upload_file.vue b/src/views/modules/qc/qc_SOP_upload_file.vue index 7d0e1d4..ae9b365 100644 --- a/src/views/modules/qc/qc_SOP_upload_file.vue +++ b/src/views/modules/qc/qc_SOP_upload_file.vue @@ -23,8 +23,8 @@ - @@ -37,7 +37,7 @@ - 保存 + 保存 关闭 @@ -88,12 +88,14 @@ export default { // this.num++ }, /* 选择上传文件时 */ - onChange (file) { - this.fileList.push(file) + onChange (file, fileList) { + this.fileList = fileList }, /* 关闭modal */ closeDialog () { this.fileList = [] + // 清空文件上传记录 + this.$refs.uploadFile.clearFiles() // 刷新报工的页面 this.$emit('refreshPageTables') // 关闭当前的页面 @@ -113,7 +115,9 @@ export default { } const formData = new FormData() // 片接文件 - formData.append("file", this.fileList[0].raw) + for (let i = 0; i < this.fileList.length; i++) { + formData.append("file",this.fileList[i].raw) + } formData.append("orderRef1", this.pageData.site) formData.append("orderRef2", this.pageData.partNo) formData.append("orderRef3", this.pageData.inspectionTypeNo)