|
|
@ -145,7 +145,6 @@ |
|
|
|
coupon: '', |
|
|
|
reserve_name: '', |
|
|
|
reserve_phone: '', |
|
|
|
reserve_mobile: '', |
|
|
|
remark: '', |
|
|
|
peopleList: [], |
|
|
|
linkmanList: [], |
|
|
@ -258,7 +257,6 @@ |
|
|
|
data: JSON.stringify(data), |
|
|
|
method: 'POST', |
|
|
|
},'/api/order/place').then(res => { |
|
|
|
console.log(res) |
|
|
|
if(res.code == 1) { |
|
|
|
let order_id = res.data.order_id |
|
|
|
this.$store.commit("changeLineInfo", null); |
|
|
@ -315,18 +313,29 @@ |
|
|
|
limit: 100 |
|
|
|
},'/api/user/contactList').then(res => { |
|
|
|
this.peopleList = res.data |
|
|
|
this.reserve_mobile = this.peopleList[0].tel |
|
|
|
// 如果是添加或者修改完出行人后需要默认选中已选择的出行人 |
|
|
|
if(this.linkmanList.length > 0){ |
|
|
|
// 之前选中的出行人在请求列表后默认选中 |
|
|
|
for (let i = 0; i < this.linkmanList.length; i++) { |
|
|
|
for (let j = 0; j < this.peopleList.length; j++) { |
|
|
|
if(this.peopleList[j].id == this.linkmanList[i].id){ |
|
|
|
this.linkmanList[i] = this.peopleList[j] |
|
|
|
this.peopleList[j].is_seld = true |
|
|
|
this.linkmanList[i].is_seld = true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 之前选中的出行人在请求列表后追加规格id |
|
|
|
for (let i = 0; i < this.linkmans.length; i++) { |
|
|
|
this.linkmans[i].forEach(item => { |
|
|
|
for (let j = 0; j < this.peopleList.length; j++) { |
|
|
|
if(this.peopleList[j].id == item.id){ |
|
|
|
this.peopleList[j].is_sku = item.is_sku |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
this.showLinkman(this.skuIndex) |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
@ -337,7 +346,6 @@ |
|
|
|
if (res && res.code == 1) { |
|
|
|
this.getPeople(); |
|
|
|
this.changeContactAddPopup('close') |
|
|
|
console.log('this.linkmanList3',this.linkmanList) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 选择出行人弹框 |
|
|
@ -348,8 +356,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
this.skuIndex = skuIndex |
|
|
|
|
|
|
|
this.peopleList.map(item => { |
|
|
|
this.peopleList.forEach(item => { |
|
|
|
if(item.is_seld && item.is_sku != this.sku[this.skuIndex].id) { |
|
|
|
item.is_disable = true |
|
|
|
}else { |
|
|
@ -393,7 +400,7 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
this.linkmans[this.skuIndex] = [] |
|
|
|
this.peopleList.map(items => { |
|
|
|
this.peopleList.forEach(items => { |
|
|
|
if(items.id == item.id) { |
|
|
|
items.is_seld = !items.is_seld |
|
|
|
} |
|
|
@ -683,6 +690,7 @@ |
|
|
|
|
|
|
|
.popup-list { |
|
|
|
height: 666rpx; |
|
|
|
padding-bottom: 100rpx; |
|
|
|
overflow: scroll; |
|
|
|
|
|
|
|
.popup-item { |
|
|
|