|
...
|
...
|
@@ -12,6 +12,10 @@ Component({ |
|
|
|
usecondition:{
|
|
|
|
type:String,
|
|
|
|
value:'custom'
|
|
|
|
},
|
|
|
|
seletroomlist:{
|
|
|
|
type:Array,
|
|
|
|
value:[]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data:{
|
|
...
|
...
|
@@ -20,20 +24,8 @@ Component({ |
|
|
|
observers: {
|
|
|
|
'date,section': function(newdate,newsection) {
|
|
|
|
console.log('room',newdate,newsection)
|
|
|
|
console.log('old',this.date,this.section)
|
|
|
|
if(newdate && newsection){
|
|
|
|
if(this.date && this.section){
|
|
|
|
console.log(this.date=!newdate || this.section!=newsection)
|
|
|
|
if(this.date=!newdate || this.section!=newsection){
|
|
|
|
this.getroomtype();
|
|
|
|
this.date=newdate;
|
|
|
|
this.section=newsection;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
this.getroomtype();
|
|
|
|
this.date=newdate;
|
|
|
|
this.section=newsection;
|
|
|
|
}
|
|
|
|
this.getroomtype();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
...
|
...
|
@@ -41,7 +33,7 @@ Component({ |
|
|
|
getroomtype(){
|
|
|
|
let parmdata={
|
|
|
|
sellerid:this.data.seller.id,
|
|
|
|
day:util.timetouUnix(this.data.date,'-'),
|
|
|
|
day:new Date(this.data.date+' 00:00:00')/1000,
|
|
|
|
interval:dur.indexOf(this.data.section)+1
|
|
|
|
}
|
|
|
|
App.Seller.GetSellerTableClass(parmdata).then((json)=>{
|
|
...
|
...
|
@@ -57,6 +49,9 @@ Component({ |
|
|
|
this.setData({
|
|
|
|
roomlist:json.data
|
|
|
|
})
|
|
|
|
if(this.data.seletroomlist.length>0){
|
|
|
|
this.changestyle();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
...
|
...
|
@@ -77,9 +72,9 @@ Component({ |
|
|
|
//////
|
|
|
|
console.log('置满')
|
|
|
|
let parmdata={
|
|
|
|
classid:_target.id,
|
|
|
|
day:util.timetouUnix(this.data.date,'-'),
|
|
|
|
interval:dur.indexOf(this.data.section)+1
|
|
|
|
classid:_target.id,
|
|
|
|
day:new Date(this.data.date+' 00:00:00')/1000,
|
|
|
|
interval:dur.indexOf(this.data.section)+1
|
|
|
|
}
|
|
|
|
if(_target.fid){
|
|
|
|
parmdata.id=_target.fid;
|
|
...
|
...
|
@@ -104,5 +99,19 @@ Component({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
changestyle(){
|
|
|
|
let seletroomlist=this.data.seletroomlist;
|
|
|
|
let roomlist=this.data.roomlist;
|
|
|
|
seletroomlist.forEach((v,i)=>{
|
|
|
|
roomlist.forEach((r,n)=>{
|
|
|
|
if(v.id==r.id){
|
|
|
|
r.selectnum+=1;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.setData({
|
|
|
|
roomlist:roomlist
|
|
|
|
})
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|