Przeglądaj źródła

周薪打卡的bug修改

15555599100 5 lat temu
rodzic
commit
c9377da13a
26 zmienionych plików z 228 dodań i 149 usunięć
  1. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户.png
  2. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户@2x.png
  3. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户@3x.png
  4. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频.png
  5. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频@2x.png
  6. BIN
      HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频@3x.png
  7. 0 1
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInAuthView.h
  8. 3 2
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInAuthView.m
  9. 7 16
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInInfoView.m
  10. 0 1
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInRuleView.h
  11. 3 9
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInRuleView.m
  12. 3 8
      HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInStateView.m
  13. 9 5
      HappyJob/HappyJob/CClass/ClockIn_打卡/ViewController/HJClockInSuccessViewController.m
  14. 158 92
      HappyJob/HappyJob/CClass/ClockIn_打卡/ViewController/HJClockInViewController.m
  15. 2 0
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/Model/HJClockInStatisticDataModel.h
  16. 10 1
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/Model/HJClockInStatisticDataModel.m
  17. 3 0
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/StatisticDetailView/HJClockInStatisticDetailInfoView.m
  18. 1 1
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/StatisticView/HJClockInStatisticDayView.m
  19. 1 0
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/日历模块/ClockInCalendarView.m
  20. 3 3
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/ViewController/HJClockInStatisticDetailViewController.m
  21. 1 1
      HappyJob/HappyJob/CClass/ClockIn_打卡/统计/ViewController/HJClockInStatisticViewController.m
  22. 20 5
      HappyJob/HappyJob/CClass/ClockIn_打卡/规则/ViewController/HJClockInRuleViewController.m
  23. 1 1
      HappyJob/HappyJob/Custom/Components/CustomControl/UIView/控制面板/HJConfirmPanelViewController.m
  24. 1 1
      HappyJob/HappyJob/HappyJob.entitlements
  25. 1 1
      HappyJob/HappyJob/Info.plist
  26. 1 1
      HappyJob/HappyJob/Login_登录/ViewController/HJLoginPhoneViewController.m

BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户.png


BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户@2x.png


BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockIn_auth_icon.imageset/打卡_认证用户@3x.png


BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频.png


BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频@2x.png


BIN
HappyJob/HappyJob/Assets.xcassets/ClockIn/clockin_video.imageset/打卡_视频@3x.png


+ 0 - 1
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInAuthView.h

@@ -27,7 +27,6 @@ typedef NS_ENUM(NSUInteger, HJClockInAuthStateType) {
 @property (nonatomic, strong) UILabel     *promptLabel;
 @property (nonatomic, strong) UIButton    *authenticationBtn;
 @property (nonatomic, strong) UIButton    *ruleBtn;
-
 @property (nonatomic, assign) HJClockInAuthStateType type;
 
 @end

+ 3 - 2
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInAuthView.m

@@ -72,6 +72,7 @@
         
         make.top.equalTo(self.authenticationView.mas_bottom).offset(10);
         make.left.bottom.right.equalTo(self.middleView).offset(0);
+        make.height.mas_equalTo(HJHorizontalScale(125));
     }];
 }
 
@@ -118,7 +119,7 @@
     {
         _authenticationView = [[UIView alloc] init];
         _authenticationView.backgroundColor = [UIColor whiteColor];
-        _authenticationView.layer.cornerRadius = 16;
+        _authenticationView.layer.cornerRadius = 8;
         _authenticationView.layer.masksToBounds = YES;
     }
     return _authenticationView;
@@ -175,7 +176,7 @@
     if (_ruleBtn == nil)
     {
         _ruleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
-        [_ruleBtn setImage:[UIImage imageNamed:@"clockin_video"] forState:UIControlStateNormal];
+        [_ruleBtn setBackgroundImage:[UIImage imageNamed:@"clockin_video"] forState:UIControlStateNormal];
     }
     return _ruleBtn;
 }

+ 7 - 16
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInInfoView.m

@@ -30,14 +30,15 @@
 
     [self.naviBgImageV addSubview:self.promptLabel];
     
-    [self.naviBgImageV addSubview:self.buttonView];
+    [self addSubview:self.buttonView];
     [self.buttonView addSubview:self.statisticsButton];
     [self.buttonView addSubview:self.ruleButton];
     [self.buttonView addSubview:self.serviceButton];
     
     [self.naviBgImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
-        make.left.top.right.bottom.offset(0);
+        make.left.top.right.offset(0);
+        make.bottom.equalTo(self.mas_bottom).offset(-20);
     }];
     
     //本周工时
@@ -48,7 +49,7 @@
     }];
     [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(self.timeTitleLabel);
-        make.top.equalTo(self.timeTitleLabel.mas_bottom).offset(10);
+        make.top.equalTo(self.timeTitleLabel.mas_bottom).offset(8);
     }];
 
     
