Commit 64c68248 authored by 潘永坪's avatar 潘永坪

组合下单开发

parent b60597a6
...@@ -610,13 +610,13 @@ export default { ...@@ -610,13 +610,13 @@ export default {
let query ='?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3' let query ='?productIdList=' + JSON.stringify(productIdList) + '&groupId=' + this.groupId + '&groupChannelId=' + this.groupChannelId + '&orderSource=3'
//如果有联票 //如果有联票
if(this.chooseProduct.find(item=>item.ticketType==2)){ if(this.chooseProduct.find(item=>item.ticketType==2)){
uni.navigateTo({ uni.navigateTo({
url: '/pages/combination/combiOrder/combiOrder' + query url: '/pages/combination/combiOrder/combiOrder' + query
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: '/pages/scenic/scenicCombiOrder/scenicCombiOrder' + query url: '/pages/scenic/scenicCombiOrder/scenicCombiOrder' + query
}) })
} }
} }
}, },
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
//新增的时候 //新增的时候
this.$parent.addChoose() this.$parent.addChoose()
//显示联系人列表弹窗 //显示联系人列表弹窗
this.$parent.showContacts() this.$parent.$refs.contactList.showPop = true
//成功之后清空数据,防止下次新增的时候出现之前的数据 //成功之后清空数据,防止下次新增的时候出现之前的数据
this.name = '' this.name = ''
this.credentialNumber = '' this.credentialNumber = ''
......
...@@ -926,19 +926,22 @@ export default { ...@@ -926,19 +926,22 @@ export default {
this.contactTotal.forEach(item => { this.contactTotal.forEach(item => {
//用于判断是否被选中 //用于判断是否被选中
item.ifChoose = false item.ifChoose = false
}) if(this.chooseContact.length>0){
//编辑成功重新调该方法时,把之前选中的游客,设为选中状态 //编辑成功重新调该方法时,把之前选中的游客,设为选中状态
this.contactTotal.forEach(item => { this.chooseContact.forEach(item2 => {
this.chooseContact.forEach(item2 => { if (item.id == item2.id) {
if (item.id == item2.id) { item.ifChoose = true
item.ifChoose = true item2.credentialNumber=item.credentialNumber
} item2.name=item.name
}) item2.phone=item.phone
}) }
//删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人 })
this.chooseContact.forEach((item, index) => { //删除联系人成功重新调该方法时,之前选中的联系人,数据库可能被删除,删除该联系人
if (!this.contactTotal.find(item2 => item.id == item2.id)) { this.chooseContact.forEach((item, index) => {
this.chooseContact.splice(index, 1) if (!this.contactTotal.find(item2 => item.id == item2.id)) {
this.chooseContact.splice(index, 1)
}
})
} }
}) })
} else { } else {
...@@ -956,7 +959,7 @@ export default { ...@@ -956,7 +959,7 @@ export default {
} }
this.$request('wechatUser/contact/findContactList', data).then(res => { this.$request('wechatUser/contact/findContactList', data).then(res => {
if (res.code == '00') { if (res.code == '00') {
this.contactTotal = res.data this.contactTotal = res.data||[]
for (let i = 0; i < this.contactNum; i++) { for (let i = 0; i < this.contactNum; i++) {
let item = this.contactTotal[i] || null let item = this.contactTotal[i] || null
if (item) { if (item) {
......
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