Commit 8f8df89a authored by zhu's avatar zhu

Merge branch 'DEV_20150805_001' of http://121.42.32.57/root/xffruit into DEV_20150805_001

Conflicts:
	XFFruit/ViewControllers/Business/BusinessViewController.m
parents d5a96360 5bfa7b5f
...@@ -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 @@
@"新建行情调研",@"查看行情调研", @"查看行情调研", @"新建行情调研",@"查看行情调研", @"查看行情调研",
@"填写行情反馈", @"填写行情反馈",
@"新建采购通知",@"查看采购通知", @"查看采购通知", @"新建采购通知",@"查看采购通知", @"查看采购通知",
@"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单【供应商】", @"新建采购单",@"查看采购单", @"查看采购单", @"审核采购单",//【供应商】",
@"新建发运单",@"查看发运单", @"查看发运单", @"新建发运单",@"查看发运单", @"查看发运单",
@"新增加工单",@"查看加工单", @"查看加工单", @"新增加工单",@"查看加工单", @"查看加工单",
@"新建转运单", @"查看转运单", @"查看转运单"]; @"新建转运单", @"查看转运单", @"查看转运单"];
......
...@@ -1741,7 +1741,9 @@ acceptTypeJson:YES ...@@ -1741,7 +1741,9 @@ acceptTypeJson:YES
fail( error ); fail( error );
} }
}; };
NSString *dateStr = [[NSDate date] httpParameterString];
#pragma 请求参数的下载时间应该有要求????
NSString *dateStr = @"2015-05-04";//[[NSDate date] httpParameterString];//urlAction
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:urlAction] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", dateStr,@(page_number),@(page_size)]; NSString *urlStr = [[[self class] UrlForPluginHTTPAction:urlAction] stringByAppendingFormat:@"?startDate=%@&pageNumber=%@&pageSize=%@", dateStr,@(page_number),@(page_size)];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
......
...@@ -290,6 +290,7 @@ ...@@ -290,6 +290,7 @@
} }
- (NSString *)httpParameterString { - (NSString *)httpParameterString {
NSString *str = [self stringWithFormatter:@"%Y-%m-%d %H:%M:%S"];
return [self stringWithFormatter:@"%Y-%m-%d %H:%M:%S"]; return [self stringWithFormatter:@"%Y-%m-%d %H:%M:%S"];
} }
- (NSString *)coverStringFromString { - (NSString *)coverStringFromString {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
// Fuctions // Fuctions
- (NSDictionary *)dictForCommit; - (NSDictionary *)dictForCommit;
- (NSMutableDictionary *)mutableDictDateToStringForCommit;//把属性为日期类型的转化为string
- (NSDictionary *)dictForLocalSave; - (NSDictionary *)dictForLocalSave;
- (void)praseFromJsonDict:(NSDictionary *)dict; - (void)praseFromJsonDict:(NSDictionary *)dict;
- (void)praseFromLocalDict:(NSDictionary *)dict; - (void)praseFromLocalDict:(NSDictionary *)dict;
......
...@@ -418,6 +418,48 @@ ...@@ -418,6 +418,48 @@
return mDict; return mDict;
} }
- (NSMutableDictionary *)mutableDictDateToStringForCommit {
unsigned int count;
objc_property_t *properties = class_copyPropertyList([self class], &count);
if (count == 0) {
free(properties);
return nil;
}
NSMutableDictionary *mDict = [NSMutableDictionary dictionary];
NSDictionary *dictSpKeyDict = [[self class] specialKeysAndReplaceKeys];
NSArray *arrSpecialKeys = [dictSpKeyDict allKeys];
NSArray *arrCustomKeys = [[self class] customAcitonKeys];
NSArray *arrLocalKeys = [[self class] localKeys];
for (unsigned int i = 0; i < count; i++) {
objc_property_t property = properties[i];
NSString *key = [NSString stringWithUTF8String:property_getName(property)];
id value = [self valueForKey:key];
if ([value isKindOfClass:[NSDate class]]) {
value = [value httpParameterString];
}
if (value) {
if ([arrCustomKeys containsObject:key] ||
[arrLocalKeys containsObject:key]) {
continue;
} else if ([arrSpecialKeys containsObject:key]) {
[mDict addEntriesFromDictionary:@{dictSpKeyDict[key]: value}];
} else {
[mDict addEntriesFromDictionary:@{key: value}];
}
}
}
free(properties);
return mDict;
}
- (NSDictionary *)dictForLocalSave { - (NSDictionary *)dictForLocalSave {
unsigned int count; unsigned int count;
objc_property_t *properties = class_copyPropertyList([self class], &count); objc_property_t *properties = class_copyPropertyList([self class], &count);
......
...@@ -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) {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
[IBTLoadingView showProgressLabel:@"正在加载..."]; [IBTLoadingView showProgressLabel:@"正在加载..."];
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSDictionary *queryOrderDict = @{@"direction":@"desc",@"field":@"billNumber"}; NSDictionary *queryOrderDict = @{@"direction":@"",@"field":@"billNumber"};
NSDictionary *dict = @{ NSDictionary *dict = @{
@"billNumberLike":@"", @"billNumberLike":@"",
@"state":@"", @"state":@"",
......
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