|
@@ -522,15 +522,39 @@ export default {
|
|
}
|
|
}
|
|
let list = []
|
|
let list = []
|
|
let list1 = []
|
|
let list1 = []
|
|
|
|
+ let list2 = []
|
|
|
|
+ this.form.chennelListForm.forEach((item,index)=>{
|
|
|
|
+ if(item.chennelSeatList && item.stockType == 1) {
|
|
|
|
+ Object.keys(item.chennelSeatList).forEach((item1)=>{
|
|
|
|
+ item.chennelSeatList[item1] ? list2 = list2.concat(item.chennelSeatList[item1]) : ''
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
if(this.form.chennelListForm[this.chennelAtion].chennelSeatList) {
|
|
if(this.form.chennelListForm[this.chennelAtion].chennelSeatList) {
|
|
Object.keys(this.form.chennelListForm[this.chennelAtion].chennelSeatList).forEach((item)=>{
|
|
Object.keys(this.form.chennelListForm[this.chennelAtion].chennelSeatList).forEach((item)=>{
|
|
list1 = list1.concat(this.form.chennelListForm[this.chennelAtion].chennelSeatList[item])
|
|
list1 = list1.concat(this.form.chennelListForm[this.chennelAtion].chennelSeatList[item])
|
|
})
|
|
})
|
|
|
|
+ console.log("list2111=====",list2,list1)
|
|
list = this.dataList.filter((item,index)=>{
|
|
list = this.dataList.filter((item,index)=>{
|
|
- if(list1.includes(item.id)){
|
|
|
|
|
|
+ if(list1.includes(item.id)){
|
|
|
|
+ this.dataList[index].occupyStatus = null // 解除被占用了
|
|
return item
|
|
return item
|
|
|
|
+ }else if(!list1.includes(item.id) && list2.includes(item.id)){
|
|
|
|
+ this.dataList[index].occupyStatus = 1 // 被占用了
|
|
|
|
+ }
|
|
|
|
+ if(!item.seatTypeId&&item.status != 2) {
|
|
|
|
+ this.dataList[index].occupyStatus = 1 // 被占用了
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.dataList.forEach((item,index)=>{
|
|
|
|
+ if(!list1.includes(item.id) && list2.includes(item.id)){
|
|
|
|
+ this.dataList[index].occupyStatus = 1 // 被占用了
|
|
|
|
+ }
|
|
|
|
+ if(!item.seatTypeId&&item.status != 2) {
|
|
|
|
+ this.dataList[index].occupyStatus = 1 // 被占用了
|
|
}
|
|
}
|
|
-
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
console.log("dfsdfdsfdsf====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList)
|
|
console.log("dfsdfdsfdsf====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList)
|
|
@@ -546,6 +570,7 @@ export default {
|
|
Array.isArray(obj[srt]) ? obj[srt].push(item.id): obj[srt] = [item.id]
|
|
Array.isArray(obj[srt]) ? obj[srt].push(item.id): obj[srt] = [item.id]
|
|
})
|
|
})
|
|
this.form.chennelListForm[this.chennelAtion].chennelSeatList = JSON.stringify(obj) == '{}'?null:obj
|
|
this.form.chennelListForm[this.chennelAtion].chennelSeatList = JSON.stringify(obj) == '{}'?null:obj
|
|
|
|
+ this.form.chennelListForm[this.chennelAtion].stockNum = list.length>0 ? list.length : ''
|
|
console.log("已选择的====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList)
|
|
console.log("已选择的====",list,this.form.chennelListForm[this.chennelAtion].chennelSeatList)
|
|
}
|
|
}
|
|
},
|
|
},
|