|
...
|
...
|
@@ -28,6 +28,9 @@ Page({ |
|
|
|
[],
|
|
|
|
],
|
|
|
|
speciallist:[],
|
|
|
|
ReservesCountMonth:[],
|
|
|
|
ReservesTotal:0,
|
|
|
|
timeStrLabel:bookOrder.timeStrLabel
|
|
|
|
},
|
|
|
|
sellerid:0,
|
|
|
|
indexOpt:null,
|
|
...
|
...
|
@@ -70,6 +73,8 @@ Page({ |
|
|
|
})
|
|
|
|
//util.setBarTitle('预定本');
|
|
|
|
this.indexOpt=opt;
|
|
|
|
this.ReservesCountDay(util.unixtoTime(d,'YYYY-MM-DD'));
|
|
|
|
this.ReservesCountMonth(util.unixtoTime(d,'YYYY-MM'));
|
|
|
|
},
|
|
|
|
onShow:function(){
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -169,13 +174,14 @@ Page({ |
|
|
|
let clickDay = event.detail.date.substr(8,2);
|
|
|
|
let changeDay = `dayStyle[1].day`;
|
|
|
|
let changeBg = `dayStyle[1].background`;
|
|
|
|
this.setData({
|
|
|
|
dateStr:util.unixtoTime(cktime,'MM-DD `DAY/周WW`'),
|
|
|
|
[changeDay]: clickDay,
|
|
|
|
[changeBg]: "#84e7d0"
|
|
|
|
})
|
|
|
|
this.getbooklist();
|
|
|
|
this.calendarClose();
|
|
|
|
this.setData({
|
|
|
|
dateStr:util.unixtoTime(cktime,'MM-DD `DAY/周WW`'),
|
|
|
|
[changeDay]: clickDay,
|
|
|
|
[changeBg]: "#84e7d0"
|
|
|
|
})
|
|
|
|
this.getbooklist();
|
|
|
|
this.calendarClose();
|
|
|
|
this.ReservesCountDay(event.detail.date);
|
|
|
|
},
|
|
|
|
calendarClose(){
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -221,4 +227,45 @@ Page({ |
|
|
|
exportFile(){
|
|
|
|
this.getbooklist(true);
|
|
|
|
},
|
|
|
|
ReservesCountDay(day){
|
|
|
|
App.Reserve.ReservesCountDay({
|
|
|
|
sid:this.sellerid,
|
|
|
|
day:day
|
|
|
|
}).then(res=>{
|
|
|
|
|
|
|
|
let ReservesTotal=0;
|
|
|
|
let ReservesCountDay={};
|
|
|
|
if(res.ret==200){
|
|
|
|
ReservesCountDay=res.data;
|
|
|
|
Object.keys(res.data).forEach(k=>{
|
|
|
|
if(res.data[k]!=-1){
|
|
|
|
ReservesTotal+=parseInt(res.data[k])
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
ReservesTotal:ReservesTotal,
|
|
|
|
ReservesCountDay:ReservesCountDay,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
ReservesCountMonth(month){
|
|
|
|
App.Reserve.ReservesCountMonth({
|
|
|
|
sid:this.sellerid,
|
|
|
|
month:month
|
|
|
|
}).then(res=>{
|
|
|
|
let ReservesCountMonth=[];
|
|
|
|
if(res.ret==200){
|
|
|
|
res.data.forEach(v=>{
|
|
|
|
ReservesCountMonth.push(v>=1?1:0)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
ReservesCountMonth:ReservesCountMonth,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
clickMonth(e){
|
|
|
|
this.ReservesCountMonth(e.detail.currentYear+'-'+e.detail.currentMonth);
|
|
|
|
}
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|