|
|
|
@ -1486,11 +1486,30 @@ |
|
|
|
|
|
|
|
// 保存模板项目 |
|
|
|
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]; |
|
|
|
// 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(this.detailList[i]).then(({data}) => { |
|
|
|
saveItemDetailed(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getDataList() |
|
|
|
this.detailModelFlag = false |
|
|
|
@ -1502,7 +1521,6 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 快速新增 |
|
|
|
|