diff --git a/src/views/modules/qc/qcItem.vue b/src/views/modules/qc/qcItem.vue index 8b1e892..74409df 100644 --- a/src/views/modules/qc/qcItem.vue +++ b/src/views/modules/qc/qcItem.vue @@ -1135,8 +1135,8 @@ // bu改变事件 buChangeFunction () { - this.modalData.collectionConditionList = '' - this.modalData.collectionDataContent = '' + this.modalData.collectionConditionList = [] + this.modalData.collectionDataContent = [] this.getEquipmentNoList() this.getDataContentList() }, @@ -1398,7 +1398,7 @@ } this.modalData.collectionSource = this.modalData.collectionSourceList.join(',') this.modalData.collectionMethod = this.modalData.collectionMethodList.join(',') - this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',') + //this.modalData.collectionCondition = this.modalData.collectionConditionList.join(',') if (this.modalData.flag === '1') { qcItemSave(this.modalData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/qc/qcTemplate.vue b/src/views/modules/qc/qcTemplate.vue index 1b20579..f1e72bd 100644 --- a/src/views/modules/qc/qcTemplate.vue +++ b/src/views/modules/qc/qcTemplate.vue @@ -1486,23 +1486,41 @@ // 保存模板项目 saveDetail () { - for (let i = 0; i < this.detailList.length; i++) { - if (this.detailList[i].objectID != null){ - this.detailList[i].objectID = this.detailList[i].objectID.split('_')[0]; - } - saveItemDetailed(this.detailList[i]).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.detailModelFlag = false - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }).then(() => { - return false - }) - } - }) + // for (let i = 0; i < this.detailList.length; i++) { + // // if (this.detailList[i].objectID != null){ + // // this.detailList[i].objectID = this.detailList[i].objectID.split('_')[0]; + // // } + // saveItemDetailed(this.detailList[i]).then(({data}) => { + // if (data && data.code === 0) { + // this.getDataList() + // this.detailModelFlag = false + // } else { + // this.$alert(data.msg, '错误', { + // confirmButtonText: '确定' + // }).then(() => { + // return false + // }) + // } + // }) + // } + let tempData = { + site: this.detailData.site, + buNo: this.detailData.buNo, + templateId: this.detailData.templateId, + itemList: this.detailList } + saveItemDetailed(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.detailModelFlag = false + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }).then(() => { + return false + }) + } + }) }, // 快速新增