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
Nov 25, 2016
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
0dc73808
Expand all
Hide 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 @@
#import "GTOAnswer.h"
#import "GTOQuestion.h"
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
7
0
#define LeftMargin 20
#define BtnWidth 60
#define BtnHeight 24
...
...
@@ -475,7 +475,9 @@ static NSString *cellID = @"licenceListCell";
}
-
(
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
{
...
...
total/GTOApp/Business/Patrol/Views/GTOCategoryItemView.m
View file @
9ee92af1
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) {
if
(
!
isLocal
)
{
attachView
.
isDownImg
=
YES
;
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
])
||
(
_d_licence
&&
[
_d_licence
.
state
isEqualToString
:
GTO_LICENCE_STATE_INITIAL
]))
{
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
...
...
@@ -491,7 +491,7 @@ typedef NS_ENUM(NSUInteger,alertViewTag) {
[
attV
updateWithType
:
kATTNormal
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
}
});
//
});
}
else
{
[
attV
updateWithType
:
kATTCloseBtn
masker
:
nil
placeHolder
:
nil
image
:
iconImg
title
:
nil
];
...
...
total/GTOApp/Business/Repair/GTOAlertInfoLicenceViewController.m
View file @
9ee92af1
...
...
@@ -129,7 +129,7 @@ UITextFieldDelegate>
}
-
(
void
)
initData
{
//答案的个数
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来,(此事的排序关系到结果页中答案的显示,按道理应该是根据答题的顺序,是不是后台给的问题应该排序?????)
NSLog
(
@"%@"
,
sql
);
return
[
db
executeQuery
:
sql
,
_d_licence
.
uuid
];
...
...
@@ -179,32 +179,6 @@ UITextFieldDelegate>
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellID
forIndexPath
:
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
;
}
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
...
...
@@ -221,7 +195,6 @@ UITextFieldDelegate>
if
(
_d_licence
.
arrDisplayResults
.
count
>
0
)
{
GTODisplayResult
*
displayR
=
[
GTODisplayResult
DBObject
];
[
displayR
praseFromJsonDict
:
_d_licence
.
arrDisplayResults
[
indexPath
.
row
]];
[
categoryItem
updateWithLicence
:
_d_licence
licenceDisplayResults
:
displayR
];
}
...
...
total/GTOApp/Business/Repair/GTOLicenceListSimpleCellContentView.m
View file @
9ee92af1
...
...
@@ -12,9 +12,13 @@
//@property (strong, nonatomic) IBTUILabel *m_repairTitleLabel;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
labelStation
;
//油站
@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) IBTUILabel *m_repairDateLabel;//开始时间
@end
@implementation
GTOLicenceListSimpleCellContentView
...
...
@@ -23,7 +27,7 @@
if
(
!
self
)
{
return
nil
;
}
self
.
reasonHeight
=
0
;
[
self
initSubViews
];
return
self
;
}
...
...
@@ -35,8 +39,10 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
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
.
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_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
];
...
...
@@ -44,7 +50,11 @@
//[self addSubview:_m_repairTitleLabel];
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
self
.
labelStation
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
self
.
labelRejectReason
];
[
self
addSubview
:
_m_riskImgView
];
// [self addSubview:_m_repairDateLabel];
...
...
@@ -71,13 +81,28 @@
.
size
.
width
=
_m_billNumberLabel
.
width
,
.
size
.
height
=
lblH
,
};
_labelStation
.
frame
=
CGRectMake
(
leftX
,
_m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
self
.
width
,
lblH
);
_m_stateLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
leftX
,
.
origin
.
y
=
_
m_storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
self
.
width
,
.
origin
.
y
=
_
labelStation
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
80
,
.
size
.
height
=
lblH
,
};
[
_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
;
_m_riskImgView
.
frame
=
(
CGRect
){
.
origin
.
x
=
self
.
width
-
imgW
,
...
...
@@ -100,9 +125,15 @@
-
(
void
)
updateWithLicence
:(
GTOLicence
*
)
licence
{
// self.m_repairTitleLabel.text = [NSString stringWithFormat:@"许可证类型:%@ ",licence.licenceType];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
licence
.
store_name
];
self
.
m_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证状态: %@"
,[
GTOCommonTools
licenceStateChineseWithEnglish
:
licence
.
state
]
];
self
.
m_billNumberLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证类型:%@ "
,
licence
.
licenceType
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证单号:%@ "
,
licence
.
billnumber
];
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 ];
if
([
licence
.
riskGrade
isEqualToString
:
@"高"
])
{
self
.
m_riskImgView
.
image
=
[
UIImage
imageNamed
:
@"licence_hight"
];
...
...
@@ -110,6 +141,16 @@
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
...
...
total/GTOApp/Business/Repair/GTOLicenceResultTopCellContentView.m
View file @
9ee92af1
...
...
@@ -161,12 +161,15 @@
-
(
void
)
updateWithLicence
:
(
GTOLicence
*
)
licence
arrayDictDisplayResults
:
(
NSArray
*
)
arrDisplayResults
{
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_licenceTypeLabel
.
text
=
[
NSString
stringWithFormat
:
@"许可证类型:%@"
,
licence
.
licenceType
];
self
.
m_valideTimeStartLabel
.
text
=
[
NSString
stringWithFormat
:
@"开始时间:%@"
,[
GTOCommonTools
nullChangedWithId
:
licence
.
beginDate
]];
self
.
m_valideTimeEndLabel
.
text
=
[
NSString
stringWithFormat
:
@"截止时间:%@"
,[
GTOCommonTools
nullChangedWithId
:
licence
.
endDate
]];
self
.
m_requestDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"申请时间:%@"
,
licence
.
requestDate
];
self
.
m_valideTimeStartLabel
.
text
=
[
NSString
stringWithFormat
:
@"申请时间:%@"
,
licence
.
requestDate
];
NSDateFormatter
*
f
=
[[
NSDateFormatter
alloc
]
init
];
[
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
];
...
...
@@ -174,7 +177,6 @@
self
.
m_processLabel
.
text
=
[
NSString
stringWithFormat
:
@"拓站总进度:"
];
NSUInteger
totalNumber
=
arrDisplayResults
.
count
;
NSUInteger
finishNumber
=
0
;
for
(
NSDictionary
*
dictDisplayR
in
arrDisplayResults
){
...
...
total/GTOApp/Business/Repair/GTOLiceneResultViewController.m
View file @
9ee92af1
...
...
@@ -193,13 +193,13 @@ static NSString *headerProblemItemID = @"headerItem";
if
(
displayR
.
arrAnswers
.
count
!=
displayR
.
arrQuestions
.
count
)
noFinishNumber
++
;
}
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
;
}
else
{
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
leftButtonColor
:
GTO_
RED
_COLOR
rightButtonColor
:
GTO_
BLUE_DEEP
_COLOR
leftButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
RED
_COLOR
LeftBtnTitle
:
@"保存"
rightBtnTitle
:
@"提交"
];
bottomV
.
tag
=
kBottomViewTwoSaveSubmitTag
;
...
...
@@ -210,19 +210,18 @@ static NSString *headerProblemItemID = @"headerItem";
bottomV
.
tag
=
kBOttomViewAskForApprove
;
}
else
if
(
isAskForApprove
)
{
bottomV
=
[[
GXFBottomView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
_c_tableView
.
bottom
,
self
.
view
.
width
,
40
)
leftButtonColor
:
GTO_
RED
_COLOR
rightButtonColor
:
GTO_
BLUE_DEEP
_COLOR
leftButtonColor
:
GTO_
BLUE_DEEP
_COLOR
rightButtonColor
:
GTO_
RED
_COLOR
LeftBtnTitle
:
@"审批拒绝"
rightBtnTitle
:
@"审批通过"
];
bottomV
.
tag
=
kBottomViewTwoRejectedApprovedTag
;
}
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
.
backgroundColor
=
XXFBgColor
;
bottomV
.
delegate
=
self
;
[
self
.
view
addSubview
:
bottomV
];
}
...
...
@@ -343,7 +342,7 @@ static NSString *headerProblemItemID = @"headerItem";
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
indexPath
.
section
==
0
)
{
return
1
7
6
;
return
1
5
6
;
}
else
{
return
55
;
}
...
...
total/GTOApp/Business/Repair/GTORepairListViewController.m
View file @
9ee92af1
...
...
@@ -17,7 +17,7 @@
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
4
0
#define LeftMargin 20
#define BtnWidth 60
#define BtnHeight 24
...
...
@@ -67,12 +67,8 @@ static NSString *cellID = @"repairListCell";
-
(
void
)
initData
{
self
.
dataArr
=
[
NSMutableArray
array
];
// if (self.assessorVendor.length > 0) {
// self.vendorLike = self.assessorVendor;
// }
}
-
(
void
)
getData
{
// [ICRUserUtil sharedInstance].needFresh = NO;
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
...
...
@@ -125,20 +121,12 @@ static NSString *cellID = @"repairListCell";
if
(
self
.
titleLike
.
length
>
0
)
{
titleObject
=
self
.
titleLike
;
}
// id vendorObject = [NSNull null];
// if (self.vendorLike.length > 0) {
// vendorObject = self.vendorLike;
// }
NSDictionary
*
dict
=
@{
@"engineerUuid"
:
[
ICRUserUtil
sharedInstance
].
f_user_uuid
,
@"billNumberLike"
:
billObject
,
@"state"
:
stateObject
,
@"titleLike"
:
titleObject
,
@"queryOrders"
:
orderArr
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageSize"
:
@
(
20
)};
ICRHTTPController
*
httpC
=
[
ICRHTTPController
sharedController
];
...
...
@@ -423,35 +411,18 @@ static NSString *cellID = @"repairListCell";
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
YES
];
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
];
return
cell
;
}
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIView
*
contentView
=
cell
.
contentView
;
GTORepairListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTORepairListCellContentView
class
]];
if
(
!
view
)
{
view
=
[[
GTORepairListCellContentView
alloc
]
initWithFrame
:
contentView
.
bounds
];
//view.m_bHiddenNumLabel = m_bIsInHome;
[
view
autoresizingWithStrechFullSize
];
[
contentView
addSubview
:
view
];
}
...
...
total/GTOApp/Business/Repair/Views/GTOLicenceBoltView.m
View file @
9ee92af1
...
...
@@ -317,12 +317,14 @@
}
else
if
(
indexPath
.
row
==
2
){
stateStr
=
GTO_LICENCE__STATE_SUBMITTED
;
}
else
if
(
indexPath
.
row
==
3
){
stateStr
=
GTO_LICENCE__STATE_A
PPROVED
;
stateStr
=
GTO_LICENCE__STATE_A
SKFORAPPROVE
;
}
else
if
(
indexPath
.
row
==
4
){
stateStr
=
GTO_LICENCE__STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
GTO_LICENCE__STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
5
){
stateStr
=
GTO_LICENCE__STATE_REJECTED
;
}
else
if
(
indexPath
.
row
==
6
){
stateStr
=
GTO_LICENCE__STATE_APPROVED
;
}
else
if
(
indexPath
.
row
==
7
){
stateStr
=
GTO_LICENCE__STATE_FINISHED
;
}
else
{
...
...
total/GTOApp/Business/Repair/Views/GTOLicenceListCellContentView.m
View file @
9ee92af1
This diff is collapsed.
Click to expand it.
total/GTOApp/Business/Repair/Views/GTOLicenceListViewController.m
View file @
9ee92af1
...
...
@@ -22,7 +22,7 @@
#import "GTOAnswer.h"
#import "GTOQuestion.h"
#define TopMargin 44
#define TableHeight 1
5
0
#define TableHeight 1
7
0
#define LeftMargin 20
#define BtnWidth 60
#define BtnHeight 24
...
...
@@ -282,7 +282,7 @@ static NSString *cellID = @"licenceListCell";
_boltView
.
backgroundColor
=
XXFBgColor
;
_boltView
.
delegate
=
self
;
//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
];
[
_maskView
addSubview
:
_boltView
];
[
UIView
animateWithDuration
:
0
.
25
animations
:
^
{
...
...
@@ -423,18 +423,7 @@ static NSString *cellID = @"licenceListCell";
[
tableView
deselectRowAtIndexPath
:
indexPath
animated
:
NO
];
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
];
return
cell
;
...
...
@@ -442,10 +431,6 @@ static NSString *cellID = @"licenceListCell";
-
(
void
)
configureCell
:
(
UITableViewCell
*
)
cell
forRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
//cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
UIView
*
contentView
=
cell
.
contentView
;
GTOLicenceListCellContentView
*
view
=
[
contentView
viewWithClass
:[
GTOLicenceListCellContentView
class
]];
...
...
@@ -461,7 +446,9 @@ static NSString *cellID = @"licenceListCell";
}
-
(
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
{
return
section
==
0
?
1
:
10
;
...
...
total/GTOApp/Business/Repair/Views/GTORepairDetailTopCellView.m
View file @
9ee92af1
...
...
@@ -10,8 +10,10 @@
#import "GTORepair.h"
@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_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_engineerNameLabel
;
...
...
@@ -35,6 +37,8 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
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_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_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
];
...
...
@@ -45,6 +49,8 @@
[
self
addSubview
:
_m_billNumberLabel
];
[
self
addSubview
:
_m_projectLabel
];
[
self
addSubview
:
_m_stateLabel
];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
_m_engineerNameLabel
];
...
...
@@ -69,9 +75,18 @@
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
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
){
.
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
.
height
=
lblH
,
};
...
...
@@ -110,13 +125,16 @@
-
(
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_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称:%@ "
,
repair
.
store_name
];
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
];
self
.
m_contentLabel
.
text
=
[
NSString
stringWithFormat
:
@"内容:%@ "
,[
GTOCommonTools
nullChangedWithId
:
repair
.
content
]];
self
.
m_stateLabel
.
text
=
@"报修状态: "
;
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
repairStateChineseWithEnglish
:
repair
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
repair
.
state
];
self
.
m_storeNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"油站名称: %@ "
,
repair
.
store_name
];
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
total/GTOApp/Business/Repair/Views/GTORepairDetailViewController.m
View file @
9ee92af1
...
...
@@ -82,8 +82,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
self
.
title
=
@"报修单详情"
;
//[self initSubViews];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
self
p_licences
];
...
...
@@ -144,11 +142,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
// if (_currentPage == 0) {
// if (self.dataArr.count > 0) {
// [self.dataArr removeAllObjects];
// }
// }
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
if
(
!
_d_muArrLicences
)
{
self
.
d_muArrLicences
=
[
NSMutableArray
array
];
...
...
@@ -162,16 +155,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
self
.
d_muArrLicences
addObject
:
licence
];
}
// NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
// NSInteger pageCount = [pageDict[@"pageCount"] integerValue];
[
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
{
[
IBTLoadingView
showTips
:
message
];
}
...
...
@@ -194,8 +178,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
self
.
view
addSubview
:
_c_tableView
];
[
_c_tableView
reloadData
];
self
.
c_addPhotoV
=
[[
GTORepairAddPhotoView
alloc
]
initWithFrame
:(
CGRect
){
.
origin
.
x
=
0
,
.
origin
.
y
=
_c_tableView
.
bottom
+
5
,
...
...
@@ -226,18 +208,13 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
for
(
NSDictionary
*
dict
in
_d_repair
.
attachmentUrls
)
{
ICRPostAttachment
*
postAttachment
=
[
ICRPostAttachment
DBObject
];
[
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
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
;
bottomV
.
tag
=
kBottomViewOneApplicationTag
;
[
bottomV
.
f_oneBtn
setTitle
:
@"申请结束报修"
forState
:
UIControlStateNormal
];
...
...
@@ -253,6 +230,10 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
self
.
c_bottomView
=
bottomV
;
[
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
{
...
...
@@ -273,14 +254,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
if
(
!
_d_muArrPhotos
.
count
)
{
self
.
d_muArrPhotos
=
[
NSMutableArray
arrayWithArray
:
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
)
{
NSData
*
imageData
=
[
NSData
dataFromBase64String
:
postAttachment
.
content
];
UIImage
*
image
=
[
UIImage
imageWithData
:
imageData
];
...
...
@@ -312,11 +285,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
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
)
{
...
...
@@ -362,11 +331,14 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
return
section
==
0
?
0
.
1
:
44
;
}
-
(
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
{
// static NSString *headID = @"headID";
// UIView *view = [tableView dequeueReusableHeaderFooterViewWithIdentifier:headID];
if
(
section
==
0
)
{
return
nil
;
}
else
{
...
...
@@ -382,7 +354,7 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
contentView
.
backgroundColor
=
XXFBgColor
;
GXFButtonAndLineView
*
headLineV
=
[
contentView
viewWithClass
:[
GXFButtonAndLineView
class
]];
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
;
BOOL
createPermission
=
[
GTOCommonTools
hasPermissionWithPermissionId
:
500303
];
...
...
@@ -405,12 +377,9 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
UITableViewCell
*
cell
=
nil
;
if
(
indexPath
.
section
==
0
)
{
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDTop
forIndexPath
:
indexPath
];
}
else
{
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
cellIDItem
forIndexPath
:
indexPath
];
}
[
self
configureCell
:
cell
forRowAtIndexPath
:
indexPath
];
return
cell
;
}
...
...
@@ -612,12 +581,6 @@ typedef NS_ENUM(NSUInteger, bottomViewTag) {
[
_d_currentLicence
saveToDBWithHandleData
:
NULL
complete
:
^
{
[
self
fetchResult
];
// if ([_d_currentLicence.state isEqualToString:GTO_LICENCE_STATE_INITIAL]) {
// [self p_addAlerInfoLicenceView];
// } else {
// [self fetchResult];
// }
}
fail
:^
(
NSError
*
error
)
{
...
...
@@ -838,17 +801,14 @@ didVideoPickedWithURL:(NSURL *)videoUrl {
}
//申请结束报修
-
(
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
)
{
if
([
data
[
@"success"
]
integerValue
]
==
1
)
{
[
IBTLoadingView
hideHUDForView
:
self
.
view
];
...
...
total/GTOApp/Business/Repair/Views/GTORepairListCellContentView.m
View file @
9ee92af1
...
...
@@ -11,10 +11,13 @@
@interface
GTORepairListCellContentView
()
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairTitleLabel
;
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_billNumberLabel
;
@property
(
nonatomic
,
strong
)
IBTUILabel
*
labelProposer
;
//报修申请人
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_storeNameLabel
;
//油站
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_stateValueLabel
;
//完成状态
@property
(
strong
,
nonatomic
)
IBTUILabel
*
m_repairDateLabel
;
//开始时间
@property
(
nonatomic
,
strong
)
UIImageView
*
imgRight
;
@end
@implementation
GTORepairListCellContentView
...
...
@@ -34,29 +37,28 @@
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
17
];
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_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_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_billNumberLabel
];
[
self
addSubview
:
self
.
labelProposer
];
[
self
addSubview
:
_m_storeNameLabel
];
[
self
addSubview
:
_m_stateLabel
];
//
[self addSubview:_m_stateLabel];
[
self
addSubview
:
_m_stateValueLabel
];
[
self
addSubview
:
_m_repairDateLabel
];
[
self
addSubview
:
self
.
imgRight
];
}
-
(
void
)
layoutSubviews
{
CGFloat
lblH
=
17
;
_m_repairTitleLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
GTO_LEFT_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
,
};
_m_billNumberLabel
.
frame
=
(
CGRect
){
...
...
@@ -65,27 +67,26 @@
.
size
.
width
=
SCREEN_SIZE
.
width
-
GTO_LEFT_PADDING
,
.
size
.
height
=
lblH
,
};
_labelProposer
.
frame
=
CGRectMake
(
_m_repairTitleLabel
.
x
,
_m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
_m_billNumberLabel
.
width
,
lblH
);
_m_storeNameLabel
.
frame
=
(
CGRect
){
.
origin
.
x
=
_m_repairTitleLabel
.
x
,
.
origin
.
y
=
_
m_billNumberLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_
m_billNumberLabel
.
width
,
.
origin
.
y
=
_
labelProposer
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
_
labelProposer
.
width
,
.
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
){
.
origin
.
x
=
_m_stat
eLabel
.
right
,
.
origin
.
y
=
_m_
storeNameLabel
.
bottom
+
GTO_VERTICAL_PADDING
,
.
size
.
width
=
self
.
width
-
_m_stateLabel
.
right
,
.
origin
.
x
=
_m_repairTitl
eLabel
.
right
,
.
origin
.
y
=
_m_
repairTitleLabel
.
y
,
.
size
.
width
=
ScreenSize
.
width
-
_m_repairTitleLabel
.
right
-
30
,
.
size
.
height
=
lblH
,
};
_imgRight
.
frame
=
CGRectMake
(
_m_stateValueLabel
.
right
,
_m_stateValueLabel
.
y
,
10
,
_m_stateValueLabel
.
height
);
_m_repairDateLabel
.
frame
=
(
CGRect
){
.
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
.
height
=
lblH
,
};
...
...
@@ -98,12 +99,15 @@
-
(
void
)
updateWithRepair
:
(
GTORepair
*
)
repair
{
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_stateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修状态: "
];
self
.
m_stateValueLabel
.
text
=
[
GTOCommonTools
repairStateChineseWithEnglish
:
repair
.
state
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithState
:
repair
.
state
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"维修时间:%@"
,
repair
.
repairDate
];
self
.
m_stateValueLabel
.
textColor
=
[
GTOCommonTools
textColorWithRepairState
:
repair
.
state
];
self
.
m_repairDateLabel
.
text
=
[
NSString
stringWithFormat
:
@"报修时间:%@"
,
[
repair
.
repairDate
substringToIndex
:
11
]];
[
self
layoutSubviews
];
}
@end
total/GTOApp/UserUtil/ChooseViewController/GTOPioneeringTemplateViewController.m
View file @
9ee92af1
...
...
@@ -22,7 +22,7 @@
//记录更新时间
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
TemplateNameUpdateDate
;
self
.
title
=
@"选择
模板
"
;
self
.
title
=
@"选择
许可证类型
"
;
[
self
fetchDataList
:
@""
tableStr
:
GTO_PATROL_TEMPLATE
];
}
-
(
void
)
getBaseDataFromServer
{
...
...
total/GTOApp/UserUtil/GTOCommonTools.h
View file @
9ee92af1
...
...
@@ -37,6 +37,8 @@
+
(
NSString
*
)
pioneeringStateChineseWithEnglish
:
(
NSString
*
)
englishState
;
//根据状态返回返回不同的文字颜色
+
(
UIColor
*
)
textColorWithState
:
(
NSString
*
)
state
;
//根据状态返回报修列表的文字颜色
+
(
UIColor
*
)
textColorWithRepairState
:
(
NSString
*
)
state
;
//是否有某个功能的权限
+
(
BOOL
)
hasPermissionWithPermissionId
:
(
NSUInteger
)
permissionId
;
...
...
total/GTOApp/UserUtil/GTOCommonTools.m
View file @
9ee92af1
...
...
@@ -158,10 +158,35 @@
//根据状态返回返回不同的文字颜色
+
(
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"
])
{
return
GTO_RED_COLOR
;
}
else
if
([
state
isEqualToString
:
@"submitted"
])
{
return
GTO_
BLUE_SHALLOW_TINT
_COLOR
;
return
GTO_
RED
_COLOR
;
}
else
if
([
state
isEqualToString
:
@"approved"
])
{
return
GTO_GREEN_COLOR
;
}
else
if
([
state
isEqualToString
:
@"rejected"
])
{
...
...
total/Info.plist
View file @
9ee92af1
...
...
@@ -15,11 +15,11 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.2.
4
<
/string
>
<
string
>
1.2.
6
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.2.
4
<
/string
>
<
string
>
1.2.
6
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
total/Macro/GTOAppMacro.h
View file @
9ee92af1
...
...
@@ -91,18 +91,11 @@
//#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://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"
//@"http://mobile.weather.com.cn/data/sk/"
//http://m.weather.com.cn/mweather/101020100.shtml
//http://www.weather.com.cn/data/sk/
//refreshUpdateDate
...
...
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