Commit c4046d0b authored by 潘永坪's avatar 潘永坪

Merge branch 'develop' of http://git.tbd.yanzuoguang.com/panyongping/uni-pdtravel into develop

# Conflicts:
#	pages/my/order/electronicTicket/electronicTicket-副本.vue
parents 373ca213 5f20aa15
...@@ -43,17 +43,13 @@ export default { ...@@ -43,17 +43,13 @@ export default {
return { return {
list:[],//站点列表 list:[],//站点列表
active:100,//下标 active:100,//下标
merchantCode:'',//商家编号
channelName:'',//渠道名称
productName:'',//产品名称
chooseArea:'',//选中的站点 chooseArea:'',//选中的站点
orderId:'',//订单Id
} }
}, },
onLoad(option) { onLoad(option) {
this.merchantCode=option.merchantCode||''
this.list=option.list?JSON.parse(option.list):'' this.list=option.list?JSON.parse(option.list):''
this.channelName=option.channelName||'' this.orderId=option.orderId||''
this.productName=option.productName||''
}, },
methods: { methods: {
//---站点选择 //---站点选择
...@@ -71,7 +67,7 @@ export default { ...@@ -71,7 +67,7 @@ export default {
return return
} }
uni.navigateTo({ uni.navigateTo({
url:`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=${this.chooseArea}&merchantCode=${this.merchantCode}&productName=${this.productName}&channelName=${this.channelName}` url:`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=${this.chooseArea}&orderId=${this.orderId}`
}) })
}, },
//---取消站点 //---取消站点
......
...@@ -35,9 +35,7 @@ export default { ...@@ -35,9 +35,7 @@ export default {
showMark: false ,//是否显示遮罩层 showMark: false ,//是否显示遮罩层
search:'',//输入框的值 search:'',//输入框的值
noNumberList:[],//未排号站点列表 noNumberList:[],//未排号站点列表
merchantCode:'',//商家编号 orderId:'',//订单Id
channelName:'',//渠道名称
productName:'',//产品名称
} }
}, },
methods: { methods: {
...@@ -51,7 +49,8 @@ export default { ...@@ -51,7 +49,8 @@ export default {
return return
} }
let data={ let data={
search:this.search search:this.search,
userId:uni.getStorageSync('openid')||''
} }
uni.showLoading({ uni.showLoading({
title:'加载中' title:'加载中'
...@@ -59,12 +58,10 @@ export default { ...@@ -59,12 +58,10 @@ export default {
this.$request('order/userOrder/findOrderPageListByCode',data).then((res)=>{ this.$request('order/userOrder/findOrderPageListByCode',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
let list=res.data||[] let list=res.data||[]
this.merchantCode=list[0].merchantCode
this.channelName=list[0].channelName
this.productName=list[0].productName
if(list.length==0){ if(list.length==0){
this.showMark=true this.showMark=true
}else{ }else{
this.orderId=list[0].id
let thirdId=list[0].thirdOrderId||'' let thirdId=list[0].thirdOrderId||''
let merchantId=list[0].merchantId||'' let merchantId=list[0].merchantId||''
this.getFetchInfo(thirdId,merchantId) this.getFetchInfo(thirdId,merchantId)
...@@ -134,13 +131,13 @@ export default { ...@@ -134,13 +131,13 @@ export default {
if(this.noNumberList.length==1){ if(this.noNumberList.length==1){
let chooseArea=JSON.stringify(this.noNumberList[0]) let chooseArea=JSON.stringify(this.noNumberList[0])
uni.navigateTo({ uni.navigateTo({
url:`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=${chooseArea}&merchantCode=${this.merchantCode}&productName=${this.productName}&channelName=${this.channelName}` url:`/pages/my/takeNumber/rowNumber/rowNumber?chooseArea=${chooseArea}&orderId=${this.orderId}`
}) })
} }
if(this.noNumberList.length>1){ if(this.noNumberList.length>1){
let list=JSON.stringify(this.noNumberList) let list=JSON.stringify(this.noNumberList)
uni.navigateTo({ uni.navigateTo({
url:`/pages/my/takeNumber/numberChoose/numberChoose?list=${list}&merchantCode=${this.merchantCode}&productName=${this.productName}&channelName=${this.channelName}` url:`/pages/my/takeNumber/numberChoose/numberChoose?list=${list}&orderId=${this.orderId}`
}) })
} }
}else{ }else{
......
...@@ -84,16 +84,40 @@ export default { ...@@ -84,16 +84,40 @@ export default {
numberInfo:'',//排号信息 numberInfo:'',//排号信息
channelName:'',//渠道名称 channelName:'',//渠道名称
productName:'',//产品名称 productName:'',//产品名称
thirdOrderId:'',//三方订单Id
orderId:'',//订单Id
} }
}, },
onLoad(option) { onLoad(option) {
this.merchantCode=option.merchantCode||''
this.chooseArea=option.chooseArea?JSON.parse(option.chooseArea):'' this.chooseArea=option.chooseArea?JSON.parse(option.chooseArea):''
this.channelName=option.channelName||'' this.orderId=option.orderId||''
this.productName=option.productName||'' this.query()
this.getNumberInfo()
}, },
methods: { methods: {
//---查询订单信息
query(){
let data={
search:this.orderId
}
uni.showLoading({
title:'加载中'
})
this.$request('order/userOrder/findOrderPageListByCode',data).then((res)=>{
if(res.code=='00'){
let list=res.data||[]
this.thirdOrderId=list[0].thirdOrderId
this.merchantCode=list[0].merchantCode
this.channelName=list[0].channelName
this.productName=list[0].productName
this.getNumberInfo()
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
//---获取排号信息 //---获取排号信息
getNumberInfo(){ getNumberInfo(){
let data={ let data={
...@@ -128,16 +152,19 @@ export default { ...@@ -128,16 +152,19 @@ export default {
//---立即取号 //---立即取号
rowNumber(){ rowNumber(){
let data={ let data={
merchantCode:this.merchantCode, merchantCode:this.merchantCode,//商户编号
userId:uni.getStorageSync('openid')||'', areaCode:this.chooseArea.projectIds,//站点编号
areaCode:this.chooseArea.projectIds thirdId:this.thirdOrderId,//三方订单id
userId:uni.getStorageSync('openid')||''
} }
uni.showLoading({ uni.showLoading({
title:'加载中' title:'加载中'
}) })
this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{ this.$request('distribution/distribution/newFetchNumber',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
console.log(res) uni.navigateTo({
url:'/pages/my/order/electronicTicket/electronicTicket?orderId='+this.orderId
})
}else{ }else{
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
......
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