Commit 8f84ecc37d4b9575c92b29d36b6869538749805a

Authored by liuxuqinfhp1220
1 parent 200a5e5b

no message

... ... @@ -129,10 +129,12 @@ Component({
overdate:thistimestamp<(new Date()/1000)-86400 ? true : false, //日期是否过期,
}
if(thisdate==this.today.curdate){
thisdayobj.automark=true;
thisdayobj.istoday=true;
thisdayobj.mark='今'
}
if(util.unixtoTime(this.today.curtimestamp+86400,'YYYY-MM-DD')==thisdate){
thisdayobj.automark=true;
thisdayobj.mark='明'
}
thisdayobj.isselected=this.data.date==thisdate ? true : false;
... ... @@ -239,6 +241,19 @@ Component({
let daylist=this.data.daylist;
daylist.forEach((v,i)=>{
v.list.forEach((r,n)=>{
if(r.mark){
if(r.automark){
if(r.mark!='今' || r.mark!='明'){
if(r.mark.istoday){
r.mark='今'
}else{
r.mark='明'
}
}
}else{
r.mark=null
}
}
marklist.forEach((r1,n1)=>{
if(r.date && r1.date==r.date){
r.mark=r1.mark
... ...
... ... @@ -16,20 +16,20 @@ Component({
marklist:[]
},
attached(){
this.marklist=[];
this.setData({
date:util.unixtoTime(new Date()/1000,'YYYY-MM-DD')
})
this.showYearMonth=this.getshowmonth();
this.gethousefulldate(this.data.seller,this.showYearMonth);
this.getFillDate(this.data.seller,this.showYearMonth);
this.triggerEvent('tellselectdate',{date:util.unixtoTime(new Date()/1000,'YYYY-MM-DD'),action:'defalut'});
},
observers: {
'setroom'(newsetroom){
console.log('calendar-room',newsetroom)
if(newsetroom && newsetroom.id){
this.marklist=[];
this.gethousefulldate(this.data.seller,this.showYearMonth);
this.getFillDate(this.data.seller,this.showYearMonth);
}
}
},
... ... @@ -48,7 +48,6 @@ Component({
this.showYearMonth=e.detail;
if(e.detail.action='click'){
this.gethousefulldate(this.data.seller,this.showYearMonth);
this.getFillDate(this.data.seller,this.showYearMonth);
}
},
//根据指定年份月份获取当月满房的日期
... ... @@ -61,19 +60,18 @@ Component({
App.Customer.GetHouseFullDate(parmdata).then((json)=>{
console.log(json)
if(json.ret==200){
let marklist=this.marklist;
console.log(marklist)
if(json.data && json.data.length>0){
let marklist=this.data.marklist;
json.data.forEach((v,i)=>{
marklist.push({
date:v,
mark:'满'
})
})
this.setData({
marklist:marklist
})
this.marklist=marklist;
}
this.getFillDate(seller,showYearMonth);
}
})
},
... ... @@ -84,18 +82,20 @@ Component({
date:showYearMonth.showyear+'-'+(showYearMonth.showmonth<10 ? '0'+showYearMonth.showmonth : showYearMonth.showmonth)
}
App.Customer.GetTableFillUpDate(parmdata).then((json)=>{
if(json.data && json.data.length>0){
let marklist=this.data.marklist;
if(json.ret==200){
let marklist=this.marklist;
json.data.forEach((v,i)=>{
marklist.push({
date:v,
mark:'置'
})
})
this.marklist=marklist;
this.setData({
marklist:marklist
marklist:this.marklist
})
}
})
},
tellselectdate(e){
... ...
<nav id="nav">订座</nav>
<nav id="nav">{{seller.sellername}}</nav>
<block wx:if="{{seller && seller.id}}">
<calendar seller="{{seller}}" date="{{reserveDate}}" bindtellselectdate="selectdate" setroom="{{reserveRoom}}"></calendar>
<view style="height:40rpx;"></view>
... ...