|
|
@@ -46,6 +46,14 @@ Page({
|
|
|
this.setData({
|
|
|
userInfo: app.globalData.userInfo
|
|
|
})
|
|
|
+ if(this.data.userInfo.mgvmRole==3){
|
|
|
+ this.setData({
|
|
|
+ ['values.agentId']: this.data.userInfo.id,
|
|
|
+ ['values.agentName']: this.data.userInfo.realname,
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
//商品方案列表
|
|
|
@@ -150,7 +158,7 @@ Page({
|
|
|
}else{
|
|
|
this.setData({
|
|
|
['values.agentId']: this.data.userInfo.id,
|
|
|
- ['values.agentName']: this.data.userInfo.username,
|
|
|
+ ['values.agentName']: this.data.userInfo.realname,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -218,6 +226,7 @@ Page({
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
+ ['values.deviceNums']: item.deviceNums,
|
|
|
['values.deviceTypeId']: item.id,
|
|
|
['values.deviceTypeName']: item.deviceName,
|
|
|
['gridProductList']:gridLists,
|
|
|
@@ -256,13 +265,17 @@ Page({
|
|
|
var item = this.data.agentList[e.detail.value]
|
|
|
this.setData({
|
|
|
['values.agentId']: item.id,
|
|
|
- ['values.agentName']: item.username
|
|
|
+ ['values.agentName']: item.realname
|
|
|
})
|
|
|
},
|
|
|
//前往选择商品
|
|
|
toSelect(e) {
|
|
|
+ if(this.data.values.agentId==null||this.data.values.agentId==''){
|
|
|
+ util.toast('请选择代理商')
|
|
|
+ return;
|
|
|
+ }
|
|
|
wx.navigateTo({
|
|
|
- url: '/pages/vendingMachine/select?index=' + e.currentTarget.dataset.index,
|
|
|
+ url: '/pages/vendingMachine/select?index=' + e.currentTarget.dataset.index+'&agentId=' + this.data.values.agentId,
|
|
|
})
|
|
|
},
|
|
|
//选择支付类别 数组拼装成逗号分割
|