Commit d9083b55 authored by 曹云霄's avatar 曹云霄

接口调试基本完成,细节调整基本完成(待后台修改筛选接口)

parent 6efbeb44
......@@ -76,6 +76,7 @@
29603D8F1D1CDEA000951670 /* KMDatePickerDateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 29603D8A1D1CDEA000951670 /* KMDatePickerDateModel.m */; };
29603D901D1CDEA000951670 /* NSDate+CalculateDay.m in Sources */ = {isa = PBXBuildFile; fileRef = 29603D8C1D1CDEA000951670 /* NSDate+CalculateDay.m */; };
29603D931D1CDFE500951670 /* DetailTimeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29603D921D1CDFE500951670 /* DetailTimeViewController.m */; };
296D5E5A1FD4DDD200A397D5 /* PatrolTempCheckViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 296D5E591FD4DDD200A397D5 /* PatrolTempCheckViewController.m */; };
2978ED421D1B7CEE00159B4A /* DeleteSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2978ED411D1B7CEE00159B4A /* DeleteSectionView.m */; };
2978ED441D1B7CF600159B4A /* DeleteSectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2978ED431D1B7CF600159B4A /* DeleteSectionView.xib */; };
2978ED481D1BB0BA00159B4A /* PromptTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2978ED471D1BB0BA00159B4A /* PromptTableViewController.m */; };
......@@ -596,6 +597,8 @@
29603D8C1D1CDEA000951670 /* NSDate+CalculateDay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+CalculateDay.m"; sourceTree = "<group>"; };
29603D911D1CDFE500951670 /* DetailTimeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailTimeViewController.h; sourceTree = "<group>"; };
29603D921D1CDFE500951670 /* DetailTimeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailTimeViewController.m; sourceTree = "<group>"; };
296D5E581FD4DDD200A397D5 /* PatrolTempCheckViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PatrolTempCheckViewController.h; sourceTree = "<group>"; };
296D5E591FD4DDD200A397D5 /* PatrolTempCheckViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PatrolTempCheckViewController.m; sourceTree = "<group>"; };
2978ED401D1B7CEE00159B4A /* DeleteSectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeleteSectionView.h; sourceTree = "<group>"; };
2978ED411D1B7CEE00159B4A /* DeleteSectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeleteSectionView.m; sourceTree = "<group>"; };
2978ED431D1B7CF600159B4A /* DeleteSectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DeleteSectionView.xib; sourceTree = "<group>"; };
......@@ -2129,6 +2132,8 @@
29F5C3C31FCBAA4F0052CBF1 /* PatrolStartAnswerConfirmVC.m */,
29F5C3C41FCBAA4F0052CBF1 /* PatrolTaskViewController.h */,
29F5C3C51FCBAA4F0052CBF1 /* PatrolTaskViewController.m */,
296D5E581FD4DDD200A397D5 /* PatrolTempCheckViewController.h */,
296D5E591FD4DDD200A397D5 /* PatrolTempCheckViewController.m */,
);
path = ViewConstrollers;
sourceTree = "<group>";
......@@ -3245,7 +3250,6 @@
352652DC1BCD053E001CB9C3 /* Licence(许可证) */,
352652D21BCCFD5C001CB9C3 /* Repair(报修) */,
352652D11BCCFD5C001CB9C3 /* Pioneering(拓店) */,
35B2E5991BAC159D00AB8582 /* Task */,
35B2E51D1BAC064600AB8582 /* Patrol(巡检) */,
);
path = Business;
......@@ -3445,13 +3449,6 @@
path = AttachmentsView;
sourceTree = "<group>";
};
35B2E5991BAC159D00AB8582 /* Task */ = {
isa = PBXGroup;
children = (
);
path = Task;
sourceTree = "<group>";
};
35B2E5AC1BAC17F800AB8582 /* JTOptions */ = {
isa = PBXGroup;
children = (
......@@ -4128,6 +4125,7 @@
29603D901D1CDEA000951670 /* NSDate+CalculateDay.m in Sources */,
35B2E55D1BAC064600AB8582 /* GTOAllPatrolPlanViewController.m in Sources */,
2941543C1D1D098800B3B761 /* OrderDetailsView.m in Sources */,
296D5E5A1FD4DDD200A397D5 /* PatrolTempCheckViewController.m in Sources */,
35550C2A1BA1195D003D6199 /* ICRCheckBox.m in Sources */,
3506ED481BA0164E00897EBE /* IBTTableViewCellInfo.m in Sources */,
3506EDA01BA0166700897EBE /* JTImagePreviewer.m in Sources */,
......@@ -4281,7 +4279,6 @@
baseConfigurationReference = CFA5B9B7D49DF5246CE1BBC5 /* Pods-total.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = total/total.entitlements;
......@@ -4318,7 +4315,6 @@
baseConfigurationReference = 79DE38EEF10DB014EE707286 /* Pods-total.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = total/total.entitlements;
......
......@@ -144,11 +144,11 @@
},
{
"id": "60",
"name": "巡检管理",
"name": "VI检查管理",
"children": [
{
"id": "6001",
"name": "工程巡检",
"name": "工程VI检查",
"url": "patrol/plan/patrolplan.thor?category=project",
"permissions": [
{
......@@ -165,7 +165,7 @@
},
{
"id": "6002",
"name": "HSE巡检",
"name": "HSEVI检查",
"url": "patrol/plan/patrolplan.thor?category=HSE",
"permissions": [
{
......@@ -305,7 +305,7 @@
"children": [
{
"id" : "5001",
"name": "工程巡检",
"name": "工程VI检查",
"type" : "mobileModule",
"permissions": [
{
......@@ -327,7 +327,7 @@
},
{
"id" : "5002",
"name": "HSE巡检",
"name": "HSEVI检查",
"type" : "mobileModule",
"permissions": [
{
......@@ -460,4 +460,4 @@
}
]
}
]
\ No newline at end of file
]
......@@ -27,6 +27,7 @@
#import "GTOPatrolPlanListViewController.h"
#import "PatrolTaskViewController.h"
#import "InspectionTableViewController.h"
#import "PatrolTempCheckViewController.h"
@interface BusinessViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>
/**
......@@ -93,7 +94,7 @@
@"查看报修"
,@"查看许可证"
,@"许可证审批"
,@"工程巡检", nil];
,@"工程VI检查", nil];
NSDictionary *dict = @{@"image":[imageArray objectAtIndex:i],@"title":[titleArray objectAtIndex:i]};
[_datasArray[1] addObject:dict];
}
......@@ -121,12 +122,12 @@
//VI检查
for (int i=0; i<3; i++) {
NSArray *imageArray = [NSArray arrayWithObjects:
@"function_repairSee_icon"
,@"function_licenceSee_icon"
,@"function_licenceSee_icon",nil];
@"function_vicheck_temp"
,@"function_vicheck"
,@"function_vicheckresult",nil];
NSArray *titleArray = [NSArray arrayWithObjects:
@"VI检查"
,@"临时检查"
@"VI临时检查"
,@"VI检查"
,@"VI检查结果",nil];
NSDictionary *dict = @{@"image":[imageArray objectAtIndex:i],@"title":[titleArray objectAtIndex:i]};
[_datasArray[3] addObject:dict];
......@@ -139,7 +140,7 @@
,nil];
NSArray *titleArray = [NSArray arrayWithObjects:
@"拓站"
,@"HSE巡检",nil];
,@"HSEVI检查",nil];
NSDictionary *dict = @{@"image":[imageArray objectAtIndex:i],@"title":[titleArray objectAtIndex:i]};
[_datasArray[4] addObject:dict];
}
......@@ -253,20 +254,18 @@
//VI检查
NSArray *viExamine = [NSArray arrayWithObjects:
@"500501,500502,500503"
@"500201,500202,500203"
,@"500201,500202,500203"
,@"500201,500202,500203",nil];
//开发、HSE
NSArray *development = [NSArray arrayWithObjects:
@"500501,500502,500503"
,@"500201,500202,500203"
,@"500201,500202,500203",nil];
_permissionsArray = [NSMutableArray arrayWithObjects:general,project,order,viExamine,development, nil];
}
return _permissionsArray;
}
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -441,15 +440,18 @@
[self PushViewController:controller animated:YES];
}
#pragma mark -巡检storyboard跳转
#pragma mark -VI检查storyboard跳转
- (void)patrol_StoryboardPush:(NSIndexPath *)indexPath
{
if (indexPath.item == 2) {
InspectionTableViewController *patrolResultVc = [InspectionTableViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECTRESULT];
[self PushViewController:patrolResultVc animated:YES];
}else {
}else if (indexPath.item == 1) {
PatrolTaskViewController *patrolTask = [PatrolTaskViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECT];
[self PushViewController:patrolTask animated:YES];
}else {
PatrolTempCheckViewController *tempChecKVc = [PatrolTempCheckViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECT];
[self PushViewController:tempChecKVc animated:YES];
}
}
......
......@@ -206,8 +206,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -83,8 +83,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -64,8 +64,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -78,8 +78,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -12,7 +12,7 @@
@interface CustomInspectionTableViewCell : UITableViewCell
/**
巡检问题、答案 数据源
VI检查问题、答案 数据源
*/
@property (nonatomic,strong) NSArray *datasArray;
......
......@@ -19,7 +19,7 @@
return self;
}
#pragma mark - 添加巡检问题、答案控制器
#pragma mark - 添加VI检查问题、答案控制器
- (void)addChildViewController
{
self.inspectionVc = [InspectionAnswerViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECTRESULT];
......
......@@ -24,7 +24,7 @@
@property (nonatomic,weak) id<RefreshDelegate>RefreshDelegate;
/**
巡检问题、答案 数据源
VI检查问题、答案 数据源
*/
@property (nonatomic,strong) NSArray *datasArray;
......
......@@ -14,17 +14,17 @@
@interface InspectionDetailTableViewController : UITableViewController
/**
* 巡检人员
* VI检查人员
*/
@property(nonatomic, strong) Inspectors *inspectorsModel;
/**
* 巡检结果
* VI检查结果
*/
@property(nonatomic, strong) Results *resultsModel;
/**
* 巡检计划UUID
* VI检查计划UUID
*/
@property(nonatomic, copy) NSString *planUuid;
......
......@@ -178,7 +178,7 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
[self getInspectionResultDetails];
}
#pragma mark - 获取巡检计划详情数据
#pragma mark - 获取VI检查计划详情数据
- (void)getInspectionResultDetails
{
@weakify(self);
......
......@@ -19,8 +19,8 @@
* 门店详情
*
* @param indexPath 点击位置
* @param inspectors 巡检
* @param uuid 巡检计划UUID
* @param inspectors VI检查
* @param uuid VI检查计划UUID
*/
- (void)storesClickEvent:(NSIndexPath *)indexPath inspectionPerson:(Inspectors *)inspectors planResults:(Results *)result planUuid:(NSString *)uuid;
......
......@@ -74,9 +74,9 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
//巡检员model
//VI检查员model
Inspectors *inspectorsModel = self.planResultModel.inspectors[indexPath.section];
//门店巡检结果model
//门店VI检查结果model
Results *storeResultsModel = [[self.planResultModel.inspectors[indexPath.section] results] yx_objectAtIndex:indexPath.row];
if ([self.delegate respondsToSelector:@selector(storesClickEvent:inspectionPerson:planResults:planUuid:)]) {
[self.delegate storesClickEvent:indexPath inspectionPerson:inspectorsModel planResults:storeResultsModel planUuid:self.planResultModel.uuid];
......
......@@ -11,4 +11,9 @@
@interface InspectionTableViewController : BasePullTableViewController
/**
是否返回根视图
*/
@property (nonatomic, assign) BOOL isBackRootVc;
@end
......@@ -46,7 +46,7 @@
@property (nonatomic,strong) ParametersModel *queryResultModel;
/**
* 巡检列表结果
* VI检查列表结果
*/
@property (nonatomic,strong) InspectionResultModel *resultModel;
......@@ -90,17 +90,36 @@
- (void)viewDidLoad {
[super viewDidLoad];
[ICRUserUtil sharedInstance].f_user_uuid = @"2c9802135fa55b48015fa57f291101aa";
[ICRUserUtil sharedInstance].f_enterprise_uuid = @"2c9802135fa48878015fa488b5420151";
[self createBackBtn];
[self uiConfigAction];
[self addChooseButton];
}
#pragma mark -自定义返回视图
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
}
#pragma mark -返回
- (void)backClicked {
if (self.isBackRootVc) {
[self PopToRootViewControllerAnimated:YES];
}else {
[self PopViewControllerAnimated:YES];
}
}
#pragma mark - UI
- (void)uiConfigAction
{
self.title = @"巡检结果";
self.title = @"VI检查结果";
self.taskNumberTitleLabel.text = @"任务数";
self.supervisorTitleLabel.text = @"督导人数";
self.storeNumberTitleLabel.text = @"门店次数";
......@@ -112,7 +131,7 @@
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:kChooseImage style:UIBarButtonItemStyleDone target:self action:@selector(chooseButtonAction)];
}
#pragma mark -筛选巡检结果
#pragma mark -筛选VI检查结果
- (void)chooseButtonAction
{
self.filter.filterViewModel = self.filterViewModel;
......@@ -135,7 +154,7 @@
[self getInspectionResultDatas];
}
#pragma mark - 获取巡检结果数据
#pragma mark - 获取VI检查结果数据
- (void)getInspectionResultDatas
{
@weakify(self);
......@@ -155,6 +174,8 @@
}
[self.datasArray addObjectsFromArray:self.resultModel.records];
[self headerViewassignment];
}else {
[self endRefresh:EndRefreshNotData];
}
[self.tableView reloadData];
} failure:^(id errorValue) {
......
......@@ -57,7 +57,7 @@
/**
* 巡检列表
* VI检查列表
*/
@interface Records : JSONModel
......@@ -83,7 +83,7 @@
@end
/**
* 巡检
* VI检查
*/
@interface Inspectors : JSONModel
......@@ -105,7 +105,7 @@
/**
* 巡检结果
* VI检查结果
*/
@interface Results : JSONModel
......
......@@ -32,7 +32,7 @@
@property (nonatomic,copy) NSString *endDate;
/**
* 巡检计划ID
* VI检查计划ID
*/
@property (nonatomic,copy) NSString *planUuid;
......
......@@ -142,7 +142,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="50%(1/2)店" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wLC-Ok-9HH">
<rect key="frame" x="312" y="18" width="58" height="14"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" red="0.2901960784" green="0.57254901960000004" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="X9n-d8-bl3">
......@@ -266,13 +266,13 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sa1-Rl-c3T">
<rect key="frame" x="0.0" y="0.0" width="5" height="44"/>
<color key="backgroundColor" red="0.2901960784" green="0.57254901960000004" blue="0.93725490199999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="5" id="z2e-E7-o7a"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="八月常规巡检" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q9f-cv-fHH">
<rect key="frame" x="20" y="12" width="98" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="八月常规VI检查" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q9f-cv-fHH">
<rect key="frame" x="20" y="12" width="113" height="20"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
......@@ -393,7 +393,7 @@
</state>
</button>
</subviews>
<color key="backgroundColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="5gz-mV-0rc" firstAttribute="centerY" secondItem="Mrb-NB-BQl" secondAttribute="centerY" id="1kK-br-qP1"/>
<constraint firstItem="pIT-bc-dlt" firstAttribute="centerY" secondItem="Mrb-NB-BQl" secondAttribute="centerY" id="2wU-HG-6LT"/>
......@@ -430,7 +430,7 @@
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<state key="normal" title="全部展开" image="arrowturnoff">
<color key="titleColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="selected" image="arrowopen"/>
<connections>
......@@ -523,13 +523,13 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="adasdas " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VWf-zl-NYm">
<rect key="frame" x="15" y="10" width="345" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="nini" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ail-Be-qGe">
<rect key="frame" x="15" y="37" width="345" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
......
......@@ -25,8 +25,8 @@
{
_questionModel = questionModel;
self.titleLabel.text = questionModel.questionTitle;
self.titleLabel.textColor = questionModel.answered ? ICR_TINTCOLOR : [UIColor redColor];
self.scoreLabel.textColor = questionModel.answered ? ICR_TINTCOLOR : [UIColor redColor];
self.titleLabel.textColor = questionModel.answered ? GTO_BLUE_DEEP_COLOR : [UIColor redColor];
self.scoreLabel.textColor = questionModel.answered ? GTO_BLUE_DEEP_COLOR : [UIColor redColor];
self.scoreLabel.text = questionModel.answered ? [NSString stringWithFormat:@"%.2f%@",[questionModel.score floatValue],@"分"] : @"--";
if (questionModel.answered) {
self.scoreLabel.hidden = !questionModel.score;
......
......@@ -294,7 +294,7 @@
}else {
self.photoManager.view.hidden = YES;
}
self.contentLabel.textColor = ICR_TINTCOLOR;
self.contentLabel.textColor = GTO_BLUE_DEEP_COLOR;
}
#pragma mark - 未填写情况
......
......@@ -106,7 +106,7 @@ UITextFieldDelegate>
UILabel *timeLabel = [ [IBTUILabel alloc]initWithFrame:CGRectMake(patrolNameLabel.x, patrolNameLabel.bottom + GTO_TOP_VERTICAL_PADDING , patrolNameLabel.width, lblH) text:[NSString stringWithFormat:@"开始时间:%@",_d_patrolPlan.beginDate] font:font tintColor:nil backgroundColor:nil textAlignment:NSTextAlignmentLeft];
UILabel *inspectorLabel = [ [IBTUILabel alloc]initWithFrame:CGRectMake(patrolNameLabel.x, timeLabel.bottom + GTO_TOP_VERTICAL_PADDING , planInfoView.width - 60, lblH) text:[NSString stringWithFormat:@"巡检人: %@",_d_storeResult.f_user_name] font:font tintColor:nil backgroundColor:nil textAlignment:NSTextAlignmentLeft];
UILabel *inspectorLabel = [ [IBTUILabel alloc]initWithFrame:CGRectMake(patrolNameLabel.x, timeLabel.bottom + GTO_TOP_VERTICAL_PADDING , planInfoView.width - 60, lblH) text:[NSString stringWithFormat:@"VI检查人: %@",_d_storeResult.f_user_name] font:font tintColor:nil backgroundColor:nil textAlignment:NSTextAlignmentLeft];
UILabel *positionLabel = [ [IBTUILabel alloc]initWithFrame:CGRectMake(patrolNameLabel.x, inspectorLabel.bottom + GTO_TOP_VERTICAL_PADDING , planInfoView.width - 60, lblH) text:[NSString stringWithFormat:@"签到坐标: (%@,%@)",[GTOCommonTools nullChangedWithId:_d_storeResult.latitude],[GTOCommonTools nullChangedWithId:_d_storeResult.longitude]] font:font tintColor:nil backgroundColor:nil textAlignment:NSTextAlignmentLeft];
......
//
// GTOAllPatrolPlanViewController.h
// total
// (巡检汇总)
// (VI检查汇总)
// Created by freecui on 15/9/15.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOAllPatrolPlanViewController.m
// total
// (巡检汇总)
// (VI检查汇总)
// Created by freecui on 15/9/15.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -75,7 +75,7 @@ static NSString *cellIDStore = @"cellIDStore";
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"巡检汇总";
self.title = @"VI检查汇总";
// [self initData];
self.d_currentRow = -1;
[self initSubViews];
......
......@@ -178,7 +178,7 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
// NSUInteger intNumber = [strNumber integerValue];
// GTOPermission *permission = [GTOPermission DBObject];
// if (intNumber <= 500103 && intNumber > 500100) {
// permission.fuctionName = @"工程巡检";
// permission.fuctionName = @"工程VI检查";
// permission.functionImageName = @"";
// permission.functionTag = kFunctionProjectPatrol;
// }
......@@ -186,14 +186,14 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
// break;
// }
GTOPermission *permission = [self permissionWithMaxNumber:500103
minNumber:500100 functionName:@"工程巡检"
minNumber:500100 functionName:@"工程VI检查"
functionImageName:@"function_ProjectPatrol_icon"
funtionTag:kFunctionProjectPatrol];
if (permission) {
[muArr addObject:permission];
}
permission = [self permissionWithMaxNumber:500203
minNumber:500200 functionName:@"HSE巡检"
minNumber:500200 functionName:@"HSEVI检查"
functionImageName:@"function_HSEPatrol_icon"
funtionTag:kFunctionHSEPatrol];
if (permission) {
......@@ -292,7 +292,7 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
NSMutableArray *arrFunctionEntities = [NSMutableArray array];
// NSArray *functionImageNames = @[ @"AnnouncementIcon",@"TaskManageIcon",@"PatrolPlanIcon",@"MyStoreIcon",@"PatrolPlanIcon",@"MyStoreIcon",@"PatrolPlanIcon",@"MyStoreIcon" ];
// NSArray *fuctionNames = @[@"工程巡检",@"HSE巡检",@"查看报修",@"查看许可证",
// NSArray *fuctionNames = @[@"工程VI检查",@"HSEVI检查",@"查看报修",@"查看许可证",
// @"许可证审批",@"拓站",@"公告",@"签到"];
// NSArray *functionTags = @[@(kFunctionProjectPatrol),
// @(kFunctionHSEPatrol),
......@@ -406,13 +406,13 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
}
switch (imageView.tag) {
case kFunctionProjectPatrol://工程巡检
case kFunctionProjectPatrol://工程VI检查
{
GTOPatrolPlanListViewController *pVC = [[GTOPatrolPlanListViewController alloc]initWithTitle:@"project"];//[[GTOPatrolPlanListViewController alloc]init];//[[ICRPatrolPlanViewController alloc] initWithStore:nil isHomeShow:YES];
[self PushViewController:pVC animated:YES];
}
break;
case kFunctionHSEPatrol://HSE巡检
case kFunctionHSEPatrol://HSEVI检查
{
GTOPatrolPlanListViewController *pVC = [[GTOPatrolPlanListViewController alloc]initWithTitle:@"HSE"];//[[GTOPatrolPlanListViewController alloc]init];//[[ICRPatrolPlanViewController alloc] initWithStore:nil isHomeShow:YES];
[self PushViewController:pVC animated:YES];
......@@ -551,11 +551,11 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
@"functionTag":@(kFunctionLicenExam),
@"hasPermission":@(judgePermission) };
[repariArr addObject:[[GTOPermission alloc] initWithDict:judgeDict]];
//工程巡检
//工程VI检查
BOOL patrolPermission = [self permissionWithMaxNumber:500103 minNumber:500100];
NSString *patrolIcon =patrolPermission==YES?@"function_ProjectPatrol_icon":@"function_ProjectPatrol_icon_no_premission";
NSDictionary *noticeDict =@{@"functionImageName":patrolIcon,
@"fuctionName":@"工程巡检",
@"fuctionName":@"工程VI检查",
@"functionTag":@(kFunctionProjectPatrol),
@"hasPermission":@(patrolPermission) };
[repariArr addObject:[[GTOPermission alloc] initWithDict:noticeDict]];
......@@ -571,11 +571,11 @@ typedef NS_ENUM (NSUInteger, ICRFunctionID) {
//HSE巡检
//HSEVI检查
BOOL hsePermission = [self permissionWithMaxNumber:500203 minNumber:500200];
NSString *hseIcon =hsePermission==YES?@"function_HSEPatrol_icon":@"function_HSEPatrol_icon_no_premission";
NSDictionary *hseDict =@{@"functionImageName":hseIcon,
@"fuctionName":@"HSE巡检",
@"fuctionName":@"HSEVI检查",
@"functionTag":@(kFunctionHSEPatrol),
@"hasPermission":@(hsePermission) };
[patrolArr addObject:[[GTOPermission alloc] initWithDict:hseDict]];
......
......@@ -48,7 +48,7 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
}
@property(strong, nonatomic) UITableView *m_tableView;
@property(strong, nonatomic) NSMutableArray *m_arrAllData; //所以巡检任务
@property(strong, nonatomic) NSMutableArray *m_arrAllData; //所以VI检查任务
@property(nonatomic, strong) UIBarButtonItem *c_sureBtn; //选择条件后确定按钮
@property(nonatomic, strong) UIButton *c_sortBtn; // 排序按钮
@property(nonatomic, strong) UIButton *c_filterBtn; //筛选
......@@ -79,7 +79,7 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
}
- (void)viewDidLoad {
[super viewDidLoad];
// self.title = @"HSE巡检";
// self.title = @"HSEVI检查";
[self p_initWithSubViews];
[self createRefresh];
[self createBackBtn];
......
......@@ -77,7 +77,7 @@ GXFBottomViewDelegate>
[super viewDidLoad];
// Do any additional setup after loading the view.
self.title = @"工程巡检结果";
self.title = @"工程VI检查结果";
[self initSubViews];
}
......@@ -383,10 +383,10 @@ GXFBottomViewDelegate>
}
if (section == 0) {
view.m_positionBtn.hidden = NO;
[view updateWithString:_d_patrolPlan.name];//@"工程巡检"];
[view updateWithString:_d_patrolPlan.name];//@"工程VI检查"];
} else if (section == 1) {
view.m_positionBtn.hidden = YES;
[view updateWithString:@"工程巡检结果"];
[view updateWithString:@"工程VI检查结果"];
} else {
GTOPatrolPlanResultHeaderItem *resultHeader = [contentView viewWithClass:[GTOPatrolPlanResultHeaderItem class]];
......@@ -597,7 +597,7 @@ GXFBottomViewDelegate>
#pragma GTOPatrolPlanResultHeaderItemDelegate
// 巡检结果中:不同区的headerView点击事件
// VI检查结果中:不同区的headerView点击事件
- (void)patrolPlanResultHeaderItem:(GTOPatrolPlanResultHeaderItem *)resultHeaderItem
andIsDisplay:(BOOL)isDisplay {
NSInteger aIndex = resultHeaderItem.tag - 2;
......
......@@ -42,7 +42,7 @@ typedef NS_ENUM(NSUInteger, GTOPatrolPlanStatus) {
//另加
@property (nonatomic, assign) NSUInteger finishedStoreNumber;
@property (nonatomic, assign) NSUInteger totalStoreNumber;
@property (nonatomic, assign) CGFloat processLength;//任务进度:根据油站,油站根据巡检员的状态
@property (nonatomic, assign) CGFloat processLength;//任务进度:根据油站,油站根据VI检查员的状态
@property (copy, nonatomic) NSArray *questionCategorys;
@end
//
// GTOSubmitPlan.h
// total
// 提交巡检结果
// 提交VI检查结果
// Created by freecui on 15/11/11.
// Copyright © 2015年 free. All rights reserved.
//
......
//
// GTOSubmitPlan.m
// total
// 提交巡检结果
// 提交VI检查结果
// Created by freecui on 15/11/11.
// Copyright © 2015年 free. All rights reserved.
//
......
//
// GTOSubmitPlanAnswer.h
// total
// 提交巡检结果:问题答案 Answer
// 提交VI检查结果:问题答案 Answer
// Created by freecui on 15/11/11.
// Copyright © 2015年 free. All rights reserved.
//
......
//
// GTOSubmitPlanAnswer.m
// total
// 提交巡检结果:问题答案 Answer
// 提交VI检查结果:问题答案 Answer
// Created by freecui on 15/11/11.
// Copyright © 2015年 free. All rights reserved.
//
......
......@@ -226,7 +226,7 @@
if (!view) {
view = [[UIView alloc]initWithFrame:rect];//tableView.tableHeaderView.bounds];
CGRect rect = CGRectMake(padding, 0, 150, view.height);
UILabel *lblTitle = [self p_labelWithFrame:rect title:@"每月例行巡检" font:[UIFont systemFontOfSize:18] textColor:[UIColor blackColor] textAlignment:NSTextAlignmentLeft];
UILabel *lblTitle = [self p_labelWithFrame:rect title:@"每月例行VI检查" font:[UIFont systemFontOfSize:18] textColor:[UIColor blackColor] textAlignment:NSTextAlignmentLeft];
rect = CGRectMake( view.width - 10 - 100, 0, 100, lblTitle.height);//
UILabel *lblAddress = [self p_labelWithFrame:rect title:@"杨高油站" font:[UIFont systemFontOfSize:18] textColor:[UIColor blackColor] textAlignment:NSTextAlignmentLeft];//self.m_storeResult.store_name
[view addSubview:lblTitle];
......@@ -239,7 +239,7 @@
if (!view) {
view = [[UIView alloc]initWithFrame:rect];//tableView.tableHeaderView.bounds];
CGRect rect = CGRectMake(padding, 0, 100, view.height);
UILabel *lblState = [self p_labelWithFrame:rect title:@"巡检状态" font:[UIFont systemFontOfSize:18] textColor:[UIColor blackColor] textAlignment:NSTextAlignmentLeft];
UILabel *lblState = [self p_labelWithFrame:rect title:@"VI检查状态" font:[UIFont systemFontOfSize:18] textColor:[UIColor blackColor] textAlignment:NSTextAlignmentLeft];
[view addSubview:lblState];
}
......
......@@ -633,7 +633,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
UILabel *attentionLbl = [[UILabel alloc]initWithFrame:CGRectMake(0, lblCome.bottom, W, topH)];
attentionLbl.font = [UIFont systemFontOfSize:20];
attentionLbl.text = [NSString stringWithFormat:@"填写页数范围:%d ~ %ld",0,[[ICRQuestionManager sharedManager] m_maxProblemLineno]];//0代表跳转到巡检汇总
attentionLbl.text = [NSString stringWithFormat:@"填写页数范围:%d ~ %ld",0,[[ICRQuestionManager sharedManager] m_maxProblemLineno]];//0代表跳转到VI检查汇总
[attentionLbl setTextAlignment:NSTextAlignmentCenter];
[info addSubview:attentionLbl];
......
......@@ -2,7 +2,7 @@
//
// GTOPatrolPlanResultTopItem.m
// total
// 巡检结果中的每月巡检的下面的cell
// VI检查结果中的每月VI检查的下面的cell
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -104,7 +104,7 @@
NSString *stateStr = [NSString stringWithFormat:@"%ld",patrolPlan.state];
self.m_planStateLabel.text = [NSString stringWithFormat:@"状态:%@",[GTOCommonTools patrolStateChineseWithEnglish:stateStr]];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"计划时间:%@ ~ %@",patrolPlan.beginDate ,patrolPlan.endDate ];
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度"];
self.m_processLabel.text = [NSString stringWithFormat:@"VI检查总进度"];
// int finishStores = 0; int totalStores = (int)patrolPlan.inspectors.count;
// for(NSDictionary *dict in patrolPlan.inspectors) {
......
......@@ -2,7 +2,7 @@
//
// GTOPatrolPlanResultTopItem.m
// total
// 巡检任务列表的cell的内容
// VI检查任务列表的cell的内容
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -125,7 +125,7 @@
NSString *begin = [patrolPlan.beginDate substringToIndex:11];
NSString *end = [patrolPlan.endDate substringToIndex:11];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"计划时间: %@ ~ %@",begin ,end];//
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度: "];
self.m_processLabel.text = [NSString stringWithFormat:@"VI检查总进度: "];
self.m_planStateLabel.text = @"状态: ";
NSString *stateStr = [NSString stringWithFormat:@"%ld",patrolPlan.state];
self.m_planStateValueLabel.text = [GTOCommonTools patrolStateChineseWithEnglish:stateStr];
......
//
// GTOPatrolPlanInfoItemView.h
// total
// 巡检汇总头部:巡检信息item
// VI检查汇总头部:VI检查信息item
// Created by freecui on 15/9/15.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOPatrolPlanInfoItemView.m
// total
// 巡检汇总头部: 巡检信息item
// VI检查汇总头部: VI检查信息item
// Created by freecui on 15/9/15.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -51,7 +51,7 @@
self.m_patrolInfoLabel = [[UILabel alloc]init];
self.m_patrolInfoLabel.font = [UIFont systemFontOfSize:18];
self.m_patrolInfoLabel.textColor = ICR_BLUE_BTN_COLOR;
self.m_patrolInfoLabel.text = @"巡检信息";
self.m_patrolInfoLabel.text = @"VI检查信息";
self.m_locationLabel = [[self class]customLabelWithTextColor:PATROL_PLAN_CONTENT_LABEL_TITLE_COLOR];
self.m_locationLabel.textAlignment = NSTextAlignmentRight;
......@@ -75,7 +75,7 @@
[self addSubview:_m_planTimeValueLabel];
self.m_stateLabel = [[self class] customLabelWithTextColor:PATROL_PLAN_CONTENT_LABEL_TITLE_COLOR];
_m_stateLabel.text = @"油站巡检情况";//[IBTCommon localizableString:@"Start Time:"];
_m_stateLabel.text = @"油站VI检查情况";//[IBTCommon localizableString:@"Start Time:"];
[self addSubview:_m_stateLabel];
self.m_stateValueLabel = [[self class] customLabelWithTextColor:PATROL_PLAN_CONTENT_LABEL_CONTENT_COLOR];
......@@ -245,4 +245,4 @@
[self.delegate patrolPlanInfoItemViewLocationWithLongitude:11 andLatitude:10];
}
}
@end
\ No newline at end of file
@end
//
// GTOPatrolPlanResultHeadItem.h
// total
// 巡检结果中:不同区的headerView
// VI检查结果中:不同区的headerView
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -23,4 +23,4 @@
@interface GTOPatrolPlanResultHeaderItem (configure)
- (void)updateWithDisplayResult: (GTODisplayResult *)displayResult;
@end
\ No newline at end of file
@end
//
// GlineTopatrolPlanResultHeadItem.m
// total
// 巡检结果中:不同区的headerView
// VI检查结果中:不同区的headerView
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOPatrolPlanResultProblemItem.h
// total
// 巡检结果中:每个问题和答案
// VI检查结果中:每个问题和答案
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOPatrolPlanResultProblemItem.m
// total
// 巡检结果中:每个问题和答案
// VI检查结果中:每个问题和答案
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOPatrolPlanResultTopItem.h
// total
// 巡检结果中的每月巡检的下面的cell
// VI检查结果中的每月VI检查的下面的cell
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......
......@@ -2,7 +2,7 @@
//
// GTOPatrolPlanResultTopItem.m
// total
// 巡检结果中的每月巡检的下面的cell
// VI检查结果中的每月VI检查的下面的cell
// Created by freecui on 15/9/28.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -11,7 +11,7 @@
#import "GTOPioneering.h"
#import "GTODisplayResult.h"
@interface GTOPatrolPlanResultTopItem ()
@property (strong, nonatomic) IBTUILabel *m_planModuleLabel;//巡检模板
@property (strong, nonatomic) IBTUILabel *m_planModuleLabel;//VI检查模板
@property (strong, nonatomic) IBTUILabel *m_planTimeLabel;
@property (strong, nonatomic) IBTUILabel *m_startTimeLabel;
@property (strong, nonatomic) IBTUILabel *m_processLabel;//拓站总进度
......@@ -112,7 +112,7 @@
storeResult.store_code];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"计划时间:%@ ~ %@",patrolPlan.beginDate ,patrolPlan.endDate ];
self.m_startTimeLabel.text = [NSString stringWithFormat:@"开始时间:%@",storeResult.beginTime];
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度" ];
self.m_processLabel.text = [NSString stringWithFormat:@"VI检查总进度" ];
self.m_processFractionLabel.text = [NSString stringWithFormat:@" %ld/%ld(区)",finishNumber,totalNumber];
self.d_processLength = 1.0 * finishNumber / totalNumber;
......@@ -133,7 +133,7 @@
NSInteger totalNumber = storeResult.questions.count;
self.d_processLength = 1.0 * finishNumber / totalNumber;
int percent = self.d_processLength *100;
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度" ];
self.m_processLabel.text = [NSString stringWithFormat:@"VI检查总进度" ];
if (patrolPlan.state == kPatrolPlanStatusFinished) {
self.m_processValueLabel.text = [NSString stringWithFormat:@"已完成 %d%%(题)",percent];
}else{
......
......@@ -190,7 +190,7 @@
self.m_storeResult = storeResult;
self.m_storeNameLabel.text = [NSString stringWithFormat:@"油站名称: "];
self.m_storeNameValueLabel.text = storeResult.store_name;
self.m_processLabel.text = @"巡检进度: ";
self.m_processLabel.text = @"VI检查进度: ";
if (storeResult.state == kPatrolStoreStateSubmitted) {
self.d_processLength = 1.0 * storeResult.questions.count / storeResult.questions.count;
int percent = self.d_processLength * 100;
......@@ -215,7 +215,7 @@
self.m_storeNameLabel.text = [NSString stringWithFormat:@"油站名称:"];
self.m_storeNameValueLabel.text = store.name;
self.m_processLabel.text = @"巡检进度";
self.m_processLabel.text = @"VI检查进度";
// int finishProblems = (int )proceeValue.finishNumber;
// int totalProblems = (int)proceeValue.totalNumber;
//// if (arrDisplayResults) {
......@@ -253,4 +253,4 @@
}
@end
\ No newline at end of file
@end
......@@ -12,18 +12,49 @@
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setCellModel:(PatrolExamCellViewModel *)cellModel {
[super setCellModel:cellModel];
self.labelCategory.text = cellModel.category;
NSMutableArray *questions = [NSMutableArray array];
NSMutableArray *answers = [NSMutableArray array];
for (ZJPatrolDetail_questions *question in cellModel.viewModel.detail.questions) {
if ([question.category isEqualToString:cellModel.category]) {
for (NSString *key in cellModel.viewModel.dicAnswers.allKeys) {
if ([key isEqualToString:question.uuid]) {
[answers addObject:@1];
}
}
[questions addObject:question];
}
}
NSString *string = [NSString stringWithFormat:@"%@ (%ld/%ld)",cellModel.category,answers.count,questions.count];
NSRange range = [string rangeOfString:[NSString stringWithFormat:@"(%ld/%ld)",answers.count,questions.count]];
NSMutableAttributedString *attributedStr = [[NSMutableAttributedString alloc] initWithString:string];
[attributedStr addAttribute:NSForegroundColorAttributeName
value:GTO_BLUE_DEEP_COLOR
range:range];
self.labelCategory.attributedText = attributedStr;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -8,8 +8,13 @@
#import <UIKit/UIKit.h>
#import "BasePatrolExamTableViewCell.h"
@interface PatrolExamQuestionTableViewCell : BasePatrolExamTableViewCell
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
@property (weak, nonatomic) IBOutlet UIImageView *imgPin;
@property (weak, nonatomic) IBOutlet UILabel *labelStandScore;
@end
......@@ -13,8 +13,6 @@
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)actionNotiAnswerChanged:(NSNotification *)noti {
......@@ -50,17 +48,10 @@
self.labelStandScore.hidden = cellModel.question.standScore == nil;
ZJPatrolDetail_results_answers *answer = self.cellModel.answer;
if (answer) {
self.imgPin.image = TCImage(@"patrol_exam_blue_pin");
[self bluePin];
}else{
self.imgPin.image = TCImage(@"patrol_exam_red_pin");
[self redPin];
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
......@@ -11,17 +11,17 @@
@property (nonatomic, strong) NSString <Optional> * store_code;
@property (nonatomic, strong) NSString <Optional> * f_user_name;
@property (nonatomic, strong) NSString <Optional> * user_name;
@property (nonatomic, strong) NSNumber <Optional> * state;
@property (nonatomic, strong) NSString <Optional> * store_name;
@property (nonatomic, strong) NSString <Optional> * f_user_code;
@property (nonatomic, strong) NSString <Optional> * user_code;
@property (nonatomic, strong) NSNumber <Optional> * score;
@property (nonatomic, strong) NSString <Optional> * f_user_uuid;
@property (nonatomic, strong) NSString <Optional> * user_uuid;
@property (nonatomic, strong) NSString <Optional> * store_uuid;
......@@ -111,7 +111,7 @@
@property (nonatomic, strong) NSString <Optional> * store_name;
@property (nonatomic, strong) NSString <Optional> * f_user_code;
@property (nonatomic, strong) NSString <Optional> * user_code;
@property (nonatomic, strong) NSMutableArray <ZJPatrolDetail_results_answers,Optional> * answers;
......@@ -119,11 +119,11 @@
@property (nonatomic, strong) NSString <Optional> * endTime;
@property (nonatomic, strong) NSString <Optional> * f_user_uuid;
@property (nonatomic, strong) NSString <Optional> * user_uuid;
@property (nonatomic, strong) NSString <Optional> * store_uuid;
@property (nonatomic, strong) NSString <Optional> * f_user_name;
@property (nonatomic, strong) NSString <Optional> * user_name;
@end
......
......@@ -15,5 +15,8 @@
//@property (strong, nonatomic) Results *result;
@property (strong, nonatomic) PatrolExamViewModel *viewModel;
/**
是否返回到根视图
*/
@property (nonatomic, assign) BOOL isBackRootVc;
@end
......@@ -20,6 +20,7 @@
#import "PatrolStartAnswerConfirmVC.h"
#import "ZJPatrolDetail.h"
#import "BaseNavigationViewController.h"
#import "InspectionTableViewController.h"
@interface PatrolExamViewController () <UITableViewDelegate, UITableViewDataSource>
@property (weak, nonatomic) IBOutlet PatrolExamTopView *topView;
......@@ -60,11 +61,15 @@
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.navigationController.interactivePopGestureRecognizer.enabled = YES;
}
[self.timer invalidate];
self.timer = nil;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self timer];
self.timer = [NSTimer timerWithTimeInterval:30 target:self selector:@selector(actionSave) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
[self.tableView registerClass:[PatrolExamStarCell class] forCellReuseIdentifier:@"PatrolExamStarCell"];
self.title = self.viewModel.storeResult.store_name;
[self.btnSubmit setTitle:@"确认提交" forState:UIControlStateNormal];
......@@ -99,7 +104,21 @@
};
//状态是0,弹出开始答题提示
if (self.viewModel.state.type == PatrolExamStateUnStart) {
[self.confirmVC show];
[RequestManager request_BeginPatrolPlanAnswer:self.viewModel.plan.uuid storeUuid:self.viewModel.storeResult.store_uuid selectedStoreUuid:@"" longtitude:kUser.longitude latitute:kUser.latitude success:^(id returnValue) {
if ([BaseViewModel verifyData:returnValue]) {
self.viewModel.storeResult.state = @(2);
if (self.confirmVC.blockStart) {
self.confirmVC.blockStart();
}
}
} failure:^(id errorValue) {
[IBTLoadingView showTextOnly:errorValue];
}];
}else {
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray *arrIndexs = [self.viewModel closeAll];
[self.tableView deleteRowsAtIndexPaths:arrIndexs withRowAnimation:UITableViewRowAnimationFade];
});
};
//统一刷新
self.viewModel.blockReloadData = ^{
......@@ -110,10 +129,12 @@
self.viewModel.blockAnswerAction = ^{
@strongify(self);
self.isAnswered = YES;
self.topView.viewModel = self.viewModel;
};
//开始答题
self.confirmVC.blockStart = ^{
@strongify(self);
[kNotification postNotificationName:UPDATEPATROLONLINELIST object:nil];
UIBarButtonItem *save = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStyleDone target:self action:@selector(actionSave)];
self.navigationItem.rightBarButtonItem = save;
self.btnSubmit.hidden = NO;
......@@ -125,6 +146,11 @@
self.topView.viewModel = self.viewModel;
self.btnSubmit.hidden = self.viewModel.state.type != PatrolExamStateProcessing;
[self.tableView reloadData];
dispatch_async(dispatch_get_main_queue(), ^{
NSMutableArray *arrIndexs = [self.viewModel closeAll];
[self.tableView deleteRowsAtIndexPaths:arrIndexs withRowAnimation:UITableViewRowAnimationFade];
});
}];
};
......@@ -132,10 +158,37 @@
BaseNavigationViewController *nav = (BaseNavigationViewController *)self.navigationController;
[nav setBackClickAction:^{
@strongify(self);
[self.timer invalidate];
self.timer = nil;
[self popViewControllerAnimated:YES];
}];
//监听刷新通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(actionNotiAnswerChanged:) name:kNotiPatrolAnswerChange object:nil];
[self createBackBtn];
}
#pragma mark -自定义返回视图
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
}
#pragma mark -返回
- (void)backClicked {
if (self.isBackRootVc) {
[self PopToRootViewControllerAnimated:YES];
}else {
[self PopViewControllerAnimated:YES];
}
}
#pragma mark -通知刷新回调
- (void)actionNotiAnswerChanged:(NSNotification *)noti {
[self.tableView reloadData];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
......@@ -230,7 +283,7 @@
}
}
#pragma mark -提交巡检任务
#pragma mark -提交VI检查任务
- (IBAction)actionSubmit:(id)sender {
//找到最上面一个没有回答的问题
if (self.viewModel.detail.questions.count != self.viewModel.dicAnswers.count) {
......@@ -252,18 +305,18 @@
return;
}
@weakify(self);
ShowAlertView(@"提示",@"您确认要提交巡检任务吗?", @[@"取消",@"确认"], UIAlertControllerStyleAlert, ^(NSInteger index) {
ShowAlertView(@"提示",@"您确认要提交VI检查任务吗?", @[@"取消",@"确认"], UIAlertControllerStyleAlert, ^(NSInteger index) {
@strongify(self);
if (index == ONE) {
[IBTLoadingView showProgressLabel:@"加载中"];
[self.viewModel httpSubmitAnswerWithAction:(AnswerSubmitActionCommit) complete:^(BOOL isSuccess) {
[IBTLoadingView hideHUDWithText:nil];
if (isSuccess) {
[IBTLoadingView showProgressLabel:@"提交成功"];
[IBTLoadingView showTextOnly:@"提交成功"];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(ONE * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.timer invalidate];
self.timer = nil;
[kNotification postNotificationName:UPDATEPATROLONLINELIST object:nil];
[self popViewControllerAnimated:YES];
InspectionTableViewController *patrolResultVc = [InspectionTableViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECTRESULT];
patrolResultVc.isBackRootVc = YES;
[self PushViewController:patrolResultVc animated:YES];
});
}
}];
......@@ -271,7 +324,7 @@
});
}
#pragma mark -保存巡检答案
#pragma mark -保存VI检查答案
- (void)actionSave {
@weakify(self);
if (self.viewModel.state.type != PatrolExamStateProcessing || !self.viewModel.result) {
......@@ -308,13 +361,7 @@
return _viewModel;
}
- (NSTimer *)timer {
if (!_timer) {
_timer = [NSTimer timerWithTimeInterval:30 target:self selector:@selector(actionSave) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
}
return _timer;
}
......
......@@ -12,21 +12,12 @@
@property (weak, nonatomic) PatrolExamViewModel *viewModel;
/**
选择门店
*/
@property (weak, nonatomic) IBOutlet UIButton *btnChooseStore;
@property (weak, nonatomic) IBOutlet UITableView *tableViewStoreList;
/**
开始检查
*/
@property (weak, nonatomic) IBOutlet UIButton *startCheckButton;
/**
tableview的高度约束
*/
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constrainTableHeight;
@property (nonatomic, copy) void (^blockStart)(void);
......
......@@ -8,12 +8,10 @@
#import "PatrolStartAnswerConfirmVC.h"
#import "ZJPatrolStore.h"
#import "BaiduLocationManager.h"
@interface PatrolStartAnswerConfirmVC () <UITableViewDelegate, UITableViewDataSource,BaiduLocationManagerDelegate>
@interface PatrolStartAnswerConfirmVC ()
@property (strong, nonatomic) NSMutableArray *arrData;
@property (strong, nonatomic) ZJPatrolStore *storeSelected;
@property (strong, nonatomic) NSString *latitute;
@property (strong, nonatomic) NSString *longtitude;
......@@ -21,19 +19,6 @@
@implementation PatrolStartAnswerConfirmVC
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[BaiduLocationManager manager].locationDelegate = self;
[[BaiduLocationManager manager] startPositioning];
}
-(void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[[BaiduLocationManager manager] stopPositioning];
[BaiduLocationManager manager].locationDelegate = nil;
}
- (void)viewDidLoad {
[super viewDidLoad];
......@@ -43,58 +28,12 @@
#pragma mark -UI
- (void)uiConfigAction
{
self.constrainTableHeight.constant = 0;
[self.btnChooseStore setTitle:@"暂未匹配到门店" forState:UIControlStateNormal];
[self.btnChooseStore horizontalCenterImageAndTitle:5];
[self.btnChooseStore.titleLabel sizeToFit];
self.btnChooseStore.titleLabel.adjustsFontSizeToFitWidth = YES;
[self.startCheckButton setTitle:@"开始检查" forState:UIControlStateNormal];
[self.view layoutIfNeeded];
}
#pragma mark - <BaiduLocationManagerDelegate>百度地图定位
#pragma mark 定位成功
- (void)positioningSuccess:(BMKUserLocation *)location
{
double latitude = location.location.coordinate.latitude;
double longitude = location.location.coordinate.longitude;
kUser.latitude = [NSString stringWithFormat:@"%lf",latitude];
kUser.longitude = [NSString stringWithFormat:@"%lf",longitude];
[self httpGetStoreList];
[[BaiduLocationManager manager] stopPositioning];
}
#pragma mark 定位失败
- (void)positioningError:(NSError *)error
{
[IBTLoadingView showTextOnly:error.localizedDescription];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.arrData.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 35;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
ZJPatrolStore *store = [self.arrData yx_objectAtIndex:indexPath.row];
cell.textLabel.text = store.name;
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.textLabel.font = [UIFont systemFontOfSize:13];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
self.storeSelected = [self.arrData yx_objectAtIndex:indexPath.row];
[self hideStoreList];
}
- (void)setStoreSelected:(ZJPatrolStore *)storeSelected {
_storeSelected = storeSelected;
[self.btnChooseStore setTitle:storeSelected.name forState:UIControlStateNormal];
}
#pragma mark -开始答题请求
......@@ -117,28 +56,6 @@
}];
}
//获取周围的store列表
- (void)httpGetStoreList {
[RequestManager request_QueryRoundStoreLongtitude:kUser.longitude latitute:kUser.latitude success:^(id returnValue) {
if ([BaseViewModel verifyData:returnValue]) {
NSArray *array = (NSArray *)[BaseViewModel formatData:returnValue];
for (NSDictionary *dic in array) {
ZJPatrolStore *store = [ZJPatrolStore modelWithDic:dic];
[self.arrData addObject:store];
}
if (self.arrData.count > ZERO) {
self.storeSelected = self.arrData[0];
}
[self.tableViewStoreList reloadData];
}else {
[IBTLoadingView showTextOnly:@"无法定位到当前门店,请返回后重试"];
}
} failure:^(id errorValue) {
[IBTLoadingView showTextOnly:errorValue];
}];
}
- (IBAction)actionCancel:(id)sender {
[self hide];
[self.superVC.navigationController popViewControllerAnimated:YES];
......@@ -148,50 +65,4 @@
[self actionCancel:nil];
}
- (void)httpStartAnswer {
}
- (IBAction)actionSelectStore:(UIButton *)sender {
sender.selected = !sender.isSelected;
if (sender.isSelected) {
[self showStoreList];
} else {
[self hideStoreList];
}
}
- (void)showStoreList {
self.constrainTableHeight.constant = 100;
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.7
initialSpringVelocity:1.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
[self.view layoutIfNeeded];
}
completion:nil];
}
- (void)hideStoreList {
self.constrainTableHeight.constant = 0;
[UIView animateWithDuration:0.5
delay:0
usingSpringWithDamping:0.9
initialSpringVelocity:1.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
[self.view layoutIfNeeded];
}
completion:nil];
}
- (NSMutableArray *)arrData {
if (!_arrData) {
_arrData = [NSMutableArray array];
}
return _arrData;
}
@end
......@@ -13,5 +13,9 @@
@property (weak, nonatomic) IBOutlet UICollectionViewFlowLayout *collectionFlowLayout;
/**
是否返回根视图
*/
@property (nonatomic, assign) BOOL isBackRootVc;
@end
......@@ -52,15 +52,35 @@
- (void)viewDidLoad {
[super viewDidLoad];
[ICRUserUtil sharedInstance].f_user_uuid = @"2c9802135fa55b48015fa57f291101aa";
[ICRUserUtil sharedInstance].f_enterprise_uuid = @"2c9802135fa48878015fa488b5420151";
[self createBackBtn];
[self addChooseButtonItem];
[self uiConfigAction];
}
#pragma mark -自定义返回视图
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
}
#pragma mark -返回
- (void)backClicked {
if (self.isBackRootVc) {
[self PopToRootViewControllerAnimated:YES];
}else {
[self PopViewControllerAnimated:YES];
}
}
#pragma mark -UI
- (void)uiConfigAction
{
self.title = @"VI检查";
self.collectionFlowLayout.itemSize = CGSizeMake((ScreenSize.width-30)/2.0, 130);
self.collectionFlowLayout.sectionInset = UIEdgeInsetsMake(5, 10, 5, 10);
self.collectionFlowLayout.minimumLineSpacing = 10;
......@@ -68,7 +88,7 @@
[kNotification addObserver:self selector:@selector(updatePatrolOnline) name:UPDATEPATROLONLINELIST object:nil];
}
#pragma mark -更新巡检任务列表
#pragma mark -更新VI检查任务列表
- (void)updatePatrolOnline
{
self.pullPageIndex = ZERO;
......@@ -81,7 +101,7 @@
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:kChooseImage style:UIBarButtonItemStyleDone target:self action:@selector(chooseButtonClickAction)];
}
#pragma mark -筛选巡检任务
#pragma mark -筛选VI检查任务
- (void)chooseButtonClickAction
{
self.filter.filterViewModel = self.filterViewModel;
......
//
// PatrolTempCheckViewController.h
// total
//
// Created by 曹云霄 on 2017/12/4.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import "BaseViewController.h"
@interface PatrolTempCheckViewController : BaseViewController
@end
//
// PatrolTempCheckViewController.m
// total
//
// Created by 曹云霄 on 2017/12/4.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import "PatrolTempCheckViewController.h"
#import "FilterDetailViewController.h"
#import "IBTFileManager.h"
#import "PatrolTaskViewController.h"
#import "PatrolExamViewController.h"
@interface PatrolTempCheckViewController ()
/**
选中门店
*/
@property (weak, nonatomic) IBOutlet UILabel *selectedStoreLabel;
/**
背景View
*/
@property (weak, nonatomic) IBOutlet UIView *contentBgView;
/**
油站列表
*/
@property (nonatomic, strong) FilterDetailViewController *storeDetailVc;
/**
选择油站
*/
@property (nonatomic, strong) FilterSearchModel *selectedStoreModel;
@end
@implementation PatrolTempCheckViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self addStoreChildVc];
self.title = @"临时检查";
kUser.f_user_uuid = @"8a2eb8135ce33bdd015d07a2cb10018d";
}
#pragma mark -布局完成
- (void)viewDidLayoutSubviews
{
self.storeDetailVc.view.frame = self.contentBgView.bounds;
}
#pragma mark -添加油站列表控制器
- (void)addStoreChildVc
{
[self.contentBgView addSubview:self.storeDetailVc.view];
NSMutableArray *storyArray = [NSMutableArray array];
for (NSDictionary *dict in [ICRUserUtil sharedInstance].storeArray) {
FilterSearchModel *searchModel = [[FilterSearchModel alloc] init];
searchModel.name = [NSString stringWithFormat:@"[%@]%@",dict[@"code"],dict[@"name"]];
searchModel.uuid = dict[@"uuid"];
[storyArray addObject:searchModel];
}
WS(weakSelf);
[self.storeDetailVc setSelectedItemBlock:^(NSIndexPath *indexPath, FilterSearchModel *model) {
weakSelf.selectedStoreLabel.text = model.isSelected ? model.name : @"---";
weakSelf.selectedStoreModel = model.isSelected ? model : nil;
}];
self.storeDetailVc.filterArray = storyArray;
}
#pragma mark -下一步(生成VI检查任务)
- (IBAction)nextButtonClickAction:(UIButton *)sender {
if (!self.selectedStoreModel) {
[IBTLoadingView showTextOnly:@"请先选择油站"];
return;
}
WS(weakSelf);
ShowAlertView(@"提示", @"您确定对此门店发起VI临时检查任务吗?", @[@"取消",@"确认"], UIAlertControllerStyleAlert, ^(NSInteger index) {
if (index == ONE) {
[IBTLoadingView showProgressLabel:@"加载中"];
[RequestManager request_CreatePatrolTempCheck:self.selectedStoreModel.uuid success:^(id returnValue) {
[IBTLoadingView hideHUDWithText:nil];
if ([ BaseViewModel verifyData:returnValue]) {
[IBTLoadingView showTextOnly:@"生成VI临时VI检查任务成功"];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
ZJPatrolDetail *detail = [ZJPatrolDetail modelWithDic:[BaseViewModel formatData:returnValue]];
PatrolTaskCustomModel *customModel = [PatrolTaskCustomModel new];
customModel.uuid = detail.uuid;
Results *result = [Results new];
result.store_uuid = self.selectedStoreModel.uuid;
PatrolExamViewController *examVC = [PatrolExamViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_PATROLINSPECT];
PatrolExamViewModel *viewVM = [PatrolExamViewModel new];
viewVM.storeResult = result;
viewVM.plan = customModel;
examVC.viewModel = viewVM;
examVC.isBackRootVc = YES;
[self pushViewController:examVC animated:YES];
});
}else {
[IBTLoadingView showTextOnly:[BaseViewModel messageData:returnValue]];
}
} failure:^(id errorValue) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTextOnly:errorValue];
}];
}
});
}
#pragma mark -lazy
- (FilterDetailViewController *)storeDetailVc
{
if (!_storeDetailVc) {
_storeDetailVc = [FilterDetailViewController viewControllerWithStoryBoardType:STORYBOARD_TYPE_FILTER];
_storeDetailVc.isContentVc = YES;
}
return _storeDetailVc;
}
@end
......@@ -4,7 +4,7 @@
//
// Created by Javen on 2017/3/13.
// Copyright © 2017年 上海勾芒科技有限公司. All rights reserved.
// 巡检任务状态的模型
// VI检查任务状态的模型
#import <Foundation/Foundation.h>
......
......@@ -25,12 +25,12 @@ typedef NS_ENUM(NSInteger, AnswerSubmitAction) {
@property (nonatomic, copy) void (^blockReHttp)(void);
/**
门店巡检的结果
门店VI检查的结果
*/
@property (strong, nonatomic) Results *storeResult;
/**
巡检计划
VI检查计划
*/
@property (strong, nonatomic) PatrolTaskCustomModel *plan;
@property (strong, nonatomic) PatrolExamState *state;
......
......@@ -19,7 +19,7 @@
*/
- (void)setViewModel:(PatrolExamViewModel *)viewModel {
_viewModel = viewModel;
self.labelOperator.text = viewModel.inspector.f_user_name;
self.labelOperator.text = viewModel.inspector.user_name;
self.labelPosision.text = viewModel.inspector.store_name;
self.labelTime.text = [self configTimeBegin:viewModel.detail.beginDate end:viewModel.detail.endDate];
self.labelTitle.text = viewModel.plan.name;
......
......@@ -1061,7 +1061,7 @@ UIAlertViewDelegate>
}
#pragma GTOPatrolPlanResultHeaderItemDelegate
// 巡检结果中:不同区的headerView
// VI检查结果中:不同区的headerView
- (void)patrolPlanResultHeaderItem: (GTOPatrolPlanResultHeaderItem *)resultHeaderItem
andIsDisplay: (BOOL)isDisplay {
NSInteger aIndex = resultHeaderItem.tag - 2;
......
......@@ -672,7 +672,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
UILabel *attentionLbl = [[UILabel alloc]initWithFrame:CGRectMake(0, lblCome.bottom, W, topH)];
attentionLbl.font = [UIFont systemFontOfSize:20];
attentionLbl.text = [NSString stringWithFormat:@"填写页数范围:%d ~ %ld",0,[[GTOQuestionManager sharedManager] d_maxProblemLineno]];//0代表跳转到巡检汇总
attentionLbl.text = [NSString stringWithFormat:@"填写页数范围:%d ~ %ld",0,[[GTOQuestionManager sharedManager] d_maxProblemLineno]];//0代表跳转到VI检查汇总
[attentionLbl setTextAlignment:NSTextAlignmentCenter];
[info addSubview:attentionLbl];
......
......@@ -1057,7 +1057,7 @@ static NSString *headerProblemItemID = @"headerItem";
#pragma GTOPatrolPlanResultHeaderItemDelegate
// 巡检结果中:不同区的headerView
// VI检查结果中:不同区的headerView
- (void)patrolPlanResultHeaderItem:(GTOPatrolPlanResultHeaderItem *)resultHeaderItem andIsDisplay:(BOOL)isDisplay
{
NSInteger aIndex = resultHeaderItem.tag - 2;
......
......@@ -31,8 +31,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -181,8 +181,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -176,8 +176,9 @@ typedef enum : NSUInteger {
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -47,8 +47,9 @@
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn setImage:[UIImage imageNamed:@"result_back_icon"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 40, 40);
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
......
......@@ -86,14 +86,14 @@
break;
case kProjectPatrol :
{
titleStr = @"工程巡检";
contentStr = @"无工程巡检任务";
titleStr = @"工程VI检查";
contentStr = @"无工程VI检查任务";
}
break;
case kHSEPatrol:
{
titleStr = @"HSE专项巡检";
contentStr = @"无HSE专项巡检任务";
titleStr = @"HSE专项VI检查";
contentStr = @"无HSE专项VI检查任务";
}
break;
......@@ -109,4 +109,4 @@
self.contentLabel.text = contentStr;
[self layoutSubviews];
}
@end
\ No newline at end of file
@end
//
// GTOHomePatrolItem.h
// total
// 巡检的item
// VI检查的item
// Created by freecui on 15/10/20.
// Copyright (c) 2015年 free. All rights reserved.
//
......
//
// GTOHomePatrolItem.m
// total
// 巡检的item
// VI检查的item
// Created by freecui on 15/10/20.
// Copyright (c) 2015年 free. All rights reserved.
//
......@@ -91,9 +91,9 @@
- (void)updateWithData: (id)data andCategory: (NSString *)category{
if ([category isEqualToString:@"project"]) {
self.titleLabel.text = @"工程巡检";
self.titleLabel.text = @"工程VI检查";
} else {
self.titleLabel.text = @"HSE专项巡检";
self.titleLabel.text = @"HSE专项VI检查";
}
if (![data isKindOfClass:[GTOPatrolPlan class]]) {
self.m_nameLabel.text = @"无相关任务";
......@@ -110,7 +110,7 @@
self.m_nameLabel.text = patrolPlan.name;
self.m_processLabel.text = @"巡检总进度:";
self.m_processLabel.text = @"VI检查总进度:";
self.m_processValueLabel.textColor = GTO_RED_COLOR;
self.m_processValueLabel.text = [NSString stringWithFormat:@"%d%%",percent];
self.m_processFractionLabel.textColor = GTO_RED_COLOR;
......
......@@ -85,9 +85,9 @@
@implementation GTOHomeWarnItem (configure)
- (void)updateWithData {
self.titleLabel.text = @"待办事项提醒";
self.HSELabel.text = @"2015年HSE季度巡检";
self.HSELabel.text = @"2015年HSE季度VI检查";
self.HSETimeLabel.text = @"07-01 ~ 09-30";
self.checkLabel.text = @"2015年HSE季度巡检";
self.checkLabel.text = @"2015年HSE季度VI检查";
self.checkTimeLabel.text = @"07-01 ~ 09-30";
}
@end
......@@ -104,4 +104,4 @@
- (void)initSubviews {
}
* */
\ No newline at end of file
* */
......@@ -159,11 +159,9 @@
};
void (^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:@"登录失败"];
//[IBTLoadingView showTextOnly: data inView:self.view];
void (^fail)(id) = ^(NSError *data) {
[IBTLoadingView hideHUDWithText:data.localizedDescription];
};
[IBTLoadingView showProgressLabel:@"正在登录"];
ICRHTTPController *httpCtrl = [ICRHTTPController sharedController];
[httpCtrl doLoginWithUserName:nsUserName password:nsPassword registerCode:nsRegisterCode success:succ failure:fail];
......
......@@ -45,7 +45,7 @@
/**
巡检单选题、多选题、是非题 自动答题
VI检查单选题、多选题、是非题 自动答题
*/
@property (nonatomic, assign) BOOL automaticAnswer;
/**
......
......@@ -69,7 +69,7 @@
}else if ([item.optionKey isEqualToString:@"logoUrl"]) {
CompanyLogoModel *companyModel = [[CompanyLogoModel alloc] initWithString:item.optionValue error:nil];
self.companyLogo = companyModel;
//巡检自动答题
//VI检查自动答题
}else if ([item.optionKey isEqualToString:@"patrolAutomaticAnswer"]) {
self.automaticAnswer = [item.optionValue isEqualToString:@"true"];
//地图类型
......
......@@ -32,8 +32,13 @@
{
if (self.viewControllers.count > 0) {
viewController.hidesBottomBarWhenPushed = YES;
self.tabBarController.tabBar.hidden = YES;
viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:TCImage(@"back") style:UIBarButtonItemStyleDone target:self action:@selector(backBarButtonItemClick)];
viewController.navigationItem.hidesBackButton = YES;
UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
leftBtn.frame = CGRectMake(0, 0, 40, 40);
[leftBtn setImage:TCImage(@"result_back_icon") forState:UIControlStateNormal];
leftBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0);
[leftBtn addTarget:self action:@selector(backBarButtonItemClick) forControlEvents:UIControlEventTouchUpInside];
viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
}
[super pushViewController:viewController animated:animated];
}
......
......@@ -18,7 +18,6 @@
}
- (void)actionNotiAnswerChanged:(NSNotification *)noti {
CLog(@"%@",noti);
PatrolExamCellViewModel *cellModel = noti.object;
if (![cellModel.question.uuid isEqualToString:self.cellModel.question.uuid]) {
return;
......
......@@ -17,21 +17,8 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self createBackBtn];
}
#pragma mark -创建返回按钮
- (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, 12, 20);
[btn addTarget:self action:@selector(backClicked) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *back = [[UIBarButtonItem alloc]initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = back;
}
- (void)backClicked {
[self PopViewControllerAnimated:YES];
self.automaticallyAdjustsScrollViewInsets = NO;
self.navigationController.navigationBar.subviews[0].subviews[0].hidden = YES;
}
#pragma mark -渲染完成
......
......@@ -38,7 +38,7 @@
#pragma mark -开始时间
- (IBAction)beginButtonClickAction:(UIButton *)sender {
[[YXPickerManager shareManager] showDatePickerView:ICR_TINTCOLOR datePickerModel:UIDatePickerModeDate minimumDate:nil maximumDate:[NSDate dateWithString:self.endDateLabel.text format:@"yyyy-MM-dd"] defaultDate:[NSString stringWithFormat:@"%@ 00:00:00",self.begainDateLabel.text] commitBlock:^(NSString *date) {
[[YXPickerManager shareManager] showDatePickerView:GTO_BLUE_DEEP_COLOR datePickerModel:UIDatePickerModeDate minimumDate:nil maximumDate:[NSDate dateWithString:self.endDateLabel.text format:@"yyyy-MM-dd"] defaultDate:[NSString stringWithFormat:@"%@ 00:00:00",self.begainDateLabel.text] commitBlock:^(NSString *date) {
NSArray *dateArray = [date componentsSeparatedByString:@" "];
self.begainDateLabel.text = dateArray[0];
[self.beginSubject sendNext:self.begainDateLabel.text];
......@@ -49,7 +49,7 @@
#pragma mark -截止时间
- (IBAction)endButtonClickAction:(UIButton *)sender {
[[YXPickerManager shareManager] showDatePickerView:ICR_TINTCOLOR datePickerModel:UIDatePickerModeDate minimumDate:[NSDate dateWithString:self.begainDateLabel.text format:@"yyyy-MM-dd"] maximumDate:nil defaultDate:[NSString stringWithFormat:@"%@ 00:00:00",self.endDateLabel.text] commitBlock:^(NSString *date) {
[[YXPickerManager shareManager] showDatePickerView:GTO_BLUE_DEEP_COLOR datePickerModel:UIDatePickerModeDate minimumDate:[NSDate dateWithString:self.begainDateLabel.text format:@"yyyy-MM-dd"] maximumDate:nil defaultDate:[NSString stringWithFormat:@"%@ 00:00:00",self.endDateLabel.text] commitBlock:^(NSString *date) {
NSArray *dateArray = [date componentsSeparatedByString:@" "];
self.endDateLabel.text = dateArray[0];
[self.endSubject sendNext:self.endDateLabel.text];
......
......@@ -42,8 +42,8 @@
FILTER_SUPERVISOR, //督导人员
FILTER_INSPECTTASK, //自检任务项任务项
FILTER_INSPECTTASK_STATE, //自检任务状态
FILTER_PATROL_INSPECTTASK, //巡检任务项任务项
FILTER_PATROL_INSPECTTASK_STATE, //巡检任务状态
FILTER_PATROL_INSPECTTASK, //VI检查任务项任务项
FILTER_PATROL_INSPECTTASK_STATE, //VI检查任务状态
FILTER_CHECKITEM, //自检检查项
FILTER_SORT //排序方式
*/
......@@ -80,7 +80,7 @@
}
#pragma mark -巡检任务筛选项/值
#pragma mark -VI检查任务筛选项/值
+ (NSArray *)patrolInpectPlanFilter
{
//筛选条件
......@@ -99,7 +99,7 @@
return @[filters,conditionIndexPaths];
}
#pragma mark -巡检结果筛选项/值
#pragma mark -VI检查结果筛选项/值
+ (NSArray *)patrolInpectResultFilter
{
//筛选条件
......
......@@ -43,4 +43,9 @@
*/
@property (nonatomic, copy) void(^selectedItemBlock)(NSIndexPath *indexPath,FilterSearchModel *model);
/**
是否被包裹在别的控制器
*/
@property (nonatomic, assign) BOOL isContentVc;
@end
......@@ -39,6 +39,8 @@
self.filterDetailTableView.rowHeight = UITableViewAutomaticDimension;
self.filterDetailTableView.tableFooterView = [UIView new];
self.filterSearchBar.placeholder = @"请输入关键字";
self.filterSearchBar.barTintColor = self.isContentVc ? [UIColor whiteColor] : GTO_BLUE_DEEP_COLOR;
self.filterSearchBar.searchBarStyle = self.isContentVc ? UISearchBarStyleMinimal :UISearchBarStyleDefault;
self.title = @"筛选项选择";
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -24,7 +24,7 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fk4-1z-b1s">
<rect key="frame" x="30" y="66" width="315" height="44"/>
<color key="backgroundColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="H1G-m7-TpZ"/>
</constraints>
......@@ -86,13 +86,13 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2017-08-15" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vjv-k6-lVL">
<rect key="frame" x="233" y="42" width="96" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2017-08-15" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wQy-5C-3xN">
<rect key="frame" x="46" y="42" width="96" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.0" green="0.36078431370000003" blue="0.64705882349999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s7X-31-AWN">
......@@ -146,7 +146,7 @@
<rect key="frame" x="0.0" y="145.5" width="375" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="GGi-gf-Mkz" id="Kv4-31-7uj">
<rect key="frame" x="0.0" y="0.0" width="342" height="49.5"/>
<rect key="frame" x="0.0" y="0.0" width="341" height="49.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="筛选项名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NmF-OC-R8V">
......@@ -159,7 +159,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="请选择" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Z4-cw-18M">
<rect key="frame" x="299" y="16.5" width="43" height="17"/>
<rect key="frame" x="298" y="16.5" width="43" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
......@@ -263,12 +263,11 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<searchBar contentMode="redraw" placeholder="请输入关键字" translatesAutoresizingMaskIntoConstraints="NO" id="CN7-b8-gzs">
<searchBar contentMode="redraw" searchBarStyle="minimal" placeholder="请输入关键字" translatesAutoresizingMaskIntoConstraints="NO" id="CN7-b8-gzs">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="pzl-IK-rqk"/>
</constraints>
<color key="barTintColor" red="0.2470588235" green="0.52549019610000003" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<textInputTraits key="textInputTraits"/>
<connections>
<outlet property="delegate" destination="vyO-7p-eDR" id="whH-yI-n7d"/>
......
......@@ -34,7 +34,7 @@
- (void)queryDate {
for (FilterModel *model in self.fileterArray) {
if (model.type == FILTER_TIME) {
//巡检任务、巡检结果(开始时间-截止时间默认相差7天)
//VI检查任务、VI检查结果(开始时间-截止时间默认相差7天)
if ([self.classVc isKindOfClass:[PatrolTaskViewController class]] || [self.classVc isKindOfClass:[InspectionTableViewController class]] ) {
model.value = [ToolsManager getTimeby:-7];
model.uuid = [[NSDate date] yearMonthDayString];
......@@ -227,7 +227,7 @@
}];
}
#pragma mark -获取巡检任务列表
#pragma mark -获取VI检查任务列表
- (void)queryPatrolInspectPlanList:(SuccessBlock)successBlock {
[IBTLoadingView showProgressLabel:@"加载中..."];;
[RequestManager request_QueryPatrolInspectResultSuccess:^(id returnValue) {
......@@ -252,7 +252,7 @@
}];
}
#pragma mark -获取巡检任务状态
#pragma mark -获取VI检查任务状态
- (void)queryPatrolInspectPlanState:(SuccessBlock)successBlock {
NSArray *titleArray = @[@{@"name":@"待执行",@"uuid":@"1"},
@{@"name":@"执行中",@"uuid":@"2"},
......@@ -295,7 +295,7 @@
@"uuid" : @""},
@{@"name" : @"自检",
@"uuid" : @"inspection"},
@{@"name" : @"巡检",
@{@"name" : @"VI检查",
@"uuid" : @"inspection"},
@{@"name" : @"自定义",
@"uuid" : @"other"}];
......@@ -780,7 +780,7 @@
*/
- (void)sureFilterCondition
{
//巡检任务、巡检结果
//VI检查任务、VI检查结果
if ([self.classVc isKindOfClass:[PatrolTaskViewController class]] || [self.classVc isKindOfClass:[InspectionTableViewController class]]) {
ParametersModel *queryModel = (ParametersModel *)self.useQueryModel;
[self.fileterArray enumerateObjectsUsingBlock:^(FilterModel *object, NSUInteger index, BOOL * _Nonnull stop) {
......
......@@ -23,10 +23,10 @@
//拓站状态
+ (NSString *)pioneeringStateWithString: (NSString *)state;
//巡检
//VI检查
+ (NSString *)pioneeringCategoryWithString: (NSString *)category;
//各种巡检和SHE状态返回成对应的中文
//各种VI检查和SHE状态返回成对应的中文
+ (NSString *)patrolStateChineseWithEnglish: (NSString *)englishState;
//各种许可证状态返回成对应的中文
+ (NSString *)licenceStateChineseWithEnglish: (NSString *)englishState;
......
......@@ -78,18 +78,18 @@
}
}
//巡检
//VI检查
+ (NSString *)pioneeringCategoryWithString: (NSString *)category {
if ([category isEqualToString:@"project"]) {
return @"工程巡检列表";
return @"工程VI检查列表";
} else if ([category isEqualToString:@"HSE"]) {
return @"HSE巡检列表";
return @"HSEVI检查列表";
} else {
return @"error";
}
}
//各种巡检和SHE状态返回成对应的中文
//各种VI检查和SHE状态返回成对应的中文
+ (NSString *)patrolStateChineseWithEnglish: (NSString *)englishState {
if ([englishState isEqualToString:GTO_PATROL_STATE_INITIAL]) {
return @"未提交";
......
......@@ -91,7 +91,7 @@
+ (NSString *)getTimeby:(NSInteger)day;
/**
判断巡检任务门店任务状态
判断VI检查任务门店任务状态
@param state 状态码
@return 状态码图片
......@@ -99,7 +99,7 @@
+ (UIImage *)returnPatrolTaskStateImage:(NSInteger)state;
/**
判断巡检任务门店组坐标状态
判断VI检查任务门店组坐标状态
@param state 状态码
@param taskState 门店状态
......
......@@ -16,7 +16,7 @@
+ (NSString *)completeUrl:(NSString *)url
{
return [NSString stringWithFormat:@"%@%@",@"http://47.74.16.118:80/patrol-web/rest/",url];
return [NSString stringWithFormat:@"%@/%@",HTTP_REST_API_BASE_URL,url];
}
/**
......@@ -28,10 +28,11 @@
if (boolValue) {
return string;
}
NSArray *baseUrl = [HTTP_LOCAL_BASE_URL componentsSeparatedByString:@"patrol-web/rest/"];
NSArray *baseUrl = [HTTP_LOCAL_BASE_URL componentsSeparatedByString:@"total-server/rest/"];
NSString *urlString = [NSString stringWithFormat:@"%@%@",baseUrl.firstObject,string];
return urlString;
}
/**
比较时间字符串大小
......@@ -220,7 +221,7 @@
}
/**
判断巡检任务门店任务状态
判断VI检查任务门店任务状态
@param state 状态码
@return 状态码图片
......@@ -247,7 +248,7 @@
}
/**
判断巡检任务门店组坐标状态
判断VI检查任务门店组坐标状态
@param state 状态码
@param taskState 门店状态
......
......@@ -78,7 +78,7 @@
/**
自检以及巡检的进度(首页)
自检以及VI检查的进度(首页)
@param success 成功回调
@param failure 失败回调
......@@ -151,10 +151,17 @@
*/
+ (void)request_UploadInspectResult:(NSString *)taskUuid parmeter:(NSDictionary *)parmeter success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
生成VI临时VI检查
@param store_Uuid 油站ID
@param success 成功回调
@param failure 失败回调
*/
+ (void)request_CreatePatrolTempCheck:(NSString *)store_Uuid success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
获取巡检任务图片
获取VI检查任务图片
@param attachmentId 附件Uuid
@param success 成功回调
......@@ -254,7 +261,7 @@
/**********************************筛选条件***********************************/
/**
获取巡检任务
获取VI检查任务
@param queryModel 查询
@param success 成功回调
@param failure 失败回调
......@@ -262,8 +269,8 @@
+ (void)request_PatrolPlan:(ParametersModel *)queryModel success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
获取巡检任务详情
@param planUuid 巡检任务id
获取VI检查任务详情
@param planUuid VI检查任务id
@param storeUuid 门店id
@param success 成功回调
@param failure 失败回调
......@@ -271,8 +278,8 @@
+ (void)request_PatrolPlanDetail:(NSString *)planUuid storeUuid:(NSString *)storeUuid success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
获取巡检任务结果详情
@param planUuid 巡检任务id
获取VI检查任务结果详情
@param planUuid VI检查任务id
@param storeUuid 门店id
@param success 成功回调
@param failure 失败回调
......@@ -281,8 +288,8 @@
/**
提交巡检任务
@param planUuid 巡检任务id
提交VI检查任务
@param planUuid VI检查任务id
@param type 保存、提交
@param parameter 参数
@param success 成功回调
......@@ -292,9 +299,9 @@
/**
巡检任务开始答题
VI检查任务开始答题
@param planUuid 巡检任务uuid
@param planUuid VI检查任务uuid
@param storeUuid 门店uuid
@param selectedStoreUuid 选择门店uuid
@param longtitude 经度
......@@ -316,7 +323,7 @@
+ (void)request_QueryRoundStoreLongtitude:(NSString *)longtitude latitute:(NSString *)latitute success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
巡检结果查看
VI检查结果查看
@param model ParametersModel
@param success 成功回调
......@@ -325,7 +332,7 @@
+ (void)request_QueryPatrolInspectResult:(ParametersModel *)model success:(SuccessBlock)success failure:(ErrorBlock)failure;
/**
巡检任务列表
VI检查任务列表
@param success 成功回调
@param failure 失败回调
......@@ -334,7 +341,7 @@
/**
巡检任务附件查询
VI检查任务附件查询
@param entityUuid 附件id
@param success 成功回调
......
......@@ -76,7 +76,7 @@
/**
自检以及巡检的进度(首页)
自检以及VI检查的进度(首页)
@param success 成功回调
@param failure 失败回调
......@@ -218,7 +218,7 @@
/**
获取巡检任务图片
获取VI检查任务图片
@param attachmentId 附件Uuid
@param success 成功回调
......@@ -450,7 +450,7 @@
/**********************************筛选条件***********************************/
/**
获取巡检任务
获取VI检查任务
@param queryModel 查询
@param success 成功回调
@param failure 失败回调
......@@ -466,8 +466,8 @@
}
/**
获取巡检任务详情
@param planUuid 巡检任务id
获取VI检查任务详情
@param planUuid VI检查任务id
@param storeUuid 门店id
@param success 成功回调
@param failure 失败回调
......@@ -483,8 +483,8 @@
}
/**
获取巡检任务结果详情
@param planUuid 巡检任务id
获取VI检查任务结果详情
@param planUuid VI检查任务id
@param storeUuid 门店id
@param success 成功回调
@param failure 失败回调
......@@ -500,8 +500,8 @@
}
/**
提交巡检任务
@param planUuid 巡检任务id
提交VI检查任务
@param planUuid VI检查任务id
@param type 保存、提交
@param parameter 参数
@param success 成功回调
......@@ -519,9 +519,9 @@
/**
巡检任务开始答题
VI检查任务开始答题
@param planUuid 巡检任务uuid
@param planUuid VI检查任务uuid
@param storeUuid 门店uuid
@param selectedStoreUuid 选择门店uuid
@param longtitude 经度
......@@ -558,7 +558,7 @@
}
/**
巡检结果查看
VI检查结果查看
@param model ParametersModel
@param success 成功回调
......@@ -575,7 +575,7 @@
}
/**
巡检任务列表
VI检查任务列表
@param success 成功回调
@param failure 失败回调
......@@ -592,7 +592,7 @@
}
/**
巡检任务附件查询
VI检查任务附件查询
@param entityUuid 附件id
@param success 成功回调
......@@ -609,6 +609,26 @@
}];
}
/**
生成VI临时VI检查
@param store_Uuid 油站ID
@param success 成功回调
@param failure 失败回调
*/
+ (void)request_CreatePatrolTempCheck:(NSString *)store_Uuid success:(SuccessBlock)success failure:(ErrorBlock)failure {
NSString *urlString = [NSString stringWithFormat:[ToolsManager completeUrl:CREATEVITEMPCHECK],kUser.f_user_uuid,store_Uuid];
urlString = [ToolsManager returnUrlString:urlString];
[[NetWorkRequestManager shareManager] GET:urlString withParmeter:nil success:^(id returnValue) {
success(returnValue);
} failure:^(id errorValue) {
failure(errorValue);
}];
}
/**
自检结果发表评论
......
......@@ -22,12 +22,14 @@ UIKIT_EXTERN NSString *const UPLOADCONFIG;
UIKIT_EXTERN NSString *const STORECOORDLEVEL;
//待办(首页)
UIKIT_EXTERN NSString *const TODO;
//自检、巡检进度(首页)
//自检、VI检查进度(首页)
UIKIT_EXTERN NSString *const PRAISEANDINSPECTOR_PROGRESS;
//督导营运数据(首页)
UIKIT_EXTERN NSString *const SUPERVISOR_SERVICE;
//当日自检任务进度(首页)
UIKIT_EXTERN NSString *const QUERYPRAISESBYDAY;
//生成VI临时VI检查
UIKIT_EXTERN NSString *const CREATEVITEMPCHECK;
//当日自检任务列表、时间轴(首页)
UIKIT_EXTERN NSString *const QUERYPRAISESBYDAY2;
//门店营运数据(首页)
......@@ -38,7 +40,7 @@ UIKIT_EXTERN NSString *const INSPECTDETAIL;
UIKIT_EXTERN NSString *const STORECOORD;
//上传自检结果
UIKIT_EXTERN NSString *const UPLOADINSPECTRESULT;
//获取巡检任务图片
//获取VI检查任务图片
UIKIT_EXTERN NSString *const PATROLINSPECTATTACHMENT;
//通过状态获取公告列表
UIKIT_EXTERN NSString *const GETANNOUNCEMENT;
......@@ -60,23 +62,23 @@ UIKIT_EXTERN NSString *const QUERYTASK;
//获取检查项
UIKIT_EXTERN NSString *const QUERYCHECKITEM;
/**********筛选条件***********/
//查询巡检任务
//查询VI检查任务
UIKIT_EXTERN NSString *const QUERYPATROLPLAN;
//查询巡检任务详情
//查询VI检查任务详情
UIKIT_EXTERN NSString *const QUERYPATROLPLANDETAIL;
//提交巡检任务
//提交VI检查任务
UIKIT_EXTERN NSString *const SUBMITPATROLPLAN;
//巡检任务开始答题
//VI检查任务开始答题
UIKIT_EXTERN NSString *const BEGINPATROLPLANANSWER;
//获取周围门店
UIKIT_EXTERN NSString *const QUERYROUNDSTORE;
//巡检结果查看
//VI检查结果查看
UIKIT_EXTERN NSString *const QUERYPATROLINSPECTRESULT;
//巡检任务列表
//VI检查任务列表
UIKIT_EXTERN NSString *const QUERYPATROLINSPECTPLAN;
//巡检任务详情
//VI检查任务详情
UIKIT_EXTERN NSString *const QUERYPATROLINSPECTDETAIL;
//查询巡检任务附件
//查询VI检查任务附件
UIKIT_EXTERN NSString *const QUERYPATROLATTACHMENT;
//修改密码
UIKIT_EXTERN NSString *const CHANGEPASSWORD;
......
......@@ -20,7 +20,7 @@ NSString *const UPLOADCONFIG = @"option/getall";
NSString *const STORECOORDLEVEL = @"option/get/enableStoreLocationCheck";
//待办(首页)
NSString *const TODO = @"assignment/queryToDoTask";
//自检、巡检进度(首页)
//自检、VI检查进度(首页)
NSString *const PRAISEANDINSPECTOR_PROGRESS = @"praise/get_for_inspector";
//督导营运数据(首页)
NSString *const SUPERVISOR_SERVICE = @"operatingratios/getByInspector";
......@@ -36,7 +36,7 @@ NSString *const INSPECTDETAIL = @"praise/getAnswerByUuid2?questionUuid=%@&answer
NSString *const STORECOORD = @"signin/getStoreByMap/%@?lng=%@&lat=%@&flag=nearest";
//上传自检结果
NSString *const UPLOADINSPECTRESULT = @"praise/report/%@?time=%@&operId=%@&operName=%@";
//获取巡检任务图片
//获取VI检查任务图片
NSString *const PATROLINSPECTATTACHMENT = @"attachment/get_urls?entity_type=repairingBill&entity_uuid=%@";
//通过状态获取公告列表
NSString *const GETANNOUNCEMENT = @"affiche/download/%@?read=%@&page_number=%ld&page_size=%ld";
......@@ -58,24 +58,26 @@ NSString *const QUERYTASK = @"praise/queryPraise";
//获取检查项
NSString *const QUERYCHECKITEM = @"praise/queryQuestion";
/**********筛选条件***********/
//查询巡检任务
NSString *const QUERYPATROLPLAN = @"patrol/plan/queryResult";
//查询巡检任务详情
NSString *const QUERYPATROLPLANDETAIL = @"patrol/plan/get_store_detail/%@?store_uuid=%@&user_uuid=%@";
//提交巡检任务
NSString *const SUBMITPATROLPLAN = @"patrol/plan/submit_resultOnline/%@?plan_uuid=%@";
//巡检任务开始答题
NSString *const BEGINPATROLPLANANSWER = @"patrol/plan/update_inspector_start/%@?store_uuid=%@&user_uuid=%@&realstoreUuid=%@&longitude=%@&latitude=%@";
//查询VI检查任务
NSString *const QUERYPATROLPLAN = @"vipatrol/plan/queryResult";
//查询VI检查任务详情
NSString *const QUERYPATROLPLANDETAIL = @"vipatrol/plan/get_store_detail/%@?store_uuid=%@&user_uuid=%@";
//提交VI检查任务
NSString *const SUBMITPATROLPLAN = @"vipatrol/plan/submit_resultOnline/%@?plan_uuid=%@";
//VI检查任务开始答题
NSString *const BEGINPATROLPLANANSWER = @"vipatrol/plan/update_inspector_start/%@?store_uuid=%@&user_uuid=%@&realstoreUuid=%@&longitude=%@&latitude=%@";
//获取周围门店
NSString *const QUERYROUNDSTORE = @"mdata/store/queryByCoordinate?Lng=%@&Lat=%@";
//巡检结果查看
NSString *const QUERYPATROLINSPECTRESULT = @"patrol/plan/queryResult";
//巡检任务列表
NSString *const QUERYPATROLINSPECTPLAN = @"patrol/plan/query/%@?start_date=%@&date_type=before&category=project&page_number=%@&page_size=%@";
//巡检任务结果详情
NSString *const QUERYPATROLINSPECTDETAIL = @"patrol/plan/get_rstore_result/%@?store_uuid=%@";
//查询巡检任务附件
//VI检查结果查看
NSString *const QUERYPATROLINSPECTRESULT = @"vipatrol/plan/queryResult";
//VI检查任务列表
NSString *const QUERYPATROLINSPECTPLAN = @"vipatrol/plan/query/%@?start_date=%@&date_type=before&category=project&page_number=%@&page_size=%@";
//VI检查任务结果详情
NSString *const QUERYPATROLINSPECTDETAIL = @"vipatrol/plan/get_rstore_result/%@?store_uuid=%@";
//查询VI检查任务附件
NSString *const QUERYPATROLATTACHMENT = @"attachment/get_urls?entity_type=repairingBill&entity_uuid=%@";
//生成VI临时VI检查
NSString *const CREATEVITEMPCHECK = @"vipatrol/plan/create_by_temporary/%@?store_uuid=%@";
//修改密码
NSString *const CHANGEPASSWORD = @"user/change_password/%@?time=%@&operId=%@&operName=%@";
//自检结果
......
......@@ -10,7 +10,7 @@
//自检entity_type
static NSString *ENTITY_PRAISE = @"praiseAnswer";
//巡检entity_type
//VI检查entity_type
static NSString *ENTITY_PATROL = @"patrolAnswer";
//报修前entity_type
static NSString *ENTITY_REPAIRING = @"repairingBill";
......
......@@ -18,11 +18,11 @@
- STORYBOARD_TYPE_BUSINESS: 业务
- STORYBOARD_TYPE_REPORT: 公告
- STORYBOARD_TYPE_ME: 我的
- STORYBOARD_TYPE_PATROLINSPECTRESULT: 巡检结果查看
- STORYBOARD_TYPE_PATROLINSPECTRESULT: VI检查结果查看
- STORYBOARD_TYPE_MESSAGE: 消息
- STORYBOARD_TYPE_LEARN: 学习
- STORYBOARD_TYPE_FILTER: 筛选
- STORYBOARD_TYPE_PATROLINSPECT: 巡检任务
- STORYBOARD_TYPE_PATROLINSPECT: VI检查任务
- STORYBOARD_TYPE_RECTIFICATION: 整改
- STORYBOARD_TYPE_INSPECTRESULT: 自检结果
- STORYBOARD_TYPE_EQUIPMENTREPAIRS: 设备报修
......
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
"orientation" : "landscape",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "736h",
"scale" : "3x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "8.0",
"subtype" : "667h",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"subtype" : "retina4",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "to-status-bar",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "function_vicheck@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "function_vicheck@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "function_vicheck_gray@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "function_vicheck_gray@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment