|
...
|
...
|
@@ -23,7 +23,7 @@ Component({ |
|
|
|
attached(){
|
|
|
|
//默认标记特殊日期
|
|
|
|
this.getspeciallist();
|
|
|
|
this.gethousefulldate();
|
|
|
|
this.gethousefulldate(this.data.curYear,this.data.curMonth,'defalut');
|
|
|
|
},
|
|
|
|
ready(){
|
|
|
|
},
|
|
...
|
...
|
@@ -39,26 +39,31 @@ Component({ |
|
|
|
})
|
|
|
|
},
|
|
|
|
//根据指定年份月份获取当月满房的日期
|
|
|
|
gethousefulldate(){
|
|
|
|
gethousefulldate(year,month,action){
|
|
|
|
let parmdata={
|
|
|
|
sid:this.data.seller.id,
|
|
|
|
date:this.data.date.split('-')[0]+'-'+this.data.date.split('-')[1]
|
|
|
|
date:year+'-'+month
|
|
|
|
}
|
|
|
|
App.Customer.GetHouseFullDate(parmdata).then((json)=>{
|
|
|
|
console.log(json)
|
|
|
|
if(json.ret==200){
|
|
|
|
this.houseFullDate=json.data;
|
|
|
|
if(this.houseFullDate.indexOf(this.data.date)==-1){
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:0,overdate:0})
|
|
|
|
}else{ //满房
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1,overdate:0})
|
|
|
|
}
|
|
|
|
if(json.data.length>0){
|
|
|
|
this.changespeciallist(json.data)
|
|
|
|
if(action=='defalut'){
|
|
|
|
if(this.houseFullDate.indexOf(this.data.date)==-1){
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:0,overdate:0})
|
|
|
|
}else{ //满房
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1,overdate:0})
|
|
|
|
}
|
|
|
|
if(json.data.length>0){
|
|
|
|
this.changespeciallist(json.data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
this.houseFullDate=null
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1,overdate:0})
|
|
|
|
if(action=='defalut'){
|
|
|
|
this.houseFullDate=null
|
|
|
|
this.triggerEvent('selectdate',{date:this.data.date,action:'defalut',houseFullStatus:1,overdate:0})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
...
|
...
|
@@ -84,12 +89,20 @@ Component({ |
|
|
|
},
|
|
|
|
//下一月
|
|
|
|
nextMonth(e){
|
|
|
|
console.log(e)
|
|
|
|
this.gethousefulldate(e.detail.currentYear,e.detail.currentMonth,'click');
|
|
|
|
this.setData({
|
|
|
|
nextNum:this.data.nextNum+1
|
|
|
|
})
|
|
|
|
},
|
|
|
|
//上一月
|
|
|
|
prevMonth(e){
|
|
|
|
if(this.data.nextNum==1){
|
|
|
|
this.gethousefulldate(e.detail.currentYear,e.detail.currentMonth,'defalut');
|
|
|
|
}else{
|
|
|
|
this.gethousefulldate(e.detail.currentYear,e.detail.currentMonth,'click');
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setData({
|
|
|
|
nextNum:this.data.nextNum-1
|
|
|
|
})
|
...
|
...
|
|