Commit c3ee62c9ad32175545b3bce8c01389ed9f81d8b8

Authored by vking
1 parent c4a37411

隐藏在线预订处理页面的联系客户按钮 调整拒绝订单文案提示

@@ -98,7 +98,7 @@ Page({ @@ -98,7 +98,7 @@ Page({
98 //getApp().isAdmin 98 //getApp().isAdmin
99 console.log('this.hasCallPhone',this.hasCallPhone,bi.status) 99 console.log('this.hasCallPhone',this.hasCallPhone,bi.status)
100 if(!this.hasCallPhone){//不能直接打电话 100 if(!this.hasCallPhone){//不能直接打电话
101 - if(bi.status==6) return; 101 + if(bi.status==6 || bi.status==0) return;
102 if(bi.status==0){ 102 if(bi.status==0){
103 return wx.showModal({ 103 return wx.showModal({
104 title: '   客户要求不能满足时  \n请先安排包间后再联系客户调整', 104 title: '   客户要求不能满足时  \n请先安排包间后再联系客户调整',
@@ -180,6 +180,9 @@ Page({ @@ -180,6 +180,9 @@ Page({
180 detailData: null, 180 detailData: null,
181 async getDetail(id, force = false) { 181 async getDetail(id, force = false) {
182 let res = await App.Reserve.Detail({rid: id, openid: ''}, force); 182 let res = await App.Reserve.Detail({rid: id, openid: ''}, force);
  183 + //debug
  184 + //res.data.status=0
  185 +
183 res.data.phoneStr = res.data.phone || ''; 186 res.data.phoneStr = res.data.phone || '';
184 let enter_params = util.cache('enter_params'); 187 let enter_params = util.cache('enter_params');
185 let sc = (await App.Reserve.SellerInfo(enter_params)).data 188 let sc = (await App.Reserve.SellerInfo(enter_params)).data
@@ -190,7 +193,7 @@ Page({ @@ -190,7 +193,7 @@ Page({
190 res.data.hasOwner = true; 193 res.data.hasOwner = true;
191 } 194 }
192 } 195 }
193 - if(!res.data.hasOwner && !this.hasCallPhone){ 196 + if((!res.data.hasOwner && !this.hasCallPhone) || (!getApp().isAdmin)){
194 res.data.phoneStr = res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/, function ($0, $1, $2, $3) { 197 res.data.phoneStr = res.data.phoneStr.replace(/(\d{2})(.{5})(\d{3})/, function ($0, $1, $2, $3) {
195 return $1 + '**' + $3; 198 return $1 + '**' + $3;
196 }) 199 })
@@ -228,6 +231,8 @@ Page({ @@ -228,6 +231,8 @@ Page({
228 this.setData({ 231 this.setData({
229 tables: res.data.tables, 232 tables: res.data.tables,
230 bookInfo: this.detailData, 233 bookInfo: this.detailData,
  234 + //isAdmin:getApp().isAdmin,
  235 + //hasCallPhone:this.hasCallPhone
231 }) 236 })
232 }, 237 },
233 gotoModify() { 238 gotoModify() {
@@ -287,8 +292,8 @@ Page({ @@ -287,8 +292,8 @@ Page({
287 }, 292 },
288 refuseOrder(){ 293 refuseOrder(){
289 wx.showModal({ 294 wx.showModal({
290 - title: '   确定拒绝订单吗?   \n拒绝后无法联系客户',  
291 - content: '如果包间类型已订满,请及时停用', 295 + title: '您确定要拒绝这个订单吗?',
  296 + content: '如果该类型包间已订满,请及时停用包间',
292 showCancel:true, 297 showCancel:true,
293 cancelText:'拒绝订单', 298 cancelText:'拒绝订单',
294 cancelColor:'', 299 cancelColor:'',
@@ -174,22 +174,49 @@ @@ -174,22 +174,49 @@
174 </view> 174 </view>
175 <!--操作在线预订--> 175 <!--操作在线预订-->
176 <view class="notice-opt" wx:if="{{bookInfo.status==0}}"> 176 <view class="notice-opt" wx:if="{{bookInfo.status==0}}">
177 - <view class="notice-button-border font34r flex-lr">  
178 - <view>  
179 - <formids bindclick="easyCall" data-key="seller">联系商家</formids> 177 + <block wx:if="{{isAdmin}}">
  178 + <view class="notice-button-border font34r flex-lr">
  179 + <view>
  180 + <formids bindclick="easyCall" data-key="seller">联系商家</formids>
  181 + </view>
  182 + <view>
  183 + <formids bindclick="easyCall" data-key="customer">联系顾客</formids>
  184 + </view>
180 </view> 185 </view>
181 - <view>  
182 - <formids bindclick="easyCall" data-key="customer">联系顾客</formids> 186 + <view class="notice-button-border font34r flex-lr">
  187 + <view>
  188 + <formids bindclick="refuseOrder">拒绝订单</formids>
  189 + </view>
  190 + <view>
  191 + <formids bindclick="arrangeOrder">安排包间</formids>
  192 + </view>
183 </view> 193 </view>
184 - </view>  
185 - <view class="notice-button-border font34r flex-lr">  
186 - <view>  
187 - <formids bindclick="refuseOrder">拒绝订单</formids> 194 + </block>
  195 + <block wx:elif="{{hasCallPhone}}">
  196 + <view class="notice-button-border font34r flex-lr">
  197 + <view>
  198 + <formids bindclick="arrangeOrder">安排包间</formids>
  199 + </view>
188 </view> 200 </view>
189 - <view>  
190 - <formids bindclick="arrangeOrder">安排包间</formids> 201 + <view class="notice-button-border font34r flex-lr">
  202 + <view>
  203 + <formids bindclick="refuseOrder">拒绝订单</formids>
  204 + </view>
  205 + <view>
  206 + <formids bindclick="easyCall" data-key="customer">联系顾客</formids>
  207 + </view>
191 </view> 208 </view>
192 - </view> 209 + </block>
  210 + <block wx:else="">
  211 + <view class="notice-button-border font34r flex-lr">
  212 + <view>
  213 + <formids bindclick="refuseOrder">拒绝订单</formids>
  214 + </view>
  215 + <view>
  216 + <formids bindclick="arrangeOrder">安排包间</formids>
  217 + </view>
  218 + </view>
  219 + </block>
193 </view> 220 </view>
194 <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall> 221 <noticeCall id="notice" bookInfo="{{bookInfo}}"></noticeCall>
195 <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll"> 222 <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange" class="flex-ll">