Commit 312b1ce4 authored by suntao's avatar suntao

进件项 保存 新增问题

parent 753e134d
......@@ -472,12 +472,15 @@
}
}
if (rep.data && rep.data.importCheckInfo && rep.data.importCheckInfo.checkedItemsResult.length > 0) {
_this.channel.importCheckInfo.checkedItemsResult = rep.data.importCheckInfo.checkedItemsResult;
// 说明有数据
let def = rep.data.importCheckInfo.checkedItemsResult[0];
_this.checkedItemsResultVO.point = def.point
_this.checkedItemsResultVO.value = def.checkedItems
if (rep.data && rep.data.importCheckInfo) {
_this.channel.importCheckInfo.channelId = rep.data.importCheckInfo.channelId
if (rep.data.importCheckInfo.checkedItemsResult.length > 0) {
_this.channel.importCheckInfo.checkedItemsResult = rep.data.importCheckInfo.checkedItemsResult;
// 说明有数据
let def = rep.data.importCheckInfo.checkedItemsResult[0];
_this.checkedItemsResultVO.point = def.point
_this.checkedItemsResultVO.value = def.checkedItems
}
}
}
})
......@@ -517,20 +520,22 @@
}
}
// 保存进件项配置
console.log(this.channel.importCheckInfo)
// 如果
if (this.checkedItemsResultVO) {
if (this.channel.importCheckInfo.checkedItemsResult.length > 0) {
// 说明用户至少有一项
// 遇到个问题,如果checkedItemsResult 有point=1, 现在新增point=2 ,就在要for 之后添加一个checkedItemsResult[1]
let isNotEquals = true;
let isEquals = false;
for (let index in this.channel.importCheckInfo.checkedItemsResult) {
let item = this.channel.importCheckInfo.checkedItemsResult[index]
console.log(item)
if (item.point === this.checkedItemsResultVO.point) {
isNotEquals = false
isEquals = true
item.checkedItems = this.checkedItemsResultVO.value
}
}
if (isNotEquals) {
if (!isEquals) {
let point2 = {
point : this.checkedItemsResultVO.point,
checkedItems : this.checkedItemsResultVO.value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment