Commit 532e7a8bef7df2c997f7d3d86fd5e21453f45cde

Authored by liuxuqinfhp1220
1 parent d73556c9

no message

@@ -25,6 +25,16 @@ Component({ @@ -25,6 +25,16 @@ Component({
25 'date,section': function(newdate,newsection) { 25 'date,section': function(newdate,newsection) {
26 console.log('room',newdate,newsection) 26 console.log('room',newdate,newsection)
27 if(newdate && newsection){ 27 if(newdate && newsection){
  28 + if(this.data.roomlist.length>0){
  29 + this.data.roomlist.forEach((v,i)=>{
  30 + if(v.selectnum>0){
  31 + v.selectnum=0;
  32 + }
  33 + })
  34 + }
  35 + this.setData({
  36 + roomlist:this.data.roomlist
  37 + })
28 this.getroomtype(); 38 this.getroomtype();
29 } 39 }
30 } 40 }
@@ -59,15 +69,20 @@ Component({ @@ -59,15 +69,20 @@ Component({
59 let _target=e.currentTarget.dataset; 69 let _target=e.currentTarget.dataset;
60 console.log(typeof _target.selectnum,this.data.usecondition) 70 console.log(typeof _target.selectnum,this.data.usecondition)
61 if(this.data.usecondition=='custom'){ 71 if(this.data.usecondition=='custom'){
62 - let setkey='roomlist['+_target.index+'].selectnum';  
63 - this.setData({  
64 - [setkey]:_target.selectnum+1  
65 - })  
66 - let obj={  
67 - id:_target.id,  
68 - name:this.data.roomlist[_target.index].name 72 + if((this.data.seletroomlist && this.data.seletroomlist.length<3) || !this.data.seletroomlist){
  73 + let setkey='roomlist['+_target.index+'].selectnum';
  74 + this.setData({
  75 + [setkey]:_target.selectnum+1
  76 + })
  77 + let obj={
  78 + id:_target.id,
  79 + name:this.data.roomlist[_target.index].name
  80 + }
  81 + this.triggerEvent('selectroom',obj)
  82 + }else{
  83 + util.toast('最多可选3个包间','none');
69 } 84 }
70 - this.triggerEvent('selectroom',obj) 85 +
71 }else{ 86 }else{
72 ////// 87 //////
73 console.log('置满') 88 console.log('置满')
1 <view class="room-list flex-rs"> 1 <view class="room-list flex-rs">
2 <block wx:for="{{roomlist}}" wx:key="{{index}}"> 2 <block wx:for="{{roomlist}}" wx:key="{{index}}">
3 <block wx:if="{{item.status==1}}"> 3 <block wx:if="{{item.status==1}}">
4 - <view class="room-item black-font {{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? 'border-gray bg-gray' : 'border-yellow bg-yellow'}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="{{usecondition=='seller' ? (item.isorderFull && item.isorderFull==1 ? '' : 'selectroom') : (item.isFull && item.isFull==1 ? '' : 'selectroom')}}"> 4 + <view class="room-item black-font {{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? 'border-gray bg-gray' : 'border-yellow bg-yellow'}} flex-vl" style="justify-content:center;" data-id="{{item.id}}" data-index="{{index}}" data-selectnum="{{item.selectnum ? item.selectnum : 0}}" data-fid="{{item.fid ? item.fid : null}}" catchtap="{{usecondition=='seller' ? (item.isorderFull && item.isorderFull==1 ? '' : 'selectroom') : ((item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1) ? '' : 'selectroom')}}">
5 <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view> 5 <view class="font30r font-bold" style="width:100%;padding-right:62rpx;box-sizing:border-box; block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{{item.name}}</view>
6 <block wx:if="{{item.max && item.max!=0}}"> 6 <block wx:if="{{item.max && item.max!=0}}">
7 <view class="font24r room-more">最多可坐{{item.max}}人</view> 7 <view class="font24r room-more">最多可坐{{item.max}}人</view>
1 <nav hasHome>{{action ? '选择联系人' : '常用联系人'}}</nav> 1 <nav hasHome>{{action ? '选择联系人' : '常用联系人'}}</nav>
2 -<view class="concat-list"> 2 +<view class="concat-list" style="margin-bottom: 150rpx;">
3 <block wx:for="{{concatlist}}" wx:key="{{index}}"> 3 <block wx:for="{{concatlist}}" wx:key="{{index}}">
4 <view class="flex-lr item font30r black-font" data-index="{{index}}" catchtap="edit"> 4 <view class="flex-lr item font30r black-font" data-index="{{index}}" catchtap="edit">
5 <view class="font-bold">{{item.name}}</view> 5 <view class="font-bold">{{item.name}}</view>
@@ -7,5 +7,6 @@ @@ -7,5 +7,6 @@
7 </view> 7 </view>
8 </block> 8 </block>
9 </view> 9 </view>
10 -  
11 -<view class="white-font font32r add-button flex-cc" catchtap="add">新建联系人</view>  
  10 +<view class="add-cover flex-cc">
  11 + <view class="white-font font32r add-button flex-cc" catchtap="add">新建联系人</view>
  12 +</view>
@@ -9,13 +9,18 @@ @@ -9,13 +9,18 @@
9 border-bottom: 2rpx solid #F1F0F4; 9 border-bottom: 2rpx solid #F1F0F4;
10 box-sizing: border-box; 10 box-sizing: border-box;
11 } 11 }
12 -.add-button{  
13 - width:680rpx;  
14 - height:80rpx; 12 +.add-cover{
  13 + width:100%;
  14 + height:130rpx;
15 position: fixed; 15 position: fixed;
16 left:0; 16 left:0;
17 right:0; 17 right:0;
18 - bottom:80rpx; 18 + bottom:0;
  19 + background: #fff;
  20 +}
  21 +.add-button{
  22 + width:680rpx;
  23 + height:80rpx;
19 margin:0 auto; 24 margin:0 auto;
20 background: #242320; 25 background: #242320;
21 } 26 }
@@ -33,6 +33,7 @@ Page({ @@ -33,6 +33,7 @@ Page({
33 res.data.forEach((v,i)=>{ 33 res.data.forEach((v,i)=>{
34 if(v.is_default==1){ 34 if(v.is_default==1){
35 this.user = v 35 this.user = v
  36 + v.remark='';
36 this.setData({ 37 this.setData({
37 user: v, 38 user: v,
38 }) 39 })