Commit 41ec2a23 authored by 曹云霄's avatar 曹云霄

Merge branch 'master' of https://git.oschina.net/gomore/total

parents b866ce5a 417ac082
......@@ -342,7 +342,7 @@ GXFBottomViewDelegate>
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 106;
return 126;
} else {
return 55;
}
......
......@@ -11,9 +11,10 @@
#import "GTOPioneering.h"
#import "GTODisplayResult.h"
@interface GTOPatrolPlanResultTopItem ()
@property (strong, nonatomic) IBTUILabel *m_planModuleLabel;//巡检模板
@property (strong, nonatomic) IBTUILabel *m_planTimeLabel;
@property (strong, nonatomic) IBTUILabel *m_startTimeLabel;
@property (strong, nonatomic) IBTUILabel *m_processLabel;//完成进度
@property (strong, nonatomic) IBTUILabel *m_processLabel;//拓站总进度
@property (strong, nonatomic) IBTUILabel *m_processValueLabel;
@property (strong, nonatomic) IBTUILabel * m_processFractionLabel;
@property (strong, nonatomic) IBTUIView *m_processBarView;
......@@ -35,12 +36,13 @@
- (void)initSubViews {
UIFont *font = [UIFont systemFontOfSize:17];
self.m_planModuleLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_GRAY_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self.m_planTimeLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_GRAY_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self.m_startTimeLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_GRAY_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self.m_processLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_GRAY_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self.m_processValueLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_BLUE_SHALLOW_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentLeft];
self.m_processFractionLabel = [[IBTUILabel alloc]initWithfont:font tintColor:GTO_BLUE_SHALLOW_TINT_COLOR backgroundColor:nil textAlignment:NSTextAlignmentRight];
[self addSubview:_m_planModuleLabel];
[self addSubview:_m_planTimeLabel];
[self addSubview:_m_startTimeLabel];
[self addSubview:_m_processLabel];
......@@ -50,9 +52,15 @@
}
- (void)layoutSubviews {
CGFloat lblH = 17;
_m_planModuleLabel.frame = (CGRect){
.origin.x = GTO_LEFT_PADDING,
.origin.y = GTO_TOP_VERTICAL_PADDING,
.size.width = SCREEN_SIZE.width - GTO_LEFT_PADDING,
.size.height = lblH,
};
_m_planTimeLabel.frame = (CGRect){
.origin.x = GTO_LEFT_PADDING,
.origin.y = GTO_TOP_VERTICAL_PADDING,
.origin.y = _m_planModuleLabel.bottom + GTO_VERTICAL_PADDING,
.size.width = SCREEN_SIZE.width - GTO_LEFT_PADDING,
.size.height = lblH,
};
......@@ -100,6 +108,8 @@
storeResult: (ICRStoreResult *)storeResult
finishCategorysNumber: (NSInteger)finishNumber
totalCategorys: (NSInteger)totalNumber{
self.m_planModuleLabel.text = [NSString stringWithFormat:@"油站名称:%@(%@)",storeResult.store_name,
storeResult.store_code];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"计划时间:%@ ~ %@",patrolPlan.beginDate ,patrolPlan.endDate ];
self.m_startTimeLabel.text = [NSString stringWithFormat:@"开始时间:%@",storeResult.beginTime];
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度" ];
......@@ -115,6 +125,8 @@
}
- (void)updateWithPatrolPlan: (GTOPatrolPlan *)patrolPlan
storeResult: (ICRStoreResult *)storeResult {
self.m_planModuleLabel.text = [NSString stringWithFormat:@"油站名称:%@(%@)",storeResult.store_name,
storeResult.store_code];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"计划时间:%@ ~ %@",patrolPlan.beginDate ,patrolPlan.endDate ];
self.m_startTimeLabel.text = [NSString stringWithFormat:@"开始时间:%@",storeResult.beginTime ];
NSInteger finishNumber = storeResult.answers.count;
......@@ -122,12 +134,17 @@
self.d_processLength = 1.0 * finishNumber / totalNumber;
int percent = self.d_processLength *100;
self.m_processLabel.text = [NSString stringWithFormat:@"巡检总进度" ];
self.m_processValueLabel.text = [NSString stringWithFormat:@"进行中 %d%%(题)",percent]; //为什么直接写self.d_processLength *100 却是其他数据(貌似是随机分配的垃圾数据)????
if (patrolPlan.state == kPatrolPlanStatusFinished) {
self.m_processValueLabel.text = [NSString stringWithFormat:@"已完成 %d%%(题)",percent];
}else{
self.m_processValueLabel.text = [NSString stringWithFormat:@"进行中 %d%%(题)",percent]; //为什么直接写self.d_processLength *100 却是其他数据(貌似是随机分配的垃圾数据)????
}
[self layoutSubviews];
}
- (void)updateWithPioneering: (GTOPioneering *)pioneering
arrayDictDisplayResults: (NSArray *)arrDisplayResults
{
self.m_planModuleLabel.text = [NSString stringWithFormat:@"拓站模板:%@",pioneering.templateName];
self.m_planTimeLabel.text = [NSString stringWithFormat:@"拓站人员:%@",pioneering.pioneer_name ];
self.m_startTimeLabel.text = [NSString stringWithFormat:@"开始时间:%@",pioneering.beginDate];
self.m_processLabel.text = [NSString stringWithFormat:@"拓站总进度:" ];
......@@ -143,7 +160,11 @@
}
self.d_processLength = 1.0 * finishNumber / totalNumber;
int percent = self.d_processLength *100;
self.m_processValueLabel.text = [NSString stringWithFormat:@"进行中 %d%%",percent];
if ([pioneering.state isEqualToString:@"submitted"]) {
self.m_processValueLabel.text = [NSString stringWithFormat:@"已完成 %d%%",percent];
}else{
self.m_processValueLabel.text = [NSString stringWithFormat:@"进行中 %d%%",percent];
}
[self layoutSubviews];
}
......
......@@ -377,7 +377,7 @@ UIAlertViewDelegate>
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return 106;
return 126;
} else {
return 55;
}
......
......@@ -128,7 +128,7 @@
@implementation GTOPioneeringListCellContent (configure)
- (void)updateWithPioneering: (GTOPioneering *)pioneering
{
self.m_planNameLabel.text = [NSString stringWithFormat:@"标题:%@ ",pioneering.title];
self.m_planNameLabel.text = [NSString stringWithFormat:@"%@ ",pioneering.title];
self.m_operNameLabel.text = [NSString stringWithFormat:@"拓站人员:%@ ",pioneering.pioneer_name];
NSString *beginStr = [GTOCommonTools dateSubstringDeleteZeroWithDateString:pioneering.beginDate]; //lastModify_time];//
self.m_planBeginDateLabel.text = [NSString stringWithFormat:@"开始时间:%@",beginStr ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment