|
|
@@ -68,10 +68,20 @@
|
|
|
}
|
|
|
ClockInCalendarDayModel *model = self.numberCellArray[indexPath.row];
|
|
|
cell.dateLable.text = model.day;
|
|
|
+
|
|
|
if ([self.today isEqualToString:model.date])
|
|
|
{
|
|
|
- cell.dateLable.backgroundColor = COLOR_0177FF;
|
|
|
+ if (model.startPunchClock.length > 0 && model.endPunchClock.length <=0 )
|
|
|
+ {//缺卡
|
|
|
+ cell.dateLable.backgroundColor = [UIColor colorFromHexString:@"FD7235"];
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {//不是缺卡的
|
|
|
+ cell.dateLable.backgroundColor = COLOR_0177FF;
|
|
|
+ }
|
|
|
cell.dateLable.textColor = [UIColor whiteColor];
|
|
|
+ cell.dotView.hidden = NO;
|
|
|
+
|
|
|
self.todayIndexPathBlock(indexPath);
|
|
|
}
|
|
|
else
|
|
|
@@ -92,7 +102,7 @@
|
|
|
{
|
|
|
if (model.endPunchClock.length > 0)
|
|
|
{
|
|
|
- cell.dotView.backgroundColor = [UIColor colorFromHexString:@"BCBCBC"];
|
|
|
+ cell.dotView.backgroundColor = COLOR_0177FF;
|
|
|
cell.borderLayer.strokeColor = [UIColor whiteColor].CGColor;
|
|
|
cell.borderLayer.fillColor = [UIColor clearColor].CGColor;
|
|
|
}
|
|
|
@@ -133,7 +143,10 @@
|
|
|
_month = 12;
|
|
|
_year = _year - 1;
|
|
|
}
|
|
|
- self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+
|
|
|
+// self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+ self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:self.servicerDate]];
|
|
|
+
|
|
|
[self createCellNumber:self.createDate];
|
|
|
}
|
|
|
|
|
|
@@ -148,7 +161,8 @@
|
|
|
_month = 1;
|
|
|
_year = _year + 1;
|
|
|
}
|
|
|
- self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+// self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+ self.createDate = [self.servicerDate dateByAddingTimeInterval:_day*kDay * [self totaldaysInMonth:self.servicerDate]];
|
|
|
[self createCellNumber:self.createDate];
|
|
|
}
|
|
|
|
|
|
@@ -260,7 +274,8 @@
|
|
|
tempYear = _year - 1;
|
|
|
}
|
|
|
|
|
|
- NSDate *lastDate = [[NSDate date] dateByAddingTimeInterval:tempDay*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+// NSDate *lastDate = [[NSDate date] dateByAddingTimeInterval:tempDay*kDay * [self totaldaysInMonth:[NSDate date]]];
|
|
|
+ NSDate *lastDate = [self.servicerDate dateByAddingTimeInterval:tempDay*kDay * [self totaldaysInMonth:self.servicerDate]];
|
|
|
NSRange daysInLastMonth = [[NSCalendar currentCalendar] rangeOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitMonth forDate:lastDate];
|
|
|
return daysInLastMonth.length;
|
|
|
}
|