Commit 038b2199220dbea776996fe411969e231e790bbf

Authored by vking
2 parents fa56b4cc 532e7a8b

Merge remote-tracking branch 'origin/master'

... ... @@ -25,6 +25,16 @@ Component({
'date,section': function(newdate,newsection) {
console.log('room',newdate,newsection)
if(newdate && newsection){
if(this.data.roomlist.length>0){
this.data.roomlist.forEach((v,i)=>{
if(v.selectnum>0){
v.selectnum=0;
}
})
}
this.setData({
roomlist:this.data.roomlist
})
this.getroomtype();
}
}
... ... @@ -59,15 +69,20 @@ Component({
let _target=e.currentTarget.dataset;
console.log(typeof _target.selectnum,this.data.usecondition)
if(this.data.usecondition=='custom'){
let setkey='roomlist['+_target.index+'].selectnum';
this.setData({
[setkey]:_target.selectnum+1
})
let obj={
id:_target.id,
name:this.data.roomlist[_target.index].name
if((this.data.seletroomlist && this.data.seletroomlist.length<3) || !this.data.seletroomlist){
let setkey='roomlist['+_target.index+'].selectnum';
this.setData({
[setkey]:_target.selectnum+1
})
let obj={
id:_target.id,
name:this.data.roomlist[_target.index].name
}
this.triggerEvent('selectroom',obj)
}else{
util.toast('最多可选3个包间','none');
}
this.triggerEvent('selectroom',obj)
}else{
//////
console.log('置满')
... ...
<view class="room-list flex-rs">
<block wx:for="{{roomlist}}" wx:key="{{index}}">
<block wx:if="{{item.status==1}}">
<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')}}">
<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')}}">
<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>
<block wx:if="{{item.max && item.max!=0}}">
<view class="font24r room-more">最多可坐{{item.max}}人</view>
... ...
<nav hasHome>{{action ? '选择联系人' : '常用联系人'}}</nav>
<view class="concat-list">
<view class="concat-list" style="margin-bottom: 150rpx;">
<block wx:for="{{concatlist}}" wx:key="{{index}}">
<view class="flex-lr item font30r black-font" data-index="{{index}}" catchtap="edit">
<view class="font-bold">{{item.name}}</view>
... ... @@ -7,5 +7,6 @@
</view>
</block>
</view>
<view class="white-font font32r add-button flex-cc" catchtap="add">新建联系人</view>
\ No newline at end of file
<view class="add-cover flex-cc">
<view class="white-font font32r add-button flex-cc" catchtap="add">新建联系人</view>
</view>
\ No newline at end of file
... ...
... ... @@ -9,13 +9,18 @@
border-bottom: 2rpx solid #F1F0F4;
box-sizing: border-box;
}
.add-button{
width:680rpx;
height:80rpx;
.add-cover{
width:100%;
height:130rpx;
position: fixed;
left:0;
right:0;
bottom:80rpx;
bottom:0;
background: #fff;
}
.add-button{
width:680rpx;
height:80rpx;
margin:0 auto;
background: #242320;
}
\ No newline at end of file
... ...
... ... @@ -33,6 +33,7 @@ Page({
res.data.forEach((v,i)=>{
if(v.is_default==1){
this.user = v
v.remark='';
this.setData({
user: v,
})
... ...