Browse Source

2024-06-29

功能优化
java8
fengyuan_yang 2 years ago
parent
commit
14a7e45f55
  1. 6
      src/views/modules/qc/qcItem.vue
  2. 50
      src/views/modules/qc/qcTemplate.vue

6
src/views/modules/qc/qcItem.vue

@ -1135,8 +1135,8 @@
// bu // bu
buChangeFunction () { buChangeFunction () {
this.modalData.collectionConditionList = ''
this.modalData.collectionDataContent = ''
this.modalData.collectionConditionList = []
this.modalData.collectionDataContent = []
this.getEquipmentNoList() this.getEquipmentNoList()
this.getDataContentList() this.getDataContentList()
}, },
@ -1398,7 +1398,7 @@
} }
this.modalData.collectionSource = this.modalData.collectionSourceList.join(',') this.modalData.collectionSource = this.modalData.collectionSourceList.join(',')
this.modalData.collectionMethod = this.modalData.collectionMethodList.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') { if (this.modalData.flag === '1') {
qcItemSave(this.modalData).then(({data}) => { qcItemSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

50
src/views/modules/qc/qcTemplate.vue

@ -1486,23 +1486,41 @@
// //
saveDetail () { 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
})
}
})
}, },
// //

Loading…
Cancel
Save