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
9ee92af1
Commit
9ee92af1
authored
8 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
0dc73808
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
358 additions
and
385 deletions
+358
-385
GTOLicenceCheckListViewController.m
...Business/LicenceCheck/GTOLicenceCheckListViewController.m
+4
-2
GTOCategoryItemView.m
total/GTOApp/Business/Patrol/Views/GTOCategoryItemView.m
+95
-114
GTOQuestionBaseViewController.m
...ness/Pioneering/Questions/GTOQuestionBaseViewController.m
+2
-2
GTOAlertInfoLicenceViewController.m
...TOApp/Business/Repair/GTOAlertInfoLicenceViewController.m
+1
-28
GTOLicenceListSimpleCellContentView.m
...App/Business/Repair/GTOLicenceListSimpleCellContentView.m
+50
-9
GTOLicenceResultTopCellContentView.m
...OApp/Business/Repair/GTOLicenceResultTopCellContentView.m
+7
-5
GTOLiceneResultViewController.m
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
+7
-8
GTORepairListViewController.m
total/GTOApp/Business/Repair/GTORepairListViewController.m
+1
-30
GTOLicenceBoltView.m
total/GTOApp/Business/Repair/Views/GTOLicenceBoltView.m
+5
-3
GTOLicenceListCellContentView.m
...App/Business/Repair/Views/GTOLicenceListCellContentView.m
+72
-59
GTOLicenceListViewController.m
...OApp/Business/Repair/Views/GTOLicenceListViewController.m
+6
-19
GTORepairDetailTopCellView.m
...GTOApp/Business/Repair/Views/GTORepairDetailTopCellView.m
+26
-8
GTORepairDetailViewController.m
...App/Business/Repair/Views/GTORepairDetailViewController.m
+22
-62
GTORepairListCellContentView.m
...OApp/Business/Repair/Views/GTORepairListCellContentView.m
+27
-23
GTOPioneeringTemplateViewController.m
...hooseViewController/GTOPioneeringTemplateViewController.m
+1
-1
GTOCommonTools.h
total/GTOApp/UserUtil/GTOCommonTools.h
+2
-0
GTOCommonTools.m
total/GTOApp/UserUtil/GTOCommonTools.m
+26
-1
Info.plist
total/Info.plist
+2
-2
GTOAppMacro.h
total/Macro/GTOAppMacro.h
+2
-9
No files found.
total/GTOApp/Business/LicenceCheck/GTOLicenceCheckListViewController.m
View file @
9ee92af1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#import "GTOAnswer.h"
#import "GTOAnswer.h"
#import "GTOQuestion.h"
#import "GTOQuestion.h"
#define TopMargin 44
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
7
0
#define LeftMargin 20
#define LeftMargin 20
#define BtnWidth 60
#define BtnWidth 60
#define BtnHeight 24
#define BtnHeight 24
...
@@ -475,7 +475,9 @@ static NSString *cellID = @"licenceListCell";
...
@@ -475,7 +475,9 @@ static NSString *cellID = @"licenceListCell";
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
return
TableHeight
;
//如果是审批拒绝状态,就显示拒绝理由,所以增加一个label的高度
GTOLicence
*
licence
=
_dataArr
[
indexPath
.
section
];
return
[
licence
.
state
isEqualToString
:
@"rejected"
]
?
TableHeight
+
20
:
TableHeight
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
{
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Patrol/Views/GTOCategoryItemView.m
View file @
9ee92af1
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
//
//
#import "GTOCategoryItemView.h"
#import "GTOCategoryItemView.h"
#import "GTOLicence.h"
#import "GTOPatrolPlan.h"
#import "GTOPatrolPlan.h"
#import "ICRStoreResult.h"
#import "GTOPioneeingProcess.h";
#import "GTOPioneeingProcess.h";
#import "GTOPioneering.h"
#import "GTOPioneering.h"
#import "
GTOLicence
.h"
#import "
ICRStoreResult
.h"
@interface
GTOCategoryItemView
()
@interface
GTOCategoryItemView
()
//@property (strong, nonatomic) UIButton *m_categoryButton;//门店代码
//@property (strong, nonatomic) UIButton *m_categoryButton;//门店代码
@property
(
strong
,
nonatomic
)
UIImageView
*
m_categoryImgView
;
@property
(
strong
,
nonatomic
)
UIImageView
*
m_categoryImgView
;
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
@property
(
nonatomic
,
assign
)
CGFloat
d_processLength
;
//进度条长度
@property
(
nonatomic
,
assign
)
CGFloat
d_processLength
;
//进度条长度
@end
@end
@implementation
GTOCategoryItemView
@implementation
GTOCategoryItemView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
!
self
)
{
if
(
!
self
)
{
return
nil
;
return
nil
;
...
@@ -33,74 +34,55 @@
...
@@ -33,74 +34,55 @@
return
self
;
return
self
;
}
}
-
(
void
)
_init
{
-
(
void
)
_init
{
self
.
m_categoryImgView
=
[[
UIImageView
alloc
]
init
];
self
.
m_categoryImgView
=
[[
UIImageView
alloc
]
init
];
self
.
m_categoryImgView
.
layer
.
cornerRadius
=
4
;
self
.
m_categoryImgView
.
layer
.
cornerRadius
=
4
;
self
.
m_categoryImgView
.
layer
.
masksToBounds
=
YES
;
self
.
m_categoryImgView
.
layer
.
masksToBounds
=
YES
;
self
.
m_categoryLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_categoryLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_processLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
//[[self class] p_customLabelWithTextColor:[UIColor blackColor]];
self
.
m_processLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
self
.
m_processValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentRight
];
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
//[[self class] p_customLabelWithTextColor:[UIColor blackColor]];
self
.
m_processValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
16
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentRight
];
[
self
addSubview
:
_m_categoryImgView
];
[
self
addSubview
:
_m_categoryImgView
];
[
self
addSubview
:
_m_categoryLabel
];
[
self
addSubview
:
_m_categoryLabel
];
[
self
addSubview
:
_m_processValueLabel
];
[
self
addSubview
:
_m_processValueLabel
];
[
self
addSubview
:
_m_processLabel
];
[
self
addSubview
:
_m_processLabel
];
}
}
-
(
void
)
layoutSubviews
{
-
(
void
)
layoutSubviews
CGFloat
leftPadding
=
10
;
CGFloat
gap
=
7
;
{
CGFloat
leftPadding
=
10
;
CGFloat
gap
=
7
;
// CGFloat btnCategoryW = (self.width - 2*leftPadding - 2*gap ) *0.3;
// CGFloat btnCategoryW = (self.width - 2*leftPadding - 2*gap ) *0.3;
// CGFloat btnProcessW = (self.width - 2*leftPadding - 2*gap ) *0.2;
// CGFloat btnProcessW = (self.width - 2*leftPadding - 2*gap ) *0.2;
//CGFloat lblH = 16;
//
CGFloat lblH = 16;
CGFloat
imgVY
=
(
self
.
height
-
44
)
*
0
.
5
;
CGFloat
imgVY
=
(
self
.
height
-
44
)
*
0
.
5
;
CGFloat
lblH
=
18
;
CGFloat
lblH
=
18
;
self
.
m_categoryImgView
.
frame
=
((
CGRect
){
self
.
m_categoryImgView
.
frame
=
((
CGRect
){.
origin
.
x
=
leftPadding
,
.
origin
.
x
=
leftPadding
,
.
origin
.
y
=
imgVY
,
.
origin
.
y
=
imgVY
,
.
size
.
width
=
44
,
//btnCategoryW,
.
size
.
width
=
44
,
// btnCategoryW,
.
size
.
height
=
44
.
size
.
height
=
44
});
});
self
.
m_categoryLabel
.
frame
=
((
CGRect
){
self
.
m_categoryLabel
.
frame
=
((
CGRect
){.
origin
.
x
=
_m_categoryImgView
.
right
+
gap
,
.
origin
.
y
=
imgVY
,
.
size
.
width
=
120
,
.
size
.
height
=
lblH
});
.
origin
.
x
=
_m_categoryImgView
.
right
+
gap
,
.
origin
.
y
=
imgVY
,
.
size
.
width
=
120
,
.
size
.
height
=
lblH
});
CGRect
rect
=
((
CGRect
){.
origin
.
x
=
_m_categoryLabel
.
x
,
.
origin
.
y
=
_m_categoryLabel
.
bottom
+
7
,
.
size
.
width
=
IBT_MAIN_SCREEN_WIDTH
-
_m_categoryLabel
.
x
-
leftPadding
,
.
size
.
height
=
18
});
self
.
m_processBarView
=
[[
IBTUIView
alloc
]
initWithFrame
:
rect
processBarFloat
:
_d_processLength
processBarColor
:
GTO_BLUE_SHALLOW_TINT_COLOR
viewBorderBarColor
:
GTO_GRAY_SHALLOW_TINT_COLOR
];
CGRect
rect
=
((
CGRect
){
.
origin
.
x
=
_m_categoryLabel
.
x
,
.
origin
.
y
=
_m_categoryLabel
.
bottom
+
7
,
.
size
.
width
=
IBT_MAIN_SCREEN_WIDTH
-
_m_categoryLabel
.
x
-
leftPadding
,
.
size
.
height
=
18
});
self
.
m_processBarView
=
[[
IBTUIView
alloc
]
initWithFrame
:
rect
processBarFloat
:
_d_processLength
processBarColor
:
GTO_BLUE_SHALLOW_TINT_COLOR
viewBorderBarColor
:
GTO_GRAY_SHALLOW_TINT_COLOR
];
[
self
addSubview
:
_m_processBarView
];
[
self
addSubview
:
_m_processBarView
];
self
.
m_processValueLabel
.
frame
=
((
CGRect
){
self
.
m_processValueLabel
.
frame
=
((
CGRect
){.
origin
.
x
=
_m_processBarView
.
right
-
70
,
.
origin
.
y
=
_m_categoryLabel
.
y
,
.
size
.
width
=
72
,
.
size
.
height
=
lblH
});
.
origin
.
x
=
_m_processBarView
.
right
-
60
,
.
origin
.
y
=
_m_categoryLabel
.
y
,
.
size
.
width
=
60
,
.
size
.
height
=
lblH
});
self
.
m_processLabel
.
frame
=
((
CGRect
){
self
.
m_processLabel
.
frame
=
((
CGRect
){.
origin
.
x
=
_m_categoryLabel
.
right
+
gap
,
.
origin
.
y
=
imgVY
,
.
size
.
width
=
_m_processValueLabel
.
left
-
_m_categoryLabel
.
right
-
gap
,
.
size
.
height
=
lblH
});
.
origin
.
x
=
_m_categoryLabel
.
right
+
gap
,
.
origin
.
y
=
imgVY
,
.
size
.
width
=
_m_processValueLabel
.
left
-
_m_categoryLabel
.
right
-
gap
,
.
size
.
height
=
lblH
});
}
}
+
(
IBTUILabel
*
)
p_customLabelWithTextColor
:
(
UIColor
*
)
textColor
{
+
(
IBTUILabel
*
)
p_customLabelWithTextColor
:
(
UIColor
*
)
textColor
{
IBTUILabel
*
label
=
[[
IBTUILabel
alloc
]
init
];
IBTUILabel
*
label
=
[[
IBTUILabel
alloc
]
init
];
label
.
textAlignment
=
NSTextAlignmentLeft
;
label
.
textAlignment
=
NSTextAlignmentLeft
;
...
@@ -121,23 +103,24 @@
...
@@ -121,23 +103,24 @@
// btn.titleLabel.font = font;
// btn.titleLabel.font = font;
// btn.backgroundColor = bgColor;
// btn.backgroundColor = bgColor;
//}
//}
-
(
void
)
p_imageViewWithImgView
:
(
UIImageView
*
)
imgV
andCategory
:
(
NSString
*
)
category
{
-
(
void
)
p_imageViewWithImgView
:
(
UIImageView
*
)
imgV
andCategory
:
(
NSString
*
)
category
{
if
([
category
isEqualToString
:
@"公共区"
])
{
if
([
category
isEqualToString
:
@"公共区"
])
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"public_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"public_area"
];
}
else
if
([
category
isEqualToString
:
@"储罐区"
])
{
}
else
if
([
category
isEqualToString
:
@"储罐区"
])
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"storage_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"storage_area"
];
}
else
if
([
category
isEqualToString
:
@"加油区"
])
{
}
else
if
([
category
isEqualToString
:
@"加油区"
])
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"addOil_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"addOil_area"
];
}
else
if
([
category
isEqualToString
:
@"辅助区"
])
{
}
else
if
([
category
isEqualToString
:
@"辅助区"
])
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"assist_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"assist_area"
];
}
else
{
}
else
{
imgV
.
image
=
[
UIImage
imageNamed
:
@"public_area"
];
imgV
.
image
=
[
UIImage
imageNamed
:
@"public_area"
];
}
}
}
}
-
(
void
)
p_processWithFinishCategorysNumber
:
(
NSInteger
)
finishNumber
-
(
void
)
p_processWithFinishCategorysNumber
:
(
NSInteger
)
finishNumber
totalCategorys
:
(
NSInteger
)
totalNumber
totalCategorys
:
(
NSInteger
)
totalNumber
processLabel
:
(
IBTUILabel
*
)
processLbl
processLabel
:
(
IBTUILabel
*
)
processLbl
processValueLabel
:
(
IBTUILabel
*
)
processValueLbl
processValueLabel
:
(
IBTUILabel
*
)
processValueLbl
{
{
NSString
*
stateStr
=
[
NSString
string
];
NSString
*
stateStr
=
[
NSString
string
];
if
(
finishNumber
==
0
)
{
if
(
finishNumber
==
0
)
{
...
@@ -145,7 +128,7 @@
...
@@ -145,7 +128,7 @@
processLbl
.
textColor
=
GTO_RED_COLOR
;
processLbl
.
textColor
=
GTO_RED_COLOR
;
processValueLbl
.
textColor
=
GTO_RED_COLOR
;
processValueLbl
.
textColor
=
GTO_RED_COLOR
;
}
else
if
(
finishNumber
<
totalNumber
){
}
else
if
(
finishNumber
<
totalNumber
)
{
stateStr
=
@"进行中"
;
stateStr
=
@"进行中"
;
processLbl
.
textColor
=
GTO_BLUE_TINT_COLOR
;
processLbl
.
textColor
=
GTO_BLUE_TINT_COLOR
;
processValueLbl
.
textColor
=
GTO_BLUE_TINT_COLOR
;
processValueLbl
.
textColor
=
GTO_BLUE_TINT_COLOR
;
...
@@ -158,74 +141,72 @@
...
@@ -158,74 +141,72 @@
totalNumber
=
-
1
.
0
;
totalNumber
=
-
1
.
0
;
}
}
self
.
d_processLength
=
1
.
0
*
finishNumber
/
totalNumber
;
self
.
d_processLength
=
1
.
0
*
finishNumber
/
totalNumber
;
int
percent
=
self
.
d_processLength
*
100
;
int
percent
=
self
.
d_processLength
*
100
;
processLbl
.
text
=
[
NSString
stringWithFormat
:
@"%@ %d%%"
,
stateStr
,
percent
];
processLbl
.
text
=
[
NSString
stringWithFormat
:
@"%@ %d%%"
,
stateStr
,
percent
];
processValueLbl
.
text
=
[
NSString
stringWithFormat
:
@" %ld/%ld(题)"
,
finishNumber
,
totalNumber
];
processValueLbl
.
text
=
[
NSString
stringWithFormat
:
@" %ld/%ld(题)"
,
finishNumber
,
totalNumber
];
}
}
@end
@end
@implementation
GTOCategoryItemView
(
configure
)
@implementation
GTOCategoryItemView
(
configure
)
-
(
void
)
updateWithPatrolPlan
:
(
GTOPatrolPlan
*
)
patrolPlan
-
(
void
)
updateWithPatrolPlan
:(
GTOPatrolPlan
*
)
patrolPlan
storeCategory
:(
NSString
*
)
category
finishCategorysNumber
:(
NSInteger
)
finishNumber
totalCategorys
:(
NSInteger
)
totalNumber
storeCategory
:
(
NSString
*
)
category
{
finishCategorysNumber
:
(
NSInteger
)
finishNumber
totalCategorys
:
(
NSInteger
)
totalNumber
{
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
category
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
category
];
[
self
p_processWithFinishCategorysNumber
:
finishNumber
totalCategorys
:
totalNumber
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
p_processWithFinishCategorysNumber
:
finishNumber
totalCategorys
:
totalNumber
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
-
(
void
)
updateWithPioneering
:
(
GTOPioneering
*
)
pioneering
-
(
void
)
updateWithPioneering
:
(
GTOPioneering
*
)
pioneering
pioneeringProcess
:(
GTOPioneeingProcess
*
)
process
pioneeringProcess
:
(
GTOPioneeingProcess
*
)
process
{
{
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
process
.
category
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
process
.
category
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
process
.
finishNumber
totalCategorys
:(
int
)
process
.
totalNumber
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
process
.
finishNumber
totalCategorys
:(
int
)
process
.
totalNumber
processLabel:
self
.
m_processLabel
processValueLabel:
self
.
m_processValueLabel
];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
-
(
void
)
updateWithPioneering
:
(
GTOPioneering
*
)
pioneering
-
(
void
)
updateWithPioneering
:
(
GTOPioneering
*
)
pioneering
pioneeringDisplayResults
:(
GTODisplayResult
*
)
displayR
pioneeringDisplayResults
:
(
GTODisplayResult
*
)
displayR
{
{
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel:
self
.
m_processLabel
processValueLabel:
self
.
m_processValueLabel
];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
-
(
void
)
updateWithLicence
:
(
GTOLicence
*
)
licence
-
(
void
)
updateWithLicence
:
(
GTOLicence
*
)
licence
licenceDisplayResults
:(
GTODisplayResult
*
)
displayR
licenceDisplayResults
:
(
GTODisplayResult
*
)
displayR
{
{
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel:
self
.
m_processLabel
processValueLabel:
self
.
m_processValueLabel
];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
-
(
void
)
updateWithStoreResult
:
(
ICRStoreResult
*
)
storeResult
-
(
void
)
updateWithStoreResult
:
(
ICRStoreResult
*
)
storeResult
storeResultDisplayResults
:(
GTODisplayResult
*
)
displayR
storeResultDisplayResults
:
(
GTODisplayResult
*
)
displayR
{
{
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
[
self
p_imageViewWithImgView
:
self
.
m_categoryImgView
andCategory
:
nil
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
self
.
m_categoryLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:"
,
displayR
.
category
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel
:
self
.
m_processLabel
processValueLabel
:
self
.
m_processValueLabel
];
[
self
p_processWithFinishCategorysNumber
:(
int
)
displayR
.
arrAnswers
.
count
totalCategorys
:(
int
)
displayR
.
arrQuestions
.
count
processLabel:
self
.
m_processLabel
processValueLabel:
self
.
m_processValueLabel
];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Pioneering/Questions/GTOQuestionBaseViewController.m
View file @
9ee92af1
...
@@ -483,7 +483,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
...
@@ -483,7 +483,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
if
(
!
isLocal
)
{
if
(
!
isLocal
)
{
attachView
.
isDownImg
=
YES
;
attachView
.
isDownImg
=
YES
;
attV
.
m_imageView
.
backgroundColor
=
[
UIColor
grayColor
];
attV
.
m_imageView
.
backgroundColor
=
[
UIColor
grayColor
];
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_DEFAULT
,
0
),
^
{
//
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
if
((
_d_pioneering
&&
[
_d_pioneering
.
state
isEqualToString
:
GTO_PIONEERING_STATE_INITIAL
])
if
((
_d_pioneering
&&
[
_d_pioneering
.
state
isEqualToString
:
GTO_PIONEERING_STATE_INITIAL
])
||
(
_d_licence
&&
[
_d_licence
.
state
isEqualToString
:
GTO_LICENCE_STATE_INITIAL
]))
{
||
(
_d_licence
&&
[
_d_licence
.
state
isEqualToString
:
GTO_LICENCE_STATE_INITIAL
]))
{
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
...
@@ -491,7 +491,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
...
@@ -491,7 +491,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
[
attV
updateWithType
:
kATTNormal
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
[
attV
updateWithType
:
kATTNormal
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
}
}
});
//
});
}
else
{
}
else
{
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/GTOAlertInfoLicenceViewController.m
View file @
9ee92af1
...
@@ -129,7 +129,7 @@ UITextFieldDelegate>
...
@@ -129,7 +129,7 @@ UITextFieldDelegate>
}
}
-
(
void
)
initData
{
//答案的个数
-
(
void
)
initData
{
//答案的个数
ICRDatabaseFetchBlock
fetchBlk
=
^
FMResultSet
*
(
FMDatabase
*
db
)
{
ICRDatabaseFetchBlock
fetchBlk
=
^
FMResultSet
*
(
FMDatabase
*
db
)
{
NSString
*
sql
=
[
NSString
stringWithFormat
:
@"SELECT * FROM %@ WHERE %@ = ?
ORDER BY %@"
,
[
GTOAnswer
TableName
],
@"licenceUuid"
,
@"question
Uuid"
];
NSString
*
sql
=
[
NSString
stringWithFormat
:
@"SELECT * FROM %@ WHERE %@ = ?
"
,
[
GTOAnswer
TableName
],
@"licence
Uuid"
];
//答案的排序按照问题的uuid来,(此事的排序关系到结果页中答案的显示,按道理应该是根据答题的顺序,是不是后台给的问题应该排序?????)
//答案的排序按照问题的uuid来,(此事的排序关系到结果页中答案的显示,按道理应该是根据答题的顺序,是不是后台给的问题应该排序?????)
NSLog
(
@"%@"
,
sql
);
NSLog
(
@"%@"
,
sql
);
return
[
db
executeQuery
:
sql
,
_d_licence
.
uuid
];
return
[
db
executeQuery
:
sql
,
_d_licence
.
uuid
];
...
@@ -179,32 +179,6 @@ UITextFieldDelegate>
...
@@ -179,32 +179,6 @@ UITextFieldDelegate>
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
// static NSString * Id = @"cellId";
// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Id];
//
// if (!cell) {
// cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Id];
//
// } else {
// while ([cell.contentView.subviews lastObject] != nil) {
// [(UIView *)[cell.contentView.subviews lastObject] removeFromSuperview];
// }
//
// }
//
// GTOCategoryItemView *categoryItem = [[GTOCategoryItemView alloc]initWithFrame:CGRectMake(0, 0, cell.contentView.width, cell.contentView.height)];//cell.bounds];
// // if (_d_arrProcesses.count > 0) {
// // GTOPioneeingProcess *process = _d_arrProcesses[indexPath.row];
// if (_d_licence.arrDisplayResults.count > 0) {
// GTODisplayResult *displayR = [GTODisplayResult DBObject];
// [displayR praseFromJsonDict:_d_licence.arrDisplayResults[indexPath.row]];
//
//
// [categoryItem updateWithLicence:_d_licence licenceDisplayResults:displayR];
//
// }
//
// [cell.contentView addSubview:categoryItem];
return
cell
;
return
cell
;
}
}
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
...
@@ -221,7 +195,6 @@ UITextFieldDelegate>
...
@@ -221,7 +195,6 @@ UITextFieldDelegate>
if
(
_d_licence
.
arrDisplayResults
.
count
>
0
)
{
if
(
_d_licence
.
arrDisplayResults
.
count
>
0
)
{
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
[
displayR
praseFromJsonDict
:
_d_licence
.
arrDisplayResults
[
indexPath
.
row
]];
[
displayR
praseFromJsonDict
:
_d_licence
.
arrDisplayResults
[
indexPath
.
row
]];
[
categoryItem
updateWithLicence
:
_d_licence
licenceDisplayResults
:
displayR
];
[
categoryItem
updateWithLicence
:
_d_licence
licenceDisplayResults
:
displayR
];
}
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/GTOLicenceListSimpleCellContentView.m
View file @
9ee92af1
...
@@ -12,9 +12,13 @@
...
@@ -12,9 +12,13 @@
//@property (strong, nonatomic) IBTUILabel *m_repairTitleLabel;
//@property (strong, nonatomic) IBTUILabel *m_repairTitleLabel;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
labelStation
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
nonatomic
,
strong
)
IBTUILabel
*
labelRejectReason
;
@property
(
nonatomic
,
assign
)
CGFloat
reasonHeight
;
@property
(
strong
,
nonatomic
)
UIImageView
*
m_riskImgView
;
@property
(
strong
,
nonatomic
)
UIImageView
*
m_riskImgView
;
//@property (strong, nonatomic) IBTUILabel *m_repairDateLabel;//开始时间
@end
@end
@implementation
GTOLicenceListSimpleCellContentView
@implementation
GTOLicenceListSimpleCellContentView
...
@@ -23,7 +27,7 @@
...
@@ -23,7 +27,7 @@
if
(
!
self
)
{
if
(
!
self
)
{
return
nil
;
return
nil
;
}
}
self
.
reasonHeight
=
0
;
[
self
initSubViews
];
[
self
initSubViews
];
return
self
;
return
self
;
}
}
...
@@ -35,8 +39,10 @@
...
@@ -35,8 +39,10 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
labelStation
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
//self.m_repairDateLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_GRAY_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self
.
m_stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
labelRejectReason
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_riskImgView
=
[[
UIImageView
alloc
]
init
];
self
.
m_riskImgView
=
[[
UIImageView
alloc
]
init
];
...
@@ -44,7 +50,11 @@
...
@@ -44,7 +50,11 @@
//[self addSubview:_m_repairTitleLabel];
//[self addSubview:_m_repairTitleLabel];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
self
.
labelStation
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
self
.
labelRejectReason
];
[
self
addSubview
:
_m_riskImgView
];
[
self
addSubview
:
_m_riskImgView
];
// [self addSubview:_m_repairDateLabel];
// [self addSubview:_m_repairDateLabel];
...
@@ -71,13 +81,28 @@
...
@@ -71,13 +81,28 @@
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
_labelStation
.
frame
=
CGRectMake
(
leftX
,
_m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
self
.
width
,
lblH
);
_m_stateLabel
.
frame
=
(
CGRect
){
_m_stateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
leftX
,
.
origin
.
x
=
leftX
,
.
origin
.
y
=
_
m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_
labelStation
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
self
.
width
,
.
size
.
width
=
80
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
[
_m_stateLabel
sizeToFit
];
};
[
_m_stateLabel
sizeToFit
];
_m_stateValueLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_stateLabel
.
right
,
.
origin
.
y
=
_labelStation
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
-
_m_stateLabel
.
width
,
.
size
.
height
=
lblH
,
};
_labelRejectReason
.
frame
=
CGRectMake
(
_m_billNumberLabel
.
x
,
_m_stateLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
self
.
reasonHeight
);
CGFloat
imgW
=
40
;
CGFloat
imgW
=
40
;
_m_riskImgView
.
frame
=
(
CGRect
){
_m_riskImgView
.
frame
=
(
CGRect
){
.
origin
.
x
=
self
.
width
-
imgW
,
.
origin
.
x
=
self
.
width
-
imgW
,
...
@@ -100,9 +125,15 @@
...
@@ -100,9 +125,15 @@
-
(
void
)
updateWithLicence
:(
GTOLicence
*
)
licence
{
-
(
void
)
updateWithLicence
:(
GTOLicence
*
)
licence
{
// self.m_repairTitleLabel.text = [NSString stringWithFormat:@"许可证类型:%@ ",licence.licenceType];
// self.m_repairTitleLabel.text = [NSString stringWithFormat:@"许可证类型:%@ ",licence.licenceType];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证类型:%@ "
,
licence
.
licenceType
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
licence
.
store_name
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
self
.
m_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证状态: %@"
,[
GTOCommonTools
licenceStateChineseWithEnglish
:
licence
.
state
]
];
self
.
labelStation
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@"
,
licence
.
store_name
];
self
.
m_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证状态: "
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
licenceStateChineseWithEnglish
:
licence
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
licence
.
state
];
self
.
labelRejectReason
.
text
=
[
NSString
stringWithFormat
:
@"拒绝理由:%@"
,
licence
.
rejectCause
];
// self.m_repairDateLabel.text = [NSString stringWithFormat:@"申请时间:%@",licence.requestDate ];
// self.m_repairDateLabel.text = [NSString stringWithFormat:@"申请时间:%@",licence.requestDate ];
if
([
licence
.
riskGrade
isEqualToString
:
@"高"
])
{
if
([
licence
.
riskGrade
isEqualToString
:
@"高"
])
{
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_hight"
];
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_hight"
];
...
@@ -110,6 +141,16 @@
...
@@ -110,6 +141,16 @@
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_middle"
];
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_middle"
];
}
}
if
([
licence
.
state
isEqualToString
:
@"rejected"
])
{
self
.
reasonHeight
=
17
;
self
.
labelRejectReason
.
height
=
17
;
self
.
labelRejectReason
.
hidden
=
NO
;
}
else
{
self
.
reasonHeight
=
0
;
self
.
labelRejectReason
.
height
=
0
;
self
.
labelRejectReason
.
hidden
=
YES
;
}
[
self
layoutIfNeeded
];
}
}
@end
@end
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/GTOLicenceResultTopCellContentView.m
View file @
9ee92af1
...
@@ -161,12 +161,15 @@
...
@@ -161,12 +161,15 @@
-
(
void
)
updateWithLicence
:
(
GTOLicence
*
)
licence
arrayDictDisplayResults
:
(
NSArray
*
)
arrDisplayResults
-
(
void
)
updateWithLicence
:
(
GTOLicence
*
)
licence
arrayDictDisplayResults
:
(
NSArray
*
)
arrDisplayResults
{
{
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修单号:%@"
,
licence
.
repairNumber
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修单号:%@"
,
licence
.
repairNumber
];
self
.
m_riskGradeLabel
.
text
=
[
NSString
stringWithFormat
:
@"
风
险等级:%@"
,
licence
.
riskGrade
];
self
.
m_riskGradeLabel
.
text
=
[
NSString
stringWithFormat
:
@"
危
险等级:%@"
,
licence
.
riskGrade
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站:%@"
,
licence
.
store_name
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站:%@"
,
licence
.
store_name
];
self
.
m_licenceTypeLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证类型:%@"
,
licence
.
licenceType
];
self
.
m_licenceTypeLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证类型:%@"
,
licence
.
licenceType
];
self
.
m_valideTimeStartLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,[
GTOCommonTools
nullChangedWithId
:
licence
.
beginDate
]];
self
.
m_valideTimeStartLabel
.
text
=
[
NSString
stringWithFormat
:
@"申请时间:%@"
,
licence
.
requestDate
];
self
.
m_valideTimeEndLabel
.
text
=
[
NSString
stringWithFormat
:
@"截止时间:%@"
,[
GTOCommonTools
nullChangedWithId
:
licence
.
endDate
]];
NSDateFormatter
*
f
=
[[
NSDateFormatter
alloc
]
init
];
self
.
m_requestDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"申请时间:%@"
,
licence
.
requestDate
];
[
f
setDateFormat
:
@"yyyy-MM-dd HH:mm:ss"
];
NSDate
*
date
=
[
f
dateFromString
:
licence
.
requestDate
];
NSDate
*
endDate
=
[
NSDate
dateWithTimeInterval
:
licence
.
validHours
*
60
*
60
sinceDate
:
date
];
self
.
m_valideTimeEndLabel
.
text
=
[
NSString
stringWithFormat
:
@"截止时间:%@"
,[
f
stringFromDate
:
endDate
]];
self
.
m_rejectCauseLabel
.
text
=
[
NSString
stringWithFormat
:
@"拒绝理由:%@"
,
licence
.
rejectCause
];
self
.
m_rejectCauseLabel
.
text
=
[
NSString
stringWithFormat
:
@"拒绝理由:%@"
,
licence
.
rejectCause
];
...
@@ -174,7 +177,6 @@
...
@@ -174,7 +177,6 @@
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓站总进度:"
];
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓站总进度:"
];
NSUInteger
totalNumber
=
arrDisplayResults
.
count
;
NSUInteger
totalNumber
=
arrDisplayResults
.
count
;
NSUInteger
finishNumber
=
0
;
NSUInteger
finishNumber
=
0
;
for
(
NSDictionary
*
dictDisplayR
in
arrDisplayResults
){
for
(
NSDictionary
*
dictDisplayR
in
arrDisplayResults
){
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
View file @
9ee92af1
...
@@ -193,13 +193,13 @@ static NSString *headerProblemItemID = @"headerItem";
...
@@ -193,13 +193,13 @@ static NSString *headerProblemItemID = @"headerItem";
if
(
displayR
.
arrAnswers
.
count
!=
displayR
.
arrQuestions
.
count
)
noFinishNumber
++
;
if
(
displayR
.
arrAnswers
.
count
!=
displayR
.
arrQuestions
.
count
)
noFinishNumber
++
;
}
}
if
(
noFinishNumber
>
0
)
{
if
(
noFinishNumber
>
0
)
{
bottomV
=
[[
GXFBottomView
alloc
]
initOneButtonWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
buttonColor
:
GTO_
RED
_COLOR
buttonTitle
:
@"返回"
];
bottomV
=
[[
GXFBottomView
alloc
]
initOneButtonWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
buttonColor
:
GTO_
BLUE_DEEP
_COLOR
buttonTitle
:
@"返回"
];
bottomV
.
tag
=
kBottomViewOneBackTag
;
bottomV
.
tag
=
kBottomViewOneBackTag
;
}
else
{
}
else
{
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
leftButtonColor
:
GTO_
RED
_COLOR
leftButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
RED
_COLOR
LeftBtnTitle
:
@"保存"
LeftBtnTitle
:
@"保存"
rightBtnTitle
:
@"提交"
];
rightBtnTitle
:
@"提交"
];
bottomV
.
tag
=
kBottomViewTwoSaveSubmitTag
;
bottomV
.
tag
=
kBottomViewTwoSaveSubmitTag
;
...
@@ -210,19 +210,18 @@ static NSString *headerProblemItemID = @"headerItem";
...
@@ -210,19 +210,18 @@ static NSString *headerProblemItemID = @"headerItem";
bottomV
.
tag
=
kBOttomViewAskForApprove
;
bottomV
.
tag
=
kBOttomViewAskForApprove
;
}
else
if
(
isAskForApprove
)
{
}
else
if
(
isAskForApprove
)
{
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
leftButtonColor
:
GTO_
RED
_COLOR
leftButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
RED
_COLOR
LeftBtnTitle
:
@"审批拒绝"
LeftBtnTitle
:
@"审批拒绝"
rightBtnTitle
:
@"审批通过"
];
rightBtnTitle
:
@"审批通过"
];
bottomV
.
tag
=
kBottomViewTwoRejectedApprovedTag
;
bottomV
.
tag
=
kBottomViewTwoRejectedApprovedTag
;
}
else
{
}
else
{
bottomV
=
[[
GXFBottomView
alloc
]
initOneButtonWithFrame
:
rect
buttonColor
:
GTO_
RED
_COLOR
buttonTitle
:
@"返 回"
];
bottomV
=
[[
GXFBottomView
alloc
]
initOneButtonWithFrame
:
rect
buttonColor
:
GTO_
BLUE_DEEP
_COLOR
buttonTitle
:
@"返 回"
];
bottomV
.
tag
=
kBottomViewOneBackTag
;
bottomV
.
tag
=
kBottomViewOneBackTag
;
}
}
bottomV
.
backgroundColor
=
XXFBgColor
;
bottomV
.
backgroundColor
=
XXFBgColor
;
bottomV
.
delegate
=
self
;
bottomV
.
delegate
=
self
;
[
self
.
view
addSubview
:
bottomV
];
[
self
.
view
addSubview
:
bottomV
];
}
}
...
@@ -343,7 +342,7 @@ static NSString *headerProblemItemID = @"headerItem";
...
@@ -343,7 +342,7 @@ static NSString *headerProblemItemID = @"headerItem";
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
section
==
0
)
{
return
1
7
6
;
return
1
5
6
;
}
else
{
}
else
{
return
55
;
return
55
;
}
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/GTORepairListViewController.m
View file @
9ee92af1
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#define TopMargin 44
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
4
0
#define LeftMargin 20
#define LeftMargin 20
#define BtnWidth 60
#define BtnWidth 60
#define BtnHeight 24
#define BtnHeight 24
...
@@ -67,12 +67,8 @@ static NSString *cellID = @"repairListCell";
...
@@ -67,12 +67,8 @@ static NSString *cellID = @"repairListCell";
-
(
void
)
initData
{
-
(
void
)
initData
{
self
.
dataArr
=
[
NSMutableArray
array
];
self
.
dataArr
=
[
NSMutableArray
array
];
// if (self.assessorVendor.length > 0) {
// self.vendorLike = self.assessorVendor;
// }
}
}
-
(
void
)
getData
{
-
(
void
)
getData
{
// [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
];
...
@@ -125,20 +121,12 @@ static NSString *cellID = @"repairListCell";
...
@@ -125,20 +121,12 @@ static NSString *cellID = @"repairListCell";
if
(
self
.
titleLike
.
length
>
0
)
{
if
(
self
.
titleLike
.
length
>
0
)
{
titleObject
=
self
.
titleLike
;
titleObject
=
self
.
titleLike
;
}
}
// id vendorObject = [NSNull null];
// if (self.vendorLike.length > 0) {
// vendorObject = self.vendorLike;
// }
NSDictionary
*
dict
=
@{
NSDictionary
*
dict
=
@{
@"engineerUuid"
:
[
ICRUserUtil
sharedInstance
].
f_user_uuid
,
@"engineerUuid"
:
[
ICRUserUtil
sharedInstance
].
f_user_uuid
,
@"billNumberLike"
:
billObject
,
@"billNumberLike"
:
billObject
,
@"state"
:
stateObject
,
@"state"
:
stateObject
,
@"titleLike"
:
titleObject
,
@"titleLike"
:
titleObject
,
@"queryOrders"
:
orderArr
,
@"queryOrders"
:
orderArr
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageNumber"
:
@
(
_currentPage
),
@"pageSize"
:
@
(
20
)};
@"pageSize"
:
@
(
20
)};
ICRHTTPController
*
httpC
=
[
ICRHTTPController
sharedController
];
ICRHTTPController
*
httpC
=
[
ICRHTTPController
sharedController
];
...
@@ -423,35 +411,18 @@ static NSString *cellID = @"repairListCell";
...
@@ -423,35 +411,18 @@ static NSString *cellID = @"repairListCell";
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
// static NSString *cellID = @"SurveyID";
// PurchaseCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
// if (cell == nil) {
// cell = [[PurchaseCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
// tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// }
// if (self.dataArr.count > 0) {
// PurchaseBill *bill = self.dataArr[indexPath.row];
// [cell setPurchaseBill:bill];
// }
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
return
cell
;
return
cell
;
}
}
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
//cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIView
*
contentView
=
cell
.
contentView
;
UIView
*
contentView
=
cell
.
contentView
;
GTORepairListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTORepairListCellContentView
class
]];
GTORepairListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTORepairListCellContentView
class
]];
if
(
!
view
)
{
if
(
!
view
)
{
view
=
[[
GTORepairListCellContentView
alloc
]
initWithFrame
:
contentView
.
bounds
];
view
=
[[
GTORepairListCellContentView
alloc
]
initWithFrame
:
contentView
.
bounds
];
//view.m_bHiddenNumLabel = m_bIsInHome;
[
view
autoresizingWithStrechFullSize
];
[
view
autoresizingWithStrechFullSize
];
[
contentView
addSubview
:
view
];
[
contentView
addSubview
:
view
];
}
}
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTOLicenceBoltView.m
View file @
9ee92af1
...
@@ -317,12 +317,14 @@
...
@@ -317,12 +317,14 @@
}
else
if
(
indexPath
.
row
==
2
){
}
else
if
(
indexPath
.
row
==
2
){
stateStr
=
GTO_LICENCE__STATE_SUBMITTED
;
stateStr
=
GTO_LICENCE__STATE_SUBMITTED
;
}
else
if
(
indexPath
.
row
==
3
){
}
else
if
(
indexPath
.
row
==
3
){
stateStr
=
GTO_LICENCE__STATE_A
PPROVED
;
stateStr
=
GTO_LICENCE__STATE_A
SKFORAPPROVE
;
}
else
if
(
indexPath
.
row
==
4
){
}
else
if
(
indexPath
.
row
==
4
){
stateStr
=
GTO_LICENCE__STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
GTO_LICENCE__STATE_APPROVED
;
stateStr
=
GTO_LICENCE__STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
GTO_LICENCE__STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
6
){
}
else
if
(
indexPath
.
row
==
6
){
stateStr
=
GTO_LICENCE__STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
7
){
stateStr
=
GTO_LICENCE__STATE_FINISHED
;
stateStr
=
GTO_LICENCE__STATE_FINISHED
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTOLicenceListCellContentView.m
View file @
9ee92af1
...
@@ -6,120 +6,133 @@
...
@@ -6,120 +6,133 @@
// Copyright © 2015年 free. All rights reserved.
// Copyright © 2015年 free. All rights reserved.
//
//
#import "GTOLicenceListCellContentView.h"
#import "GTOLicence.h"
#import "GTOLicence.h"
#import "GTOLicenceListCellContentView.h"
@interface
GTOLicenceListCellContentView
()
@interface
GTOLicenceListCellContentView
()
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairTitleLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairTitleLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
nonatomic
,
strong
)
IBTUILabel
*
labelValidHours
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
nonatomic
,
strong
)
IBTUILabel
*
labelRejectReason
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
UIImageView
*
m_riskImgView
;
@property
(
strong
,
nonatomic
)
UIImageView
*
m_riskImgView
;
@property
(
nonatomic
,
assign
)
CGFloat
reasonHeight
;
@end
@end
@implementation
GTOLicenceListCellContentView
@implementation
GTOLicenceListCellContentView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
self
=
[
super
initWithFrame
:
frame
];
if
(
!
self
)
{
if
(
!
self
)
{
return
nil
;
return
nil
;
}
}
self
.
reasonHeight
=
0
;
[
self
initSubViews
];
[
self
initSubViews
];
return
self
;
return
self
;
}
}
-
(
void
)
initSubViews
{
-
(
void
)
initSubViews
{
self
.
m_repairTitleLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
20
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_repairTitleLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:[
UIFont
systemFontOfSize
:
17
]
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
labelValidHours
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_
repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_
stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_riskImgView
=
[[
UIImageView
alloc
]
ini
t
];
self
.
labelRejectReason
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLef
t
];
self
.
m_repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_riskImgView
=
[[
UIImageView
alloc
]
init
];
[
self
addSubview
:
_m_repairTitleLabel
];
[
self
addSubview
:
_m_repairTitleLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
self
.
labelValidHours
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
self
.
labelRejectReason
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_riskImgView
];
[
self
addSubview
:
_m_riskImgView
];
}
}
-
(
void
)
layoutSubviews
{
-
(
void
)
layoutSubviews
{
CGFloat
lblH
=
17
;
CGFloat
lblH
=
17
;
_m_repairTitleLabel
.
frame
=
(
CGRect
){
_m_repairTitleLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
GTO_LEFT_PADDING
,
.
origin
.
x
=
GTO_LEFT_PADDING
,
.
origin
.
y
=
GTO_TOP_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
+
10
,
.
origin
.
y
=
GTO_TOP_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
+
10
,
};
};
_m_billNumberLabel
.
frame
=
(
CGRect
){
_m_billNumberLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_m_repairTitleLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
.
origin
.
y
=
_m_repairTitleLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
};
};
_m_storeNameLabel
.
frame
=
(
CGRect
){
_m_storeNameLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
height
=
lblH
,
.
origin
.
y
=
_m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
height
=
lblH
,
};
};
_labelValidHours
.
frame
=
CGRectMake
(
_m_repairTitleLabel
.
x
,
_m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
_m_billNumberLabel
.
width
,
lblH
);
_m_stateLabel
.
frame
=
(
CGRect
){
_m_stateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_
m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_
labelValidHours
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
80
,
//SCREEN_SIZE.width - GTO_LEFT_PADDING,
.
size
.
width
=
80
,
//
SCREEN_SIZE.width - GTO_LEFT_PADDING,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
[
_m_stateLabel
sizeToFit
];
};
[
_m_stateLabel
sizeToFit
];
_m_stateValueLabel
.
frame
=
(
CGRect
){
_m_stateValueLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_stateLabel
.
right
,
.
origin
.
x
=
_m_stateLabel
.
right
,
.
origin
.
y
=
_labelValidHours
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
-
_m_stateLabel
.
width
,
.
size
.
height
=
lblH
,
.
origin
.
y
=
_m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
-
_m_stateLabel
.
width
,
.
size
.
height
=
lblH
,
};
};
_labelRejectReason
.
frame
=
CGRectMake
(
_m_repairTitleLabel
.
x
,
_m_stateLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
self
.
reasonHeight
);
_m_repairDateLabel
.
frame
=
(
CGRect
){
_m_repairDateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_m_stateLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
//如果拒绝理由的高度是0,则和_labelRejectReason的底部贴在一起
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT
_PADDING
,
.
origin
.
y
=
self
.
reasonHeight
==
0
?
_labelRejectReason
.
bottom
:
_labelRejectReason
.
bottom
+
GTO_VERTICAL
_PADDING
,
.
size
.
height
=
lblH
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
};
};
CGFloat
imgW
=
40
;
CGFloat
imgW
=
40
;
_m_riskImgView
.
frame
=
(
CGRect
){
_m_riskImgView
.
frame
=
(
CGRect
){
.
origin
.
x
=
self
.
width
-
imgW
,
.
origin
.
x
=
self
.
width
-
imgW
,
.
origin
.
y
=
0
,
.
size
.
width
=
imgW
,
.
size
.
height
=
imgW
,
.
origin
.
y
=
0
,
.
size
.
width
=
imgW
,
.
size
.
height
=
imgW
,
};
};
}
}
@end
@end
@implementation
GTOLicenceListCellContentView
(
configure
)
@implementation
GTOLicenceListCellContentView
(
configure
)
-
(
void
)
updateWithLicence
:(
GTOLicence
*
)
licence
{
-
(
void
)
updateWithLicence
:(
GTOLicence
*
)
licence
self
.
m_repairTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ "
,
licence
.
licenceType
];
{
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
self
.
m_repairTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证名称:%@ "
,
licence
.
licenceType
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
licence
.
store_name
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
licence
.
store_name
];
self
.
labelValidHours
.
text
=
[
NSString
stringWithFormat
:
@"有效时间(h):%lu h"
,
licence
.
validHours
];
self
.
m_stateLabel
.
text
=
@"许可证状态: "
;
self
.
m_stateLabel
.
text
=
@"许可证状态: "
;
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
licenceStateChineseWithEnglish
:
licence
.
state
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
licenceStateChineseWithEnglish
:
licence
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
licence
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
licence
.
state
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"风险等级:%@"
,
licence
.
riskGrade
];
self
.
labelRejectReason
.
text
=
[
NSString
stringWithFormat
:
@"拒绝理由:%@"
,
//self.m_repairDateLabel.text = [NSString stringWithFormat:@"最后修改时间:%@",licence.lastModify_time ];
licence
.
rejectCause
];
//已拒绝显示拒绝理由
if
([
licence
.
state
isEqualToString
:
@"rejected"
])
{
self
.
reasonHeight
=
17
;
self
.
labelRejectReason
.
height
=
17
;
self
.
labelRejectReason
.
hidden
=
NO
;
}
else
{
self
.
reasonHeight
=
0
;
self
.
labelRejectReason
.
height
=
0
;
self
.
labelRejectReason
.
hidden
=
YES
;
}
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证申请时间:%@"
,
licence
.
requestDate
];
if
([
licence
.
riskGrade
isEqualToString
:
@"高"
])
{
if
([
licence
.
riskGrade
isEqualToString
:
@"高"
])
{
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_hight"
];
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_hight"
];
}
else
{
}
else
{
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_middle"
];
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_middle"
];
}
}
[
self
layoutIfNeeded
];
}
}
@end
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTOLicenceListViewController.m
View file @
9ee92af1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#import "GTOAnswer.h"
#import "GTOAnswer.h"
#import "GTOQuestion.h"
#import "GTOQuestion.h"
#define TopMargin 44
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
7
0
#define LeftMargin 20
#define LeftMargin 20
#define BtnWidth 60
#define BtnWidth 60
#define BtnHeight 24
#define BtnHeight 24
...
@@ -282,7 +282,7 @@ static NSString *cellID = @"licenceListCell";
...
@@ -282,7 +282,7 @@ static NSString *cellID = @"licenceListCell";
_boltView
.
backgroundColor
=
XXFBgColor
;
_boltView
.
backgroundColor
=
XXFBgColor
;
_boltView
.
delegate
=
self
;
_boltView
.
delegate
=
self
;
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
_boltView
.
dataArrState
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"全部"
,
@"未提交"
,
@"待审批"
,
@"审批通过"
,
@"审批拒绝"
,
@"已过期"
,
@"已结束"
,
nil
];
_boltView
.
dataArrState
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"全部"
,
@"未提交"
,
@"
申请审批"
,
@"
待审批"
,
@"审批通过"
,
@"审批拒绝"
,
@"已过期"
,
@"已结束"
,
nil
];
_boltView
.
dataArrRisk
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"全部"
,
GTO_LICENCE_RISK_HIGHT
,
GTO_LICENCE__RISK_MIDDLE
,
nil
];
_boltView
.
dataArrRisk
=
[[
NSMutableArray
alloc
]
initWithObjects
:
@"全部"
,
GTO_LICENCE_RISK_HIGHT
,
GTO_LICENCE__RISK_MIDDLE
,
nil
];
[
_maskView
addSubview
:
_boltView
];
[
_maskView
addSubview
:
_boltView
];
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
...
@@ -424,17 +424,6 @@ static NSString *cellID = @"licenceListCell";
...
@@ -424,17 +424,6 @@ static NSString *cellID = @"licenceListCell";
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
indexPath
];
// static NSString *cellID = @"SurveyID";
// PurchaseCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
// if (cell == nil) {
// cell = [[PurchaseCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
// tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
// cell.selectionStyle = UITableViewCellSelectionStyleNone;
// }
// if (self.dataArr.count > 0) {
// PurchaseBill *bill = self.dataArr[indexPath.row];
// [cell setPurchaseBill:bill];
// }
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
return
cell
;
return
cell
;
...
@@ -442,10 +431,6 @@ static NSString *cellID = @"licenceListCell";
...
@@ -442,10 +431,6 @@ static NSString *cellID = @"licenceListCell";
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
{
//cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIView
*
contentView
=
cell
.
contentView
;
UIView
*
contentView
=
cell
.
contentView
;
GTOLicenceListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTOLicenceListCellContentView
class
]];
GTOLicenceListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTOLicenceListCellContentView
class
]];
...
@@ -461,7 +446,9 @@ static NSString *cellID = @"licenceListCell";
...
@@ -461,7 +446,9 @@ static NSString *cellID = @"licenceListCell";
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
TableHeight
;
//如果是审批拒绝状态,就显示拒绝理由,所以增加一个label的高度
GTOLicence
*
licence
=
_dataArr
[
indexPath
.
section
];
return
[
licence
.
state
isEqualToString
:
@"rejected"
]
?
TableHeight
+
20
:
TableHeight
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
section
==
0
?
1
:
10
;
return
section
==
0
?
1
:
10
;
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTORepairDetailTopCellView.m
View file @
9ee92af1
...
@@ -10,8 +10,10 @@
...
@@ -10,8 +10,10 @@
#import "GTORepair.h"
#import "GTORepair.h"
@interface
GTORepairDetailTopCellView
()
@interface
GTORepairDetailTopCellView
()
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
//报修单号
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_projectLabel
;
//报修项目
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_projectLabel
;
//报修项目
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_engineerNameLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_engineerNameLabel
;
...
@@ -35,6 +37,8 @@
...
@@ -35,6 +37,8 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_projectLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_projectLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_engineerNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_engineerNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
...
@@ -45,6 +49,8 @@
...
@@ -45,6 +49,8 @@
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_projectLabel
];
[
self
addSubview
:
_m_projectLabel
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_engineerNameLabel
];
[
self
addSubview
:
_m_engineerNameLabel
];
...
@@ -69,9 +75,18 @@
...
@@ -69,9 +75,18 @@
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
//增加报修状态
_m_stateLabel
.
frame
=
CGRectMake
(
leftX
,
_m_projectLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
80
,
lblH
);
_m_stateValueLabel
.
frame
=
CGRectMake
(
_m_stateLabel
.
right
,
_m_stateLabel
.
y
,
100
,
lblH
);
_m_storeNameLabel
.
frame
=
(
CGRect
){
_m_storeNameLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
leftX
,
.
origin
.
x
=
leftX
,
.
origin
.
y
=
_m_
project
Label
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_m_
state
Label
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
...
@@ -110,13 +125,16 @@
...
@@ -110,13 +125,16 @@
-
(
void
)
updateWithRepair
:
(
GTORepair
*
)
repair
{
-
(
void
)
updateWithRepair
:
(
GTORepair
*
)
repair
{
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修单号
:
%@ "
,
repair
.
billnumber
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修单号
:
%@ "
,
repair
.
billnumber
];
self
.
m_projectLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修项目: %@"
,
repair
.
title
];
self
.
m_projectLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修项目: %@"
,
repair
.
title
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
repair
.
store_name
];
self
.
m_stateLabel
.
text
=
@"报修状态: "
;
self
.
m_startDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"新建时间:%@"
,
repair
.
create_time
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
repairStateChineseWithEnglish
:
repair
.
state
];
self
.
m_engineerNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修申请人:%@ "
,
repair
.
requestor
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
repair
.
state
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修日期:%@ "
,
repair
.
repairDate
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称: %@ "
,
repair
.
store_name
];
self
.
m_contentLabel
.
text
=
[
NSString
stringWithFormat
:
@"内容:%@ "
,[
GTOCommonTools
nullChangedWithId
:
repair
.
content
]];
self
.
m_startDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"新建时间: %@"
,
repair
.
create_time
];
self
.
m_engineerNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修申请人: %@ "
,
repair
.
requestor
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修时间: %@ "
,[
repair
.
repairDate
substringToIndex
:
11
]];
self
.
m_contentLabel
.
text
=
[
NSString
stringWithFormat
:
@"内容描述: %@ "
,[
GTOCommonTools
nullChangedWithId
:
repair
.
content
]];
}
}
@end
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTORepairDetailViewController.m
View file @
9ee92af1
...
@@ -82,8 +82,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -82,8 +82,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
super
viewDidLoad
];
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
self
.
title
=
@"报修单详情"
;
self
.
title
=
@"报修单详情"
;
//[self initSubViews];
}
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
self
p_licences
];
[
self
p_licences
];
...
@@ -144,11 +142,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -144,11 +142,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
success
==
1
)
{
// if (_currentPage == 0) {
// if (self.dataArr.count > 0) {
// [self.dataArr removeAllObjects];
// }
// }
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
if
(
!
_d_muArrLicences
)
{
if
(
!
_d_muArrLicences
)
{
self
.
d_muArrLicences
=
[
NSMutableArray
array
];
self
.
d_muArrLicences
=
[
NSMutableArray
array
];
...
@@ -162,16 +155,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -162,16 +155,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
self
.
d_muArrLicences
addObject
:
licence
];
[
self
.
d_muArrLicences
addObject
:
licence
];
}
}
// NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
// NSInteger pageCount = [pageDict[@"pageCount"] integerValue];
[
self
.
c_tableView
reloadData
];
[
self
.
c_tableView
reloadData
];
// [self endRefreshing];
// if (pageCount <= _currentPage) {
// [self.tableView.footer noticeNoMoreData];
// }
// if (_currentPage == 0 && self.dataArr.count > 0) {
// [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
// }
}
else
{
}
else
{
[
IBTLoadingView
showTips
:
message
];
[
IBTLoadingView
showTips
:
message
];
}
}
...
@@ -194,8 +178,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -194,8 +178,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
self
.
view
addSubview
:
_c_tableView
];
[
self
.
view
addSubview
:
_c_tableView
];
[
_c_tableView
reloadData
];
[
_c_tableView
reloadData
];
self
.
c_addPhotoV
=
[[
GTORepairAddPhotoView
alloc
]
initWithFrame
:(
CGRect
){
self
.
c_addPhotoV
=
[[
GTORepairAddPhotoView
alloc
]
initWithFrame
:(
CGRect
){
.
origin
.
x
=
0
,
.
origin
.
x
=
0
,
.
origin
.
y
=
_c_tableView
.
bottom
+
5
,
.
origin
.
y
=
_c_tableView
.
bottom
+
5
,
...
@@ -226,18 +208,13 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -226,18 +208,13 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
for
(
NSDictionary
*
dict
in
_d_repair
.
attachmentUrls
)
{
for
(
NSDictionary
*
dict
in
_d_repair
.
attachmentUrls
)
{
ICRPostAttachment
*
postAttachment
=
[
ICRPostAttachment
DBObject
];
ICRPostAttachment
*
postAttachment
=
[
ICRPostAttachment
DBObject
];
[
postAttachment
praseFromJsonDict
:
dict
];
[
postAttachment
praseFromJsonDict
:
dict
];
// NSString *str = [NSString stringWithFormat:@"%@%@",HTTP_LOCAL_BASE_URL ,postAttachment.fileUrl];
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// [self addAttachment:[self p_getImageFromURL:str]];
// });
self
.
d_isDownLoadImg
=
YES
;
self
.
d_isDownLoadImg
=
YES
;
[
self
addAttachment
:[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
HTTP_LOCAL_BASE_URL
,
postAttachment
.
fileUrl
]]];
[
self
addAttachment
:[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
HTTP_LOCAL_BASE_URL
,
postAttachment
.
fileUrl
]]];
}
}
}
}
}
else
if
([
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_SUBMITTED
]
||
[
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_PROCESSING
]){
}
else
if
([
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_SUBMITTED
]
||
[
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_PROCESSING
]){
self
.
c_addPhotoV
.
hidden
=
YES
;
self
.
c_addPhotoV
.
hidden
=
YES
;
bottomV
.
tag
=
kBottomViewOneApplicationTag
;
bottomV
.
tag
=
kBottomViewOneApplicationTag
;
[
bottomV
.
f_oneBtn
setTitle
:
@"申请结束报修"
forState
:
UIControlStateNormal
];
[
bottomV
.
f_oneBtn
setTitle
:
@"申请结束报修"
forState
:
UIControlStateNormal
];
...
@@ -253,6 +230,10 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -253,6 +230,10 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
self
.
c_bottomView
=
bottomV
;
self
.
c_bottomView
=
bottomV
;
[
self
.
view
addSubview
:
_c_bottomView
];
[
self
.
view
addSubview
:
_c_bottomView
];
if
([
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_SUBMITTED
]
||
[
_d_repair
.
state
isEqualToString
:
GTO_REPAIR_STATE_PROCESSING
]){
self
.
c_tableView
.
height
=
self
.
view
.
height
-
BottomViewHeight
-
10
;
}
}
}
//加载本地图片
//加载本地图片
-
(
void
)
addLocalPhotos
{
-
(
void
)
addLocalPhotos
{
...
@@ -273,14 +254,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -273,14 +254,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
if
(
!
_d_muArrPhotos
.
count
)
{
if
(
!
_d_muArrPhotos
.
count
)
{
self
.
d_muArrPhotos
=
[
NSMutableArray
arrayWithArray
:
fetchedObjects
];
self
.
d_muArrPhotos
=
[
NSMutableArray
arrayWithArray
:
fetchedObjects
];
for
(
ICRPostAttachment
*
postAttachment
in
fetchedObjects
)
{
for
(
ICRPostAttachment
*
postAttachment
in
fetchedObjects
)
{
// BOOL isHave = [[NSFileManager defaultManager] fileExistsAtPath:postAttachment.filePath];
// if([[NSFileManager defaultManager] fileExistsAtPath:postAttachment.filePath]) {
// CLog(@"%@",postAttachment.filePath);
// UIImage *img = [[UIImage alloc]initWithContentsOfFile:postAttachment.filePath];
// [self addAttachment:img];
// }
if
(
postAttachment
.
content
)
{
if
(
postAttachment
.
content
)
{
NSData
*
imageData
=
[
NSData
dataFromBase64String
:
postAttachment
.
content
];
NSData
*
imageData
=
[
NSData
dataFromBase64String
:
postAttachment
.
content
];
UIImage
*
image
=
[
UIImage
imageWithData
:
imageData
];
UIImage
*
image
=
[
UIImage
imageWithData
:
imageData
];
...
@@ -312,11 +285,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -312,11 +285,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
success
==
1
)
{
// NSDictionary *dictRepair = data[@"data"];
// self.d_repair = [GTORepair DBObject];
// [_d_repair praseFromJsonDict:dictRepair];
// [self initSubViews];
// [_c_tableView reloadData];
}
}
};
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
...
@@ -362,11 +331,14 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -362,11 +331,14 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
return
section
==
0
?
0
.
1
:
44
;
return
section
==
0
?
0
.
1
:
44
;
}
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
indexPath
.
section
==
0
?
200
:
90
;
if
(
indexPath
.
section
==
0
)
{
return
210
;
}
else
{
GTOLicence
*
licence
=
_d_muArrLicences
[
indexPath
.
row
];
return
[
licence
.
state
isEqualToString
:
@"rejected"
]
?
110
+
20
:
110
;
}
}
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
// static NSString *headID = @"headID";
// UIView *view = [tableView dequeueReusableHeaderFooterViewWithIdentifier:headID];
if
(
section
==
0
)
{
if
(
section
==
0
)
{
return
nil
;
return
nil
;
}
else
{
}
else
{
...
@@ -382,7 +354,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -382,7 +354,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
contentView
.
backgroundColor
=
XXFBgColor
;
contentView
.
backgroundColor
=
XXFBgColor
;
GXFButtonAndLineView
*
headLineV
=
[
contentView
viewWithClass
:[
GXFButtonAndLineView
class
]];
GXFButtonAndLineView
*
headLineV
=
[
contentView
viewWithClass
:[
GXFButtonAndLineView
class
]];
if
(
!
headLineV
)
{
if
(
!
headLineV
)
{
headLineV
=
[[
GXFButtonAndLineView
alloc
]
initViewLineAndButtonWithFrame
:
CGRectMake
(
0
,
0
,
self
.
view
.
width
*
0
.
5
,
44
)
isSeleted
:
YES
buttonTitle
:
@"许可证"
selectColor
:
GTO_RED_COLOR
];
headLineV
=
[[
GXFButtonAndLineView
alloc
]
initViewLineAndButtonWithFrame
:
CGRectMake
(
0
,
0
,
self
.
view
.
width
*
0
.
5
,
44
)
isSeleted
:
YES
buttonTitle
:
@"许可证
列表
"
selectColor
:
GTO_RED_COLOR
];
headLineV
.
f_btn
.
userInteractionEnabled
=
NO
;
headLineV
.
f_btn
.
userInteractionEnabled
=
NO
;
BOOL
createPermission
=
[
GTOCommonTools
hasPermissionWithPermissionId
:
500303
];
BOOL
createPermission
=
[
GTOCommonTools
hasPermissionWithPermissionId
:
500303
];
...
@@ -405,12 +377,9 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -405,12 +377,9 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
UITableViewCell
*
cell
=
nil
;
UITableViewCell
*
cell
=
nil
;
if
(
indexPath
.
section
==
0
)
{
if
(
indexPath
.
section
==
0
)
{
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDTop
forIndexPath
:
indexPath
];
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDTop
forIndexPath
:
indexPath
];
}
else
{
}
else
{
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDItem
forIndexPath
:
indexPath
];
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDItem
forIndexPath
:
indexPath
];
}
}
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
return
cell
;
return
cell
;
}
}
...
@@ -612,12 +581,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
...
@@ -612,12 +581,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
_d_currentLicence
saveToDBWithHandleData
:
NULL
[
_d_currentLicence
saveToDBWithHandleData
:
NULL
complete
:
^
{
complete
:
^
{
[
self
fetchResult
];
[
self
fetchResult
];
// if ([_d_currentLicence.state isEqualToString:GTO_LICENCE_STATE_INITIAL]) {
// [self p_addAlerInfoLicenceView];
// } else {
// [self fetchResult];
// }
}
}
fail
:^
(
NSError
*
error
)
{
fail
:^
(
NSError
*
error
)
{
...
@@ -838,17 +801,14 @@ didVideoPickedWithURL:(NSURL *)videoUrl {
...
@@ -838,17 +801,14 @@ didVideoPickedWithURL:(NSURL *)videoUrl {
}
}
//申请结束报修
//申请结束报修
-
(
void
)
httpApplicationRepair
{
-
(
void
)
httpApplicationRepair
{
// if (_d_muArrLicences.count > 0) {
// for(GTOLicence *licence in _d_muArrLicences ) {
// BOOL condition = [licence.state isEqualToString:GTO_LICENCE_STATE_INITIAL]
// || [licence.state isEqualToString:GTO_LICENCE__STATE_SUBMITTED];
// if (condition) {
// [IBTLoadingView showProgressLabel:@"有未审批的许可证或者审批不通过的许可证"];
// return;
// }
// };
// }
for
(
GTOLicence
*
licence
in
_d_muArrLicences
)
{
if
([
licence
.
state
isEqualToString
:
@"submitted"
]
||
[
licence
.
state
isEqualToString
:
@"initial"
]
||
[
licence
.
state
isEqualToString
:
@"askforapprove"
])
{
[
IBTLoadingView
hideHUDWithText
:
@"有未提交或待审批的许可证,请处理完成后重试"
];
}
}
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
if
([
data
[
@"success"
]
integerValue
]
==
1
)
{
if
([
data
[
@"success"
]
integerValue
]
==
1
)
{
[
IBTLoadingView
hideHUDForView
:
self
.
view
];
[
IBTLoadingView
hideHUDForView
:
self
.
view
];
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTORepairListCellContentView.m
View file @
9ee92af1
...
@@ -11,10 +11,13 @@
...
@@ -11,10 +11,13 @@
@interface
GTORepairListCellContentView
()
@interface
GTORepairListCellContentView
()
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairTitleLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairTitleLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
nonatomic
,
strong
)
IBTUILabel
*
labelProposer
;
//报修申请人
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
nonatomic
,
strong
)
UIImageView
*
imgRight
;
@end
@end
@implementation
GTORepairListCellContentView
@implementation
GTORepairListCellContentView
...
@@ -34,29 +37,28 @@
...
@@ -34,29 +37,28 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_billNumberLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
labelProposer
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_storeNameLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_stateValueLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
m_repairDateLabel
=
[[
IBTUILabel
alloc
]
initWithfont
:
font
tintColor
:
GTO_GRAY_TINT_COLOR
backgroundColor
:
nil
textAlignment
:
NSTextAlignmentLeft
];
self
.
imgRight
=
[
UIImageView
new
];
self
.
imgRight
.
image
=
[
UIImage
imageNamed
:
@"23"
];
[
self
addSubview
:
_m_repairTitleLabel
];
[
self
addSubview
:
_m_repairTitleLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
self
.
labelProposer
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_stateLabel
];
//
[self addSubview:_m_stateLabel];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
self
.
imgRight
];
}
}
-
(
void
)
layoutSubviews
{
-
(
void
)
layoutSubviews
{
CGFloat
lblH
=
17
;
CGFloat
lblH
=
17
;
_m_repairTitleLabel
.
frame
=
(
CGRect
){
_m_repairTitleLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
GTO_LEFT_PADDING
,
.
origin
.
x
=
GTO_LEFT_PADDING
,
.
origin
.
y
=
GTO_TOP_VERTICAL_PADDING
,
.
origin
.
y
=
GTO_TOP_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
100
,
.
size
.
height
=
lblH
+
10
,
.
size
.
height
=
lblH
+
10
,
};
};
_m_billNumberLabel
.
frame
=
(
CGRect
){
_m_billNumberLabel
.
frame
=
(
CGRect
){
...
@@ -65,27 +67,26 @@
...
@@ -65,27 +67,26 @@
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
_labelProposer
.
frame
=
CGRectMake
(
_m_repairTitleLabel
.
x
,
_m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
_m_billNumberLabel
.
width
,
lblH
);
_m_storeNameLabel
.
frame
=
(
CGRect
){
_m_storeNameLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_
m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_
labelProposer
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_
m_billNumberLabel
.
width
,
.
size
.
width
=
_
labelProposer
.
width
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
_m_stateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
80
,
.
size
.
height
=
lblH
,
};
[
_m_stateLabel
sizeToFit
];
_m_stateValueLabel
.
frame
=
(
CGRect
){
_m_stateValueLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_stat
eLabel
.
right
,
.
origin
.
x
=
_m_repairTitl
eLabel
.
right
,
.
origin
.
y
=
_m_
storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_m_
repairTitleLabel
.
y
,
.
size
.
width
=
self
.
width
-
_m_stateLabel
.
right
,
.
size
.
width
=
ScreenSize
.
width
-
_m_repairTitleLabel
.
right
-
30
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
_imgRight
.
frame
=
CGRectMake
(
_m_stateValueLabel
.
right
,
_m_stateValueLabel
.
y
,
10
,
_m_stateValueLabel
.
height
);
_m_repairDateLabel
.
frame
=
(
CGRect
){
_m_repairDateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_m_st
at
eLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
origin
.
y
=
_m_st
oreNam
eLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
.
size
.
height
=
lblH
,
};
};
...
@@ -98,12 +99,15 @@
...
@@ -98,12 +99,15 @@
-
(
void
)
updateWithRepair
:
(
GTORepair
*
)
repair
{
-
(
void
)
updateWithRepair
:
(
GTORepair
*
)
repair
{
self
.
m_repairTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ "
,
repair
.
title
];
self
.
m_repairTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ "
,
repair
.
title
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"维修单号:%@ "
,
repair
.
billnumber
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修单号:%@ "
,
repair
.
billnumber
];
self
.
labelProposer
.
text
=
[
NSString
stringWithFormat
:
@"报修申请人:%@"
,
repair
.
requestor
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
repair
.
store_name
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
repair
.
store_name
];
self
.
m_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修状态: "
];
self
.
m_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修状态: "
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
repairStateChineseWithEnglish
:
repair
.
state
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
repairStateChineseWithEnglish
:
repair
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
repair
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithRepairState
:
repair
.
state
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"维修时间:%@"
,
repair
.
repairDate
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修时间:%@"
,
[
repair
.
repairDate
substringToIndex
:
11
]];
[
self
layoutSubviews
];
[
self
layoutSubviews
];
}
}
@end
@end
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/ChooseViewController/GTOPioneeringTemplateViewController.m
View file @
9ee92af1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
//记录更新时间
//记录更新时间
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
TemplateNameUpdateDate
;
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
TemplateNameUpdateDate
;
self
.
title
=
@"选择
模板
"
;
self
.
title
=
@"选择
许可证类型
"
;
[
self
fetchDataList
:
@""
tableStr
:
GTO_PATROL_TEMPLATE
];
[
self
fetchDataList
:
@""
tableStr
:
GTO_PATROL_TEMPLATE
];
}
}
-
(
void
)
getBaseDataFromServer
{
-
(
void
)
getBaseDataFromServer
{
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/GTOCommonTools.h
View file @
9ee92af1
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
+
(
NSString
*
)
pioneeringStateChineseWithEnglish
:
(
NSString
*
)
englishState
;
+
(
NSString
*
)
pioneeringStateChineseWithEnglish
:
(
NSString
*
)
englishState
;
//根据状态返回返回不同的文字颜色
//根据状态返回返回不同的文字颜色
+
(
UIColor
*
)
textColorWithState
:
(
NSString
*
)
state
;
+
(
UIColor
*
)
textColorWithState
:
(
NSString
*
)
state
;
//根据状态返回报修列表的文字颜色
+
(
UIColor
*
)
textColorWithRepairState
:
(
NSString
*
)
state
;
//是否有某个功能的权限
//是否有某个功能的权限
+
(
BOOL
)
hasPermissionWithPermissionId
:
(
NSUInteger
)
permissionId
;
+
(
BOOL
)
hasPermissionWithPermissionId
:
(
NSUInteger
)
permissionId
;
...
...
This diff is collapsed.
Click to expand it.
total/GTOApp/UserUtil/GTOCommonTools.m
View file @
9ee92af1
...
@@ -158,10 +158,35 @@
...
@@ -158,10 +158,35 @@
//根据状态返回返回不同的文字颜色
//根据状态返回返回不同的文字颜色
+
(
UIColor
*
)
textColorWithState
:
(
NSString
*
)
state
{
+
(
UIColor
*
)
textColorWithState
:
(
NSString
*
)
state
{
if
([
state
isEqualToString
:
@"initial"
])
{
//未提交
return
GTO_RED_COLOR
;
}
else
if
([
state
isEqualToString
:
@"submitted"
])
{
//申请审批(和待审批的英文单词互换)
return
GTO_BLUE_SHALLOW_TINT_COLOR
;
}
else
if
([
state
isEqualToString
:
@"approved"
])
{
return
GTO_GREEN_COLOR
;
}
else
if
([
state
isEqualToString
:
@"rejected"
])
{
return
GTO_RED_COLOR
;
}
else
if
([
state
isEqualToString
:
@"expired"
])
{
return
GTO_GRAY_SHALLOW_TINT_COLOR
;
}
else
if
([
state
isEqualToString
:
@"finished"
])
{
return
GTO_GRAY_SHALLOW_TINT_COLOR
;
}
else
if
([
state
isEqualToString
:
@"application"
])
{
return
GTO_GREEN_COLOR
;
}
else
if
([
state
isEqualToString
:
@"processing"
])
{
return
GTO_BLUE_SHALLOW_TINT_COLOR
;
}
else
if
([
state
isEqualToString
:
@"askforapprove"
]){
//待审批
return
GTO_BLUE_SHALLOW_TINT_COLOR
;
}
else
{
return
nil
;
}
}
+
(
UIColor
*
)
textColorWithRepairState
:
(
NSString
*
)
state
{
if
([
state
isEqualToString
:
@"initial"
])
{
if
([
state
isEqualToString
:
@"initial"
])
{
return
GTO_RED_COLOR
;
return
GTO_RED_COLOR
;
}
else
if
([
state
isEqualToString
:
@"submitted"
])
{
}
else
if
([
state
isEqualToString
:
@"submitted"
])
{
return
GTO_
BLUE_SHALLOW_TINT
_COLOR
;
return
GTO_
RED
_COLOR
;
}
else
if
([
state
isEqualToString
:
@"approved"
])
{
}
else
if
([
state
isEqualToString
:
@"approved"
])
{
return
GTO_GREEN_COLOR
;
return
GTO_GREEN_COLOR
;
}
else
if
([
state
isEqualToString
:
@"rejected"
])
{
}
else
if
([
state
isEqualToString
:
@"rejected"
])
{
...
...
This diff is collapsed.
Click to expand it.
total/Info.plist
View file @
9ee92af1
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,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.
4
<
/string
>
<
string
>
1.2.
6
<
/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.
4
<
/string
>
<
string
>
1.2.
6
<
/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
>
...
...
This diff is collapsed.
Click to expand it.
total/Macro/GTOAppMacro.h
View file @
9ee92af1
...
@@ -91,18 +91,11 @@
...
@@ -91,18 +91,11 @@
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8080/total-server/rest"
//#define HTTP_REST_API_BASE_URL @"http://139.196.39.77:8080/total-server/rest"
//开发环境
//开发环境
#define HTTP_LOCAL_BASE_URL @"http://39.196.195.30:8093"
#define HTTP_LOCAL_BASE_URL @"http://
1
39.196.195.30:8093"
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
#define HTTP_REST_API_BASE_URL @"http://139.196.195.30:8093/total-server/rest"
//豪杰/
//#define HTTP_REST_API_BASE_URL @"http://192.168.100.168:8080/total-server/rest"
//@"http://139.196.39.77:8080/total-web/"//
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
#define HTTP_WEATHER_URL @"http://apis.baidu.com/heweather/weather/free"
//@"http://mobile.weather.com.cn/data/sk/"
//http://m.weather.com.cn/mweather/101020100.shtml
//http://www.weather.com.cn/data/sk/
//refreshUpdateDate
//refreshUpdateDate
...
...
This diff is collapsed.
Click to expand it.
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