Commit b8da979aa33930d8a4adc3c7febd8a71a116136b

Authored by liuxuqinfhp1220
1 parent 9373c6cf

no message

... ... @@ -69,38 +69,43 @@ Component({
let _target=e.currentTarget.dataset;
console.log(typeof _target.selectnum,this.data.usecondition)
if(this.data.usecondition=='custom'){
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)
console.log(this.data.roomlist[_target.index].isorderFull,this.data.roomlist[_target.index].isFull)
if(this.data.roomlist[_target.index].isorderFull==1 || this.data.roomlist[_target.index].isFull==1){
}else{
util.toast('最多可选3个包间','none');
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');
}
}
}else{
//////
console.log('置满')
let parmdata={
classid:_target.id,
day:util.timetouUnix(this.data.date+' 00:00:00'),
interval:dur.indexOf(this.data.section)+1
}
if(_target.fid){
parmdata.id=_target.fid;
}
App.Seller.SetTableClassFull(parmdata).then((json)=>{
console.log(json)
if(json.ret==200){
this.triggerEvent('changeroom',{id:_target.id,action:parmdata.id ? 'cancel' : 'confirm'})
this.getroomtype();
if(!this.data.roomlist[_target.index].isorderFull){
let parmdata={
classid:_target.id,
day:util.timetouUnix(this.data.date+' 00:00:00'),
interval:dur.indexOf(this.data.section)+1
}
})
if(_target.fid){
parmdata.id=_target.fid;
}
App.Seller.SetTableClassFull(parmdata).then((json)=>{
console.log(json)
if(json.ret==200){
this.triggerEvent('changeroom',{id:_target.id,action:parmdata.id ? 'cancel' : 'confirm'})
this.getroomtype();
}
})
}
}
},
cancelroom(id){
... ...
<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) || (item.isorderFull && item.isorderFull==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="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>
... ...
... ... @@ -138,7 +138,8 @@ Component({
this.triggerEvent('selectdate',{date:_target.date,action:'click'});
this.setData({
date:_target.date,
showYearMonth:this.getshowmonth(_target.date)
showYearMonth:this.getshowmonth(_target.date),
hidecalendar:true
})
if(_target.date in this.datelist){
this.changedatestyle(_target.date)
... ...
... ... @@ -72,11 +72,13 @@ Page({
...this.user
}).then(res=>{
if(res.ret==200){
App.Customer.GetCustomerInfo({},'clear')
}else{
return util.toast(res.msg,'none')
if(re.data==-1){
return util.toast('手机号已存在',none')
}else{
App.Customer.GetCustomerInfo({},'clear')
}
}
wx.navigateBack()
wx.navigateBack()
})
},
changeInput(e) {
... ...
... ... @@ -55,7 +55,7 @@
"id": 0,
"name": "预订本-商家1",
"pathName": "pack-book/pages/book/b_index",
"query": "seller_id=1007&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
"query": "seller_id=1009&seller_openid=o9pcQ0cbjRKnRWczcOJaaSRGP1lE&manager_id=500",
"scene": 1001
},
{
... ...