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
3a950dbc
Commit
3a950dbc
authored
Jan 05, 2017
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改状态颜色
parent
3a540349
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
21 deletions
+42
-21
GTOPatrolPlanListViewController.m
.../GTOApp/Business/Patrol/GTOPatrolPlanListViewController.m
+0
-5
GTOPatrolPlan.h
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.h
+1
-0
GTOPatrolPlan.m
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.m
+28
-0
GTOPatrolPlanCellContentView.m
...OApp/Business/Patrol/Views/GTOPatrolPlanCellContentView.m
+8
-10
GTOLiceneResultViewController.m
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
+5
-6
No files found.
total/GTOApp/Business/Patrol/GTOPatrolPlanListViewController.m
View file @
3a950dbc
...
@@ -155,7 +155,6 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
...
@@ -155,7 +155,6 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
/** 联网获取属数据 */
/** 联网获取属数据 */
-
(
void
)
getHttpDataWithDate
:
(
NSString
*
)
date
DateType
:
(
NSString
*
)
dateType
{
-
(
void
)
getHttpDataWithDate
:
(
NSString
*
)
date
DateType
:
(
NSString
*
)
dateType
{
//[ICRUserUtil sharedInstance].needFresh = NO;
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
hideHUDWithText
:
nil
];
...
@@ -435,10 +434,6 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
...
@@ -435,10 +434,6 @@ static NSString *PatrolPlanCellIdentifier = @"PatrolPlanCell";
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
// cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
// id data = _m_arrAllData[indexPath.section];//_m_arrData[ indexPath.row
// ];
UIView
*
contentView
=
cell
.
contentView
;
UIView
*
contentView
=
cell
.
contentView
;
...
...
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.h
View file @
3a950dbc
...
@@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, GTOPatrolPlanStatus) {
...
@@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, GTOPatrolPlanStatus) {
@property
(
copy
,
nonatomic
)
NSString
*
category
;
// 巡店类别
@property
(
copy
,
nonatomic
)
NSString
*
category
;
// 巡店类别
@property
(
assign
,
nonatomic
)
BOOL
recordLocation
;
//是否记录调整位置
@property
(
assign
,
nonatomic
)
BOOL
recordLocation
;
//是否记录调整位置
@property
(
assign
,
nonatomic
)
GTOPatrolPlanStatus
state
;
// 状态 应该是后台的状态吧?????
@property
(
assign
,
nonatomic
)
GTOPatrolPlanStatus
state
;
// 状态 应该是后台的状态吧?????
@property
(
strong
,
nonatomic
)
UIColor
*
stateColor
;
@property
(
copy
,
nonatomic
)
NSString
*
remark
;
//说明
@property
(
copy
,
nonatomic
)
NSString
*
remark
;
//说明
@property
(
copy
,
nonatomic
)
NSArray
*
questions
;
//问题列表
@property
(
copy
,
nonatomic
)
NSArray
*
questions
;
//问题列表
@property
(
copy
,
nonatomic
)
NSArray
*
inspectors
;
//巡店员列表
@property
(
copy
,
nonatomic
)
NSArray
*
inspectors
;
//巡店员列表
...
...
total/GTOApp/Business/Patrol/Models/GTOPatrolPlan.m
View file @
3a950dbc
...
@@ -18,6 +18,34 @@
...
@@ -18,6 +18,34 @@
+
(
NSString
*
)
PrimaryKey
{
+
(
NSString
*
)
PrimaryKey
{
return
@"uuid"
;
return
@"uuid"
;
}
}
-
(
UIColor
*
)
stateColor
{
if
(
!
_stateColor
)
{
switch
(
self
.
state
)
{
case
kPatrolPlanStatusCreated
:
{
_stateColor
=
GTO_RED_COLOR
;
break
;
}
case
kPatrolPlanStatusCommited
:
{
_stateColor
=
[
UIColor
redColor
];
break
;
}
case
kPatrolPlanStatusProcessing
:
{
_stateColor
=
GTO_BLUE_TINT_COLOR
;
break
;
}
case
kPatrolPlanStatusFinished
:
{
_stateColor
=
[
UIColor
blackColor
];
break
;
}
case
kPatrolPlanStatusCanceld
:
{
_stateColor
=
GTO_GRAY_TINT_COLOR
;
break
;
}
}
}
return
_stateColor
;
}
#pragma mark - setter
#pragma mark - setter
//- (void)setQuestions:(NSArray *)questions {
//- (void)setQuestions:(NSArray *)questions {
...
...
total/GTOApp/Business/Patrol/Views/GTOPatrolPlanCellContentView.m
View file @
3a950dbc
...
@@ -120,25 +120,23 @@
...
@@ -120,25 +120,23 @@
_d_processLength
=
patrolPlan
.
processLength
;
_d_processLength
=
patrolPlan
.
processLength
;
self
.
m_planNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
patrolPlan
.
name
];
self
.
m_planNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
patrolPlan
.
name
];
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"计划时间: %@ ~ %@"
,
patrolPlan
.
beginDate
,
patrolPlan
.
endDate
];
//[NSString stringWithFormat:@"最后修改时间:%@ ",patrolPlan.lastModify_time];//
NSString
*
begin
=
[
patrolPlan
.
beginDate
substringToIndex
:
11
];
NSString
*
end
=
[
patrolPlan
.
endDate
substringToIndex
:
11
];
self
.
m_planTimeLabel
.
text
=
[
NSString
stringWithFormat
:
@"计划时间: %@ ~ %@"
,
begin
,
end
];
//[NSString stringWithFormat:@"最后修改时间:%@ ",patrolPlan.lastModify_time];//
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"巡检总进度: "
];
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"巡检总进度: "
];
self
.
m_planStateLabel
.
text
=
@"状态: "
;
self
.
m_planStateLabel
.
text
=
@"状态: "
;
NSString
*
stateStr
=
[
NSString
stringWithFormat
:
@"%ld"
,
patrolPlan
.
state
];
NSString
*
stateStr
=
[
NSString
stringWithFormat
:
@"%ld"
,
patrolPlan
.
state
];
self
.
m_planStateValueLabel
.
text
=
[
GTOCommonTools
patrolStateChineseWithEnglish
:
stateStr
];
self
.
m_planStateValueLabel
.
text
=
[
GTOCommonTools
patrolStateChineseWithEnglish
:
stateStr
];
if
(
patrolPlan
.
state
==
kPatrolPlanStatusProcessing
)
{
self
.
m_planStateValueLabel
.
textColor
=
patrolPlan
.
stateColor
;
self
.
m_planStateValueLabel
.
textColor
=
GTO_RED_COLOR
;
}
else
{
self
.
m_planStateValueLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
}
self
.
d_processLength
=
patrolPlan
.
processLength
;
//finishStores * 1.0 / totalStores;
self
.
d_processLength
=
patrolPlan
.
processLength
;
//finishStores * 1.0 / totalStores;
int
percent
=
patrolPlan
.
processLength
*
100
;
int
percent
=
patrolPlan
.
processLength
*
100
;
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
patrolPlan
.
stateColor
;
if
(
patrolPlan
.
finishedStoreNumber
==
patrolPlan
.
totalStoreNumber
)
{
if
(
patrolPlan
.
finishedStoreNumber
==
patrolPlan
.
totalStoreNumber
)
{
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_GRAY_TINT_COLOR
;
}
else
{
}
else
{
self
.
m_processValueLabel
.
text
=
[
NSString
stringWithFormat
:
@"%d%%"
,
percent
];
self
.
m_processValueLabel
.
textColor
=
GTO_BLUE_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_BLUE_TINT_COLOR
;
self
.
m_processFractionLabel
.
textColor
=
GTO_BLUE_TINT_COLOR
;
}
}
...
...
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
View file @
3a950dbc
...
@@ -122,23 +122,22 @@ static NSString *headerProblemItemID = @"headerItem";
...
@@ -122,23 +122,22 @@ static NSString *headerProblemItemID = @"headerItem";
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
NSMutableArray
*
muArrDisplayRs
=
[
NSMutableArray
array
];
NSMutableArray
*
muArrDisplayRs
=
[
NSMutableArray
array
];
for
(
int
count
=
0
;
count
<
_
d_licence
.
arrDisplayResults
.
count
;
count
++
)
{
for
(
int
count
=
0
;
count
<
strongSelf
.
d_licence
.
arrDisplayResults
.
count
;
count
++
)
{
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
[
displayR
praseFromJsonDict
:
_
d_licence
.
arrDisplayResults
[
count
]];
[
displayR
praseFromJsonDict
:
strongSelf
.
d_licence
.
arrDisplayResults
[
count
]];
NSMutableArray
*
muArrAnswers
=
[
NSMutableArray
array
];
NSMutableArray
*
muArrAnswers
=
[
NSMutableArray
array
];
for
(
GTOAnswer
*
answer
in
fetchedObjects
)
{
for
(
GTOAnswer
*
answer
in
fetchedObjects
)
{
if
([
answer
.
category
isEqualToString
:
displayR
.
category
])
if
([
answer
.
category
isEqualToString
:
displayR
.
category
])
// displayR.answerNumber++;
[
muArrAnswers
addObject
:[
answer
dictForCommit
]];
[
muArrAnswers
addObject
:[
answer
dictForCommit
]];
}
}
displayR
.
arrAnswers
=
muArrAnswers
;
displayR
.
arrAnswers
=
muArrAnswers
;
[
muArrDisplayRs
addObject
:[
displayR
dictForCommit
]];
[
muArrDisplayRs
addObject
:[
displayR
dictForCommit
]];
}
}
_
d_licence
.
arrDisplayResults
=
muArrDisplayRs
;
strongSelf
.
d_licence
.
arrDisplayResults
=
muArrDisplayRs
;
[
_
d_licence
saveToDBWithHandleData
:
nil
[
strongSelf
.
d_licence
saveToDBWithHandleData
:
nil
complete
:
^
{
complete
:
^
{
[
_
c_tableView
reloadData
];
[
strongSelf
.
c_tableView
reloadData
];
}
}
fail
:
nil
];
fail
:
nil
];
...
...
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