Commit 2aed5278c18bdf7074ff2ef2f32d575a840440ca

Authored by wangfan
1 parent 493ba8ba

seller

@@ -18,18 +18,8 @@ Component({ @@ -18,18 +18,8 @@ Component({
18 methods:{ 18 methods:{
19 detail:function(e){ 19 detail:function(e){
20 var obj=this.data.vitem; 20 var obj=this.data.vitem;
21 - var path='';  
22 - var i=0;  
23 - for (var key in obj){  
24 - i++;  
25 - if(i==1){  
26 - path=path+'?'+key+'='+obj[key]  
27 - }else{  
28 - path=path+'&'+key+'='+obj[key]  
29 - }  
30 - }  
31 wx.navigateTo({ 21 wx.navigateTo({
32 - url:'b_detail'+path 22 + url:util.http_build_query(obj,'b_detail')
33 }) 23 })
34 }, 24 },
35 25
1 var util = require('../../utils/util.js') 1 var util = require('../../utils/util.js')
2 var uri=require('../../utils/uri.js') 2 var uri=require('../../utils/uri.js')
  3 +import App from '../../utils/api';
  4 +const {regeneratorRuntime} = global
3 Page({ 5 Page({
4 onLoad:function (opt) { 6 onLoad:function (opt) {
5 util.setBarTitle('预定详情'); 7 util.setBarTitle('预定详情');
@@ -17,6 +19,7 @@ Page({ @@ -17,6 +19,7 @@ Page({
17 console.log(res) 19 console.log(res)
18 } 20 }
19 }) 21 })
  22 + this.chooseManagerInit();
20 }, 23 },
21 onShow:function(){ 24 onShow:function(){
22 this.getsellerInfo(); 25 this.getsellerInfo();
@@ -113,5 +116,41 @@ Page({ @@ -113,5 +116,41 @@ Page({
113 this.notice.close(); 116 this.notice.close();
114 } 117 }
115 }) 118 })
116 - } 119 + },
  120 + chooseManagerInit(){
  121 + try{
  122 + let managers=util.cache('sellerInfo').manager;
  123 + let mans=[];
  124 + if(managers.length>0){
  125 + managers.forEach(man=>{
  126 + mans.push(man.user_name);
  127 + })
  128 + }
  129 + this.setData({mans:mans})
  130 + }catch(e){
  131 + wx.showToast({
  132 + title:'无客户经理',
  133 + icon:'none'
  134 + });
  135 + }
  136 + },
  137 + chooseManager(e){
  138 + let mansIndex=util.val(e);
  139 + this.setData({mansIndex:mansIndex});
  140 + try{
  141 + let managers=util.cache('sellerInfo').manager;
  142 + let man=managers[mansIndex];
  143 + if(man){
  144 + App.Reserve.SetReserveCusman({
  145 + rid:this.data.bookInfo.id,
  146 + cusman_id:man.id,
  147 + cusman:man.user_name,
  148 + cusman_phone:man.user_phone?man.user_phone:'158777556369',
  149 + cusman_account:man.user_wechat?man.user_wechat:'',
  150 + });
  151 + }
  152 + }catch(e){
  153 + console.log(e);
  154 + }
  155 + },
117 }) 156 })
@@ -55,12 +55,17 @@ @@ -55,12 +55,17 @@
55 </view> 55 </view>
56 </block> 56 </block>
57 </view> 57 </view>
58 -<block wx:if="{{bookInfo.cusman!='' && bookInfo.cusman!='null'}}">  
59 - <view class="seller-staff flex-lr black-font font34r">  
60 - <view>客户经理</view>  
61 - <view>{{bookInfo.cusman}}</view> 58 +<view class="seller-staff flex-lr black-font font34r">
  59 + <view>客户经理</view>
  60 + <view class="flex-lr">
  61 + <picker bindchange="chooseManager" value="{{mansIndex}}" range="{{mans}}">
  62 + <view class="picker">
  63 + {{mans[mansIndex]?mans[mansIndex]:bookInfo.cusman?bookInfo.cusman:'请选择'}}
  64 + </view>
  65 + </picker>
  66 + <view>></view>
62 </view> 67 </view>
63 -</block> 68 +</view>
64 <view style="height: 160rpx;"></view> 69 <view style="height: 160rpx;"></view>
65 70
66 <!--通知预订人--> 71 <!--通知预订人-->
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 <view class="cut"></view> 42 <view class="cut"></view>
43 43
44 44
45 -<view class="book-info"> 45 +<view class="book-info" style="margin-bottom: 205rpx;">
46 <view class="book-info-single flex-lr" style="align-items:flex-start;"> 46 <view class="book-info-single flex-lr" style="align-items:flex-start;">
47 <input placeholder="请输入预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="5" style="width:450rpx;" value="{{name}}" bindinput="changename" bindblur="ifAll"/> 47 <input placeholder="请输入预订人姓名(必填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="5" style="width:450rpx;" value="{{name}}" bindinput="changename" bindblur="ifAll"/>
48 <view class="book-info-grand flex-rr font28r gray-deep-font"> 48 <view class="book-info-grand flex-rr font28r gray-deep-font">
@@ -64,7 +64,6 @@ @@ -64,7 +64,6 @@
64 <input placeholder="请输入顾客要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{remark}}" bindinput="changeremark"/> 64 <input placeholder="请输入顾客要求(25字以内,选填)" placeholder-class="gray-font font34r" class="black-font font34r" maxlength="25" value="{{remark}}" bindinput="changeremark"/>
65 </view> 65 </view>
66 </view> 66 </view>
67 -<view class="zhanwei"></view>  
68 -  
69 -  
70 -<view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>  
  67 +<view class="zhanwei">
  68 + <view class="confirm-button white-font flex-vc font34r {{buttonhide==false ? 'confirm-button-active' : ''}}" bindtap="{{buttonhide==false ? 'formsubmit' : ''}}">确定</view>
  69 +</view>
@@ -107,8 +107,13 @@ view{ @@ -107,8 +107,13 @@ view{
107 107
108 .zhanwei{ 108 .zhanwei{
109 width:100%; 109 width:100%;
110 - height:205rpx; 110 + height:170rpx;
111 background:#efeef3; 111 background:#efeef3;
  112 + position:fixed;
  113 + left:0;
  114 + right:0;
  115 + bottom:0;
  116 + z-index: 99;
112 } 117 }
113 118
114 119
@@ -116,11 +121,7 @@ view{ @@ -116,11 +121,7 @@ view{
116 width:680rpx; 121 width:680rpx;
117 height:85rpx; 122 height:85rpx;
118 background:#199095; 123 background:#199095;
119 - position:fixed;  
120 - left:0;  
121 - right:0;  
122 - bottom:60rpx;  
123 - margin:0 auto; 124 + margin:42rpx auto 0;
124 border-radius:10rpx; 125 border-radius:10rpx;
125 opacity:.6; 126 opacity:.6;
126 } 127 }
@@ -34,6 +34,9 @@ export default { @@ -34,6 +34,9 @@ export default {
34 //定个座儿 获取商户信息 34 //定个座儿 获取商户信息
35 'App.Reserve.SellerInfo':{ 35 'App.Reserve.SellerInfo':{
36 cachetime:3600, 36 cachetime:3600,
37 - } 37 + },
  38 +
  39 + //设置客户经理
  40 + 'App.Reserve.SetReserveCusman':null,
38 41
39 } 42 }