|
|
@ -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 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 快速新增 |
|
|
// 快速新增 |
|
|
|