@@ -76,8 +77,8 @@
 
         make.left.equalTo(self.naviBgImageV.mas_left).offset(15);
         make.right.equalTo(self.naviBgImageV.mas_right).offset(-15);
-        make.top.equalTo(self.promptLabel.mas_bottom).offset(10);
-        make.bottom.equalTo(self.naviBgImageV.mas_bottom).offset(0);
+        make.top.equalTo(self.promptLabel.mas_bottom).offset(30);
+        make.bottom.equalTo(self.mas_bottom).offset(0);
     }];
 
     // 三等分布局
@@ -89,14 +90,6 @@
          make.bottom.equalTo(self.buttonView.mas_bottom).offset(-14);
      }];
     
-    self.buttonView.layer.shadowColor = [UIColor lightGrayColor].CGColor;
-    self.buttonView.layer.shadowOffset = CGSizeMake(0, 2);
-    self.buttonView.layer.shadowOpacity = 0.8;
-    self.buttonView.layer.shadowRadius = 5.0;
-    
-    self.timeLabel.attributedText = [self attributedText:@"0小时" DINCondensedBlod:@"0"];
-    self.advanceLabel.attributedText = [self attributedText:@"0元" DINCondensedBlod:@"0"];
-    
 }
 
 - (NSMutableAttributedString *)attributedText:(NSString *)text DINCondensedBlod:(NSString *)blodText {
@@ -216,8 +209,7 @@
     {
         _buttonView = [[UIView alloc] init];
         _buttonView.backgroundColor = [UIColor whiteColor];
-        _buttonView.layer.cornerRadius = 16;
-        _buttonView.layer.masksToBounds = YES;
+        _buttonView.layer.cornerRadius = 8;
     }
     return _buttonView;
 }
@@ -226,7 +218,6 @@
     if (_statisticsButton == nil)
     {
         _statisticsButton = [self createButtonWithTitle:@"统计" imageNamed:@"clockin_statistics"];
-        
     }
     return _statisticsButton;
 }

+ 0 - 1
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInRuleView.h

@@ -14,7 +14,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, strong) UIButton *ruleButton;
 
-
 @end
 
 NS_ASSUME_NONNULL_END

+ 3 - 9
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInRuleView.m

@@ -19,16 +19,10 @@
            
             make.left.equalTo(self.mas_left).offset(15);
             make.right.equalTo(self.mas_right).offset(-15);
-            make.bottom.equalTo(self.mas_bottom).offset(-10);
             make.top.equalTo(self.mas_top).offset(0);
-            make.height.mas_equalTo(124);
+            make.bottom.equalTo(self.mas_bottom).offset(-30);
+            make.height.mas_equalTo(HJHorizontalScale(125));
         }];
-        
-        self.ruleButton.layer.shadowColor = [UIColor lightGrayColor].CGColor;
-        self.ruleButton.layer.shadowOffset = CGSizeMake(0, 2);
-        self.ruleButton.layer.shadowOpacity = 0.8;
-        self.ruleButton.layer.shadowRadius = 5.0;
-        
     }
     return self;
 }
@@ -41,7 +35,7 @@
     {
         _ruleButton = [UIButton buttonWithType:UIButtonTypeCustom];
         _ruleButton.imageView.contentMode = UIViewContentModeScaleAspectFit;
-        [_ruleButton setImage:[UIImage imageNamed:@"clockin_video"] forState:UIControlStateNormal];
+        [_ruleButton setBackgroundImage:[UIImage imageNamed:@"clockin_video"] forState:UIControlStateNormal];
     }
     return _ruleButton;
     

+ 3 - 8
HappyJob/HappyJob/CClass/ClockIn_打卡/View/HJClockInStateView.m

@@ -95,10 +95,6 @@
         make.size.mas_equalTo(CGSizeMake(HJXVerticalScale(130), HJXVerticalScale(130)));
     }];
     
-    self.bgView.layer.shadowColor = [UIColor lightGrayColor].CGColor;
-    self.bgView.layer.shadowOffset = CGSizeMake(0, 2);
-    self.bgView.layer.shadowOpacity = 0.8;
-    self.bgView.layer.shadowRadius = 5.0;
 }
 
 - (void)setStateType:(HJClockInStateType)stateType {
@@ -129,7 +125,6 @@
             {//上班打卡完成,下班打卡还没开始
                 [self.clockInButton setImage:[UIImage imageNamed:@"clockOut_disable"] forState:UIControlStateNormal];
                 self.promptView.icon.image = [UIImage imageNamed:@"clockIn_state_warning"];
-//                self.promptView.textLabel.text = @"上班6小时候才能进行上班打卡";               
                 [self afterWork];
             }
             break;
@@ -328,7 +323,7 @@
     {
         _bgView = [[UIView alloc] init];
         _bgView.backgroundColor = [UIColor whiteColor];
-        _bgView.layer.cornerRadius = 16;
+        _bgView.layer.cornerRadius = 8;
     }
     return _bgView;
 }
@@ -338,7 +333,7 @@
     {
         _goWorkView = [[UIView alloc] init];
         _goWorkView.backgroundColor = COLOR_F5F5F5;
-        _goWorkView.layer.cornerRadius = 5;
+        _goWorkView.layer.cornerRadius = 4;
     }
     return _goWorkView;
 }
@@ -371,7 +366,7 @@
     {
         _afterWorkView = [[UIView alloc] init];
         _afterWorkView.backgroundColor = COLOR_F5F5F5;
-        _afterWorkView.layer.cornerRadius = 5;
+        _afterWorkView.layer.cornerRadius = 4;
     }
     return _afterWorkView;
 }

+ 9 - 5
HappyJob/HappyJob/CClass/ClockIn_打卡/ViewController/HJClockInSuccessViewController.m

@@ -49,17 +49,16 @@
         make.left.right.offset(0);
     }];
 }
+- (UIStatusBarStyle)preferredStatusBarStyle{
 
+    return UIStatusBarStyleDefault;
+}
 #pragma mark - setter and getter
 
 - (void)setSuccessType:(HJClockInSuccessType)successType {
     
     HJClockInInfoModel *model = [HJClockInInfoModel yy_modelWithDictionary:self.dataDict];
     
-    self.successView.advanceLabel.text = [NSString stringWithFormat:@"累计预支%@元",model.sumMoney];
-    
-    self.successView.advanceLabel.attributedText = [self.successView attributedText:self.successView.advanceLabel.text DINCondensedBlod:model.sumMoney DINCondensedBlod:@"" sizeFont:29];
-    
     switch (successType) {
             
             case HJClockInSuccessTypeGoWork:
@@ -67,14 +66,19 @@
                 self.successView.clockInTimeLabel.text = [HJAppService time_timestampToString:model.startPunchClock withType:kTimeStampDateOnlyHMS];
                 self.successView.titleLabel.text = @"上班打卡成功";
                 self.successView.promptLabel.text = @"新的一天开始啦! \n今天的你也要光芒万丈!记得下班也要打卡哦!";
-                self.successView.promptLabel.attributedText = [self.successView attributedText:self.successView.promptLabel.text DINCondensedBlod:@"" DINCondensedBlod:@"" sizeFont:21];
+//                self.successView.promptLabel.attributedText = [self.successView attributedText:self.successView.promptLabel.text DINCondensedBlod:@"" DINCondensedBlod:@"" sizeFont:21];
             }
             break;
             
             case HJClockInSuccessTypeAfterWork:
             {
+                self.successView.advanceLabel.text = [NSString stringWithFormat:@"累计预支%@元",model.sumMoney];
+                self.successView.advanceLabel.attributedText = [self.successView attributedText:self.successView.advanceLabel.text DINCondensedBlod:model.sumMoney DINCondensedBlod:@"" sizeFont:29];
+                
                 self.successView.clockInTimeLabel.text = [HJAppService time_timestampToString:model.endPunchClock withType:kTimeStampDateOnlyHMS];
+                
                 self.successView.titleLabel.text = @"下班打卡成功";
+                
                 self.successView.promptLabel.text = [NSString stringWithFormat:@"今日打卡已完成,打卡时长%@小时, \n可预支工资%@元。明天也要努力哦!",model.duration,model.todayMoney];
                 self.successView.promptLabel.attributedText = [self.successView attributedText:self.successView.promptLabel.text DINCondensedBlod:model.duration ? model.duration:@"0" DINCondensedBlod:model.todayMoney ? model.todayMoney:@"0" sizeFont:21];
             }

+ 158 - 92
HappyJob/HappyJob/CClass/ClockIn_打卡/ViewController/HJClockInViewController.m

@@ -22,12 +22,14 @@
 #import "HJClockInAPI.h"//打卡
 #import "HJClockInInfoModel.h"
 #import "HJClockInDataBox.h"
+#import <CoreLocation/CLLocationManager.h>
 
 @interface HJClockInViewController ()
 <
 FBScrollLayoutViewDelegate,
 FBAPIManagerInterceptor,
-FBAPIManagerDelegate
+FBAPIManagerDelegate,
+UIScrollViewDelegate
 >
 
 @property (nonatomic, strong) FBScrollLayoutView   *scrollLayoutView;
@@ -65,10 +67,36 @@ FBAPIManagerDelegate
 }
 
 - (void)viewDidLoad {
+    
     [super viewDidLoad];
     
-    self.view.backgroundColor = COLOR_F5F5F5;
+    self.view.backgroundColor = [UIColor whiteColor];
     [self locationShowLoading:NO clockInAPI:NO];
+    self.edgesForExtendedLayout = UIRectEdgeNone;
+    [self locationPermissionJudgment];
+}
+
+#pragma mark - Private methods
+
+/*  设置状态了为白色 */
+- (UIStatusBarStyle)preferredStatusBarStyle{
+
+    return UIStatusBarStyleLightContent;
+}
+
+/* 定位权限判断 */
+- (void)locationPermissionJudgment {
+    
+    if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied)
+    {
+        HJConfirmPanelViewController *vc = [[HJConfirmPanelViewController alloc] init];
+        vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
+        vc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
+        self.navigationController.definesPresentationContext = NO;
+        [vc title:@"请前往设置打开用户定位权限" cancelTitle:@"取消" confirmTitle:@"确认" singleTitle:@"" hiddenSingleButton:YES];
+        [vc.confirmButton addTarget:self action:@selector(confirmButtonAction:) forControlEvents:UIControlEventTouchUpInside];
+        [self presentViewController:vc animated:YES completion:nil];
+    }
 }
 
 /* 添加视图 */
@@ -100,7 +128,7 @@ FBAPIManagerDelegate
     }
 }
 
-/* 定位 */
+/* 定位,请求信息 */
 - (void)locationShowLoading:(BOOL)show clockInAPI:(BOOL)clockIn {
 
     if (show)
@@ -127,33 +155,126 @@ FBAPIManagerDelegate
             }
             else
             { //打卡信息
-                [self clockIninfoAPI];
+                [self requestClockIninfo];
             }
         }
         else
         {
-            [self.view fb_showFailureWithStatus:@"获取位置失败"];
             [self showErrorView];
             [self.view fb_dismiss];
+            [self.view fb_showFailureWithStatus:@"获取位置失败"];
+            [self locationPermissionJudgment];
+            self.stateView.clockInButton.userInteractionEnabled = YES;
         }
     }];
 }
 
 /* 请求打卡信息  */
-- (void)clockIninfoAPI {
+- (void)requestClockIninfo {
     
     self.clockInInfoAPI.latitude = self.latitude;
     self.clockInInfoAPI.longitude = self.longitude;
     [self.clockInInfoAPI start];
 }
 
+/* 显示错误页面 */
+- (void)showErrorView {
+    
+    [self.view showErrorView];
+    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonAction:) forControlEvents:UIControlEventTouchUpInside];
+}
+
+/* 打卡的按钮的状态 */
+- (void)clockInButtonState {
+    
+    self.infoView.timeLabel.attributedText = [self.infoView attributedText:[NSString stringWithFormat:@"%@ 小时",self.infoModel.sumDuration] DINCondensedBlod:self.infoModel.sumDuration];
+    
+    self.infoView.advanceLabel.attributedText = [self.infoView attributedText:[NSString stringWithFormat:@"%.2f 元",[self.infoModel.sumMoney floatValue]] DINCondensedBlod:[NSString stringWithFormat:@"%.2f",[self.infoModel.sumMoney floatValue]]];
+    
+    //上班打卡时间
+    if ([self.infoModel.startPunch isEqualToString:@"未完成"])
+    {
+        self.stateView.goWorkStateView.textLabel.text = self.infoModel.startPunch;
+    }
+    else
+    {
+        self.stateView.goWorkStateView.textLabel.text = [HJAppService time_timestampToString:self.infoModel.startPunch withType:kTimeStampDateOnlyHMS];
+    }
+    
+    //下班打卡时间
+    if ([self.infoModel.endPunch isEqualToString:@"未完成"])
+    {
+        self.stateView.afterWorkStateView.textLabel.text = self.infoModel.endPunch;
+    }
+    else
+    {
+        self.stateView.afterWorkStateView.textLabel.text = [HJAppService time_timestampToString:self.infoModel.endPunch withType:kTimeStampDateOnlyHMS];
+    }
+
+    if (self.infoModel.authenticationStatus == 1)
+    {//1:等待认证
+        self.stateView.stateType = HJClockInStateTypeAuthing;
+    }
+    else
+    {
+        if ([self.infoModel.clockType integerValue] == 1)
+        {
+            self.stateView.stateType = HJClockInStateTypeGoWork;
+        }
+        
+        if ([self.infoModel.clockType integerValue] == 1 && ![self.infoModel.startPunch  isEqualToString: @"未完成"])
+        {
+            self.stateView.stateType = HJClockInStateTypeGoWorkComplete;
+            self.stateView.promptView.textLabel.text = [NSString stringWithFormat:@"上班%@小时后才能进行上班打卡",self.infoModel.dailyAvailableMinHour];
+        }
+        
+        if ([self.infoModel.clockType integerValue] == 2)
+        {
+            self.stateView.stateType = HJClockInStateTypeAfterWork;
+        }
+        
+        if ([self.infoModel.clockType integerValue] == 3)
+        {
+            if ([self.infoModel.startPunch isEqualToString:@"未完成"])
+            {
+                self.stateView.stateType = HJClockInStateTypeGoWorkOutOfRange;
+            }
+            else
+            {
+                self.stateView.stateType = HJClockInStateTypeAfterWorkOutOfRange;
+            }
+        }
+        
+        if ([self.infoModel.clockType integerValue] == 4)
+        {
+            self.stateView.stateType = HJClockInStateTypeComplete;
+            self.stateView.wageView.moneyLabel.text = self.infoModel.todayMoney;
+        }
+    }
+}
+
+#pragma mark - UIScrollViewDelegate
+
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
+    
+    if (scrollView.contentOffset.y <= 0)
+    {
+        [_scrollLayoutView az_setGradientBackgroundWithColors:@[[UIColor colorFromHexString:@"016DFF"],[UIColor colorFromHexString:@"0254FF"]] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
+    }
+    else
+    {
+        [_scrollLayoutView az_setGradientBackgroundWithColors:@[COLOR_F5F5F5,COLOR_F5F5F5] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
+    }
+}
+
 #pragma mark - FBScrollLayoutViewDelegate
 
 - (void)scrollLayoutViewMakeConstraints:(FBScrollLayoutView *)scrollLayoutView {
     
     [scrollLayoutView mas_makeConstraints:^(MASConstraintMaker *make) {
         
-        make.left.right.top.bottom.equalTo(self.view).offset(0);
+        make.left.right.top.equalTo(self.view).offset(0);
+        make.bottom.equalTo(self.view.mas_bottom).offset(0);
     }];
 }
 
@@ -205,6 +326,7 @@ FBAPIManagerDelegate
     }
     if (manager == self.clockInAPI)
     {//打卡成功
+        self.stateView.clockInButton.userInteractionEnabled = YES;
         HJClockInSuccessViewController *successVC = [[HJClockInSuccessViewController alloc] init];
         successVC.dataDict = [manager fetchDataWithBox:self.dataBox];
         if (self.stateView.stateType == HJClockInStateTypeGoWork)
@@ -217,7 +339,10 @@ FBAPIManagerDelegate
         }
         successVC.modalPresentationStyle = UIModalPresentationFullScreen;
         [self presentViewController:successVC animated:YES completion:nil];
-        [self clockIninfoAPI];//打卡成功更新数据
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1*NSEC_PER_SEC)),dispatch_get_main_queue(), ^{
+            
+            [self requestClockIninfo];//打卡成功更新数据
+        });
     }
 }
 
@@ -229,7 +354,8 @@ FBAPIManagerDelegate
     }
     if (manager == self.clockInAPI)
     {
-        [self clockIninfoAPI];//打卡成功更新数据
+        [self requestClockIninfo];//打卡成功更新数据
+        self.stateView.clockInButton.userInteractionEnabled = YES;
     }
     
     id fetchData = [manager fetchDataWithBox:self.dataBox];
@@ -239,84 +365,6 @@ FBAPIManagerDelegate
     }
 }
 
-#pragma mark - Private methods
-
-/* 显示错误页面 */
-- (void)showErrorView {
-    
-    [self.view showErrorView];
-    [self.view.errorView.refreshButton addTarget:self action:@selector(refreshButtonAction:) forControlEvents:UIControlEventTouchUpInside];
-}
-
-/* 打卡的按钮的状态 */
-- (void)clockInButtonState {
-    
-    self.infoView.timeLabel.attributedText = [self.infoView attributedText:[NSString stringWithFormat:@"%@小时",self.infoModel.sumDuration] DINCondensedBlod:self.infoModel.sumDuration];
-    
-    self.infoView.advanceLabel.attributedText = [self.infoView attributedText:[NSString stringWithFormat:@"%@元",self.infoModel.sumMoney] DINCondensedBlod:self.infoModel.sumMoney];
-    
-    //上班打卡时间
-    if ([self.infoModel.startPunch isEqualToString:@"未完成"])
-    {
-        self.stateView.goWorkStateView.textLabel.text = self.infoModel.startPunch;
-    }
-    else
-    {
-        self.stateView.goWorkStateView.textLabel.text = [HJAppService time_timestampToString:self.infoModel.startPunch withType:kTimeStampDateOnlyHMS];
-    }
-    
-    //下班打卡时间
-    if ([self.infoModel.endPunch isEqualToString:@"未完成"])
-    {
-        self.stateView.afterWorkStateView.textLabel.text = self.infoModel.endPunch;
-    }
-    else
-    {
-        self.stateView.afterWorkStateView.textLabel.text = [HJAppService time_timestampToString:self.infoModel.endPunch withType:kTimeStampDateOnlyHMS];
-    }
-
-    if (self.infoModel.authenticationStatus == 1)
-    {//1:等待认证
-        self.stateView.stateType = HJClockInStateTypeAuthing;
-    }
-    else
-    {
-        if ([self.infoModel.clockType integerValue] == 1)
-        {
-            self.stateView.stateType = HJClockInStateTypeGoWork;
-        }
-        
-        if ([self.infoModel.clockType integerValue] == 1 && ![self.infoModel.startPunch  isEqualToString: @"未完成"])
-        {
-            self.stateView.stateType = HJClockInStateTypeGoWorkComplete;
-            self.stateView.promptView.textLabel.text = [NSString stringWithFormat:@"上班%@小时后才能进行上班打卡",self.infoModel.dailyAvailableMinHour];
-        }
-        
-        if ([self.infoModel.clockType integerValue] == 2)
-        {
-            self.stateView.stateType = HJClockInStateTypeAfterWork;
-        }
-        
-        if ([self.infoModel.clockType integerValue] == 3)
-        {
-            if ([self.infoModel.startPunch isEqualToString:@"未完成"])
-            {
-                self.stateView.stateType = HJClockInStateTypeGoWorkOutOfRange;
-            }
-            else
-            {
-                self.stateView.stateType = HJClockInStateTypeAfterWorkOutOfRange;
-            }
-        }
-        
-        if ([self.infoModel.clockType integerValue] == 4)
-        {
-            self.stateView.stateType = HJClockInStateTypeComplete;
-            self.stateView.wageView.moneyLabel.text = self.infoModel.todayMoney;
-        }
-    }
-}
-
 #pragma mark - Notification
 
 - (void)realNameNotification:(NSNotification *)notification {
@@ -337,6 +385,22 @@ FBAPIManagerDelegate
 
 #pragma mark - event
 
+- (void)confirmButtonAction:(UIButton *)btn {
+    
+    [self dismissViewControllerAnimated:YES completion:nil];
+    NSURL *url= [NSURL URLWithString:UIApplicationOpenSettingsURLString];
+    if( [[UIApplication sharedApplication]canOpenURL:url] )
+    {
+        if (@available(iOS 10.0, *))
+        {
+            [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
+        }
+        else
+        {
+            [[UIApplication sharedApplication]openURL:url];
+        }
+    }
+}
 /* 错误刷新 */
 - (void)refreshButtonAction:(UIButton *)btn {
     
@@ -355,9 +419,8 @@ FBAPIManagerDelegate
 - (void)statisticsButtonClick:(UIButton *)btn {
     
     HJClockInStatisticViewController *statisticsVC = [[HJClockInStatisticViewController alloc] init];
-    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:statisticsVC];
-    navi.modalPresentationStyle = UIModalPresentationOverFullScreen;
-    [self presentViewController:navi animated:YES completion:nil];
+    statisticsVC.hidesBottomBarWhenPushed = YES;
+    [self.navigationController pushViewController:statisticsVC animated:YES];
 }
 
 /* 规则 */
@@ -381,12 +444,14 @@ FBAPIManagerDelegate
     
     if (self.stateView.stateType == HJClockInStateTypeGoWork)
     {
+        self.stateView.clockInButton.userInteractionEnabled = NO;
         self.clockInAPI.clockType = @"1";
         self.clockInAPI.wsPunchClockId = @"";
         [self locationShowLoading:YES clockInAPI:YES];
     }
     if (self.stateView.stateType == HJClockInStateTypeAfterWork)
     {
+        self.stateView.clockInButton.userInteractionEnabled = NO;
         self.clockInAPI.clockType = @"2";
         self.clockInAPI.wsPunchClockId = self.infoModel.wsPunchClockId;
         [self locationShowLoading:YES clockInAPI:YES];
@@ -414,9 +479,10 @@ FBAPIManagerDelegate
     {
         _scrollLayoutView = [[FBScrollLayoutView alloc] init];
         _scrollLayoutView.delegate = self;
-        _scrollLayoutView.backgroundColor = COLOR_F5F5F5;
+        [_scrollLayoutView az_setGradientBackgroundWithColors:@[COLOR_F5F5F5,COLOR_F5F5F5] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
         _scrollLayoutView.contentView.backgroundColor = COLOR_F5F5F5;
         _scrollLayoutView.scrollView.mj_header = self.refreshHeader;
+        _scrollLayoutView.scrollView.delegate = self;
         // 去除顶部空白
         if (@available(iOS 11.0, *))
         {
@@ -426,7 +492,6 @@ FBAPIManagerDelegate
         {
             self.automaticallyAdjustsScrollViewInsets = NO;
         }
-        self.edgesForExtendedLayout = UIRectEdgeNone;
     }
     return _scrollLayoutView;
 }
@@ -514,6 +579,7 @@ FBAPIManagerDelegate
     if (_refreshHeader == nil)
     {
         _refreshHeader = [HJRefreshHeaderView headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
+        _refreshHeader.backgroundColor = [UIColor clearColor];
     }
     return _refreshHeader;
 }

+ 2 - 0
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/Model/HJClockInStatisticDataModel.h

@@ -17,9 +17,11 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) NSInteger        day;//日
 @property (nonatomic, copy)   NSString         *today;
 
+@property (nonatomic, strong) NSArray          *yearsArray;
 @property (nonatomic, strong) NSArray          *monthArray;
 @property (nonatomic, strong) NSArray          *weekArray;
 
+
 - (instancetype)initWithServicerDate:(NSString *)date;
 
 

+ 10 - 1
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/Model/HJClockInStatisticDataModel.m

@@ -42,6 +42,10 @@
     
     NSMutableArray *array = [NSMutableArray array];
     [array addObject:[NSString stringWithFormat:@"%ld-%02ld",(long)_year,(long)_month]];
+    
+    NSMutableArray *monthArray = [NSMutableArray array];
+    [monthArray addObject:[NSString stringWithFormat:@"%ld月",(long)_month]];
+    
     _month = _month - 1;
     _day = _day - 1;
     if (_month == 0)
@@ -50,7 +54,12 @@
         _year = _year - 1;
     }
     [array addObject:[NSString stringWithFormat:@"%ld-%02ld",(long)_year,(long)_month]];
-    self.monthArray = [[array reverseObjectEnumerator] allObjects];
+    
+    [monthArray addObject:[NSString stringWithFormat:@"%ld月",(long)_month]];
+    
+    self.monthArray = [[monthArray reverseObjectEnumerator] allObjects];
+    self.yearsArray = [[array reverseObjectEnumerator] allObjects];
+    
 }
 
 - (void)currentWeek {

+ 3 - 0
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/StatisticDetailView/HJClockInStatisticDetailInfoView.m

@@ -54,6 +54,9 @@
         make.left.equalTo(self.headerIcon.mas_right).offset(20);
         make.bottom.equalTo(self.headerIcon.mas_bottom).offset(-5);
     }];
+    
+    self.headerIcon.layer.cornerRadius = 25;
+    self.headerIcon.layer.masksToBounds = YES;
 }
 
 #pragma mark - lazy

+ 1 - 1
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/StatisticView/HJClockInStatisticDayView.m

@@ -53,7 +53,7 @@
     [self initSubViews];
     NSArray *clockListArray = [NSArray arrayWithArray:dataDict[@"punckClockList"]];
     _ruleLabel.text = [NSString stringWithFormat:@"规则:自由上下班打卡 00:00-24:00 \n当日打卡%lu次,工时%@小时",(unsigned long)clockListArray.count,dataDict[@"currentDuration"]];
-    _wageView.moneyLabel.text = [NSString stringWithFormat:@"%@",dataDict[@"nextMoney"]];
+    _wageView.moneyLabel.text = [NSString stringWithFormat:@"%.2f",[dataDict[@"nextMoney"] floatValue]];
     
     if (clockListArray.count == 0)
     {

+ 1 - 0
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/View/日历模块/ClockInCalendarView.m

@@ -85,6 +85,7 @@
         cell.dateLable.textColor = [UIColor whiteColor];
         self.lastInexPath = indexPath;
         self.selectDayBlock(model.date);
+        self.viewModel.today = @"";
     }
 }
 

