|
|
|
var util = require('../../utils/util.js')
|
|
|
|
var uri=require('../../utils/uri.js')
|
|
|
|
import App from '../../utils/api';
|
|
|
|
const {regeneratorRuntime} = global
|
|
|
|
Page({
|
|
|
|
onLoad:function (opt) {
|
|
|
|
util.setBarTitle('预定详情');
|
|
...
|
...
|
@@ -17,6 +19,7 @@ Page({ |
|
|
|
console.log(res)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.chooseManagerInit();
|
|
|
|
},
|
|
|
|
onShow:function(){
|
|
|
|
this.getsellerInfo();
|
|
...
|
...
|
@@ -113,5 +116,41 @@ Page({ |
|
|
|
this.notice.close();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
chooseManagerInit(){
|
|
|
|
try{
|
|
|
|
let managers=util.cache('sellerInfo').manager;
|
|
|
|
let mans=[];
|
|
|
|
if(managers.length>0){
|
|
|
|
managers.forEach(man=>{
|
|
|
|
mans.push(man.user_name);
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.setData({mans:mans})
|
|
|
|
}catch(e){
|
|
|
|
wx.showToast({
|
|
|
|
title:'无客户经理',
|
|
|
|
icon:'none'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
chooseManager(e){
|
|
|
|
let mansIndex=util.val(e);
|
|
|
|
this.setData({mansIndex:mansIndex});
|
|
|
|
try{
|
|
|
|
let managers=util.cache('sellerInfo').manager;
|
|
|
|
let man=managers[mansIndex];
|
|
|
|
if(man){
|
|
|
|
App.Reserve.SetReserveCusman({
|
|
|
|
rid:this.data.bookInfo.id,
|
|
|
|
cusman_id:man.id,
|
|
|
|
cusman:man.user_name,
|
|
|
|
cusman_phone:man.user_phone?man.user_phone:'158777556369',
|
|
|
|
cusman_account:man.user_wechat?man.user_wechat:'',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}catch(e){
|
|
|
|
console.log(e);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|