Commit a64cbdf8 authored by freecui's avatar freecui

modify 首页bug

parent 404500c5
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
@(500101),@(500102),@(500103), @(500101),@(500102),@(500103),
@(500201), @(500201),
@(500301),@(500302),@(500303),//"采购通知", @(500301),@(500302),@(500303),//"采购通知",
@(500401),@(500402),@(500403),@(500406),//"采购单" @(500401),@(500402),@(500403),@(500404),//"采购单"
@(500501),@(500502),@(500503),//"发运单" @(500501),@(500502),@(500503),//"发运单"
@(500601),@(500602),@(500603),//"转运单" @(500601),@(500602),@(500603),//"转运单"
@(500701),@(500702),@(500703),];//加工单 @(500701),@(500702),@(500703),];//加工单
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
@"新建行情调研",@"查看行情调研", @"查看行情调研", @"新建行情调研",@"查看行情调研", @"查看行情调研",
@"填写行情反馈", @"填写行情反馈",
@"新建采购通知",@"查看采购通知", @"查看采购通知", @"新建采购通知",@"查看采购通知", @"查看采购通知",
@"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单【供应商】", @"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单",//【供应商】",
@"新建发运单",@"查看发运单", @"查看发运单", @"新建发运单",@"查看发运单", @"查看发运单",
@"新增加工单",@"查看加工单", @"查看加工单", @"新增加工单",@"查看加工单", @"查看加工单",
@"新建转运单", @"查看转运单", @"查看转运单"]; @"新建转运单", @"查看转运单", @"查看转运单"];
......
...@@ -54,7 +54,7 @@ static NSString *cellID = @"cell"; ...@@ -54,7 +54,7 @@ static NSString *cellID = @"cell";
self.navigationItem.rightBarButtonItem = rightBarBtn; self.navigationItem.rightBarButtonItem = rightBarBtn;
} }
- (void)setupTableView { - (void)setupTableView {
self.f_tableView = [[UITableView alloc]initWithFrame:self.view.frame style:UITableViewStyleGrouped]; self.f_tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height - 64) style:UITableViewStyleGrouped];
self.f_tableView.dataSource = self; self.f_tableView.dataSource = self;
self.f_tableView.delegate = self; self.f_tableView.delegate = self;
//[self.f_tableView dequeueReusableCellWithIdentifier ] //[self.f_tableView dequeueReusableCellWithIdentifier ]
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
@end @end
@implementation ICRHomeViewController @implementation ICRHomeViewController
static NSString *cellID = @"cell"; static NSString *firestCellID = @"firestCell";
static NSString *secondCellID = @"secondCell"; static NSString *secondCellID = @"secondCell";
static NSString *collectionCellID = @"collectionCell"; static NSString *collectionCellID = @"collectionCell";
//static CGFloat colletionCellHeight [UIScreen mainScreen].bounds.size.width / 3.0 //static CGFloat colletionCellHeight [UIScreen mainScreen].bounds.size.width / 3.0
...@@ -187,24 +187,30 @@ static NSString *collectionCellID = @"collectionCell"; ...@@ -187,24 +187,30 @@ static NSString *collectionCellID = @"collectionCell";
} }
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; UITableViewCell *cell; //= [tableView dequeueReusableCellWithIdentifier:cellID];
if (!cell) {
if (indexPath.section == 0) { if (indexPath.section == 0) {
cell = [[GXFNoticeFunctionTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; cell = [tableView dequeueReusableCellWithIdentifier:firestCellID];
if (!cell) {
cell = [[GXFNoticeFunctionTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:firestCellID];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.text = @"查看行情反馈-进行中"; cell.textLabel.text = @"查看行情反馈-进行中";
} else {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"secondCell"];
[cell.contentView addSubview:_f_functionBaseView];
NSLog(@"%@",NSStringFromCGRect(cell.frame));
} }
} else { } else {
cell = [tableView dequeueReusableCellWithIdentifier:secondCellID];
if (!cell) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:secondCellID];
} else {
while ([cell.contentView.subviews lastObject] != nil) { while ([cell.contentView.subviews lastObject] != nil) {
[(UIView *)[cell.contentView.subviews lastObject] removeFromSuperview]; [(UIView *)[cell.contentView.subviews lastObject]removeFromSuperview];
} }
} }
[cell.contentView addSubview:_f_functionBaseView];
NSLog(@"%@",NSStringFromCGRect(cell.frame));
}
return cell; return cell;
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
@property (nonatomic, copy) NSString *functionImgName; // @property (nonatomic, copy) NSString *functionImgName; //
@property (nonatomic, copy) NSString *functionSmallImgName; @property (nonatomic, copy) NSString *functionSmallImgName;
@property (nonatomic, assign) BOOL isSelected; //选中 @property (nonatomic, assign) BOOL isSelected; //选中
@property (nonatomic, assign) BOOL hasPermission;
@property (nonatomic, assign) NSInteger functionItemTag; @property (nonatomic, assign) NSInteger functionItemTag;
+ (instancetype)initClassWithDictionary: (NSDictionary *)dict; + (instancetype)initClassWithDictionary: (NSDictionary *)dict;
......
...@@ -163,12 +163,14 @@ ...@@ -163,12 +163,14 @@
} }
} }
if (![[GXFFunctionDB sharedInstance]defaultdisplayFunctions]) { //配置功能 不是默认配置
NSUserDefaults *f_default = [NSUserDefaults standardUserDefaults];
BOOL noDefault = [[f_default objectForKey:@"noDefault"] integerValue] > 0 ? YES : NO;
if (!noDefault) {
[[GXFFunctionDB sharedInstance]defaultdisplayFunctions]; [[GXFFunctionDB sharedInstance]defaultdisplayFunctions];
} }
}; };
void(^fail)(id) = ^(id data) { void(^fail)(id) = ^(id data) {
......
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