+ 3 - 3
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/ViewController/HJClockInStatisticDetailViewController.m

@@ -81,7 +81,7 @@ FBAPIManagerDelegate
 
 - (void)exitClick{
     
-    [self dismissViewControllerAnimated:YES completion:nil];
+    [self.navigationController popToRootViewControllerAnimated:YES];
 }
 
 #pragma mark - FBScrollLayoutViewDelegate
@@ -306,8 +306,8 @@ FBAPIManagerDelegate
     if (_monthView == nil)
     {
         _monthView = [[HJClockInStatisticDetailMonthView alloc]init];
-        _monthView.monthView.contentLabel.text = self.dataModel.monthArray.lastObject;
-        _monthView.monthView.titleArray = self.dataModel.monthArray;
+        _monthView.monthView.contentLabel.text = self.dataModel.yearsArray.lastObject;
+        _monthView.monthView.titleArray = self.dataModel.yearsArray;
         _monthView.monthView.delegate = self;
         _monthView.monthView.leftBtn.tag = 1;
         _monthView.monthView.rightBtn.tag = 2;

+ 1 - 1
HappyJob/HappyJob/CClass/ClockIn_打卡/统计/ViewController/HJClockInStatisticViewController.m

@@ -223,7 +223,7 @@ UIGestureRecognizerDelegate
 
 - (void)deleteBtnClick:(UIButton *)btn {
     
-    [self dismissViewControllerAnimated:YES completion:nil];
+    [self.navigationController popViewControllerAnimated:YES];
 }
 - (void)detailClick:(UITapGestureRecognizer *)tap {
     

+ 20 - 5
HappyJob/HappyJob/CClass/ClockIn_打卡/规则/ViewController/HJClockInRuleViewController.m

@@ -32,12 +32,21 @@ UIGestureRecognizerDelegate
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-
+    
+    [self.navigationController setNavigationBarHidden:YES animated:YES];
     [self makeConstraints];
 }
+- (UIStatusBarStyle)preferredStatusBarStyle{
 
+    return UIStatusBarStyleLightContent;
+}
 - (void)makeConstraints {
     
+    [self.scrollLayoutView.contentView mas_updateConstraints:^(MASConstraintMaker *make) {
+    
+        make.left.top.right.equalTo(self.scrollLayoutView.scrollView).offset(0);
+    }];
+    
     [self.view addSubview:self.scrollLayoutView];
     [self.view addSubview:self.backBtn];
     
@@ -50,6 +59,7 @@ UIGestureRecognizerDelegate
         make.top.equalTo(self.view).offset(STATUS_BAR_H + 10);
         make.width.mas_equalTo(30);
     }];
