Commit 2aed5278c18bdf7074ff2ef2f32d575a840440ca

Authored by wangfan
1 parent 493ba8ba

seller

... ... @@ -18,18 +18,8 @@ Component({
methods:{
detail:function(e){
var obj=this.data.vitem;
var path='';
var i=0;
for (var key in obj){
i++;
if(i==1){
path=path+'?'+key+'='+obj[key]
}else{
path=path+'&'+key+'='+obj[key]
}
}
wx.navigateTo({
url:'b_detail'+path
url:util.http_build_query(obj,'b_detail')
})
},
... ...
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
... ...
... ... @@ -55,12 +55,17 @@
</view>
</block>
</view>
<block wx:if="{{bookInfo.cusman!='' && bookInfo.cusman!='null'}}">
<view class="seller-staff flex-lr black-font font34r">
<view>客户经理</view>
<view>{{bookInfo.cusman}}</view>
<view class="seller-staff flex-lr black-font font34r">
<view>客户经理</view>
<view class="flex-lr">
<picker bindchange="chooseManager" value="{{mansIndex}}" range="{{mans}}">
<view class="picker">
{{mans[mansIndex]?mans[mansIndex]:bookInfo.cusman?bookInfo.cusman:'请选择'}}
</view>
</picker>
<view>></view>
</view>
</block>
</view>
<view style="height: 160rpx;"></view>
<!--通知预订人-->
... ...
... ... @@ -42,7 +42,7 @@
<view class="cut"></view>
<view class="book-info">
<view class="book-info" style="margin-bottom: 205rpx;">
<view class="book-info-single flex-lr" style="align-items:flex-start;">
<input placeholder="请输入预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="5" style="width:450rpx;" value="{{name}}" bindinput="changename" bindblur="ifAll"/>
<view class="book-info-grand flex-rr font28r gray-deep-font">
... ... @@ -64,7 +64,6 @@
<input placeholder="请输入顾客要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{remark}}" bindinput="changeremark"/>
</view>
</view>
<view class="zhanwei"></view>
<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
\ No newline at end of file
<view class="zhanwei">
<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
</view>
\ No newline at end of file
... ...
... ... @@ -107,8 +107,13 @@ view{
.zhanwei{
width:100%;
height:205rpx;
height:170rpx;
background:#efeef3;
position:fixed;
left:0;
right:0;
bottom:0;
z-index: 99;
}
... ... @@ -116,11 +121,7 @@ view{
width:680rpx;
height:85rpx;
background:#199095;
position:fixed;
left:0;
right:0;
bottom:60rpx;
margin:0 auto;
margin:42rpx auto 0;
border-radius:10rpx;
opacity:.6;
}
... ...
... ... @@ -34,6 +34,9 @@ export default {
//定个座儿 获取商户信息
'App.Reserve.SellerInfo':{
cachetime:3600,
}
},
//设置客户经理
'App.Reserve.SetReserveCusman':null,
}
\ No newline at end of file
... ...