Commit 4f3cbc9389ce443693fdd9fdd00ddea504cd978d

Authored by liuxuqinfhp1220
1 parent 7b69c21a

no message

@@ -20,12 +20,17 @@ Component({ @@ -20,12 +20,17 @@ Component({
20 observers: { 20 observers: {
21 'date,section': function(newdate,newsection) { 21 'date,section': function(newdate,newsection) {
22 console.log('room',newdate,newsection) 22 console.log('room',newdate,newsection)
  23 + console.log('old',this.date,this.section)
23 if(newdate && newsection){ 24 if(newdate && newsection){
24 if(this.date && this.section){ 25 if(this.date && this.section){
25 - if(this.date=!newdate && this.section!=newsection){ 26 + console.log(this.date=!newdate || this.section!=newsection)
  27 + if(this.date=!newdate || this.section!=newsection){
26 this.getroomtype(); 28 this.getroomtype();
27 this.date=newdate; 29 this.date=newdate;
28 this.section=newsection; 30 this.section=newsection;
  31 + }else{
  32 + this.date=newdate;
  33 + this.section=newsection;
29 } 34 }
30 }else{ 35 }else{
31 this.getroomtype(); 36 this.getroomtype();
@@ -39,7 +44,7 @@ Component({ @@ -39,7 +44,7 @@ Component({
39 getroomtype(){ 44 getroomtype(){
40 let parmdata={ 45 let parmdata={
41 sellerid:this.data.seller.id, 46 sellerid:this.data.seller.id,
42 - day:this.data.date, 47 + day:util.timetouUnix(this.data.date,'-'),
43 interval:dur.indexOf(this.data.section)+1 48 interval:dur.indexOf(this.data.section)+1
44 } 49 }
45 App.Seller.GetSellerTableClass(parmdata).then((json)=>{ 50 App.Seller.GetSellerTableClass(parmdata).then((json)=>{
@@ -76,7 +81,7 @@ Component({ @@ -76,7 +81,7 @@ Component({
76 console.log('置满') 81 console.log('置满')
77 let parmdata={ 82 let parmdata={
78 classid:_target.id, 83 classid:_target.id,
79 - day:this.data.date, 84 + day:util.timetouUnix(this.data.date,'-'),
80 interval:dur.indexOf(this.data.section)+1 85 interval:dur.indexOf(this.data.section)+1
81 } 86 }
82 if(_target.fid){ 87 if(_target.fid){
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 - <view class="room-item black-font {{item.isFull && item.isFull==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' ? 'selectroom' : (item.isFull && item.isFull==1 ? '' : 'selectroom')}}">  
4 - <view class="font30r font-bold">{{item.name}}</view>  
5 - <block wx:if="{{item.max}}">  
6 - <view class="font24r room-more">最多可坐{{item.max}}人</view>  
7 - </block>  
8 - <block wx:if="{{item.low}}">  
9 - <view class="font20r room-consume">最低消费{{item.low}}元</view>  
10 - </block>  
11 - <block wx:if="{{item.selectnum && item.selectnum>0}}">  
12 - <view class="room-select white-font font24r flex-cc yellow">已选{{item.selectnum}}</view>  
13 - </block>  
14 - <block wx:if="{{usecondition=='seller'}}">  
15 - <block wx:if="{{item.isFull && item.isFull==1}}">  
16 - <view class="room-select black-font font24r flex-cc gray">置满</view> 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')}}">
  5 + <view class="font30r font-bold">{{item.name}}</view>
  6 + <block wx:if="{{item.max}}">
  7 + <view class="font24r room-more">最多可坐{{item.max}}人</view>
17 </block> 8 </block>
18 - <block wx:if="{{item.isorderFull && item.isorderFull==1}}">  
19 - <view class="room-full black-font font24r">订满</view> 9 + <block wx:if="{{item.low}}">
  10 + <view class="font20r room-consume">最低消费{{item.low}}元</view>
20 </block> 11 </block>
21 - </block>  
22 - <block wx:else>  
23 - <block wx:if="{{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1)}}">  
24 - <view class="room-full black-font font24r">订满</view> 12 + <block wx:if="{{item.selectnum && item.selectnum>0}}">
  13 + <view class="room-select white-font font24r flex-cc yellow">已选{{item.selectnum}}</view>
25 </block> 14 </block>
26 - </block>  
27 - </view> 15 + <block wx:if="{{usecondition=='seller'}}">
  16 + <block wx:if="{{item.isFull && item.isFull==1}}">
  17 + <view class="room-select black-font font24r flex-cc gray">置满</view>
  18 + </block>
  19 + <block wx:if="{{item.isorderFull && item.isorderFull==1}}">
  20 + <view class="room-full black-font font24r">订满</view>
  21 + </block>
  22 + </block>
  23 + <block wx:else>
  24 + <block wx:if="{{(item.isFull && item.isFull==1) || (item.isorderFull && item.isorderFull==1)}}">
  25 + <view class="room-full black-font font24r">订满</view>
  26 + </block>
  27 + </block>
  28 + </view>
  29 + </block>
28 </block> 30 </block>
29 </view> 31 </view>