+
 }
 
 - (void)backButtonAction {
@@ -63,7 +73,8 @@ UIGestureRecognizerDelegate
     
     [scrollLayoutView mas_makeConstraints:^(MASConstraintMaker *make) {
         
-        make.left.right.top.bottom.equalTo(self.view).offset(0);
+        make.left.right.bottom.equalTo(self.view).offset(0);
+        make.top.equalTo(self.view.mas_top).offset(0);
     }];
 }
 
@@ -71,7 +82,9 @@ UIGestureRecognizerDelegate
     
     [self.iconImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
-        make.left.top.right.equalTo(contentView);
+        make.left.right.equalTo(contentView).offset(0);
+        make.top.equalTo(contentView.mas_top).offset(0);
+        make.height.mas_equalTo(HJHorizontalScale(1925));
     }];
     
     [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -87,6 +100,8 @@ UIGestureRecognizerDelegate
     {
         _scrollLayoutView = [[FBScrollLayoutView alloc] init];
         _scrollLayoutView.delegate = self;
+        _scrollLayoutView.scrollView.backgroundColor = [UIColor colorFromHexString:@"007AFF"];
+        _scrollLayoutView.contentView.backgroundColor = [UIColor colorFromHexString:@"007AFF"];
         // 去除顶部空白
         if (@available(iOS 11.0, *))
         {
@@ -94,7 +109,7 @@ UIGestureRecognizerDelegate
         }
         else
         {
-            self.automaticallyAdjustsScrollViewInsets = NO;
+            self.automaticallyAdjustsScrollViewInsets = YES;
         }
     }
     return _scrollLayoutView;
@@ -104,7 +119,7 @@ UIGestureRecognizerDelegate
     if (_iconImageV == nil)
     {
         _iconImageV = [[UIImageView alloc] init];
-        _iconImageV.contentMode = UIViewContentModeScaleAspectFill;
+        _iconImageV.contentMode = UIViewContentModeScaleAspectFit;
         _iconImageV.image = [UIImage imageNamed:@"clockin_rule_icon"];
         _iconImageV.userInteractionEnabled = YES;
     }

+ 1 - 1
HappyJob/HappyJob/Custom/Components/CustomControl/UIView/控制面板/HJConfirmPanelViewController.m

@@ -23,7 +23,7 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     
-    self.view.backgroundColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.6];
+    self.view.backgroundColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:0.5];
     
     [self.view addSubview:self.contentView];
     [self.contentView addSubview:self.titleLabel];

+ 1 - 1
HappyJob/HappyJob/HappyJob.entitlements

@@ -4,7 +4,7 @@
 <dict>
 	<key>com.apple.developer.associated-domains</key>
 	<array>
-		<string>applinks:web.hap-job.com</string>
+		<string>applinks:kf.hap-job.com</string>
 	</array>
 </dict>
 </plist>

+ 1 - 1
HappyJob/HappyJob/Info.plist

@@ -27,7 +27,7 @@
 			<string>weixin</string>
 			<key>CFBundleURLSchemes</key>
 			<array>
-				<string>wxeb8c2418a8ace030</string>
+				<string>wx9c053f7126db0b28</string>
 			</array>
 		</dict>
 		<dict>

+ 1 - 1
HappyJob/HappyJob/Login_登录/ViewController/HJLoginPhoneViewController.m

@@ -98,7 +98,7 @@ FBAPIManagerInterceptor
     [vc.singleButton addTarget:self action:@selector(editButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
     [self presentViewController:vc animated:YES completion:nil];
     
-    self.wechatLoginButton.hidden = YES;
+//    self.wechatLoginButton.hidden = YES;
 }
 
 - (void)editButtonClicked:(UIButton *)btn {