Commit 8cf6cd836d4e9514c9b512e161681b927865b1ad

Authored by zhangyan
2 parents 20f3c71a 20287fd6

Merge branch 'master' of http://123.56.79.57/xt/xcx-book

@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 </view> 9 </view>
10 </view> 10 </view>
11 <view class="tid" wx:if="{{board.tid==2}}">包间</view> 11 <view class="tid" wx:if="{{board.tid==2}}">包间</view>
  12 + <view class="tid" wx:if="{{board.tid==3}}">卡座</view>
12 <view class="status" wx:if="{{board.status_str}}" style="width: {{width}}rpx;">{{board.status_str}}</view> 13 <view class="status" wx:if="{{board.status_str}}" style="width: {{width}}rpx;">{{board.status_str}}</view>
13 <icon type="success" size="20" color="#199095" class="desk-active" wx:if="{{board.isselect==true}}"/> 14 <icon type="success" size="20" color="#199095" class="desk-active" wx:if="{{board.isselect==true}}"/>
14 </view> 15 </view>
@@ -716,8 +716,14 @@ Page({ @@ -716,8 +716,14 @@ Page({
716 App.User.GetCustomRemark({ 716 App.User.GetCustomRemark({
717 uid:util.cache('enter_params')['manager_id'], 717 uid:util.cache('enter_params')['manager_id'],
718 }).then(res=>{ 718 }).then(res=>{
  719 + let CustomRemark=[];
  720 + res.data.forEach(r=>{
  721 + if(r.often_use){
  722 + CustomRemark.push(r);
  723 + }
  724 + })
719 this.setData({ 725 this.setData({
720 - CustomRemark:res.data, 726 + CustomRemark:CustomRemark,
721 }) 727 })
722 }) 728 })
723 }, 729 },
@@ -741,6 +747,7 @@ Page({ @@ -741,6 +747,7 @@ Page({
741 CustomRemark:CustomRemark, 747 CustomRemark:CustomRemark,
742 form:form, 748 form:form,
743 }) 749 })
  750 + this.conditionInfo()
744 }, 751 },
745 CustomRemarkMore(){ 752 CustomRemarkMore(){
746 this.setData({ 753 this.setData({
@@ -190,12 +190,12 @@ @@ -190,12 +190,12 @@
190 bindblur="inputFocus" 190 bindblur="inputFocus"
191 data-key="cusdem"/> 191 data-key="cusdem"/>
192 </view> 192 </view>
193 - <view wx:if="{{CustomRemark.length>0}}" class="book-info-single" style="padding-top: 14rpx; height: 60rpx;"> 193 + <view wx:if="{{CustomRemark.length>0}}" class="book-info-single last" style="padding-top: 14rpx; height: 60rpx;">
194 <view class="flex-lr CustomRemark"> 194 <view class="flex-lr CustomRemark">
195 <view class="CustomRemarks"> 195 <view class="CustomRemarks">
196 <view class="CustomRemarksView"> 196 <view class="CustomRemarksView">
197 <view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}" 197 <view class="CustomRemarkItem {{item.active?'active':''}}" wx:for="{{CustomRemark}}"
198 - wx:if="{{item.often_use}}" bindtap="oftenUse" 198 + bindtap="oftenUse"
199 data-id="{{item.id}}" 199 data-id="{{item.id}}"
200 data-value="{{item.often_use}}">{{item.often_use}}</view> 200 data-value="{{item.often_use}}">{{item.often_use}}</view>
201 </view> 201 </view>
@@ -308,7 +308,7 @@ @@ -308,7 +308,7 @@
308 .CustomRemarkMore .CustomRemarkItem{ 308 .CustomRemarkMore .CustomRemarkItem{
309 padding: 4rpx 24rpx; 309 padding: 4rpx 24rpx;
310 } 310 }
311 -.book-info-single:last-child{ 311 +.book-info-single.last{
312 border-width: 0; 312 border-width: 0;
313 } 313 }
314 .CustomRemarkItem.active{ 314 .CustomRemarkItem.active{
@@ -7,6 +7,7 @@ Page({ @@ -7,6 +7,7 @@ Page({
7 menu_active_id:'' 7 menu_active_id:''
8 }, 8 },
9 checked_tids:[], 9 checked_tids:[],
  10 + desks:[],
10 onLoad:function(opt){ 11 onLoad:function(opt){
11 console.log('onLoad',opt) 12 console.log('onLoad',opt)
12 util.setBarTitle('选择桌位'); 13 util.setBarTitle('选择桌位');
@@ -52,24 +53,35 @@ Page({ @@ -52,24 +53,35 @@ Page({
52 App.Reserve.GetTableList(formdata).then(function (json) { 53 App.Reserve.GetTableList(formdata).then(function (json) {
53 if(json.ret==200){ 54 if(json.ret==200){
54 console.log('this.checked_tids',that.checked_tids); 55 console.log('this.checked_tids',that.checked_tids);
55 - if(json.data.length>0){  
56 - json.data.forEach(function(v,i){  
57 - v.list.forEach(function(r,n){  
58 - r.isselect=false  
59 - if(that.checked_tids._indexOf(r.id)>-1){  
60 - r.isselect=true;  
61 - }  
62 - })  
63 - })  
64 - }  
65 - that.setData({  
66 - desklist:json.data,  
67 - menu_active_id:json.data[0].name  
68 - }) 56 + that.desks=json.data
  57 + that.formatDesklist(true)
69 } 58 }
70 }) 59 })
71 }, 60 },
  61 + formatDesklist(hasFirst=true){
  62 + let desks=this.desks;
  63 + if(desks.length>0){
  64 + desks.forEach((v,i)=>{
  65 + v.list.forEach((r,n)=>{
  66 + r.isselect=false
  67 + if(this.checked_tids._indexOf(r.id)>-1){
  68 + r.isselect=true;
  69 + }
  70 + })
  71 + })
  72 + let param={
  73 + desklist:desks,
  74 + }
  75 + if(hasFirst){
  76 + param.menu_active_id=desks[0].name
  77 + }
  78 + this.setData(param)
  79 + }
  80 + return desks;
  81 + },
72 switchMenu(e){ 82 switchMenu(e){
  83 +
  84 + this.formatDesklist(false)
73 this.setData({ 85 this.setData({
74 menu_active_id:util.attr(e,'id') 86 menu_active_id:util.attr(e,'id')
75 }) 87 })
1 //正式 1 //正式
2 var uri={ 2 var uri={
3 3
4 - HOST__LINE:'https://xt05.colorcun.com/?s=', 4 + HOST__LINE:'https://xt04.colorcun.com/?s=',
5 5
6 //获取商家信息 6 //获取商家信息
7 CGI__USER_GETSELLERBYID: 'App.Seller.GetSellerById', 7 CGI__USER_GETSELLERBYID: 'App.Seller.GetSellerById',