Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
total
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
total
Commits
39fe1244
Commit
39fe1244
authored
Dec 11, 2017
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时VI检查增加历史检查入口,优化附件水印显示内容
parent
f97a7c29
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
494 additions
and
177 deletions
+494
-177
project.pbxproj
total.xcodeproj/project.pbxproj
+10
-0
BusinessViewController.m
total/GTOApp/Business/BusinessViewController.m
+8
-5
CustomInspectionTableViewCell.h
...esults(VI巡检结果)/Controller/CustomInspectionTableViewCell.h
+8
-15
CustomInspectionTableViewCell.m
...esults(VI巡检结果)/Controller/CustomInspectionTableViewCell.m
+3
-23
InspectionAnswerViewController.h
...sults(VI巡检结果)/Controller/InspectionAnswerViewController.h
+2
-1
InspectionAnswerViewController.m
...sults(VI巡检结果)/Controller/InspectionAnswerViewController.m
+3
-9
InspectionDetailTableViewController.m
...(VI巡检结果)/Controller/InspectionDetailTableViewController.m
+6
-11
InspectionTableViewController.m
...esults(VI巡检结果)/Controller/InspectionTableViewController.m
+2
-4
InspectionResultModel.h
...oIInspectionResults(VI巡检结果)/Model/InspectionResultModel.h
+5
-0
ParametersModel.h
...s/PatroIInspectionResults(VI巡检结果)/Model/ParametersModel.h
+5
-0
SupervisionHeaderTableViewCell.m
...tionResults(VI巡检结果)/View/SupervisionHeaderTableViewCell.m
+1
-0
SupervisionTableViewCell.m
...InspectionResults(VI巡检结果)/View/SupervisionTableViewCell.m
+15
-0
PatrolTaskRemarkFooterView.h
...ess/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.h
+14
-0
PatrolTaskRemarkFooterView.m
...ess/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.m
+19
-0
PatrolTaskRemarkFooterView.xib
...s/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.xib
+58
-0
PatrolExamAttachmentCell.m
...line(VI巡检)/Cells/QuestionCells/PatrolExamAttachmentCell.m
+41
-14
PatrolExamCategoryTableViewCell.m
...巡检)/Cells/QuestionCells/PatrolExamCategoryTableViewCell.m
+4
-1
ZJPatrolDetail.h
...TOApp/Business/PatrolOnline(VI巡检)/Models/ZJPatrolDetail.h
+7
-0
Patrol_PatrolInspect.storyboard
...siness/PatrolOnline(VI巡检)/Patrol_PatrolInspect.storyboard
+5
-4
PatrolAttachmentViewController.m
...e(VI巡检)/ViewConstrollers/PatrolAttachmentViewController.m
+24
-2
PatrolExamViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
+103
-35
PatrolStandardViewController.m
...ine(VI巡检)/ViewConstrollers/PatrolStandardViewController.m
+21
-22
PatrolTaskViewController.h
...lOnline(VI巡检)/ViewConstrollers/PatrolTaskViewController.h
+5
-0
PatrolTaskViewController.m
...lOnline(VI巡检)/ViewConstrollers/PatrolTaskViewController.m
+2
-1
PatrolTempCheckViewController.m
...ne(VI巡检)/ViewConstrollers/PatrolTempCheckViewController.m
+18
-5
PatrolExamTopView.m
...App/Business/PatrolOnline(VI巡检)/Views/PatrolExamTopView.m
+23
-1
SeeOrderViewController.m
total/GTOApp/Business/SeeOrderViewController.m
+1
-7
FilterViewModel.m
...TOApp/UserUtil/FilterManager/ViewModels/FilterViewModel.m
+9
-6
ToolsManager.m
total/GTOApp/UserUtil/Helper/ToolsManager.m
+1
-2
ZJPictureTableViewCell.h
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.h
+7
-1
ZJPictureTableViewCell.m
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
+4
-4
Contents.json
...sets/Patrol/patrol_exam_btn_bg_red.imageset/Contents.json
+35
-0
patrol_exam_btn_bg_red@3x.png
...ol_exam_btn_bg_red.imageset/patrol_exam_btn_bg_red@3x.png
+0
-0
Contents.json
...xcassets/Patrol/patrol_exam_camera.imageset/Contents.json
+0
-1
patrol_exam_camera.png
...Patrol/patrol_exam_camera.imageset/patrol_exam_camera.png
+0
-0
Contents.json
...ets/Patrol/patrol_exam_camera_gray.imageset/Contents.json
+0
-1
patrol_exam_camera_gray.png
...rol_exam_camera_gray.imageset/patrol_exam_camera_gray.png
+0
-0
Contents.json
...sets/Patrol/patrol_exam_camera_red.imageset/Contents.json
+22
-0
patrol_exam_camera_red@2x.png
...ol_exam_camera_red.imageset/patrol_exam_camera_red@2x.png
+0
-0
patrol_exam_camera_red@3x.png
...ol_exam_camera_red.imageset/patrol_exam_camera_red@3x.png
+0
-0
Info.plist
total/Info.plist
+2
-2
ICRHTTPController.m
total/Managers/HttpManager/ICRHTTPController.m
+1
-0
No files found.
total.xcodeproj/project.pbxproj
View file @
39fe1244
...
@@ -128,6 +128,8 @@
...
@@ -128,6 +128,8 @@
29B501E61D1A95CC003D4E74
/* SourceOrderSectionView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501E51D1A95CC003D4E74
/* SourceOrderSectionView.xib */
;
};
29B501E61D1A95CC003D4E74
/* SourceOrderSectionView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501E51D1A95CC003D4E74
/* SourceOrderSectionView.xib */
;
};
29B501E91D1A986B003D4E74
/* OilHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501E81D1A986B003D4E74
/* OilHeaderView.m */
;
};
29B501E91D1A986B003D4E74
/* OilHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501E81D1A986B003D4E74
/* OilHeaderView.m */
;
};
29B501EB1D1A9875003D4E74
/* OilHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501EA1D1A9875003D4E74
/* OilHeaderView.xib */
;
};
29B501EB1D1A9875003D4E74
/* OilHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B501EA1D1A9875003D4E74
/* OilHeaderView.xib */
;
};
29B510A01FD8E1230040198F
/* PatrolTaskRemarkFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B5109F1FD8E1230040198F
/* PatrolTaskRemarkFooterView.m */
;
};
29B510A21FD8E3D30040198F
/* PatrolTaskRemarkFooterView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29B510A11FD8E3D30040198F
/* PatrolTaskRemarkFooterView.xib */
;
};
29BE722E1D40773F001D60EE
/* OilNumberTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE722D1D40773F001D60EE
/* OilNumberTableViewCell.m */
;
};
29BE722E1D40773F001D60EE
/* OilNumberTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE722D1D40773F001D60EE
/* OilNumberTableViewCell.m */
;
};
29BE72311D407755001D60EE
/* LossNumberTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE72301D407755001D60EE
/* LossNumberTableViewCell.m */
;
};
29BE72311D407755001D60EE
/* LossNumberTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE72301D407755001D60EE
/* LossNumberTableViewCell.m */
;
};
29BE72341D4077BE001D60EE
/* NoteTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE72331D4077BE001D60EE
/* NoteTableViewCell.m */
;
};
29BE72341D4077BE001D60EE
/* NoteTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BE72331D4077BE001D60EE
/* NoteTableViewCell.m */
;
};
...
@@ -695,6 +697,9 @@
...
@@ -695,6 +697,9 @@
29B501E71D1A986B003D4E74
/* OilHeaderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OilHeaderView.h
;
sourceTree
=
"<group>"
;
};
29B501E71D1A986B003D4E74
/* OilHeaderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OilHeaderView.h
;
sourceTree
=
"<group>"
;
};
29B501E81D1A986B003D4E74
/* OilHeaderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OilHeaderView.m
;
sourceTree
=
"<group>"
;
};
29B501E81D1A986B003D4E74
/* OilHeaderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OilHeaderView.m
;
sourceTree
=
"<group>"
;
};
29B501EA1D1A9875003D4E74
/* OilHeaderView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OilHeaderView.xib
;
sourceTree
=
"<group>"
;
};
29B501EA1D1A9875003D4E74
/* OilHeaderView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
OilHeaderView.xib
;
sourceTree
=
"<group>"
;
};
29B5109E1FD8E1230040198F
/* PatrolTaskRemarkFooterView.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PatrolTaskRemarkFooterView.h
;
sourceTree
=
"<group>"
;
};
29B5109F1FD8E1230040198F
/* PatrolTaskRemarkFooterView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PatrolTaskRemarkFooterView.m
;
sourceTree
=
"<group>"
;
};
29B510A11FD8E3D30040198F
/* PatrolTaskRemarkFooterView.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
PatrolTaskRemarkFooterView.xib
;
sourceTree
=
"<group>"
;
};
29BE722C1D40773F001D60EE
/* OilNumberTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OilNumberTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29BE722C1D40773F001D60EE
/* OilNumberTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
OilNumberTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29BE722D1D40773F001D60EE
/* OilNumberTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OilNumberTableViewCell.m
;
sourceTree
=
"<group>"
;
};
29BE722D1D40773F001D60EE
/* OilNumberTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
OilNumberTableViewCell.m
;
sourceTree
=
"<group>"
;
};
29BE722F1D407755001D60EE
/* LossNumberTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
LossNumberTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29BE722F1D407755001D60EE
/* LossNumberTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
LossNumberTableViewCell.h
;
sourceTree
=
"<group>"
;
};
...
@@ -2074,6 +2079,9 @@
...
@@ -2074,6 +2079,9 @@
29F5C39C1FCBAA4F0052CBF1
/* PatrolTaskCollectionReusableView.m */
,
29F5C39C1FCBAA4F0052CBF1
/* PatrolTaskCollectionReusableView.m */
,
29F5C39D1FCBAA4F0052CBF1
/* PatrolTaskCollectionViewCell.h */
,
29F5C39D1FCBAA4F0052CBF1
/* PatrolTaskCollectionViewCell.h */
,
29F5C39E1FCBAA4F0052CBF1
/* PatrolTaskCollectionViewCell.m */
,
29F5C39E1FCBAA4F0052CBF1
/* PatrolTaskCollectionViewCell.m */
,
29B5109E1FD8E1230040198F
/* PatrolTaskRemarkFooterView.h */
,
29B5109F1FD8E1230040198F
/* PatrolTaskRemarkFooterView.m */
,
29B510A11FD8E3D30040198F
/* PatrolTaskRemarkFooterView.xib */
,
29F5C39F1FCBAA4F0052CBF1
/* QuestionCells */
,
29F5C39F1FCBAA4F0052CBF1
/* QuestionCells */
,
29F5C3B01FCBAA4F0052CBF1
/* ZJStandardPictureTableViewCell.h */
,
29F5C3B01FCBAA4F0052CBF1
/* ZJStandardPictureTableViewCell.h */
,
29F5C3B11FCBAA4F0052CBF1
/* ZJStandardPictureTableViewCell.m */
,
29F5C3B11FCBAA4F0052CBF1
/* ZJStandardPictureTableViewCell.m */
,
...
@@ -3625,6 +3633,7 @@
...
@@ -3625,6 +3633,7 @@
isa
=
PBXResourcesBuildPhase
;
isa
=
PBXResourcesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
29B510A21FD8E3D30040198F
/* PatrolTaskRemarkFooterView.xib in Resources */
,
3506ECCD1BA00E3400897EBE
/* Main.storyboard in Resources */
,
3506ECCD1BA00E3400897EBE
/* Main.storyboard in Resources */
,
2978ED531D1BC74D00159B4A
/* TimeSelectViewController.xib in Resources */
,
2978ED531D1BC74D00159B4A
/* TimeSelectViewController.xib in Resources */
,
2941543E1D1D099100B3B761
/* OrderDetailsView.xib in Resources */
,
2941543E1D1D099100B3B761
/* OrderDetailsView.xib in Resources */
,
...
@@ -4014,6 +4023,7 @@
...
@@ -4014,6 +4023,7 @@
35B2E56C1BAC064600AB8582
/* ICRQStarViewController.m in Sources */
,
35B2E56C1BAC064600AB8582
/* ICRQStarViewController.m in Sources */
,
3506ECEA1BA012BB00897EBE
/* AppDelegate.m in Sources */
,
3506ECEA1BA012BB00897EBE
/* AppDelegate.m in Sources */
,
35B2E56A1BAC064600AB8582
/* ICRQScoreViewController.m in Sources */
,
35B2E56A1BAC064600AB8582
/* ICRQScoreViewController.m in Sources */
,
29B510A01FD8E1230040198F
/* PatrolTaskRemarkFooterView.m in Sources */
,
2944FC231D2F48040093628B
/* BaseViewController.m in Sources */
,
2944FC231D2F48040093628B
/* BaseViewController.m in Sources */
,
29F5C4521FCBAB410052CBF1
/* SupervisionTableViewCell.m in Sources */
,
29F5C4521FCBAB410052CBF1
/* SupervisionTableViewCell.m in Sources */
,
3506EDD91BA0194300897EBE
/* UIFont+Custom.m in Sources */
,
3506EDD91BA0194300897EBE
/* UIFont+Custom.m in Sources */
,
...
...
total/GTOApp/Business/BusinessViewController.m
View file @
39fe1244
...
@@ -126,8 +126,8 @@
...
@@ -126,8 +126,8 @@
,
@"function_vicheck"
,
@"function_vicheck"
,
@"function_vicheckresult"
,
nil
];
,
@"function_vicheckresult"
,
nil
];
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"
VI临时
检查"
@"
临时VI
检查"
,
@"VI检查"
,
@"VI检查
任务
"
,
@"VI检查结果"
,
nil
];
,
@"VI检查结果"
,
nil
];
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
NSDictionary
*
dict
=
@{
@"image"
:
[
imageArray
objectAtIndex
:
i
],
@"title"
:
[
titleArray
objectAtIndex
:
i
]};
[
_datasArray
[
3
]
addObject
:
dict
];
[
_datasArray
[
3
]
addObject
:
dict
];
...
@@ -254,9 +254,9 @@
...
@@ -254,9 +254,9 @@
//VI检查
//VI检查
NSArray
*
viExamine
=
[
NSArray
arrayWithObjects
:
NSArray
*
viExamine
=
[
NSArray
arrayWithObjects
:
@"50
0201,500202,500203
"
@"50
1601,501602
"
,
@"50
0201,500202,500203
"
,
@"50
1401,501402
"
,
@"50
0201,500202,500203
"
,
nil
];
,
@"50
1501
"
,
nil
];
//开发、HSE
//开发、HSE
NSArray
*
development
=
[
NSArray
arrayWithObjects
:
NSArray
*
development
=
[
NSArray
arrayWithObjects
:
@"500501,500502,500503"
@"500501,500502,500503"
...
@@ -292,7 +292,9 @@
...
@@ -292,7 +292,9 @@
#pragma mark -获取登录人的所有的油站
#pragma mark -获取登录人的所有的油站
-
(
void
)
getStoreArray
-
(
void
)
getStoreArray
{
{
[
IBTLoadingView
showProgressLabel
:
@"获取门店中"
];
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/mdata/store/getsByUser/%@"
,
HTTP_REST_API_BASE_URL
,[
ICRUserUtil
sharedInstance
].
f_user_uuid
]
withRequestType
:
ONE
withParameter
:
nil
withSuccess
:^
(
id
returnValue
)
{
[
HttpRequestManager
requestNetworkwithURL
:[
NSString
stringWithFormat
:
@"%@/mdata/store/getsByUser/%@"
,
HTTP_REST_API_BASE_URL
,[
ICRUserUtil
sharedInstance
].
f_user_uuid
]
withRequestType
:
ONE
withParameter
:
nil
withSuccess
:^
(
id
returnValue
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
if
([
returnValue
[
@"success"
]
isEqualToNumber
:
@1
])
{
[
ICRUserUtil
sharedInstance
].
storeArray
=
returnValue
[
@"data"
];
[
ICRUserUtil
sharedInstance
].
storeArray
=
returnValue
[
@"data"
];
}
}
...
@@ -448,6 +450,7 @@
...
@@ -448,6 +450,7 @@
[
self
PushViewController
:
patrolResultVc
animated
:
YES
];
[
self
PushViewController
:
patrolResultVc
animated
:
YES
];
}
else
if
(
indexPath
.
item
==
1
)
{
}
else
if
(
indexPath
.
item
==
1
)
{
PatrolTaskViewController
*
patrolTask
=
[
PatrolTaskViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
PatrolTaskViewController
*
patrolTask
=
[
PatrolTaskViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
patrolTask
.
isTempTask
=
NO
;
[
self
PushViewController
:
patrolTask
animated
:
YES
];
[
self
PushViewController
:
patrolTask
animated
:
YES
];
}
else
{
}
else
{
PatrolTempCheckViewController
*
tempChecKVc
=
[
PatrolTempCheckViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
PatrolTempCheckViewController
*
tempChecKVc
=
[
PatrolTempCheckViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/CustomInspectionTableViewCell.h
View file @
39fe1244
...
@@ -11,15 +11,6 @@
...
@@ -11,15 +11,6 @@
@interface
CustomInspectionTableViewCell
:
UITableViewCell
@interface
CustomInspectionTableViewCell
:
UITableViewCell
/**
VI检查问题、答案 数据源
*/
@property
(
nonatomic
,
strong
)
NSArray
*
datasArray
;
/**
* 父视图传入的section闭合控制数组
*/
@property
(
nonatomic
,
strong
)
NSArray
*
closedControlArray
;
/**
/**
显示内容
显示内容
...
@@ -27,14 +18,16 @@
...
@@ -27,14 +18,16 @@
@property
(
nonatomic
,
strong
)
InspectionAnswerViewController
*
inspectionVc
;
@property
(
nonatomic
,
strong
)
InspectionAnswerViewController
*
inspectionVc
;
/**
/**
cell 高度
刷新cell
@param datasArray VI检查问题、答案 数据源
@param rowHeightArray cell 高度
@param sectionHeightArray section 高度
@param closedControlArray 父视图传入的section闭合控制数组
*/
*/
@property
(
nonatomic
,
strong
)
NSArray
*
rowHeightArray
;
-
(
void
)
updateCell
:(
NSArray
*
)
datasArray
rowHeightArray
:(
NSArray
*
)
rowHeightArray
sectionHeightArray
:(
NSArray
*
)
sectionHeightArray
closedControlArray
:(
NSMutableArray
*
)
closedControlArray
;
/**
section 高度
*/
@property
(
nonatomic
,
strong
)
NSArray
*
sectionHeightArray
;
@end
@end
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/CustomInspectionTableViewCell.m
View file @
39fe1244
...
@@ -27,34 +27,14 @@
...
@@ -27,34 +27,14 @@
[
self
.
contentView
addSubview
:
self
.
inspectionVc
.
view
];
[
self
.
contentView
addSubview
:
self
.
inspectionVc
.
view
];
}
}
#pragma mark - 数据源
-
(
void
)
updateCell
:
(
NSArray
*
)
datasArray
rowHeightArray
:
(
NSArray
*
)
rowHeightArray
sectionHeightArray
:
(
NSArray
*
)
sectionHeightArray
closedControlArray
:
(
NSMutableArray
*
)
closedControlArray
-
(
void
)
setDatasArray
:
(
NSArray
*
)
datasArray
{
{
_datasArray
=
datasArray
;
self
.
inspectionVc
.
datasArray
=
datasArray
;
self
.
inspectionVc
.
datasArray
=
datasArray
;
}
#pragma mark - Section 闭合
-
(
void
)
setClosedControlArray
:
(
NSMutableArray
*
)
closedControlArray
{
_closedControlArray
=
closedControlArray
;
self
.
inspectionVc
.
closedControlArray
=
closedControlArray
;
}
#pragma mark - SubTableView Row Height
-
(
void
)
setRowHeightArray
:
(
NSArray
*
)
rowHeightArray
{
_rowHeightArray
=
rowHeightArray
;
self
.
inspectionVc
.
rowHeightArray
=
rowHeightArray
;
}
-
(
void
)
setSectionHeightArray
:
(
NSArray
*
)
sectionHeightArray
{
_sectionHeightArray
=
sectionHeightArray
;
self
.
inspectionVc
.
sectionHeightArray
=
sectionHeightArray
;
self
.
inspectionVc
.
sectionHeightArray
=
sectionHeightArray
;
self
.
inspectionVc
.
rowHeightArray
=
rowHeightArray
;
self
.
inspectionVc
.
closedControlArray
=
closedControlArray
;
}
}
@end
@end
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionAnswerViewController.h
View file @
39fe1244
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
@end
@end
@interface
InspectionAnswerViewController
:
UITableViewController
@interface
InspectionAnswerViewController
:
UITableViewController
@property
(
nonatomic
,
weak
)
id
<
RefreshDelegate
>
RefreshD
elegate
;
@property
(
nonatomic
,
weak
)
id
<
RefreshDelegate
>
d
elegate
;
/**
/**
VI检查问题、答案 数据源
VI检查问题、答案 数据源
...
@@ -48,4 +48,5 @@
...
@@ -48,4 +48,5 @@
*/
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
browserArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
browserArray
;
@end
@end
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionAnswerViewController.m
View file @
39fe1244
...
@@ -34,9 +34,7 @@
...
@@ -34,9 +34,7 @@
-
(
void
)
setClosedControlArray
:
(
NSMutableArray
*
)
closedControlArray
-
(
void
)
setClosedControlArray
:
(
NSMutableArray
*
)
closedControlArray
{
{
_closedControlArray
=
closedControlArray
;
_closedControlArray
=
closedControlArray
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
});
}
}
#pragma mark - Table view data source
#pragma mark - Table view data source
...
@@ -90,15 +88,11 @@
...
@@ -90,15 +88,11 @@
BOOL
boolValue
=
[
self
.
closedControlArray
[
senderIndex
]
boolValue
];
BOOL
boolValue
=
[
self
.
closedControlArray
[
senderIndex
]
boolValue
];
boolValue
=
!
boolValue
;
boolValue
=
!
boolValue
;
self
.
closedControlArray
[
senderIndex
]
=
[
NSNumber
numberWithBool
:
boolValue
];
self
.
closedControlArray
[
senderIndex
]
=
[
NSNumber
numberWithBool
:
boolValue
];
if
([
self
.
RefreshD
elegate
respondsToSelector
:
@selector
(
refreshSuperTableView
)])
{
if
([
self
.
d
elegate
respondsToSelector
:
@selector
(
refreshSuperTableView
)])
{
[
self
.
RefreshD
elegate
refreshSuperTableView
];
[
self
.
d
elegate
refreshSuperTableView
];
}
}
[
self
.
tableView
reloadData
];
}
}
@end
@end
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionDetailTableViewController.m
View file @
39fe1244
...
@@ -84,6 +84,10 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
...
@@ -84,6 +84,10 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
*/
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
checkItemsLabel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
checkItemsLabel
;
/**
cell高度
*/
@property
(
nonatomic
,
assign
)
CGFloat
cellHeight
;
@end
@end
...
@@ -254,11 +258,8 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
...
@@ -254,11 +258,8 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
CustomInspectionTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
CELL
forIndexPath
:
indexPath
];
CustomInspectionTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
CELL
forIndexPath
:
indexPath
];
cell
.
datasArray
=
self
.
datasArray
[
indexPath
.
section
];
cell
.
inspectionVc
.
delegate
=
self
;
cell
.
inspectionVc
.
RefreshDelegate
=
self
;
[
cell
updateCell
:
self
.
datasArray
[
indexPath
.
section
]
rowHeightArray
:
self
.
subTableViewHeightArray
[
indexPath
.
section
]
sectionHeightArray
:
self
.
subTableViewSectionHeightArray
[
indexPath
.
section
]
closedControlArray
:
self
.
sectionOpenControl
[
indexPath
.
section
]];
cell
.
rowHeightArray
=
self
.
subTableViewHeightArray
[
indexPath
.
section
];
cell
.
sectionHeightArray
=
self
.
subTableViewSectionHeightArray
[
indexPath
.
section
];
cell
.
closedControlArray
=
self
.
sectionOpenControl
[
indexPath
.
section
];
return
cell
;
return
cell
;
}
}
...
@@ -288,12 +289,6 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
...
@@ -288,12 +289,6 @@ NSString *const CELL = @"CustomInspectionTableViewCell";
return
SECTION_HEIGHT
;
return
SECTION_HEIGHT
;
}
}
#pragma mark -<sectionHeaderDelegate>
-
(
void
)
refreshingTableViewHeight
:
(
NSNumber
*
)
sectionState
withIndexPath
:
(
NSIndexPath
*
)
indexPath
{
self
.
sectionOpenControl
[
indexPath
.
section
][
indexPath
.
row
]
=
sectionState
;
[
self
.
tableView
reloadData
];
}
#pragma mark - <RefreshDelegate>
#pragma mark - <RefreshDelegate>
-
(
void
)
refreshSuperTableView
-
(
void
)
refreshSuperTableView
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Controller/InspectionTableViewController.m
View file @
39fe1244
...
@@ -80,10 +80,8 @@
...
@@ -80,10 +80,8 @@
*/
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
storeNumberTitleLabel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
storeNumberTitleLabel
;
@end
@end
@implementation
InspectionTableViewController
@implementation
InspectionTableViewController
...
@@ -285,14 +283,14 @@
...
@@ -285,14 +283,14 @@
_queryResultModel
=
[[
ParametersModel
alloc
]
init
];
_queryResultModel
=
[[
ParametersModel
alloc
]
init
];
_queryResultModel
.
pageSize
=
PAGESIZE
;
_queryResultModel
.
pageSize
=
PAGESIZE
;
_queryResultModel
.
pageNumber
=
ZERO
;
_queryResultModel
.
pageNumber
=
ZERO
;
_queryResultModel
.
userUuid
=
kUser
.
f_user_uuid
;
//
_queryResultModel.userUuid = kUser.f_user_uuid;
NSString
*
dateString
=
[[
NSDate
date
]
yearMonthDayString
];
NSString
*
dateString
=
[[
NSDate
date
]
yearMonthDayString
];
NSString
*
beginDateString
=
[
NSString
stringWithFormat
:
@"%@ 00:00:00"
,[
ToolsManager
getTimeby
:
-
7
]];
NSString
*
beginDateString
=
[
NSString
stringWithFormat
:
@"%@ 00:00:00"
,[
ToolsManager
getTimeby
:
-
7
]];
NSString
*
endDateString
=
[
NSString
stringWithFormat
:
@"%@ 23:59:59"
,
dateString
];
NSString
*
endDateString
=
[
NSString
stringWithFormat
:
@"%@ 23:59:59"
,
dateString
];
_queryResultModel
.
beginDate
=
beginDateString
;
_queryResultModel
.
beginDate
=
beginDateString
;
_queryResultModel
.
endDate
=
endDateString
;
_queryResultModel
.
endDate
=
endDateString
;
InspectQuickLookQuery
*
conditions
=
[[
InspectQuickLookQuery
alloc
]
init
];
InspectQuickLookQuery
*
conditions
=
[[
InspectQuickLookQuery
alloc
]
init
];
conditions
.
field
=
@"begin
Tim
e"
;
conditions
.
field
=
@"begin
Dat
e"
;
conditions
.
direction
=
@"desc"
;
conditions
.
direction
=
@"desc"
;
_queryResultModel
.
queryOrders
=
(
NSArray
<
InspectQuickLookQuery
>
*
)@[
conditions
];
_queryResultModel
.
queryOrders
=
(
NSArray
<
InspectQuickLookQuery
>
*
)@[
conditions
];
}
}
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Model/InspectionResultModel.h
View file @
39fe1244
...
@@ -77,6 +77,11 @@
...
@@ -77,6 +77,11 @@
@property
(
nonatomic
,
copy
)
NSString
*
beginDate
;
@property
(
nonatomic
,
copy
)
NSString
*
beginDate
;
/**
是否是临时巡检
*/
@property
(
nonatomic
,
assign
)
BOOL
temp
;
@property
(
nonatomic
,
strong
)
NSArray
<
Inspectors
>
*
inspectors
;
@property
(
nonatomic
,
strong
)
NSArray
<
Inspectors
>
*
inspectors
;
@property
(
nonatomic
,
copy
)
NSString
*
name
;
@property
(
nonatomic
,
copy
)
NSString
*
name
;
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/Model/ParametersModel.h
View file @
39fe1244
...
@@ -51,6 +51,11 @@
...
@@ -51,6 +51,11 @@
*/
*/
@property
(
nonatomic
,
assign
)
NSInteger
pageNumber
;
@property
(
nonatomic
,
assign
)
NSInteger
pageNumber
;
/**
区分是否是临时任务
*/
@property
(
nonatomic
,
copy
)
NSString
*
isTemp
;
/**
/**
* 页个数
* 页个数
*/
*/
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/View/SupervisionHeaderTableViewCell.m
View file @
39fe1244
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
CGFloat
storesCount
=
model
.
personStoreCount
;
CGFloat
storesCount
=
model
.
personStoreCount
;
self
.
taskProgressLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.0f%@(%ld/%.0f%@)"
,(
model
.
finishCount
/
storesCount
)
*
100
.
0
,
@"%"
,
model
.
finishCount
,
storesCount
,
@"店"
];
self
.
taskProgressLabel
.
text
=
[
NSString
stringWithFormat
:
@"%.0f%@(%ld/%.0f%@)"
,(
model
.
finishCount
/
storesCount
)
*
100
.
0
,
@"%"
,
model
.
finishCount
,
storesCount
,
@"店"
];
[
self
.
progressView
setProgress
:
model
.
finishCount
/
storesCount
animated
:
YES
];
[
self
.
progressView
setProgress
:
model
.
finishCount
/
storesCount
animated
:
YES
];
self
.
supervisionNameLabel
.
textColor
=
[
model
.
user_uuid
isEqualToString
:
kUser
.
f_user_uuid
]
?
ICR_TINTCOLOR
:
[
UIColor
blackColor
];
}
}
#pragma mark -设置进度条风格
#pragma mark -设置进度条风格
...
...
total/GTOApp/Business/PatroIInspectionResults(VI巡检结果)/View/SupervisionTableViewCell.m
View file @
39fe1244
...
@@ -28,6 +28,21 @@
...
@@ -28,6 +28,21 @@
self
.
taskStateImageView
.
image
=
storesModel
.
resultState
?
TCImage
(
@"complete"
):
TCImage
(
@"unfinished"
);
self
.
taskStateImageView
.
image
=
storesModel
.
resultState
?
TCImage
(
@"complete"
):
TCImage
(
@"unfinished"
);
self
.
finishProgressLabel
.
text
=
storesModel
.
resultState
?
nil
:
@"未提交"
;
self
.
finishProgressLabel
.
text
=
storesModel
.
resultState
?
nil
:
@"未提交"
;
self
.
finishProgressLabel
.
hidden
=
storesModel
.
resultState
;
self
.
finishProgressLabel
.
hidden
=
storesModel
.
resultState
;
}
}
@end
@end
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.h
0 → 100644
View file @
39fe1244
//
// PatrolTaskRemarkFooterView.h
// total
//
// Created by 曹云霄 on 2017/12/7.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "IQTextView.h"
@interface
PatrolTaskRemarkFooterView
:
UITableViewHeaderFooterView
@property
(
weak
,
nonatomic
)
IBOutlet
IQTextView
*
remarkTextView
;
@end
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.m
0 → 100644
View file @
39fe1244
//
// PatrolTaskRemarkFooterView.m
// total
//
// Created by 曹云霄 on 2017/12/7.
// Copyright © 2017年 Delevin. All rights reserved.
//
#import "PatrolTaskRemarkFooterView.h"
@implementation
PatrolTaskRemarkFooterView
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
self
.
remarkTextView
.
placeholder
=
@"请输入备注内容..."
;
}
@end
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/PatrolTaskRemarkFooterView.xib
0 → 100644
View file @
39fe1244
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.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=
"13527"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"PatrolTaskRemarkFooterView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"100"
/>
<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=
"aAQ-fX-SrJ"
>
<rect
key=
"frame"
x=
"20"
y=
"10"
width=
"31"
height=
"18"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
textAlignment=
"natural"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Eph-Dj-H5K"
customClass=
"IQTextView"
>
<rect
key=
"frame"
x=
"20"
y=
"38"
width=
"335"
height=
"52"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
autocapitalizationType=
"sentences"
/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"number"
keyPath=
"cornerRadius"
>
<real
key=
"value"
value=
"5"
/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute
type=
"number"
keyPath=
"borderWidth"
>
<real
key=
"value"
value=
"1"
/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute
type=
"color"
keyPath=
"borderColor"
>
<color
key=
"value"
red=
"0.92941176469999998"
green=
"0.93333333330000001"
blue=
"0.93725490199999995"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textView>
</subviews>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstItem=
"aAQ-fX-SrJ"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
constant=
"10"
id=
"5wu-Zq-WW8"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"Eph-Dj-H5K"
secondAttribute=
"trailing"
constant=
"20"
id=
"6MV-CF-1Cw"
/>
<constraint
firstItem=
"aAQ-fX-SrJ"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
constant=
"20"
id=
"6YX-Xy-wO7"
/>
<constraint
firstItem=
"Eph-Dj-H5K"
firstAttribute=
"top"
secondItem=
"aAQ-fX-SrJ"
secondAttribute=
"bottom"
constant=
"10"
id=
"OxA-2r-dNl"
/>
<constraint
firstItem=
"Eph-Dj-H5K"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
constant=
"20"
id=
"TD7-0V-4ZH"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"Eph-Dj-H5K"
secondAttribute=
"bottom"
constant=
"10"
id=
"jFu-If-EqR"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"remarkTextView"
destination=
"Eph-Dj-H5K"
id=
"PjL-lR-yYq"
/>
</connections>
<point
key=
"canvasLocation"
x=
"37.5"
y=
"36"
/>
</view>
</objects>
</document>
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/QuestionCells/PatrolExamAttachmentCell.m
View file @
39fe1244
...
@@ -34,11 +34,9 @@
...
@@ -34,11 +34,9 @@
-
(
void
)
setCellModel
:
(
PatrolExamCellViewModel
*
)
cellModel
{
-
(
void
)
setCellModel
:
(
PatrolExamCellViewModel
*
)
cellModel
{
[
super
setCellModel
:
cellModel
];
[
super
setCellModel
:
cellModel
];
if
(
cellModel
.
question
.
reference
.
length
>
0
)
{
if
(
cellModel
.
question
.
reference
.
length
>
0
)
{
self
.
btnReference
.
hidden
=
NO
;
self
.
btnReference
.
hidden
=
NO
;
}
else
{
}
else
{
if
([
UploadManager
getUploadType
]
==
UPLOAD_COMMON
)
{
if
([
UploadManager
getUploadType
]
==
UPLOAD_COMMON
)
{
self
.
btnReference
.
hidden
=
cellModel
.
question
.
attachmentId
.
length
==
0
;
self
.
btnReference
.
hidden
=
cellModel
.
question
.
attachmentId
.
length
==
0
;
}
else
{
}
else
{
...
@@ -46,21 +44,50 @@
...
@@ -46,21 +44,50 @@
}
}
}
}
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
if
(
cellModel
.
viewModel
.
detail
.
temp
)
{
NSString
*
title
=
[
NSString
stringWithFormat
:
@"附件(%lu)"
,
self
.
cellModel
.
answer
.
resultAttachments
.
count
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitle
:
title
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera"
)
forState
:
UIControlStateNormal
];
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg"
)
forState
:
UIControlStateNormal
];
NSString
*
title
=
[
NSString
stringWithFormat
:
@"附件(%lu)"
,
self
.
cellModel
.
answer
.
resultAttachments
.
count
];
[
self
.
btnAtt
setTitleColor
:
ICR_TINTCOLOR
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitle
:
title
forState
:
UIControlStateNormal
];
}
else
{
[
self
.
btnAtt
setTitleColor
:
ICR_TINTCOLOR
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitle
:
@"附件"
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_gray"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_gray_btn_bg"
)
forState
:
UIControlStateNormal
];
}
else
{
[
self
.
btnAtt
setTitleColor
:
RGBA
(
128
,
128
,
128
,
1
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitle
:
@"附件"
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
RGBA
(
227
,
12
,
53
,
1
)
forState
:
UIControlStateNormal
];
}
}
else
{
if
(
cellModel
.
question
.
needPhoto
)
{
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg_red"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_red"
)
forState
:
UIControlStateNormal
];
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
NSString
*
title
=
[
NSString
stringWithFormat
:
@"附件(%lu)"
,
self
.
cellModel
.
answer
.
resultAttachments
.
count
];
[
self
.
btnAtt
setTitle
:
title
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
ICR_TINTCOLOR
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg"
)
forState
:
UIControlStateNormal
];
}
else
{
[
self
.
btnAtt
setTitle
:
@"附件"
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
RGBA
(
227
,
12
,
53
,
1
)
forState
:
UIControlStateNormal
];
}
}
else
{
if
(
self
.
cellModel
.
answer
.
resultAttachments
.
count
>
0
)
{
NSString
*
title
=
[
NSString
stringWithFormat
:
@"附件(%lu)"
,
self
.
cellModel
.
answer
.
resultAttachments
.
count
];
[
self
.
btnAtt
setTitle
:
title
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_btn_bg"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
ICR_TINTCOLOR
forState
:
UIControlStateNormal
];
}
else
{
[
self
.
btnAtt
setTitle
:
@"附件"
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setImage
:
TCImage
(
@"patrol_exam_camera_gray"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setBackgroundImage
:
TCImage
(
@"patrol_exam_gray_btn_bg"
)
forState
:
UIControlStateNormal
];
[
self
.
btnAtt
setTitleColor
:
RGBA
(
128
,
128
,
128
,
1
)
forState
:
UIControlStateNormal
];
}
}
}
}
}
}
-
(
IBAction
)
actionStandard
:
(
UIButton
*
)
sender
{
-
(
IBAction
)
actionStandard
:
(
UIButton
*
)
sender
{
sender
.
selected
=
!
sender
.
isSelected
;
sender
.
selected
=
!
sender
.
isSelected
;
if
(
sender
.
isSelected
)
{
if
(
sender
.
isSelected
)
{
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Cells/QuestionCells/PatrolExamCategoryTableViewCell.m
View file @
39fe1244
...
@@ -22,7 +22,10 @@
...
@@ -22,7 +22,10 @@
if
([
question
.
category
isEqualToString
:
cellModel
.
category
])
{
if
([
question
.
category
isEqualToString
:
cellModel
.
category
])
{
for
(
NSString
*
key
in
cellModel
.
viewModel
.
dicAnswers
.
allKeys
)
{
for
(
NSString
*
key
in
cellModel
.
viewModel
.
dicAnswers
.
allKeys
)
{
if
([
key
isEqualToString
:
question
.
uuid
])
{
if
([
key
isEqualToString
:
question
.
uuid
])
{
[
answers
addObject
:
@1
];
ZJPatrolDetail_results_answers
*
answer
=
(
ZJPatrolDetail_results_answers
*
)[
cellModel
.
viewModel
.
dicAnswers
objectForKey
:
key
];
if
(
answer
.
details
.
count
)
{
[
answers
addObject
:
@1
];
}
}
}
}
}
[
questions
addObject
:
question
];
[
questions
addObject
:
question
];
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Models/ZJPatrolDetail.h
View file @
39fe1244
...
@@ -175,6 +175,11 @@
...
@@ -175,6 +175,11 @@
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreTo
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreTo
;
/**
是否必须拍照
*/
@property
(
nonatomic
,
assign
)
BOOL
needPhoto
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreFrom
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
scoreFrom
;
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
reference
;
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
reference
;
...
@@ -204,6 +209,8 @@
...
@@ -204,6 +209,8 @@
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
uuid
;
@property
(
nonatomic
,
strong
)
NSString
<
Optional
>
*
uuid
;
@property
(
nonatomic
,
assign
)
BOOL
temp
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
state
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
state
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
version
;
@property
(
nonatomic
,
strong
)
NSNumber
<
Optional
>
*
version
;
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Patrol_PatrolInspect.storyboard
View file @
39fe1244
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<nil
key=
"textColor"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"---"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation
"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AmB-Sw-RmT"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
horizontalCompressionResistancePriority=
"749"
text=
"---"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0
"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"AmB-Sw-RmT"
>
<rect
key=
"frame"
x=
"129.5"
y=
"15.5"
width=
"22.5"
height=
"19.5"
/>
<rect
key=
"frame"
x=
"129.5"
y=
"15.5"
width=
"22.5"
height=
"19.5"
/>
<fontDescription
key=
"fontDescription"
type=
"boldSystem"
pointSize=
"16"
/>
<fontDescription
key=
"fontDescription"
type=
"boldSystem"
pointSize=
"16"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.36078431370000003"
blue=
"0.64705882349999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.36078431370000003"
blue=
"0.64705882349999999"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"AST-Wr-reU"
/>
<constraint
firstAttribute=
"height"
constant=
"50"
id=
"AST-Wr-reU"
/>
<constraint
firstItem=
"XQD-st-wDe"
firstAttribute=
"centerY"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"centerY"
id=
"Cna-K4-AgL"
/>
<constraint
firstItem=
"XQD-st-wDe"
firstAttribute=
"centerY"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"centerY"
id=
"Cna-K4-AgL"
/>
<constraint
firstItem=
"EJ7-Oe-Vsf"
firstAttribute=
"leading"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"leading"
id=
"FlZ-QT-pIT"
/>
<constraint
firstItem=
"EJ7-Oe-Vsf"
firstAttribute=
"leading"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"leading"
id=
"FlZ-QT-pIT"
/>
<constraint
firstAttribute=
"trailing"
relation=
"greaterThanOrEqual"
secondItem=
"AmB-Sw-RmT"
secondAttribute=
"trailing"
constant=
"10"
id=
"LFx-Be-91D"
/>
<constraint
firstItem=
"XQD-st-wDe"
firstAttribute=
"leading"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"leading"
constant=
"10"
id=
"P7c-HC-XjG"
/>
<constraint
firstItem=
"XQD-st-wDe"
firstAttribute=
"leading"
secondItem=
"3Fm-DF-njJ"
secondAttribute=
"leading"
constant=
"10"
id=
"P7c-HC-XjG"
/>
<constraint
firstItem=
"AmB-Sw-RmT"
firstAttribute=
"leading"
secondItem=
"XQD-st-wDe"
secondAttribute=
"trailing"
constant=
"5"
id=
"T0P-KO-Hbn"
/>
<constraint
firstItem=
"AmB-Sw-RmT"
firstAttribute=
"leading"
secondItem=
"XQD-st-wDe"
secondAttribute=
"trailing"
constant=
"5"
id=
"T0P-KO-Hbn"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"EJ7-Oe-Vsf"
secondAttribute=
"bottom"
id=
"mDb-HG-qFZ"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"EJ7-Oe-Vsf"
secondAttribute=
"bottom"
id=
"mDb-HG-qFZ"
/>
...
@@ -243,7 +244,7 @@
...
@@ -243,7 +244,7 @@
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"85"
id=
"QCJ-l1-s8b"
/>
<constraint
firstAttribute=
"width"
constant=
"85"
id=
"QCJ-l1-s8b"
/>
</constraints>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
3
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
5
"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-16"
minY=
"0.0"
maxX=
"20"
maxY=
"0.0"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-16"
minY=
"0.0"
maxX=
"20"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"65"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"65"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"全部展开"
image=
"arrowturnoff"
>
<state
key=
"normal"
title=
"全部展开"
image=
"arrowturnoff"
>
...
@@ -1067,7 +1068,7 @@
...
@@ -1067,7 +1068,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<subviews>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"
plain"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"2
8"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1YA-Q1-Xuk"
>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"
grouped"
separatorStyle=
"none"
rowHeight=
"44"
sectionHeaderHeight=
"18"
sectionFooterHeight=
"1
8"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1YA-Q1-Xuk"
>
<rect
key=
"frame"
x=
"0.0"
y=
"20"
width=
"375"
height=
"563"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"20"
width=
"375"
height=
"563"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<view
key=
"tableHeaderView"
contentMode=
"scaleToFill"
id=
"ETU-e0-ASH"
>
<view
key=
"tableHeaderView"
contentMode=
"scaleToFill"
id=
"ETU-e0-ASH"
>
...
@@ -1119,7 +1120,7 @@
...
@@ -1119,7 +1120,7 @@
</view>
</view>
<prototypes>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"ZJPictureTableViewCell"
rowHeight=
"114"
id=
"BOo-Tf-lON"
customClass=
"ZJPictureTableViewCell"
>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"ZJPictureTableViewCell"
rowHeight=
"114"
id=
"BOo-Tf-lON"
customClass=
"ZJPictureTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
98
"
width=
"375"
height=
"114"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
125.5
"
width=
"375"
height=
"114"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"BOo-Tf-lON"
id=
"IcP-xt-v61"
>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"BOo-Tf-lON"
id=
"IcP-xt-v61"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"114"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"114"
/>
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolAttachmentViewController.m
View file @
39fe1244
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#import "ZJPictureTableViewCell.h"
#import "ZJPictureTableViewCell.h"
#import "UploadManager.h"
#import "UploadManager.h"
#import "PatrolExamViewModel.h"
#import "PatrolExamViewModel.h"
#import "PatrolTaskRemarkFooterView.h"
@interface
PatrolAttachmentViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
PatrolAttachmentViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tableView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
tableView
;
...
@@ -28,10 +30,10 @@
...
@@ -28,10 +30,10 @@
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
labelQuestionTitle
.
text
=
self
.
cellModel
.
question
.
title
;
self
.
labelQuestionTitle
.
text
=
self
.
cellModel
.
question
.
title
;
[
self
.
btnBottom
setTitle
:
@"提交"
forState
:
UIControlStateNormal
];
[
self
.
btnBottom
setTitle
:
@"提交"
forState
:
UIControlStateNormal
];
[
self
.
tableView
registerNib
:[
UINib
nibWithNibName
:
PatrolTaskRemarkFooterView
.
className
bundle
:
nil
]
forHeaderFooterViewReuseIdentifier
:
PatrolTaskRemarkFooterView
.
className
];
[
self
configWithType
];
[
self
configWithType
];
}
}
-
(
void
)
configWithType
{
-
(
void
)
configWithType
{
switch
(
self
.
viewModel
.
type
)
{
switch
(
self
.
viewModel
.
type
)
{
case
kPicCellTypeAdd
:
case
kPicCellTypeAdd
:
...
@@ -89,7 +91,8 @@
...
@@ -89,7 +91,8 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ZJPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJPictureTableViewCell"
forIndexPath
:
indexPath
];
ZJPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJPictureTableViewCell"
forIndexPath
:
indexPath
];
[
cell
configCellWithViewModel
:
self
.
viewModel
indexPath
:
indexPath
target
:
self
];
NSString
*
memarkString
=
[
NSString
stringWithFormat
:
@"%@ %@
\n
%@ %@"
,
kUser
.
f_user_name
,
self
.
cellModel
.
question
.
title
,[[
NSDate
date
]
httpParameterString
],
self
.
cellModel
.
viewModel
.
inspector
.
store_name
];
[
cell
configCellWithViewModel
:
self
.
viewModel
indexPath
:
indexPath
target
:
self
remarkString
:
memarkString
];
@weakify
(
self
);
@weakify
(
self
);
cell
.
blockReloadData
=
^
{
cell
.
blockReloadData
=
^
{
@strongify
(
self
);
@strongify
(
self
);
...
@@ -98,6 +101,23 @@
...
@@ -98,6 +101,23 @@
return
cell
;
return
cell
;
}
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForFooterInSection
:
(
NSInteger
)
section
{
PatrolTaskRemarkFooterView
*
footerView
=
[
tableView
dequeueReusableHeaderFooterViewWithIdentifier
:
PatrolTaskRemarkFooterView
.
className
];
footerView
.
remarkTextView
.
text
=
self
.
cellModel
.
getAnswer
.
remark
;
WS
(
weakSelf
);
[
footerView
.
remarkTextView
.
rac_textSignal
subscribeNext
:
^
(
NSString
*
_Nullable
x
)
{
weakSelf
.
cellModel
.
getAnswer
.
remark
=
x
;
}];
footerView
.
userInteractionEnabled
=
self
.
cellModel
.
viewModel
.
state
.
type
==
PatrolExamStateProcessing
;
return
footerView
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForFooterInSection
:
(
NSInteger
)
section
{
return
150
;
}
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
@weakify
(
self
);
@weakify
(
self
);
ShowAlertView
(
@"提示"
,
@"确认提交附件?"
,
@[
@"确认"
,
@"取消"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
ShowAlertView
(
@"提示"
,
@"确认提交附件?"
,
@[
@"确认"
,
@"取消"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
...
@@ -124,6 +144,8 @@
...
@@ -124,6 +144,8 @@
[
UploadManager
uploadObjectArray
:
arrAttachment
completed
:
^
(
UploadResponse
*
success
)
{
[
UploadManager
uploadObjectArray
:
arrAttachment
completed
:
^
(
UploadResponse
*
success
)
{
@strongify
(
self
);
@strongify
(
self
);
ZJPatrolDetail_results_answers
*
answer
=
self
.
cellModel
.
getAnswer
;
ZJPatrolDetail_results_answers
*
answer
=
self
.
cellModel
.
getAnswer
;
PatrolTaskRemarkFooterView
*
footerView
=
(
PatrolTaskRemarkFooterView
*
)[
self
.
tableView
footerViewForSection
:
0
];
answer
.
remark
=
footerView
.
remarkTextView
.
text
;
answer
.
resultAttachmentId
=
[
ToolsManager
getTheTimestamp
];
answer
.
resultAttachmentId
=
[
ToolsManager
getTheTimestamp
];
answer
.
attachmenturls
=
(
NSMutableArray
<
ZJPatrolDetail_questions_attachmentUrls
,
Optional
>
*
)[
NSMutableArray
array
];
answer
.
attachmenturls
=
(
NSMutableArray
<
ZJPatrolDetail_questions_attachmentUrls
,
Optional
>
*
)[
NSMutableArray
array
];
if
(
success
.
type
==
UPLOAD_COMMON
)
{
if
(
success
.
type
==
UPLOAD_COMMON
)
{
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolExamViewController.m
View file @
39fe1244
...
@@ -71,29 +71,8 @@
...
@@ -71,29 +71,8 @@
[[
NSRunLoop
mainRunLoop
]
addTimer
:
_timer
forMode
:
NSRunLoopCommonModes
];
[[
NSRunLoop
mainRunLoop
]
addTimer
:
_timer
forMode
:
NSRunLoopCommonModes
];
[
self
.
tableView
registerClass
:[
PatrolExamStarCell
class
]
forCellReuseIdentifier
:
@"PatrolExamStarCell"
];
[
self
.
tableView
registerClass
:[
PatrolExamStarCell
class
]
forCellReuseIdentifier
:
@"PatrolExamStarCell"
];
self
.
title
=
self
.
viewModel
.
storeResult
.
store_name
;
[
self
.
btnSubmit
setTitle
:
@"确认提交"
forState
:
UIControlStateNormal
];
[
self
.
btnSubmit
setTitle
:
@"确认提交"
forState
:
UIControlStateNormal
];
@weakify
(
self
);
@weakify
(
self
);
//加载详情
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
self
.
viewModel
httpDetailComplete
:
^
{
@strongify
(
self
);
[
IBTLoadingView
hideHUDWithText
:
nil
];
self
.
topView
.
viewModel
=
self
.
viewModel
;
//根据当前单据状态显示底部按钮
[
self
.
tableView
reloadData
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
});
//进行中的单据才显示保存按钮
if
(
self
.
viewModel
.
state
.
type
==
PatrolExamStateProcessing
)
{
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
self
.
navigationItem
.
rightBarButtonItem
=
save
;
self
.
btnSubmit
.
hidden
=
NO
;
}
}];
self
.
viewModel
.
blockReHttp
=
^
{
self
.
viewModel
.
blockReHttp
=
^
{
@strongify
(
self
);
@strongify
(
self
);
//加载详情
//加载详情
...
@@ -119,6 +98,31 @@
...
@@ -119,6 +98,31 @@
}
failure
:^
(
id
errorValue
)
{
}
failure
:^
(
id
errorValue
)
{
[
IBTLoadingView
showTextOnly
:
errorValue
];
[
IBTLoadingView
showTextOnly
:
errorValue
];
}];
}];
}
else
{
//加载详情
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
self
.
viewModel
httpDetailComplete
:
^
{
@strongify
(
self
);
[
IBTLoadingView
hideHUDWithText
:
nil
];
self
.
title
=
self
.
viewModel
.
inspector
.
store_name
;
self
.
topView
.
viewModel
=
self
.
viewModel
;
//根据当前单据状态显示底部按钮
[
self
.
tableView
reloadData
];
if
(
self
.
viewModel
.
state
.
type
!=
PatrolExamStateUnStart
)
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
});
}
//进行中的单据才显示保存按钮
if
(
self
.
viewModel
.
state
.
type
==
PatrolExamStateProcessing
)
{
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
self
.
navigationItem
.
rightBarButtonItem
=
save
;
self
.
btnSubmit
.
hidden
=
NO
;
}
}];
};
};
//统一刷新
//统一刷新
self
.
viewModel
.
blockReloadData
=
^
{
self
.
viewModel
.
blockReloadData
=
^
{
...
@@ -134,7 +138,6 @@
...
@@ -134,7 +138,6 @@
//开始答题
//开始答题
self
.
confirmVC
.
blockStart
=
^
{
self
.
confirmVC
.
blockStart
=
^
{
@strongify
(
self
);
@strongify
(
self
);
[
kNotification
postNotificationName
:
UPDATEPATROLONLINELIST
object
:
nil
];
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
UIBarButtonItem
*
save
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"保存"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
actionSave
)];
self
.
navigationItem
.
rightBarButtonItem
=
save
;
self
.
navigationItem
.
rightBarButtonItem
=
save
;
self
.
btnSubmit
.
hidden
=
NO
;
self
.
btnSubmit
.
hidden
=
NO
;
...
@@ -143,14 +146,17 @@
...
@@ -143,14 +146,17 @@
@strongify
(
self
);
@strongify
(
self
);
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
self
.
viewModel
.
state
=
[
PatrolExamState
stateWithCode
:
self
.
viewModel
.
storeResult
.
state
];
self
.
viewModel
.
state
=
[
PatrolExamState
stateWithCode
:
self
.
viewModel
.
storeResult
.
state
];
self
.
title
=
self
.
viewModel
.
inspector
.
store_name
;
self
.
topView
.
viewModel
=
self
.
viewModel
;
self
.
topView
.
viewModel
=
self
.
viewModel
;
self
.
btnSubmit
.
hidden
=
self
.
viewModel
.
state
.
type
!=
PatrolExamStateProcessing
;
self
.
btnSubmit
.
hidden
=
self
.
viewModel
.
state
.
type
!=
PatrolExamStateProcessing
;
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
NSMutableArray
*
arrIndexs
=
[
self
.
viewModel
closeAll
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
[
self
.
tableView
deleteRowsAtIndexPaths
:
arrIndexs
withRowAnimation
:
UITableViewRowAnimationFade
];
});
});
if
(
!
self
.
isBackRootVc
)
{
[
kNotification
postNotificationName
:
UPDATEPATROLONLINELIST
object
:
nil
];
}
}];
}];
};
};
...
@@ -285,27 +291,89 @@
...
@@ -285,27 +291,89 @@
#pragma mark -提交VI检查任务
#pragma mark -提交VI检查任务
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
-
(
IBAction
)
actionSubmit
:
(
id
)
sender
{
//找到最上面一个没有回答的问题
if
(
self
.
viewModel
.
detail
.
questions
.
count
!=
self
.
viewModel
.
dicAnswers
.
count
)
{
if
(
!
self
.
viewModel
.
detail
.
temp
)
{
NSMutableArray
*
arrQuestionId
=
[
NSMutableArray
array
];
//找到最上面一个没有回答的问题
for
(
ZJPatrolDetail_questions
*
qustion
in
self
.
viewModel
.
detail
.
questions
)
{
if
(
self
.
viewModel
.
detail
.
questions
.
count
!=
self
.
viewModel
.
dicAnswers
.
count
)
{
[
arrQuestionId
addObject
:
qustion
.
uuid
];
NSMutableArray
*
arrQuestionId
=
[
NSMutableArray
array
];
for
(
ZJPatrolDetail_questions
*
qustion
in
self
.
viewModel
.
detail
.
questions
)
{
[
arrQuestionId
addObject
:
qustion
.
uuid
];
}
NSMutableSet
*
setQuestionId
=
[
NSMutableSet
setWithArray
:
arrQuestionId
];
NSSet
*
setAnswerQuestionId
=
[
NSSet
setWithArray
:
self
.
viewModel
.
dicAnswers
.
allKeys
];
[
setQuestionId
minusSet
:
setAnswerQuestionId
];
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
if
([
setQuestionId
containsObject
:
vm
.
question
.
uuid
])
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
break
;
}
}
[
IBTLoadingView
showTextOnly
:
@"您有未检查的项目"
];
return
;
}
else
{
NSMutableArray
*
questionArray
=
[
NSMutableArray
array
];
for
(
id
object
in
self
.
viewModel
.
dicAnswers
.
allValues
)
{
if
([
object
isKindOfClass
:[
ZJPatrolDetail_results_answers
class
]])
{
ZJPatrolDetail_results_answers
*
answer
=
(
ZJPatrolDetail_results_answers
*
)
object
;
if
(
answer
.
details
.
count
&&
!
answer
.
resultAttachments
.
count
)
{
[
questionArray
addObject
:
answer
.
questionUuid
];
}
}
}
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
if
(
vm
.
question
.
needPhoto
)
{
if
([
questionArray
containsObject
:
vm
.
question
.
uuid
])
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
break
;
}
}
else
{
[
questionArray
removeObject
:
vm
.
question
.
uuid
];
}
}
if
(
questionArray
.
count
)
{
[
IBTLoadingView
showTextOnly
:
@"您有检查的项目未拍照"
];
return
;
}
}
}
else
{
NSMutableArray
*
questionArray
=
[
NSMutableArray
array
];
for
(
id
object
in
self
.
viewModel
.
dicAnswers
.
allValues
)
{
if
([
object
isKindOfClass
:[
ZJPatrolDetail_results_answers
class
]])
{
ZJPatrolDetail_results_answers
*
answer
=
(
ZJPatrolDetail_results_answers
*
)
object
;
if
(
answer
.
details
.
count
&&
!
answer
.
resultAttachments
.
count
)
{
[
questionArray
addObject
:
answer
.
questionUuid
];
}
}
}
}
NSMutableSet
*
setQuestionId
=
[
NSMutableSet
setWithArray
:
arrQuestionId
];
NSSet
*
setAnswerQuestionId
=
[
NSSet
setWithArray
:
self
.
viewModel
.
dicAnswers
.
allKeys
];
[
setQuestionId
minusSet
:
setAnswerQuestionId
];
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
for
(
NSInteger
i
=
0
;
i
<
self
.
viewModel
.
arrCellData
.
count
;
i
++
)
{
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
PatrolExamCellViewModel
*
vm
=
self
.
viewModel
.
arrCellData
[
i
];
if
([
setQuestionId
containsObject
:
vm
.
question
.
uuid
])
{
if
([
questionArray
containsObject
:
vm
.
question
.
uuid
])
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
[
self
.
tableView
scrollToRowAtIndexPath
:
indexPath
atScrollPosition
:(
UITableViewScrollPositionMiddle
)
animated
:
YES
];
break
;
}
}
}
}
[
IBTLoadingView
showTextOnly
:
@"您有未检查的项目"
];
if
(
questionArray
.
count
)
{
return
;
[
IBTLoadingView
showTextOnly
:
@"您有检查的项目未拍照"
];
return
;
}
}
}
@weakify
(
self
);
@weakify
(
self
);
ShowAlertView
(
@"提示"
,
@"您确认要提交VI检查任务吗?"
,
@[
@"取消"
,
@"确认"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
NSMutableArray
*
answerArray
=
[
NSMutableArray
array
];
for
(
id
object
in
self
.
viewModel
.
dicAnswers
.
allValues
)
{
if
([
object
isKindOfClass
:[
ZJPatrolDetail_results_answers
class
]])
{
ZJPatrolDetail_results_answers
*
answer
=
(
ZJPatrolDetail_results_answers
*
)
object
;
if
(
answer
.
details
.
count
)
{
[
answerArray
addObject
:
@1
];
}
}
}
NSString
*
message
=
[
NSString
stringWithFormat
:
@"当前已填写(%lu/%lu)项检查项目,请确认是否提交!"
,
answerArray
.
count
,
self
.
viewModel
.
detail
.
questions
.
count
];
ShowAlertView
(
@"提示"
,
message
,
@[
@"取消"
,
@"确认"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
@strongify
(
self
);
@strongify
(
self
);
if
(
index
==
ONE
)
{
if
(
index
==
ONE
)
{
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolStandardViewController.m
View file @
39fe1244
...
@@ -26,24 +26,24 @@
...
@@ -26,24 +26,24 @@
self
.
tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
self
.
tableView
.
rowHeight
=
UITableViewAutomaticDimension
;
self
.
tableView
.
estimatedRowHeight
=
88
;
self
.
tableView
.
estimatedRowHeight
=
88
;
[
self
.
backButton
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
[
self
.
backButton
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
if
([
UploadManager
getUploadType
]
==
UPLOAD_COMMON
)
{
//
if ([UploadManager getUploadType] == UPLOAD_COMMON) {
[
RequestManager
request_PatrolInspectAttachment
:
self
.
question
.
attachmentId
success
:
^
(
id
returnValue
)
{
//
[RequestManager request_PatrolInspectAttachment:self.question.attachmentId success:^(id returnValue) {
if
([
returnValue
[
@"success"
]
boolValue
]
==
YES
)
{
//
if ([returnValue[@"success"] boolValue] == YES) {
NSMutableArray
*
pictures
=
[
NSMutableArray
array
];
//
NSMutableArray *pictures = [NSMutableArray array];
for
(
NSInteger
i
=
0
;
i
<
[
returnValue
[
@"data"
]
count
];
i
++
)
{
//
for (NSInteger i = 0; i < [returnValue[@"data"] count]; i++) {
NSDictionary
*
dict
=
returnValue
[
@"data"
][
i
];
//
NSDictionary *dict = returnValue[@"data"][i];
PostAttachmentModel
*
model
=
[[
PostAttachmentModel
alloc
]
initWithDictionary
:
dict
error
:
nil
];
//
PostAttachmentModel *model = [[PostAttachmentModel alloc] initWithDictionary:dict error:nil];
[
pictures
addObject
:
model
];
//
[pictures addObject:model];
}
//
}
self
.
arrPictures
=
pictures
;
//
self.arrPictures = pictures;
[
self
.
tableView
reloadData
];
//
[self.tableView reloadData];
[
self
configHeightWithAttachment
];
//
[self configHeightWithAttachment];
}
//
}
//
}
failure
:^
(
id
errorValue
)
{
//
} failure:^(id errorValue) {
[
IBTLoadingView
showTextOnly
:
errorValue
];
//
[IBTLoadingView showTextOnly:errorValue];
}];
//
}];
}
else
{
//
}else{
self
.
arrPictures
=
[
NSMutableArray
array
];
self
.
arrPictures
=
[
NSMutableArray
array
];
for
(
ZJPatrolDetail_questions_attachmentUrls
*
att
in
self
.
question
.
attachmentUrls
)
{
for
(
ZJPatrolDetail_questions_attachmentUrls
*
att
in
self
.
question
.
attachmentUrls
)
{
PostAttachmentModel
*
model
=
[[
PostAttachmentModel
alloc
]
initWithDictionary
:
att
.
toDictionary
error
:
nil
];
PostAttachmentModel
*
model
=
[[
PostAttachmentModel
alloc
]
initWithDictionary
:
att
.
toDictionary
error
:
nil
];
...
@@ -51,8 +51,7 @@
...
@@ -51,8 +51,7 @@
}
}
[
self
configHeightWithAttachment
];
[
self
configHeightWithAttachment
];
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
}
// }
}
}
-
(
void
)
configHeightWithAttachment
{
-
(
void
)
configHeightWithAttachment
{
...
@@ -84,7 +83,7 @@
...
@@ -84,7 +83,7 @@
}
else
{
}
else
{
PostAttachmentModel
*
model
=
self
.
arrPictures
[
indexPath
.
row
-
1
];
PostAttachmentModel
*
model
=
self
.
arrPictures
[
indexPath
.
row
-
1
];
ZJStandardPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJStandardPictureTableViewCell"
forIndexPath
:
indexPath
];
ZJStandardPictureTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ZJStandardPictureTableViewCell"
forIndexPath
:
indexPath
];
[
cell
.
img
sd_setImageWithURL
:[
NSURL
URLWithString
:
model
.
fileUrl
]
placeholderImage
:
TCImage
(
@"AttachPhoto"
)
];
[
cell
.
img
sd_setImageWithURL
:[
NSURL
URLWithString
:
[
ToolsManager
jointUrl
:
model
.
fileUrl
]]
placeholderImage
:
KNODATAIMAGE
];
return
cell
;
return
cell
;
}
}
...
@@ -95,7 +94,6 @@
...
@@ -95,7 +94,6 @@
if
(
indexPath
.
row
>
0
)
{
if
(
indexPath
.
row
>
0
)
{
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
PYPhotoBrowseView
*
photoBroseView
=
[[
PYPhotoBrowseView
alloc
]
init
];
PYPhotoBrowseView
*
photoBroseView
=
[[
PYPhotoBrowseView
alloc
]
init
];
photoBroseView
.
currentIndex
=
ZERO
;
for
(
UITableViewCell
*
cell
in
tableView
.
visibleCells
)
{
for
(
UITableViewCell
*
cell
in
tableView
.
visibleCells
)
{
if
([
cell
isKindOfClass
:[
ZJStandardPictureTableViewCell
class
]])
{
if
([
cell
isKindOfClass
:[
ZJStandardPictureTableViewCell
class
]])
{
ZJStandardPictureTableViewCell
*
pictureCell
=
(
ZJStandardPictureTableViewCell
*
)
cell
;
ZJStandardPictureTableViewCell
*
pictureCell
=
(
ZJStandardPictureTableViewCell
*
)
cell
;
...
@@ -103,6 +101,7 @@
...
@@ -103,6 +101,7 @@
}
}
}
}
photoBroseView
.
sourceImgageViews
=
imageArray
;
photoBroseView
.
sourceImgageViews
=
imageArray
;
photoBroseView
.
currentIndex
=
indexPath
.
row
-
1
;
[
photoBroseView
show
];
[
photoBroseView
show
];
}
}
}
}
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolTaskViewController.h
View file @
39fe1244
...
@@ -18,4 +18,9 @@
...
@@ -18,4 +18,9 @@
*/
*/
@property
(
nonatomic
,
assign
)
BOOL
isBackRootVc
;
@property
(
nonatomic
,
assign
)
BOOL
isBackRootVc
;
/**
是否是临时任务
*/
@property
(
nonatomic
,
assign
)
BOOL
isTempTask
;
@end
@end
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolTaskViewController.m
View file @
39fe1244
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
#pragma mark -UI
#pragma mark -UI
-
(
void
)
uiConfigAction
-
(
void
)
uiConfigAction
{
{
self
.
title
=
@"VI检查"
;
self
.
title
=
@"VI检查
任务
"
;
self
.
collectionFlowLayout
.
itemSize
=
CGSizeMake
((
ScreenSize
.
width
-
30
)
/
2
.
0
,
130
);
self
.
collectionFlowLayout
.
itemSize
=
CGSizeMake
((
ScreenSize
.
width
-
30
)
/
2
.
0
,
130
);
self
.
collectionFlowLayout
.
sectionInset
=
UIEdgeInsetsMake
(
5
,
10
,
5
,
10
);
self
.
collectionFlowLayout
.
sectionInset
=
UIEdgeInsetsMake
(
5
,
10
,
5
,
10
);
self
.
collectionFlowLayout
.
minimumLineSpacing
=
10
;
self
.
collectionFlowLayout
.
minimumLineSpacing
=
10
;
...
@@ -217,6 +217,7 @@
...
@@ -217,6 +217,7 @@
if
(
!
_queryPlanModel
)
{
if
(
!
_queryPlanModel
)
{
_queryPlanModel
=
[[
ParametersModel
alloc
]
init
];
_queryPlanModel
=
[[
ParametersModel
alloc
]
init
];
_queryPlanModel
.
pageSize
=
PAGESIZE
;
_queryPlanModel
.
pageSize
=
PAGESIZE
;
_queryPlanModel
.
isTemp
=
self
.
isTempTask
?
@"true"
:
@"false"
;
_queryPlanModel
.
pageNumber
=
self
.
pullPageIndex
;
_queryPlanModel
.
pageNumber
=
self
.
pullPageIndex
;
InspectQuickLookQuery
*
conditions
=
[[
InspectQuickLookQuery
alloc
]
init
];
InspectQuickLookQuery
*
conditions
=
[[
InspectQuickLookQuery
alloc
]
init
];
conditions
.
field
=
@"beginDate"
;
conditions
.
field
=
@"beginDate"
;
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/ViewConstrollers/PatrolTempCheckViewController.m
View file @
39fe1244
...
@@ -42,8 +42,8 @@
...
@@ -42,8 +42,8 @@
[
super
viewDidLoad
];
[
super
viewDidLoad
];
[
self
addStoreChildVc
];
[
self
addStoreChildVc
];
self
.
title
=
@"临时检查"
;
[
self
addHistoryButtonItem
]
;
kUser
.
f_user_uuid
=
@"8a2eb8135ce33bdd015d07a2cb10018d
"
;
self
.
title
=
@"临时VI检查
"
;
}
}
#pragma mark -布局完成
#pragma mark -布局完成
...
@@ -52,6 +52,19 @@
...
@@ -52,6 +52,19 @@
self
.
storeDetailVc
.
view
.
frame
=
self
.
contentBgView
.
bounds
;
self
.
storeDetailVc
.
view
.
frame
=
self
.
contentBgView
.
bounds
;
}
}
#pragma mark -添加历史按钮
-
(
void
)
addHistoryButtonItem
{
self
.
navigationItem
.
rightBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"历史"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
historyButtonItemAction
)];
}
#pragma mark -临时检查历史
-
(
void
)
historyButtonItemAction
{
PatrolTaskViewController
*
patrolTask
=
[
PatrolTaskViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
patrolTask
.
isTempTask
=
YES
;
[
self
PushViewController
:
patrolTask
animated
:
YES
];
}
#pragma mark -添加油站列表控制器
#pragma mark -添加油站列表控制器
-
(
void
)
addStoreChildVc
-
(
void
)
addStoreChildVc
{
{
...
@@ -81,7 +94,7 @@
...
@@ -81,7 +94,7 @@
ShowAlertView
(
@"提示"
,
@"您确定对此门店发起VI临时检查任务吗?"
,
@[
@"取消"
,
@"确认"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
ShowAlertView
(
@"提示"
,
@"您确定对此门店发起VI临时检查任务吗?"
,
@[
@"取消"
,
@"确认"
],
UIAlertControllerStyleAlert
,
^
(
NSInteger
index
)
{
if
(
index
==
ONE
)
{
if
(
index
==
ONE
)
{
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
IBTLoadingView
showProgressLabel
:
@"加载中"
];
[
RequestManager
request_CreatePatrolTempCheck
:
s
elf
.
selectedStoreModel
.
uuid
success
:
^
(
id
returnValue
)
{
[
RequestManager
request_CreatePatrolTempCheck
:
weakS
elf
.
selectedStoreModel
.
uuid
success
:
^
(
id
returnValue
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
if
([
BaseViewModel
verifyData
:
returnValue
])
{
if
([
BaseViewModel
verifyData
:
returnValue
])
{
[
IBTLoadingView
showTextOnly
:
@"生成VI临时VI检查任务成功"
];
[
IBTLoadingView
showTextOnly
:
@"生成VI临时VI检查任务成功"
];
...
@@ -90,14 +103,14 @@
...
@@ -90,14 +103,14 @@
PatrolTaskCustomModel
*
customModel
=
[
PatrolTaskCustomModel
new
];
PatrolTaskCustomModel
*
customModel
=
[
PatrolTaskCustomModel
new
];
customModel
.
uuid
=
detail
.
uuid
;
customModel
.
uuid
=
detail
.
uuid
;
Results
*
result
=
[
Results
new
];
Results
*
result
=
[
Results
new
];
result
.
store_uuid
=
s
elf
.
selectedStoreModel
.
uuid
;
result
.
store_uuid
=
weakS
elf
.
selectedStoreModel
.
uuid
;
PatrolExamViewController
*
examVC
=
[
PatrolExamViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
PatrolExamViewController
*
examVC
=
[
PatrolExamViewController
viewControllerWithStoryBoardType
:
STORYBOARD_TYPE_PATROLINSPECT
];
PatrolExamViewModel
*
viewVM
=
[
PatrolExamViewModel
new
];
PatrolExamViewModel
*
viewVM
=
[
PatrolExamViewModel
new
];
viewVM
.
storeResult
=
result
;
viewVM
.
storeResult
=
result
;
viewVM
.
plan
=
customModel
;
viewVM
.
plan
=
customModel
;
examVC
.
viewModel
=
viewVM
;
examVC
.
viewModel
=
viewVM
;
examVC
.
isBackRootVc
=
YES
;
examVC
.
isBackRootVc
=
YES
;
[
s
elf
pushViewController
:
examVC
animated
:
YES
];
[
weakS
elf
pushViewController
:
examVC
animated
:
YES
];
});
});
}
else
{
}
else
{
[
IBTLoadingView
showTextOnly
:[
BaseViewModel
messageData
:
returnValue
]];
[
IBTLoadingView
showTextOnly
:[
BaseViewModel
messageData
:
returnValue
]];
...
...
total/GTOApp/Business/PatrolOnline(VI巡检)/Views/PatrolExamTopView.m
View file @
39fe1244
...
@@ -23,12 +23,34 @@
...
@@ -23,12 +23,34 @@
self
.
labelPosision
.
text
=
viewModel
.
inspector
.
store_name
;
self
.
labelPosision
.
text
=
viewModel
.
inspector
.
store_name
;
self
.
labelTime
.
text
=
[
self
configTimeBegin
:
viewModel
.
detail
.
beginDate
end
:
viewModel
.
detail
.
endDate
];
self
.
labelTime
.
text
=
[
self
configTimeBegin
:
viewModel
.
detail
.
beginDate
end
:
viewModel
.
detail
.
endDate
];
self
.
labelTitle
.
text
=
viewModel
.
plan
.
name
;
self
.
labelTitle
.
text
=
viewModel
.
plan
.
name
;
self
.
labelProgress
.
text
=
[
NSString
stringWithFormat
:
@"%lu/%lu"
,
viewModel
.
dicAnswers
.
count
,
viewModel
.
detail
.
questions
.
count
];
self
.
labelState
.
text
=
viewModel
.
state
.
text
;
self
.
labelState
.
text
=
viewModel
.
state
.
text
;
NSMutableArray
*
answerArray
=
[
NSMutableArray
array
];
for
(
id
object
in
viewModel
.
dicAnswers
.
allValues
)
{
if
([
object
isKindOfClass
:[
ZJPatrolDetail_results_answers
class
]])
{
ZJPatrolDetail_results_answers
*
answer
=
(
ZJPatrolDetail_results_answers
*
)
object
;
if
(
answer
.
details
.
count
)
{
[
answerArray
addObject
:
@1
];
}
}
}
self
.
labelProgress
.
text
=
[
NSString
stringWithFormat
:
@"%lu/%lu"
,
answerArray
.
count
,
viewModel
.
detail
.
questions
.
count
];
}
}
-
(
NSString
*
)
configTimeBegin
:(
NSString
*
)
begin
end
:(
NSString
*
)
end
{
-
(
NSString
*
)
configTimeBegin
:(
NSString
*
)
begin
end
:(
NSString
*
)
end
{
return
[
NSString
stringWithFormat
:
@"%@%@ ~ %@%@"
,
@"起:"
,
begin
,
@"止:"
,
end
];
return
[
NSString
stringWithFormat
:
@"%@%@ ~ %@%@"
,
@"起:"
,
begin
,
@"止:"
,
end
];
}
}
@end
@end
total/GTOApp/Business/SeeOrderViewController.m
View file @
39fe1244
...
@@ -645,13 +645,7 @@ typedef enum : NSUInteger {
...
@@ -645,13 +645,7 @@ typedef enum : NSUInteger {
#pragma mark -友好界面
#pragma mark -友好界面
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
{
return
KNODATAIMAGE
;
return
[
UIImage
imageNamed
:
@"no_data"
];
}
-
(
NSAttributedString
*
)
titleForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
NSDictionary
*
attributes
=
@{
NSFontAttributeName
:
[
UIFont
boldSystemFontOfSize
:
15
.
0
f
],
NSForegroundColorAttributeName
:
[
UIColor
darkGrayColor
]};
return
[[
NSAttributedString
alloc
]
initWithString
:
@"暂无数据"
attributes
:
attributes
];
}
}
-
(
BOOL
)
emptyDataSetShouldAllowScroll
:
(
UIScrollView
*
)
scrollView
-
(
BOOL
)
emptyDataSetShouldAllowScroll
:
(
UIScrollView
*
)
scrollView
...
...
total/GTOApp/UserUtil/FilterManager/ViewModels/FilterViewModel.m
View file @
39fe1244
...
@@ -453,17 +453,20 @@
...
@@ -453,17 +453,20 @@
#pragma mark -不同的类调用筛选,排序字段不同(在此区分)
#pragma mark -不同的类调用筛选,排序字段不同(在此区分)
-
(
NSArray
*
)
distinguishClassSorts
{
-
(
NSArray
*
)
distinguishClassSorts
{
NSArray
*
sorts
=
nil
;
NSArray
*
sorts
=
nil
;
if
([
self
.
classVc
isKindOfClass
:[
PatrolTaskViewController
class
]])
{
if
([
self
.
classVc
isKindOfClass
:[
PatrolTaskViewController
class
]]
||
[
self
.
classVc
isKindOfClass
:[
InspectionTableViewController
class
]]
)
{
sorts
=
@[@{
@"name"
:
@"任务创建时间降序"
,
@"uuid"
:
@"beginDate,desc"
},
sorts
=
@[@{
@"name"
:
@"任务创建时间降序"
,
@"uuid"
:
@"beginDate,desc"
},
@{
@"name"
:
@"任务创建时间升序"
,
@"uuid"
:
@"beginDate,asc"
},
@{
@"name"
:
@"任务创建时间升序"
,
@"uuid"
:
@"beginDate,asc"
},
@{
@"name"
:
@"任务最后修改时间降序"
,
@"uuid"
:
@"lastModifyInfo,desc"
},
@{
@"name"
:
@"任务最后修改时间降序"
,
@"uuid"
:
@"lastModifyInfo,desc"
},
@{
@"name"
:
@"任务最后修改时间升序"
,
@"uuid"
:
@"lastModifyInfo,asc"
}];
@{
@"name"
:
@"任务最后修改时间升序"
,
@"uuid"
:
@"lastModifyInfo,asc"
}];
}
else
if
([
self
.
classVc
isKindOfClass
:[
InspectionTableViewController
class
]])
{
sorts
=
@[@{
@"name"
:
@"任务创建时间降序"
,
@"uuid"
:
@"beginTime,desc"
},
@{
@"name"
:
@"任务创建时间升序"
,
@"uuid"
:
@"beginTime,asc"
},
@{
@"name"
:
@"按截止日期降序"
,
@"uuid"
:
@"endTime,desc"
},
@{
@"name"
:
@"按截止日期升序"
,
@"uuid"
:
@"endTime,asc"
}];
}
}
/*
else if ([self.classVc isKindOfClass:[InspectionTableViewController class]]) {
sorts = @[@{@"name":@"任务创建时间降序",@"uuid":@"beginTime,desc"},
@{@"name":@"任务创建时间升序",@"uuid":@"beginTime,asc"},
@{@"name":@"按截止日期降序",@"uuid":@"endTime,desc"},
@{@"name":@"按截止日期升序",@"uuid":@"endTime,asc"}];
}
*/
return
sorts
;
return
sorts
;
}
}
...
...
total/GTOApp/UserUtil/Helper/ToolsManager.m
View file @
39fe1244
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
if
(
boolValue
)
{
if
(
boolValue
)
{
return
string
;
return
string
;
}
}
NSArray
*
baseUrl
=
[
HTTP_LOCAL_BASE_URL
componentsSeparatedByString
:
@"total-server/rest/"
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"%@%@"
,
HTTP_LOCAL_BASE_URL
,
string
];
NSString
*
urlString
=
[
NSString
stringWithFormat
:
@"%@%@"
,
baseUrl
.
firstObject
,
string
];
return
urlString
;
return
urlString
;
}
}
...
...
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.h
View file @
39fe1244
...
@@ -18,8 +18,14 @@ UICollectionViewDataSource,DBCameraViewControllerDelegate>
...
@@ -18,8 +18,14 @@ UICollectionViewDataSource,DBCameraViewControllerDelegate>
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
layOut
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionViewFlowLayout
*
layOut
;
@property
(
weak
,
nonatomic
)
UIViewController
*
vc
;
@property
(
weak
,
nonatomic
)
UIViewController
*
vc
;
@property
(
strong
,
nonatomic
)
PicViewModel
*
viewModel
;
@property
(
strong
,
nonatomic
)
PicViewModel
*
viewModel
;
/**
水印文字
*/
@property
(
nonatomic
,
copy
)
NSString
*
remarkString
;
/** 是否显示添加按钮 */
/** 是否显示添加按钮 */
@property
(
nonatomic
,
copy
)
repairBlock
blockReloadData
;
@property
(
nonatomic
,
copy
)
repairBlock
blockReloadData
;
-
(
void
)
configCellWithViewModel
:(
PicViewModel
*
)
viewModel
indexPath
:(
NSIndexPath
*
)
indexPath
target
:(
UIViewController
*
)
target
;
-
(
void
)
configCellWithViewModel
:(
PicViewModel
*
)
viewModel
indexPath
:(
NSIndexPath
*
)
indexPath
target
:(
UIViewController
*
)
target
remarkString
:(
NSString
*
)
remarkString
;
-
(
void
)
pushImagePickerController
;
-
(
void
)
pushImagePickerController
;
@end
@end
total/GTOApp/UserUtil/PictureCell/ZJPictureTableViewCell.m
View file @
39fe1244
...
@@ -25,15 +25,15 @@
...
@@ -25,15 +25,15 @@
// Initialization code
// Initialization code
}
}
-
(
void
)
configCellWithViewModel
:
(
PicViewModel
*
)
viewModel
indexPath
:
(
NSIndexPath
*
)
indexPath
target
:
(
UIViewController
*
)
target
{
-
(
void
)
configCellWithViewModel
:
(
PicViewModel
*
)
viewModel
indexPath
:
(
NSIndexPath
*
)
indexPath
target
:
(
UIViewController
*
)
target
remarkString
:
(
NSString
*
)
remarkString
{
self
.
vc
=
target
;
self
.
vc
=
target
;
self
.
viewModel
=
viewModel
;
self
.
viewModel
=
viewModel
;
self
.
remarkString
=
remarkString
;
//如果是只读的,则直接刷新。
//如果是只读的,则直接刷新。
if
(
self
.
viewModel
.
type
==
kPicCellTypeRead
)
{
if
(
self
.
viewModel
.
type
==
kPicCellTypeRead
)
{
[
self
.
collectionView
reloadData
];
[
self
.
collectionView
reloadData
];
return
;
return
;
}
}
//非只读情况,则是添加或者编辑
//非只读情况,则是添加或者编辑
if
(
self
.
viewModel
.
arrPics
.
count
==
self
.
viewModel
.
maxPictureNumber
)
{
if
(
self
.
viewModel
.
arrPics
.
count
==
self
.
viewModel
.
maxPictureNumber
)
{
self
.
viewModel
.
type
=
kPicCellTypeEdit
;
self
.
viewModel
.
type
=
kPicCellTypeEdit
;
...
@@ -121,9 +121,9 @@
...
@@ -121,9 +121,9 @@
return
;
return
;
}
}
UIImage
*
newImage
=
[
image
rescaleImageToSize
:
CGSizeMake
(
ScreenSize
.
width
,
ScreenSize
.
width
*
4
/
3
)];
UIImage
*
newImage
=
[
image
rescaleImageToSize
:
CGSizeMake
(
ScreenSize
.
width
,
ScreenSize
.
width
*
4
/
3
)];
NSString
*
string
=
[
NSString
stringWithFormat
:
@"%@-
%@"
,
kUser
.
f_user_name
,[[
NSDate
date
]
httpParameterString
]];
// NSString *string = [NSString stringWithFormat:@"%@
%@",kUser.f_user_name,[[NSDate date] httpParameterString]];
NSDictionary
*
fontDict
=
@{
NSForegroundColorAttributeName
:
[
UIColor
yellowColor
],
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
17
]};
NSDictionary
*
fontDict
=
@{
NSForegroundColorAttributeName
:
[
UIColor
yellowColor
],
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
17
]};
UIImage
*
waterImage
=
[
newImage
imageWaterMarkWithString
:
string
point
:
CGPointMake
(
20
,
newImage
.
size
.
height
-
20
)
attribute
:
fontDict
];
UIImage
*
waterImage
=
[
newImage
imageWaterMarkWithString
:
s
elf
.
remarkS
tring
point
:
CGPointMake
(
20
,
newImage
.
size
.
height
-
20
)
attribute
:
fontDict
];
NSString
*
imageName
=
[
self
saveImageToLocal
:
waterImage
];
NSString
*
imageName
=
[
self
saveImageToLocal
:
waterImage
];
[
self
.
viewModel
.
arrPics
addObject
:
imageName
];
[
self
.
viewModel
.
arrPics
addObject
:
imageName
];
self
.
blockReloadData
();
self
.
blockReloadData
();
...
...
total/Images.xcassets/Patrol/patrol_exam_btn_bg_red.imageset/Contents.json
0 → 100644
View file @
39fe1244
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"resizing"
:
{
"mode"
:
"9-part"
,
"center"
:
{
"mode"
:
"tile"
,
"width"
:
1
,
"height"
:
1
},
"cap-insets"
:
{
"bottom"
:
35
,
"top"
:
34
,
"right"
:
8
,
"left"
:
8
}
},
"idiom"
:
"universal"
,
"filename"
:
"patrol_exam_btn_bg_red@3x.png"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
total/Images.xcassets/Patrol/patrol_exam_btn_bg_red.imageset/patrol_exam_btn_bg_red@3x.png
0 → 100644
View file @
39fe1244
2.25 KB
total/Images.xcassets/Patrol/patrol_exam_camera.imageset/Contents.json
View file @
39fe1244
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
"images"
:
[
"images"
:
[
{
{
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"filename"
:
"patrol_exam_camera.png"
,
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
...
...
total/Images.xcassets/Patrol/patrol_exam_camera.imageset/patrol_exam_camera.png
deleted
100644 → 0
View file @
f97a7c29
1.16 KB
total/Images.xcassets/Patrol/patrol_exam_camera_gray.imageset/Contents.json
View file @
39fe1244
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
"images"
:
[
"images"
:
[
{
{
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"filename"
:
"patrol_exam_camera_gray.png"
,
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
...
...
total/Images.xcassets/Patrol/patrol_exam_camera_gray.imageset/patrol_exam_camera_gray.png
deleted
100644 → 0
View file @
f97a7c29
1.16 KB
total/Images.xcassets/Patrol/patrol_exam_camera_red.imageset/Contents.json
0 → 100644
View file @
39fe1244
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"patrol_exam_camera_red@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"patrol_exam_camera_red@3x.png"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
total/Images.xcassets/Patrol/patrol_exam_camera_red.imageset/patrol_exam_camera_red@2x.png
0 → 100644
View file @
39fe1244
2.18 KB
total/Images.xcassets/Patrol/patrol_exam_camera_red.imageset/patrol_exam_camera_red@3x.png
0 → 100644
View file @
39fe1244
2.5 KB
total/Info.plist
View file @
39fe1244
...
@@ -19,11 +19,11 @@
...
@@ -19,11 +19,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.
2.12
<
/string
>
<
string
>
1.
3.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.
2.12
<
/string
>
<
string
>
1.
3.0
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
total/Managers/HttpManager/ICRHTTPController.m
View file @
39fe1244
...
@@ -519,6 +519,7 @@ acceptTypeJson:(BOOL)bAcceptJson
...
@@ -519,6 +519,7 @@ acceptTypeJson:(BOOL)bAcceptJson
};
};
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
kGTOHTTP_UserLogin
]
stringByAppendingFormat
:
@"/%@"
,
nsUserName
];
NSString
*
urlStr
=
[[[
self
class
]
UrlForPluginHTTPAction
:
kGTOHTTP_UserLogin
]
stringByAppendingFormat
:
@"/%@"
,
nsUserName
];
NSLog
(
@"%@"
,
urlStr
);
[
self
POST
:
urlStr
[
self
POST
:
urlStr
parameters
:
dictParametes
parameters
:
dictParametes
needToken
:
NO
needToken
:
NO
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment