Commit fb33dc30 authored by zhu's avatar zhu

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

parents 381594c8 ffbc2672
...@@ -6,5 +6,5 @@ pod 'SSKeychain', '~> 1.2.3' ...@@ -6,5 +6,5 @@ pod 'SSKeychain', '~> 1.2.3'
pod 'FMDB', '~> 2.5' pod 'FMDB', '~> 2.5'
pod 'Base64nl', '~> 1.2' pod 'Base64nl', '~> 1.2'
pod 'Reveal-iOS-SDK', '~> 1.5.1' pod 'Reveal-iOS-SDK', '~> 1.5.1'
pod 'BaiduMapAPI', '~> 2.7.0' pod 'BaiduMapAPI', '~> 2.8.0’
pod 'MJRefresh', '~> 2.2.0' pod 'MJRefresh', '~> 2.2.0'
...@@ -20,7 +20,14 @@ PODS: ...@@ -20,7 +20,14 @@ PODS:
- AFNetworking/UIKit (2.5.4): - AFNetworking/UIKit (2.5.4):
- AFNetworking/NSURLConnection - AFNetworking/NSURLConnection
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- BaiduMapAPI (2.7.0) - BaiduMapAPI (2.8.0):
- BaiduMapAPI/All (= 2.8.0)
- BaiduMapAPI/All (2.8.0):
- BaiduMapAPI/Core
- BaiduMapAPI/Extend
- BaiduMapAPI/Core (2.8.0)
- BaiduMapAPI/Extend (2.8.0):
- BaiduMapAPI/Core
- Base64nl (1.2) - Base64nl (1.2)
- FMDB (2.5): - FMDB (2.5):
- FMDB/standard (= 2.5) - FMDB/standard (= 2.5)
...@@ -37,7 +44,7 @@ PODS: ...@@ -37,7 +44,7 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- AFNetworking (~> 2.5.4) - AFNetworking (~> 2.5.4)
- BaiduMapAPI (~> 2.7.0) - BaiduMapAPI (~> 2.8.0)
- Base64nl (~> 1.2) - Base64nl (~> 1.2)
- FMDB (~> 2.5) - FMDB (~> 2.5)
- MBProgressHUD (~> 0.9.1) - MBProgressHUD (~> 0.9.1)
...@@ -48,7 +55,7 @@ DEPENDENCIES: ...@@ -48,7 +55,7 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
BaiduMapAPI: d6433624b0b4dd156f2d842f394a5011b02a6401 BaiduMapAPI: e066aa1e85f9fee77a1bc071afb67552852bb0fb
Base64nl: a497bdcd1c01ea793d36b399016195a8713c0e95 Base64nl: a497bdcd1c01ea793d36b399016195a8713c0e95
FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52 FMDB: 96e8f1bcc1329e269330f99770ad4285d9003e52
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
} }
+ (void)customNavigationbarAppearance { + (void)customNavigationbarAppearance {
[UINavigationBar appearance].barTintColor = HexColor(@"7ebf74"); [UINavigationBar appearance].barTintColor = GXF_NAVIGAYION_COLOR;
[UINavigationBar appearance].tintColor = ICR_NAVIBAR_ITEM_COLOR; [UINavigationBar appearance].tintColor = ICR_NAVIBAR_ITEM_COLOR;
//Universal //Universal
......
...@@ -85,13 +85,48 @@ ...@@ -85,13 +85,48 @@
#define IBT_BIN_HIGHLIGHT_ALPHA (.6f) #define IBT_BIN_HIGHLIGHT_ALPHA (.6f)
#define XXFBgColor RGBA(246,246,246,1) #define XXFBgColor RGBA(246,246,246,1)
#define HexColor(colorStr) [UIColor colorWithHexString:colorStr] #define HexColor(colorStr) [UIColor colorWithHexString:colorStr]
#define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A] #define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A]
#define ScreenSize ([[UIScreen mainScreen] bounds].size) #define ScreenSize ([[UIScreen mainScreen] bounds].size)
#define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) #define IOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define FontSize(num) [UIFont systemFontOfSize:num] #define FontSize(num) [UIFont systemFontOfSize:num]
#define AppWindow [[UIApplication sharedApplication].delegate window] #define AppWindow [[UIApplication sharedApplication].delegate window]
#define GXF_NAVIGAYION_COLOR HexColor(@"7ebf74")
#define GXF_SAVE_COLOR HexColor(@"50bd62")
#define GXF_COMMIT_COLOR HexColor(@"f69100")
#define GXF_PLACEHOLDER_COLOR HexColor(@"bbbbbb")
#define GXF_CONTENT_COLOR HexColor(@"444444")
#define GXF_CELL_COLOR HexColor(@"aaaaaa")
#define GXF_LINE_COLOR HexColor(@"e5e5e5")
#define GXF_DETAIL_COLOR HexColor(@"888888")
#define GXF_LEFTSIX_COLOR HexColor(@"666666")
#define GXF_FOURTEENTH_SIZE FontSize(14)
#define GXF_FIFTEENTEN_SIZE FontSize(15)
#define GXF_SIXTEENTEH_SIZE FontSize(16)
#define GXF_SEVENTEENTH_SIZE FontSize(17)
//行情调研状态
//initial(未提交),submitted(已提交),insurvey(调研中),finished(已完成)
#define SURVEY_STATE_INITIAL @"initial"
#define SURVEY_STATE_SUBMITTED @"submitted"
#define SURVEY_STATE_INSURVEY @"insurvey"
#define SURVEY_STATE_FINISHED @"finished"
//采购单状态
#define PURCHASE_STATE_INITIAL @"initial"
#define PURCHASE_STATE_SUBMITTED @"submitted"
#define PURCHASE_STATE_REJECTED @"rejected"
#define PURCHASE_STATE_APPROVED @"approved"
#define PURCHASE_STATE_SHIPPING @"shipping"
#define PURCHASE_STATE_FINISHED @"finished"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.view.backgroundColor = HexColor(@"f8f8f8"); self.view.backgroundColor = XXFBgColor;
} }
......
...@@ -67,12 +67,12 @@ typedef enum : NSUInteger { ...@@ -67,12 +67,12 @@ typedef enum : NSUInteger {
label.text = @"新增商品明细"; label.text = @"新增商品明细";
label.textAlignment = NSTextAlignmentCenter; label.textAlignment = NSTextAlignmentCenter;
label.backgroundColor = XXFBgColor; label.backgroundColor = XXFBgColor;
label.textColor = HexColor(@"444444"); label.textColor = GXF_CONTENT_COLOR;
label.font = FontSize(15); label.font = GXF_FIFTEENTEN_SIZE;
[_bgView addSubview:label]; [_bgView addSubview:label];
UIButton *dissBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetWidth(_bgView.frame) - TopHeight, 0, TopHeight, TopHeight) target:self sel:@selector(btnClick:) tag:DissTag image:nil title:@"关闭" titleColor:HexColor(@"444444") isCorner:NO corner:0 bgColor:nil]; UIButton *dissBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetWidth(_bgView.frame) - TopHeight, 0, TopHeight, TopHeight) target:self sel:@selector(btnClick:) tag:DissTag image:nil title:@"关闭" titleColor:GXF_CONTENT_COLOR isCorner:NO corner:0 bgColor:nil];
dissBtn.titleLabel.font = FontSize(15); dissBtn.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[_bgView addSubview:dissBtn]; [_bgView addSubview:dissBtn];
...@@ -84,10 +84,10 @@ typedef enum : NSUInteger { ...@@ -84,10 +84,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
UIButton *delBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (CGRectGetWidth(_bgView.frame) - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:6001 image:nil title:@"删除" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"50bd62")]; UIButton *delBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (CGRectGetWidth(_bgView.frame) - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:6001 image:nil title:@"删除" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[footView addSubview:delBtn]; [footView addSubview:delBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(delBtn.frame.origin.x + delBtn.frame.size.width + LeftMargin, 10, (CGRectGetWidth(_bgView.frame) - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:1001 image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"f69100")]; UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(delBtn.frame.origin.x + delBtn.frame.size.width + LeftMargin, 10, (CGRectGetWidth(_bgView.frame) - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:1001 image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
// [self.view addSubview:footView]; // [self.view addSubview:footView];
...@@ -136,8 +136,8 @@ typedef enum : NSUInteger { ...@@ -136,8 +136,8 @@ typedef enum : NSUInteger {
if (indexPath.row == 0 || indexPath.row == 1 ) { if (indexPath.row == 0 || indexPath.row == 1 ) {
UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, CGRectGetWidth(_bgView.frame) - 100 - LeftMargin*2-10, TableHeight))]; UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, CGRectGetWidth(_bgView.frame) - 100 - LeftMargin*2-10, TableHeight))];
contentLabel.textAlignment= NSTextAlignmentRight; contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = HexColor(@"bbbbbb"); contentLabel.textColor = GXF_PLACEHOLDER_COLOR;
contentLabel.font = FontSize(15); contentLabel.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView addSubview:contentLabel]; [cell.contentView addSubview:contentLabel];
if (indexPath.row == 0) { if (indexPath.row == 0) {
contentLabel.text = @"选择商品"; contentLabel.text = @"选择商品";
...@@ -153,7 +153,7 @@ typedef enum : NSUInteger { ...@@ -153,7 +153,7 @@ typedef enum : NSUInteger {
self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0); self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
self.remarkTextView.minNumberOfLines = 1; self.remarkTextView.minNumberOfLines = 1;
self.remarkTextView.maxNumberOfLines = 2; self.remarkTextView.maxNumberOfLines = 2;
self.remarkTextView.font = FontSize(15); self.remarkTextView.font = GXF_FIFTEENTEN_SIZE;
self.remarkTextView.textAlignment = NSTextAlignmentRight; self.remarkTextView.textAlignment = NSTextAlignmentRight;
self.remarkTextView.delegate = self; self.remarkTextView.delegate = self;
self.remarkTextView.returnKeyType = UIReturnKeyDone; self.remarkTextView.returnKeyType = UIReturnKeyDone;
...@@ -163,15 +163,15 @@ typedef enum : NSUInteger { ...@@ -163,15 +163,15 @@ typedef enum : NSUInteger {
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, CGRectGetWidth(_bgView.frame) - 100 - LeftMargin*2-30, TableHeight)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, CGRectGetWidth(_bgView.frame) - 100 - LeftMargin*2-30, TableHeight)];
textField.textAlignment = NSTextAlignmentRight; textField.textAlignment = NSTextAlignmentRight;
textField.textColor = HexColor(@"444444"); textField.textColor = GXF_CONTENT_COLOR;
textField.font = FontSize(15); textField.font = GXF_FIFTEENTEN_SIZE;
textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
textField.returnKeyType = UIReturnKeyDone; textField.returnKeyType = UIReturnKeyDone;
textField.delegate = self; textField.delegate = self;
[cell.contentView addSubview:textField]; [cell.contentView addSubview:textField];
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame) + 5, 0, 20, TableHeight)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame) + 5, 0, 20, TableHeight)];
label.textColor = HexColor(@"444444"); label.textColor = GXF_CONTENT_COLOR;
label.font = FontSize(15); label.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView addSubview:label]; [cell.contentView addSubview:label];
if (indexPath.row == 2) { if (indexPath.row == 2) {
label.text = @"斤"; label.text = @"斤";
...@@ -208,7 +208,7 @@ typedef enum : NSUInteger { ...@@ -208,7 +208,7 @@ typedef enum : NSUInteger {
ChooseProductViewController *cvc = [ChooseProductViewController new]; ChooseProductViewController *cvc = [ChooseProductViewController new];
cvc.choseProduct = ^(Product *product){ cvc.choseProduct = ^(Product *product){
self.productNameLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code]; self.productNameLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code];
self.productNameLabel.textColor = HexColor(@"444444"); self.productNameLabel.textColor = GXF_CONTENT_COLOR;
}; };
cvc.isMoreChose = NO; cvc.isMoreChose = NO;
[self.delegate pushViewController:cvc]; [self.delegate pushViewController:cvc];
...@@ -218,7 +218,7 @@ typedef enum : NSUInteger { ...@@ -218,7 +218,7 @@ typedef enum : NSUInteger {
tvc.dataArr = @[@"筐",@"斤"]; tvc.dataArr = @[@"筐",@"斤"];
tvc.choseType = ^(NSString *type){ tvc.choseType = ^(NSString *type){
self.productTypeLabel.text = type; self.productTypeLabel.text = type;
self.productTypeLabel.textColor = HexColor(@"444444"); self.productTypeLabel.textColor = GXF_CONTENT_COLOR;
}; };
[self.delegate pushViewController:tvc]; [self.delegate pushViewController:tvc];
} }
......
...@@ -27,12 +27,11 @@ ...@@ -27,12 +27,11 @@
} }
- (void)bulidLayout - (void)bulidLayout
{ {
self.view.backgroundColor = HexColor(@"f8f8f8");
_selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; _selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)];
_selectTextFiled.textAlignment = NSTextAlignmentLeft; _selectTextFiled.textAlignment = NSTextAlignmentLeft;
_selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; _selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
_selectTextFiled.delegate = self; _selectTextFiled.delegate = self;
_selectTextFiled.font = FontSize(15); _selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:_selectTextFiled]; [self.view addSubview:_selectTextFiled];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
......
...@@ -80,12 +80,11 @@ ...@@ -80,12 +80,11 @@
- (void)bulidLayout - (void)bulidLayout
{ {
self.view.backgroundColor = HexColor(@"f8f8f8");
_selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; _selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)];
_selectTextFiled.textAlignment = NSTextAlignmentLeft; _selectTextFiled.textAlignment = NSTextAlignmentLeft;
_selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; _selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
_selectTextFiled.delegate = self; _selectTextFiled.delegate = self;
_selectTextFiled.font = FontSize(15); _selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:_selectTextFiled]; [self.view addSubview:_selectTextFiled];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
......
...@@ -75,12 +75,11 @@ ...@@ -75,12 +75,11 @@
- (void)bulidLayout - (void)bulidLayout
{ {
self.view.backgroundColor = HexColor(@"f8f8f8");
_selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; _selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)];
_selectTextFiled.textAlignment = NSTextAlignmentLeft; _selectTextFiled.textAlignment = NSTextAlignmentLeft;
_selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; _selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
_selectTextFiled.delegate = self; _selectTextFiled.delegate = self;
_selectTextFiled.font = FontSize(15); _selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:_selectTextFiled]; [self.view addSubview:_selectTextFiled];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
......
...@@ -67,10 +67,10 @@ typedef enum : NSUInteger { ...@@ -67,10 +67,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenSize.height - BottomViewHeight - 64, ScreenSize.width, BottomViewHeight)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenSize.height - BottomViewHeight - 64, ScreenSize.width, BottomViewHeight)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"50bd62")]; UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn]; [footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(saveBtn.frame) + 15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"f69100")]; UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(saveBtn.frame) + 15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
[self.view addSubview:footView]; [self.view addSubview:footView];
......
...@@ -68,7 +68,7 @@ typedef enum : NSUInteger { ...@@ -68,7 +68,7 @@ typedef enum : NSUInteger {
_scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)]; _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)];
_scrollView.showsHorizontalScrollIndicator = NO; _scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO; _scrollView.showsVerticalScrollIndicator = NO;
_scrollView.backgroundColor = HexColor(@"f8f8f8"); _scrollView.backgroundColor = XXFBgColor;
[self.view addSubview:_scrollView]; [self.view addSubview:_scrollView];
[self createBtn]; [self createBtn];
[self createPurchaseView]; [self createPurchaseView];
...@@ -86,14 +86,14 @@ typedef enum : NSUInteger { ...@@ -86,14 +86,14 @@ typedef enum : NSUInteger {
- (void)createBtn{ - (void)createBtn{
_endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin*2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"作废" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"f69100")]; _endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin*2, 40) target:self sel:@selector(btnClick:) tag:0 image:nil title:@"作废" titleColor:[UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
[self.view addSubview:_endBtn]; [self.view addSubview:_endBtn];
if (self.indexPerson == 0) { if (self.indexPerson == 0) {
_endBtn.tag = CancleTag; _endBtn.tag = CancleTag;
[_endBtn setTitle:@"作废" forState:UIControlStateNormal]; [_endBtn setTitle:@"作废" forState:UIControlStateNormal];
}else if(self.indexPerson == 1){ }else if(self.indexPerson == 1){
_rejectBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:RejectTag image:nil title:@"拒绝" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"50bd62")]; _rejectBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40) target:self sel:@selector(btnClick:) tag:RejectTag image:nil title:@"拒绝" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[self.view addSubview:_rejectBtn]; [self.view addSubview:_rejectBtn];
_endBtn.frame = CGRectMake(CGRectGetMaxX(_rejectBtn.frame)+ LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40); _endBtn.frame = CGRectMake(CGRectGetMaxX(_rejectBtn.frame)+ LeftMargin, ScreenSize.height - 64 - BottomHeight +5, (ScreenSize.width - LeftMargin*3)/2, 40);
...@@ -134,14 +134,14 @@ typedef enum : NSUInteger { ...@@ -134,14 +134,14 @@ typedef enum : NSUInteger {
for (NSInteger i = 0 ; i < _leftArr.count; i++) { for (NSInteger i = 0 ; i < _leftArr.count; i++) {
UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)]; UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, 10 + LeftHeight *i, LeftWidth, LeftHeight)];
leftLabel.font = FontSize(17); leftLabel.font = GXF_SEVENTEENTH_SIZE;
leftLabel.text = _leftArr[i]; leftLabel.text = _leftArr[i];
leftLabel.textColor = HexColor(@"888888"); leftLabel.textColor = GXF_DETAIL_COLOR;
[_purchaseView addSubview:leftLabel]; [_purchaseView addSubview:leftLabel];
UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), 10 + LeftHeight *i, _purchaseView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)]; UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), 10 + LeftHeight *i, _purchaseView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)];
rightLabel.font = FontSize(17); rightLabel.font = GXF_SEVENTEENTH_SIZE;
rightLabel.textColor = HexColor(@"888888"); rightLabel.textColor = GXF_DETAIL_COLOR;
if (i == 0) { if (i == 0) {
self.billNumberLabel = rightLabel; self.billNumberLabel = rightLabel;
...@@ -193,22 +193,22 @@ typedef enum : NSUInteger { ...@@ -193,22 +193,22 @@ typedef enum : NSUInteger {
- (void)fetchtPurchaseDetail{ - (void)fetchtPurchaseDetail{
self.billNumberLabel.text = [IBTCommon checkString:self.bill.billNumber]; self.billNumberLabel.text = [IBTCommon checkString:self.bill.billNumber];
if ([self.bill.state isEqualToString:@"initial"]) { if ([self.bill.state isEqualToString:PURCHASE_STATE_INITIAL]) {
self.stateLabel.textColor = [UIColor redColor]; self.stateLabel.textColor = [UIColor redColor];
self.stateLabel.text = @"未提交"; self.stateLabel.text = @"未提交";
}else if ([self.bill.state isEqualToString:@"submitted"]) { }else if ([self.bill.state isEqualToString:PURCHASE_STATE_SUBMITTED]) {
self.stateLabel.textColor = [UIColor greenColor]; self.stateLabel.textColor = [UIColor greenColor];
self.stateLabel.text = @"已提交"; self.stateLabel.text = @"已提交";
}else if ([self.bill.state isEqualToString:@"rejected"]) { }else if ([self.bill.state isEqualToString:PURCHASE_STATE_REJECTED]) {
self.stateLabel.textColor = [UIColor grayColor]; self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"已拒绝"; self.stateLabel.text = @"已拒绝";
}else if ([self.bill.state isEqualToString:@"approved"]) { }else if ([self.bill.state isEqualToString:PURCHASE_STATE_APPROVED]) {
self.stateLabel.textColor = [UIColor grayColor]; self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"已审批"; self.stateLabel.text = @"已审批";
}else if ([self.bill.state isEqualToString:@"shipping"]) { }else if ([self.bill.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
self.stateLabel.textColor = [UIColor grayColor]; self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"发运中"; self.stateLabel.text = @"发运中";
}else if ([self.bill.state isEqualToString:@"finished"]) { }else if ([self.bill.state isEqualToString:PURCHASE_STATE_FINISHED]) {
self.stateLabel.textColor = [UIColor blackColor]; self.stateLabel.textColor = [UIColor blackColor];
self.stateLabel.text = @"已完成"; self.stateLabel.text = @"已完成";
} }
...@@ -216,7 +216,7 @@ typedef enum : NSUInteger { ...@@ -216,7 +216,7 @@ typedef enum : NSUInteger {
self.createOperNameLabel.text = [IBTCommon checkString:self.bill.create_operName]; self.createOperNameLabel.text = [IBTCommon checkString:self.bill.create_operName];
self.checkNameLabel.text = [IBTCommon checkString:self.bill.vendor_name]; self.checkNameLabel.text = [IBTCommon checkString:self.bill.vendor_name];
self.vendorNameLabel.text = [IBTCommon checkString:self.bill.vendor_name]; self.vendorNameLabel.text = [IBTCommon checkString:self.bill.vendor_name];
self.totalPriceLabel.text = [IBTCommon checkString:self.bill.total]; self.totalPriceLabel.text = [IBTCommon checkString:[self.bill.total stringValue]];
self.noteLabel.text = [IBTCommon checkString:self.bill.remark]; self.noteLabel.text = [IBTCommon checkString:self.bill.remark];
self.lastModifyNameLabel.text = @"最后修改人"; self.lastModifyNameLabel.text = @"最后修改人";
self.typeLabel.text = @"类型"; self.typeLabel.text = @"类型";
......
...@@ -61,7 +61,7 @@ typedef enum : NSUInteger { ...@@ -61,7 +61,7 @@ typedef enum : NSUInteger {
bill.create_operName = @"创建人"; bill.create_operName = @"创建人";
bill.create_time = @"2013-03-04"; bill.create_time = @"2013-03-04";
bill.vendor_name = @"供应商"; bill.vendor_name = @"供应商";
bill.total = @"总金额"; bill.total = [NSNumber numberWithFloat:22];
bill.remark = @"备注"; bill.remark = @"备注";
bill.lastModified_operName = @"最后修改人"; bill.lastModified_operName = @"最后修改人";
bill.vendorConfirmTime = @"否"; bill.vendorConfirmTime = @"否";
...@@ -86,11 +86,11 @@ typedef enum : NSUInteger { ...@@ -86,11 +86,11 @@ typedef enum : NSUInteger {
{ {
_sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)]; _sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
_sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil]; _sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_sortBtn.titleLabel.font = FontSize(BtnSize); _sortBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_sortBtn]; [self.view addSubview:_sortBtn];
_boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil]; _boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_boltBtn.titleLabel.font = FontSize(BtnSize); _boltBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_boltBtn]; [self.view addSubview:_boltBtn];
...@@ -150,7 +150,7 @@ typedef enum : NSUInteger { ...@@ -150,7 +150,7 @@ typedef enum : NSUInteger {
if (_boltView == nil) { if (_boltView == nil) {
_boltView = [[PurchaseBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billLike noticeNumber:self.noticeLike]; _boltView = [[PurchaseBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billLike noticeNumber:self.noticeLike];
_boltView.backgroundColor = HexColor(@"f8f8f8"); _boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self; _boltView.delegate = self;
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成) //initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"未提交",@"已提交",@"已拒绝" ,@"已审批",@"发运中",@"已完成",nil]; _boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"未提交",@"已提交",@"已拒绝" ,@"已审批",@"发运中",@"已完成",nil];
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define TableHeight 44 #define TableHeight 44
#define SmallSize 10 #define SmallSize 10
#define SmallWidth 20 #define SmallWidth 20
#define ContentColor @"444444" #define GXF_CONTENT_COLOR @"444444"
#define ContentSize 16 #define ContentSize 16
#define SpaceMargin 1 #define SpaceMargin 1
#define LeftWidth 45 #define LeftWidth 45
...@@ -43,19 +43,19 @@ ...@@ -43,19 +43,19 @@
self.smallImageView.contentMode = UIViewContentModeScaleAspectFit; self.smallImageView.contentMode = UIViewContentModeScaleAspectFit;
self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, SmallWidth, TableHeight))]; self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, SmallWidth, TableHeight))];
self.seqLabel.textColor = HexColor(ContentColor); self.seqLabel.textColor = HexColor(GXF_CONTENT_COLOR);
self.seqLabel.text = @"13"; self.seqLabel.text = @"13";
self.seqLabel.font = FontSize(ContentSize); self.seqLabel.font = FontSize(ContentSize);
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftWidth, 0, headWidth, TableHeight))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftWidth, 0, headWidth, TableHeight))];
self.titleLabel.textAlignment = NSTextAlignmentLeft; self.titleLabel.textAlignment = NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(ContentColor); self.titleLabel.textColor = HexColor(GXF_CONTENT_COLOR);
self.titleLabel.text = @"苹果桃子"; self.titleLabel.text = @"苹果桃子";
self.titleLabel.font = FontSize(ContentSize); self.titleLabel.font = FontSize(ContentSize);
self.priceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.titleLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))]; self.priceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.titleLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))];
self.priceLabel.textAlignment = NSTextAlignmentLeft; self.priceLabel.textAlignment = NSTextAlignmentLeft;
self.priceLabel.textColor = HexColor(ContentColor); self.priceLabel.textColor = HexColor(GXF_CONTENT_COLOR);
self.priceLabel.text = @"80"; self.priceLabel.text = @"80";
self.priceLabel.font = FontSize(ContentSize); self.priceLabel.font = FontSize(ContentSize);
...@@ -63,13 +63,13 @@ ...@@ -63,13 +63,13 @@
// self.standardLabel.textAlignment = NSTextAlignmentLeft; // self.standardLabel.textAlignment = NSTextAlignmentLeft;
// self.standardLabel.text = @"20*20"; // self.standardLabel.text = @"20*20";
// self.standardLabel.backgroundColor = [UIColor redColor]; // self.standardLabel.backgroundColor = [UIColor redColor];
// self.standardLabel.textColor = HexColor(ContentColor); // self.standardLabel.textColor = HexColor(GXF_CONTENT_COLOR);
// self.standardLabel.font = FontSize(ContentSize); // self.standardLabel.font = FontSize(ContentSize);
self.countLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.priceLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))]; self.countLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.priceLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))];
self.countLabel.textAlignment = NSTextAlignmentLeft; self.countLabel.textAlignment = NSTextAlignmentLeft;
self.countLabel.text = @"200"; self.countLabel.text = @"200";
self.countLabel.textColor = HexColor(ContentColor); self.countLabel.textColor = HexColor(GXF_CONTENT_COLOR);
self.countLabel.font = FontSize(ContentSize); self.countLabel.font = FontSize(ContentSize);
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
self.editBtn.contentMode = UIViewContentModeScaleAspectFit; self.editBtn.contentMode = UIViewContentModeScaleAspectFit;
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin * 2, 1))];; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.smallImageView]; [self.contentView addSubview:self.smallImageView];
[self.contentView addSubview:self.seqLabel]; [self.contentView addSubview:self.seqLabel];
......
...@@ -47,17 +47,17 @@ ...@@ -47,17 +47,17 @@
} }
- (void)preferData{ - (void)preferData{
//initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成) //initial(未提交)submitted(已提交)rejected(已拒绝)approved(已审批)shipping(发运中)finished(已完成)
if ([self.state isEqualToString:@"initial"]) { if ([self.state isEqualToString:PURCHASE_STATE_INITIAL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
}else if ([self.state isEqualToString:@"submitted"]) { }else if ([self.state isEqualToString:PURCHASE_STATE_SUBMITTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
}else if ([self.state isEqualToString:@"rejected"]) { }else if ([self.state isEqualToString:PURCHASE_STATE_REJECTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
}else if ([self.state isEqualToString:@"approved"]) { }else if ([self.state isEqualToString:PURCHASE_STATE_APPROVED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0];
}else if ([self.state isEqualToString:@"shipping"]) { }else if ([self.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
_currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0];
}else if ([self.state isEqualToString:@"finished"]) { }else if ([self.state isEqualToString:PURCHASE_STATE_FINISHED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0];
} }
_billView.hidden = YES; _billView.hidden = YES;
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight); button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight);
[button setTitle:arr[i] forState:UIControlStateNormal]; [button setTitle:arr[i] forState:UIControlStateNormal];
[button setTitleColor:HexColor(@"888888") forState:UIControlStateNormal]; [button setTitleColor:GXF_DETAIL_COLOR forState:UIControlStateNormal];
if (i == 0) { if (i == 0) {
button.enabled = NO; button.enabled = NO;
_currentBtn = button; _currentBtn = button;
...@@ -94,8 +94,8 @@ ...@@ -94,8 +94,8 @@
_clearBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _clearBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_clearBtn.frame = CGRectMake(0, CGRectGetMaxY(_leftView.frame), self.frame.size.width, BottomHeight); _clearBtn.frame = CGRectMake(0, CGRectGetMaxY(_leftView.frame), self.frame.size.width, BottomHeight);
[_clearBtn setTitle:@"清空选项" forState:UIControlStateNormal]; [_clearBtn setTitle:@"清空选项" forState:UIControlStateNormal];
[_clearBtn setTitleColor:HexColor(@"444444") forState:UIControlStateNormal]; [_clearBtn setTitleColor:GXF_CONTENT_COLOR forState:UIControlStateNormal];
_clearBtn.titleLabel.font = FontSize(15); _clearBtn.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[_clearBtn addTarget:self action:@selector(clearBolt) forControlEvents:UIControlEventTouchUpInside]; [_clearBtn addTarget:self action:@selector(clearBolt) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_clearBtn]; [self addSubview:_clearBtn];
} }
...@@ -105,15 +105,15 @@ ...@@ -105,15 +105,15 @@
_billView.backgroundColor = [UIColor whiteColor]; _billView.backgroundColor = [UIColor whiteColor];
[self addSubview:_billView]; [self addSubview:_billView];
UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)]; UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
titleLabel.font = FontSize(15); titleLabel.font = GXF_FIFTEENTEN_SIZE;
titleLabel.text = @"类似于:"; titleLabel.text = @"类似于:";
[_billView addSubview:titleLabel]; [_billView addSubview:titleLabel];
self.billFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(titleLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)]; self.billFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(titleLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
self.billFiled.textAlignment = NSTextAlignmentLeft; self.billFiled.textAlignment = NSTextAlignmentLeft;
self.billFiled.textColor = HexColor(@"444444"); self.billFiled.textColor = GXF_CONTENT_COLOR;
self.billFiled.placeholder = @"输入类似采购单号"; self.billFiled.placeholder = @"输入类似采购单号";
self.billFiled.borderStyle = UITextBorderStyleRoundedRect; self.billFiled.borderStyle = UITextBorderStyleRoundedRect;
self.billFiled.font = FontSize(15); self.billFiled.font = GXF_FIFTEENTEN_SIZE;
self.billFiled.returnKeyType = UIReturnKeyDone; self.billFiled.returnKeyType = UIReturnKeyDone;
self.billFiled.delegate = self; self.billFiled.delegate = self;
[_billView addSubview:self.billFiled]; [_billView addSubview:self.billFiled];
...@@ -123,16 +123,16 @@ ...@@ -123,16 +123,16 @@
_noticeView.backgroundColor = [UIColor whiteColor]; _noticeView.backgroundColor = [UIColor whiteColor];
[self addSubview:_noticeView]; [self addSubview:_noticeView];
UILabel *billLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)]; UILabel *billLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
billLabel.font = FontSize(15); billLabel.font = GXF_FIFTEENTEN_SIZE;
billLabel.text = @"类似于:"; billLabel.text = @"类似于:";
[_noticeView addSubview:billLabel]; [_noticeView addSubview:billLabel];
self.noticeFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(billLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)]; self.noticeFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(billLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
self.noticeFiled.textAlignment = NSTextAlignmentLeft; self.noticeFiled.textAlignment = NSTextAlignmentLeft;
self.noticeFiled.textColor = HexColor(@"444444"); self.noticeFiled.textColor = GXF_CONTENT_COLOR;
self.noticeFiled.placeholder = @"输入类似采购通知单号"; self.noticeFiled.placeholder = @"输入类似采购通知单号";
self.noticeFiled.borderStyle = UITextBorderStyleRoundedRect; self.noticeFiled.borderStyle = UITextBorderStyleRoundedRect;
self.noticeFiled.font = FontSize(15); self.noticeFiled.font = GXF_FIFTEENTEN_SIZE;
self.noticeFiled.returnKeyType = UIReturnKeyDone; self.noticeFiled.returnKeyType = UIReturnKeyDone;
self.noticeFiled.delegate = self; self.noticeFiled.delegate = self;
[_noticeView addSubview:self.noticeFiled]; [_noticeView addSubview:self.noticeFiled];
...@@ -236,17 +236,17 @@ ...@@ -236,17 +236,17 @@
NSString *stateStr = @""; NSString *stateStr = @"";
if (indexPath.row == 0) { if (indexPath.row == 0) {
stateStr = @"initial"; stateStr = PURCHASE_STATE_INITIAL;
}else if(indexPath.row == 1){ }else if(indexPath.row == 1){
stateStr = @"submitted"; stateStr = PURCHASE_STATE_SUBMITTED;
}else if(indexPath.row == 2){ }else if(indexPath.row == 2){
stateStr = @"rejected"; stateStr = PURCHASE_STATE_REJECTED;
}else if(indexPath.row == 3){ }else if(indexPath.row == 3){
stateStr = @"approved"; stateStr = PURCHASE_STATE_APPROVED;
}else if(indexPath.row == 4){ }else if(indexPath.row == 4){
stateStr = @"shipping"; stateStr = PURCHASE_STATE_SHIPPING;
}else if(indexPath.row == 5){ }else if(indexPath.row == 5){
stateStr = @"finished"; stateStr = PURCHASE_STATE_FINISHED;
} }
[self.delegate getBoltValueSelectRow:stateStr]; [self.delegate getBoltValueSelectRow:stateStr];
} }
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#import "PurchaseCell.h" #import "PurchaseCell.h"
#define TitleSize 16 #define TitleSize 16
#define ContentSize 14 #define ContentSize 14
#define TitleColor @"444444"
#define ContentColor @"aaaaaa"
#define LeftMargin 90 #define LeftMargin 90
#define TopMargin 10 #define TopMargin 10
#define TitleHeight 20 #define TitleHeight 20
...@@ -36,25 +34,25 @@ ...@@ -36,25 +34,25 @@
self.stateBtn.enabled = NO; self.stateBtn.enabled = NO;
self.billNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))]; self.billNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))];
self.billNumberLabel.textColor = HexColor(TitleColor); self.billNumberLabel.textColor = GXF_CONTENT_COLOR;
self.billNumberLabel.font = FontSize(TitleSize); self.billNumberLabel.font = FontSize(TitleSize);
self.noticeNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billNumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight*2))]; self.noticeNumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billNumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight*2))];
self.noticeNumberLabel.numberOfLines = 0; self.noticeNumberLabel.numberOfLines = 0;
self.noticeNumberLabel.textColor = HexColor(ContentColor); self.noticeNumberLabel.textColor = GXF_CELL_COLOR;
self.noticeNumberLabel.font = FontSize(ContentSize); self.noticeNumberLabel.font = FontSize(ContentSize);
self.createOperNameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.noticeNumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.createOperNameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.noticeNumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.createOperNameLabel.textColor = HexColor(ContentColor); self.createOperNameLabel.textColor = GXF_CELL_COLOR;
self.createOperNameLabel.font = FontSize(ContentSize); self.createOperNameLabel.font = FontSize(ContentSize);
self.createTimeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.createOperNameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.createTimeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.createOperNameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.createTimeLabel.textColor = HexColor(ContentColor); self.createTimeLabel.textColor = GXF_CELL_COLOR;
self.createTimeLabel.font = FontSize(ContentSize); self.createTimeLabel.font = FontSize(ContentSize);
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.stateBtn]; [self.contentView addSubview:self.stateBtn];
[self.contentView addSubview:self.billNumberLabel]; [self.contentView addSubview:self.billNumberLabel];
...@@ -71,25 +69,25 @@ ...@@ -71,25 +69,25 @@
self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",purchaseBill.create_operName] ; self.createOperNameLabel.text = [NSString stringWithFormat:@"创建人:%@",purchaseBill.create_operName] ;
self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",purchaseBill.create_time]; self.createTimeLabel.text =[NSString stringWithFormat:@"创建时间:%@",purchaseBill.create_time];
NSString *stateStr = @""; NSString *stateStr = @"";
if ([purchaseBill.state isEqualToString:@"initial"]) { if ([purchaseBill.state isEqualToString:PURCHASE_STATE_INITIAL]) {
stateStr = @"未提交"; stateStr = @"未提交";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"initial"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"initial"] forState:UIControlStateDisabled];
}else if ([purchaseBill.state isEqualToString:@"submitted"]) { }else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_SUBMITTED]) {
stateStr = @"已提交"; stateStr = @"已提交";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([purchaseBill.state isEqualToString:@"rejected"]) { }else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_REJECTED]) {
stateStr = @"已拒绝"; stateStr = @"已拒绝";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([purchaseBill.state isEqualToString:@"approved"]) { }else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_APPROVED]) {
stateStr = @"已审批"; stateStr = @"已审批";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([purchaseBill.state isEqualToString:@"shipping"]) { }else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_SHIPPING]) {
stateStr = @"发运中"; stateStr = @"发运中";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([purchaseBill.state isEqualToString:@"finished"]) { }else if ([purchaseBill.state isEqualToString:PURCHASE_STATE_FINISHED]) {
stateStr = @"已完成"; stateStr = @"已完成";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"finish"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"finish"] forState:UIControlStateDisabled];
} }
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
if (indexPath.row == 4 ) { if (indexPath.row == 4 ) {
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-30, TableHeight)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-30, TableHeight)];
textField.textAlignment = NSTextAlignmentRight; textField.textAlignment = NSTextAlignmentRight;
textField.textColor = HexColor(@"444444"); textField.textColor = GXF_CONTENT_COLOR;
textField.font = FontSize(15); textField.font = GXF_FIFTEENTEN_SIZE;
textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
textField.returnKeyType = UIReturnKeyDone; textField.returnKeyType = UIReturnKeyDone;
textField.delegate = self; textField.delegate = self;
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
self.otherPriceFiled.placeholder = @"请输入其他费用"; self.otherPriceFiled.placeholder = @"请输入其他费用";
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame) + 5, 0, 20, TableHeight)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(textField.frame) + 5, 0, 20, TableHeight)];
label.text = @"元"; label.text = @"元";
label.textColor = HexColor(@"444444"); label.textColor = GXF_CONTENT_COLOR;
label.font = FontSize(TitleSize); label.font = FontSize(TitleSize);
[cell.contentView addSubview:label]; [cell.contentView addSubview:label];
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0); self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
self.remarkTextView.minNumberOfLines = 1; self.remarkTextView.minNumberOfLines = 1;
self.remarkTextView.maxNumberOfLines = 2; self.remarkTextView.maxNumberOfLines = 2;
self.remarkTextView.font = FontSize(15); self.remarkTextView.font = GXF_FIFTEENTEN_SIZE;
self.remarkTextView.textAlignment = NSTextAlignmentRight; self.remarkTextView.textAlignment = NSTextAlignmentRight;
self.remarkTextView.delegate = self; self.remarkTextView.delegate = self;
self.remarkTextView.returnKeyType = UIReturnKeyDone; self.remarkTextView.returnKeyType = UIReturnKeyDone;
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
}else{ }else{
UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight))]; UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight))];
contentLabel.textAlignment= NSTextAlignmentRight; contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = HexColor(@"bbbbbb"); contentLabel.textColor = GXF_PLACEHOLDER_COLOR;
contentLabel.font = FontSize(TitleSize); contentLabel.font = FontSize(TitleSize);
[cell.contentView addSubview:contentLabel]; [cell.contentView addSubview:contentLabel];
if (indexPath.row == 0) { if (indexPath.row == 0) {
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
self.purchasePriceLabel = contentLabel; self.purchasePriceLabel = contentLabel;
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(contentLabel.frame)+ 5, 0, 20, TableHeight)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(contentLabel.frame)+ 5, 0, 20, TableHeight)];
label.text = @"元"; label.text = @"元";
label.textColor = HexColor(@"444444"); label.textColor = GXF_CONTENT_COLOR;
label.font = FontSize(TitleSize); label.font = FontSize(TitleSize);
[cell.contentView addSubview:label]; [cell.contentView addSubview:label];
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
if (vendors.count > 0) { if (vendors.count > 0) {
Vendor *vendor = vendors[0]; Vendor *vendor = vendors[0];
self.purchaseSupplierLabel.text = [NSString stringWithFormat:@"%@[%@]",vendor.name,vendor.code]; self.purchaseSupplierLabel.text = [NSString stringWithFormat:@"%@[%@]",vendor.name,vendor.code];
self.purchaseSupplierLabel.textColor = HexColor(@"444444"); self.purchaseSupplierLabel.textColor = GXF_CONTENT_COLOR;
self.vendor_uuid = vendor.uuid; self.vendor_uuid = vendor.uuid;
self.vendor_code = vendor.code; self.vendor_code = vendor.code;
self.vendor_name = vendor.name; self.vendor_name = vendor.name;
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
tvc.dataArr = @[@"普通",@"紧急"]; tvc.dataArr = @[@"普通",@"紧急"];
tvc.choseType = ^(NSString *type){ tvc.choseType = ^(NSString *type){
self.purchaseTypeLabel.text = type; self.purchaseTypeLabel.text = type;
self.purchaseTypeLabel.textColor = HexColor(@"444444"); self.purchaseTypeLabel.textColor = GXF_CONTENT_COLOR;
self.type = type; self.type = type;
}; };
[self.delegate pushNextViewController:tvc]; [self.delegate pushNextViewController:tvc];
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
wvc.title = @"仓库"; wvc.title = @"仓库";
wvc.choseWarehouse = ^(Warehouse *warehouse){ wvc.choseWarehouse = ^(Warehouse *warehouse){
self.purchaseStoreLabel.text = [NSString stringWithFormat:@"%@[%@]",warehouse.name,warehouse.code]; self.purchaseStoreLabel.text = [NSString stringWithFormat:@"%@[%@]",warehouse.name,warehouse.code];
self.purchaseStoreLabel.textColor = HexColor(@"444444"); self.purchaseStoreLabel.textColor = GXF_CONTENT_COLOR;
self.receiveWrh_uuid = warehouse.uuid; self.receiveWrh_uuid = warehouse.uuid;
self.receiveWrh_code = warehouse.code; self.receiveWrh_code = warehouse.code;
self.receiveWrh_name = warehouse.name; self.receiveWrh_name = warehouse.name;
......
...@@ -88,10 +88,10 @@ typedef enum : NSUInteger { ...@@ -88,10 +88,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"50bd62")]; UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn]; [footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"f69100")]; UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
// [self.view addSubview:footView]; // [self.view addSubview:footView];
......
...@@ -50,11 +50,11 @@ ...@@ -50,11 +50,11 @@
//initial(未提交),submitted(已提交),insurvey(调研中) //initial(未提交),submitted(已提交),insurvey(调研中)
if ([self.state isEqualToString:@"none"]) { if ([self.state isEqualToString:@"none"]) {
_currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
}else if ([self.state isEqualToString:@"initial"]) { }else if ([self.state isEqualToString:SURVEY_STATE_INITIAL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0];
}else if ([self.state isEqualToString:@"submitted"]) { }else if ([self.state isEqualToString:SURVEY_STATE_SUBMITTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
}else if ([self.state isEqualToString:@"insurvey"]) { }else if ([self.state isEqualToString:SURVEY_STATE_INSURVEY]) {
_currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0];
} }
_titleView.hidden = YES; _titleView.hidden = YES;
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight); button.frame = CGRectMake(0, LeftHeight * i , LeftMargin ,LeftHeight);
[button setTitle:arr[i] forState:UIControlStateNormal]; [button setTitle:arr[i] forState:UIControlStateNormal];
[button setTitleColor:HexColor(@"888888") forState:UIControlStateNormal]; [button setTitleColor:GXF_DETAIL_COLOR forState:UIControlStateNormal];
if (i == 0) { if (i == 0) {
button.enabled = NO; button.enabled = NO;
_currentBtn = button; _currentBtn = button;
...@@ -91,8 +91,8 @@ ...@@ -91,8 +91,8 @@
_clearBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _clearBtn = [UIButton buttonWithType:UIButtonTypeCustom];
_clearBtn.frame = CGRectMake(0, CGRectGetMaxY(_leftView.frame), self.frame.size.width, BottomHeight); _clearBtn.frame = CGRectMake(0, CGRectGetMaxY(_leftView.frame), self.frame.size.width, BottomHeight);
[_clearBtn setTitle:@"清空选项" forState:UIControlStateNormal]; [_clearBtn setTitle:@"清空选项" forState:UIControlStateNormal];
[_clearBtn setTitleColor:HexColor(@"444444") forState:UIControlStateNormal]; [_clearBtn setTitleColor:GXF_CONTENT_COLOR forState:UIControlStateNormal];
_clearBtn.titleLabel.font = FontSize(15); _clearBtn.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[_clearBtn addTarget:self action:@selector(clearBolt) forControlEvents:UIControlEventTouchUpInside]; [_clearBtn addTarget:self action:@selector(clearBolt) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_clearBtn]; [self addSubview:_clearBtn];
} }
...@@ -102,15 +102,15 @@ ...@@ -102,15 +102,15 @@
_titleView.backgroundColor = [UIColor whiteColor]; _titleView.backgroundColor = [UIColor whiteColor];
[self addSubview:_titleView]; [self addSubview:_titleView];
UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)]; UILabel *titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
titleLabel.font = FontSize(15); titleLabel.font = GXF_FIFTEENTEN_SIZE;
titleLabel.text = @"类似于:"; titleLabel.text = @"类似于:";
[_titleView addSubview:titleLabel]; [_titleView addSubview:titleLabel];
self.titleFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(titleLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)]; self.titleFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(titleLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
self.titleFiled.textAlignment = NSTextAlignmentLeft; self.titleFiled.textAlignment = NSTextAlignmentLeft;
self.titleFiled.textColor = HexColor(@"444444"); self.titleFiled.textColor = GXF_CONTENT_COLOR;
self.titleFiled.placeholder = @"输入类似标题"; self.titleFiled.placeholder = @"输入类似标题";
self.titleFiled.borderStyle = UITextBorderStyleRoundedRect; self.titleFiled.borderStyle = UITextBorderStyleRoundedRect;
self.titleFiled.font = FontSize(15); self.titleFiled.font = GXF_FIFTEENTEN_SIZE;
self.titleFiled.returnKeyType = UIReturnKeyDone; self.titleFiled.returnKeyType = UIReturnKeyDone;
self.titleFiled.delegate = self; self.titleFiled.delegate = self;
[_titleView addSubview:self.titleFiled]; [_titleView addSubview:self.titleFiled];
...@@ -120,16 +120,16 @@ ...@@ -120,16 +120,16 @@
_billNumberView.backgroundColor = [UIColor whiteColor]; _billNumberView.backgroundColor = [UIColor whiteColor];
[self addSubview:_billNumberView]; [self addSubview:_billNumberView];
UILabel *billLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)]; UILabel *billLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 20, (ScreenSize.width - LeftMargin - 10*2), 20)];
billLabel.font = FontSize(15); billLabel.font = GXF_FIFTEENTEN_SIZE;
billLabel.text = @"类似于:"; billLabel.text = @"类似于:";
[_billNumberView addSubview:billLabel]; [_billNumberView addSubview:billLabel];
self.billFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(billLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)]; self.billFiled = [[UITextField alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(billLabel.frame) + 10, (ScreenSize.width - LeftMargin - 10*2), 30)];
self.billFiled.textAlignment = NSTextAlignmentLeft; self.billFiled.textAlignment = NSTextAlignmentLeft;
self.billFiled.textColor = HexColor(@"444444"); self.billFiled.textColor = GXF_CONTENT_COLOR;
self.billFiled.placeholder = @"输入类似单号"; self.billFiled.placeholder = @"输入类似单号";
self.billFiled.borderStyle = UITextBorderStyleRoundedRect; self.billFiled.borderStyle = UITextBorderStyleRoundedRect;
self.billFiled.font = FontSize(15); self.billFiled.font = GXF_FIFTEENTEN_SIZE;
self.billFiled.returnKeyType = UIReturnKeyDone; self.billFiled.returnKeyType = UIReturnKeyDone;
self.billFiled.delegate = self; self.billFiled.delegate = self;
[_billNumberView addSubview:self.billFiled]; [_billNumberView addSubview:self.billFiled];
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
// //
#import "MaskCell.h" #import "MaskCell.h"
#define TitleSize 14
#define LeftMargin 20 #define LeftMargin 20
#define TableHeight 45 #define TableHeight 45
#define BtnSize 14 #define BtnSize 14
...@@ -29,14 +28,14 @@ ...@@ -29,14 +28,14 @@
{ {
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, self.totalWidth - LeftMargin - BtnSize, self.totalHeight))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, self.totalWidth - LeftMargin - BtnSize, self.totalHeight))];
self.titleLabel.textAlignment= NSTextAlignmentLeft; self.titleLabel.textAlignment= NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(@"666666"); self.titleLabel.textColor = GXF_LEFTSIX_COLOR;
self.titleLabel.font = FontSize(TitleSize); self.titleLabel.font = GXF_FOURTEENTH_SIZE;
self.Commitbtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(self.totalWidth- LeftMargin - BtnSize, 10, BtnSize, BtnSize) target:nil sel:nil tag:0 image:@"selected" title:nil titleColor:nil isCorner:NO corner:0 bgColor:nil]; self.Commitbtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(self.totalWidth- LeftMargin - BtnSize, 10, BtnSize, BtnSize) target:nil sel:nil tag:0 image:@"selected" title:nil titleColor:nil isCorner:NO corner:0 bgColor:nil];
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.totalHeight-1, self.totalWidth - LeftMargin * 2, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.totalHeight-1, self.totalWidth - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.lineLabel.font = FontSize(TitleSize); self.lineLabel.font = GXF_FOURTEENTH_SIZE;
[self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.lineLabel]; [self.contentView addSubview:self.lineLabel];
[self.contentView addSubview:self.Commitbtn]; [self.contentView addSubview:self.Commitbtn];
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, 100, 44))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 0, 100, 44))];
self.titleLabel.textAlignment= NSTextAlignmentLeft; self.titleLabel.textAlignment= NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(@"666666"); self.titleLabel.textColor = GXF_LEFTSIX_COLOR;
self.titleLabel.font = FontSize(TitleSize); self.titleLabel.font = GXF_FIFTEENTEN_SIZE;
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.lineLabel.font = FontSize(TitleSize); self.lineLabel.font = GXF_FIFTEENTEN_SIZE;
[self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.lineLabel]; [self.contentView addSubview:self.lineLabel];
} }
......
...@@ -7,11 +7,6 @@ ...@@ -7,11 +7,6 @@
// //
#import "SurveyListCell.h" #import "SurveyListCell.h"
#define TitleSize 16
#define ContentSize 14
#define TitleColor @"444444"
#define ContentColor @"aaaaaa"
#define LeftMargin 90 #define LeftMargin 90
#define TopMargin 10 #define TopMargin 10
#define TitleHeight 20 #define TitleHeight 20
...@@ -31,33 +26,33 @@ ...@@ -31,33 +26,33 @@
{ {
self.stateBtn = [UIButton buttonWithType:UIButtonTypeCustom]; self.stateBtn = [UIButton buttonWithType:UIButtonTypeCustom];
self.stateBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftMargin - TopMargin*3, 20); self.stateBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftMargin - TopMargin*3, 20);
self.stateBtn.titleLabel.font = FontSize(ContentSize); self.stateBtn.titleLabel.font = GXF_FOURTEENTH_SIZE;
[self.stateBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [self.stateBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
self.stateBtn.enabled = NO; self.stateBtn.enabled = NO;
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, TopMargin, ScreenSize.width - LeftMargin, TitleHeight))];
self.titleLabel.textColor = HexColor(TitleColor); self.titleLabel.textColor = GXF_CONTENT_COLOR;
self.titleLabel.font = FontSize(TitleSize); self.titleLabel.font = GXF_SIXTEENTEH_SIZE;
self.billnumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.titleLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.billnumberLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.titleLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.billnumberLabel.textColor = HexColor(ContentColor); self.billnumberLabel.textColor = GXF_CELL_COLOR;
self.billnumberLabel.font = FontSize(ContentSize); self.billnumberLabel.font = GXF_FOURTEENTH_SIZE;
self.productnameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billnumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.productnameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.billnumberLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.productnameLabel.textColor = HexColor(ContentColor); self.productnameLabel.textColor = GXF_CELL_COLOR;
self.productnameLabel.font = FontSize(ContentSize); self.productnameLabel.font = GXF_FOURTEENTH_SIZE;
self.begindateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.productnameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.begindateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.productnameLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.begindateLabel.textColor = HexColor(ContentColor); self.begindateLabel.textColor = GXF_CELL_COLOR;
self.begindateLabel.font = FontSize(ContentSize); self.begindateLabel.font = GXF_FOURTEENTH_SIZE;
self.enddateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.begindateLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))]; self.enddateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, CGRectGetMaxY(self.begindateLabel.frame), ScreenSize.width - LeftMargin, TitleHeight))];
self.enddateLabel.textColor = HexColor(ContentColor); self.enddateLabel.textColor = GXF_CELL_COLOR;
self.enddateLabel.font = FontSize(ContentSize); self.enddateLabel.font = GXF_FOURTEENTH_SIZE;
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin - TopMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.stateBtn]; [self.contentView addSubview:self.stateBtn];
[self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.titleLabel];
...@@ -77,17 +72,17 @@ ...@@ -77,17 +72,17 @@
self.begindateLabel.text = [NSString stringWithFormat:@"开始时间:%@",[survey.beginDate substringToIndex:10]]; self.begindateLabel.text = [NSString stringWithFormat:@"开始时间:%@",[survey.beginDate substringToIndex:10]];
self.enddateLabel.text = [NSString stringWithFormat:@"结束时间:%@",[survey.endDate substringToIndex:10]]; self.enddateLabel.text = [NSString stringWithFormat:@"结束时间:%@",[survey.endDate substringToIndex:10]];
NSString *stateStr = @""; NSString *stateStr = @"";
if ([survey.state isEqualToString:@"initial"]) { if ([survey.state isEqualToString:SURVEY_STATE_INITIAL]) {
stateStr = @"未提交"; stateStr = @"未提交";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"initial"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"initial"] forState:UIControlStateDisabled];
}else if ([survey.state isEqualToString:@"submitted"]) { }else if ([survey.state isEqualToString:SURVEY_STATE_SUBMITTED]) {
stateStr = @"已提交"; stateStr = @"已提交";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([survey.state isEqualToString:@"insurvey"]) { }else if ([survey.state isEqualToString:SURVEY_STATE_INSURVEY]) {
stateStr = @"调研中"; stateStr = @"调研中";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"insurvey"] forState:UIControlStateDisabled];
}else if ([survey.state isEqualToString:@"finished"]) { }else if ([survey.state isEqualToString:SURVEY_STATE_FINISHED]) {
stateStr = @"已完成"; stateStr = @"已完成";
[self.stateBtn setBackgroundImage:[UIImage imageNamed:@"finish"] forState:UIControlStateDisabled]; [self.stateBtn setBackgroundImage:[UIImage imageNamed:@"finish"] forState:UIControlStateDisabled];
} }
......
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
#define TitleHeight 20 #define TitleHeight 20
#define LeftWidth 100 #define LeftWidth 100
#define TableHeight 150 #define TableHeight 150
#define TitleSize 16
#define ContentSize 14 #define ContentSize 14
#define TitleColor @"444444"
#define ContentColor @"aaaaaa"
@implementation SurveyResultCell @implementation SurveyResultCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
...@@ -33,32 +30,32 @@ ...@@ -33,32 +30,32 @@
self.imageBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftWidth, TableHeight - TopMargin*2); self.imageBtn.frame = CGRectMake(TopMargin *2 , TopMargin, LeftWidth, TableHeight - TopMargin*2);
self.dateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.imageBtn.frame) + TopMargin, TopMargin, ScreenSize.width - TopMargin*2 - LeftWidth, TitleHeight))]; self.dateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.imageBtn.frame) + TopMargin, TopMargin, ScreenSize.width - TopMargin*2 - LeftWidth, TitleHeight))];
self.dateLabel.textColor = HexColor(ContentColor); self.dateLabel.textColor = GXF_CELL_COLOR;
self.dateLabel.font = FontSize(ContentSize); self.dateLabel.font = GXF_FOURTEENTH_SIZE;
self.userNameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.dateLabel.frame), CGRectGetMaxY(self.dateLabel.frame), CGRectGetWidth(self.dateLabel.frame), 30))]; self.userNameLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.dateLabel.frame), CGRectGetMaxY(self.dateLabel.frame), CGRectGetWidth(self.dateLabel.frame), 30))];
self.userNameLabel.textColor = HexColor(TitleColor); self.userNameLabel.textColor = GXF_CONTENT_COLOR;
self.userNameLabel.font = FontSize(TitleSize); self.userNameLabel.font = GXF_SIXTEENTEH_SIZE;
self.placeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.userNameLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))]; self.placeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.userNameLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))];
self.placeLabel.textColor = HexColor(ContentColor); self.placeLabel.textColor = GXF_CELL_COLOR;
self.placeLabel.font = FontSize(ContentSize); self.placeLabel.font = GXF_FOURTEENTH_SIZE;
self.priceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.placeLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))]; self.priceLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.placeLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))];
self.priceLabel.textColor = HexColor(ContentColor); self.priceLabel.textColor = GXF_CELL_COLOR;
self.priceLabel.font = FontSize(ContentSize); self.priceLabel.font = GXF_FOURTEENTH_SIZE;
self.capacityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.priceLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))]; self.capacityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.priceLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))];
self.capacityLabel.textColor = HexColor(ContentColor); self.capacityLabel.textColor = GXF_CELL_COLOR;
self.capacityLabel.font = FontSize(ContentSize); self.capacityLabel.font = GXF_FOURTEENTH_SIZE;
self.qualityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.capacityLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))]; self.qualityLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMinX(self.userNameLabel.frame), CGRectGetMaxY(self.capacityLabel.frame), CGRectGetWidth(self.userNameLabel.frame), TitleHeight))];
self.qualityLabel.textColor = HexColor(ContentColor); self.qualityLabel.textColor = GXF_CELL_COLOR;
self.qualityLabel.font = FontSize(ContentSize); self.qualityLabel.font = GXF_FOURTEENTH_SIZE;
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(TopMargin,TableHeight-1, ScreenSize.width - TopMargin * 2, 1))];; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(TopMargin,TableHeight-1, ScreenSize.width - TopMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.imageBtn]; [self.contentView addSubview:self.imageBtn];
[self.contentView addSubview:self.dateLabel]; [self.contentView addSubview:self.dateLabel];
...@@ -76,7 +73,7 @@ ...@@ -76,7 +73,7 @@
self.dateLabel.text = [NSString stringWithFormat:@"%@",surveyResult.feedbackTime]; self.dateLabel.text = [NSString stringWithFormat:@"%@",surveyResult.feedbackTime];
self.userNameLabel.text = [NSString stringWithFormat:@"反馈人:%@",surveyResult.userName]; self.userNameLabel.text = [NSString stringWithFormat:@"反馈人:%@",surveyResult.userName];
self.placeLabel.text = [NSString stringWithFormat:@"产地:%@",surveyResult.place]; self.placeLabel.text = [NSString stringWithFormat:@"产地:%@",surveyResult.place];
NSMutableAttributedString *attributeStr1 = [IBTCommon setTextViewFontOfString:@"价格:" paragraphStyle:0 fontSize:ContentSize color:HexColor(ContentColor)]; NSMutableAttributedString *attributeStr1 = [IBTCommon setTextViewFontOfString:@"价格:" paragraphStyle:0 fontSize:ContentSize color:GXF_CELL_COLOR];
NSString *str = [NSString stringWithFormat:@"%@",surveyResult.price]; NSString *str = [NSString stringWithFormat:@"%@",surveyResult.price];
[attributeStr1 appendAttributedString:[IBTCommon setTextViewFontOfString:str paragraphStyle:0 fontSize:ContentSize color:[UIColor redColor]]]; [attributeStr1 appendAttributedString:[IBTCommon setTextViewFontOfString:str paragraphStyle:0 fontSize:ContentSize color:[UIColor redColor]]];
self.priceLabel.attributedText = attributeStr1; self.priceLabel.attributedText = attributeStr1;
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
#import "ChooseProductViewController.h" #import "ChooseProductViewController.h"
#import "MaskCell.h" #import "MaskCell.h"
#import "MJRefresh.h"
#define TopMargin 50 #define TopMargin 50
#define TableHeight 50 #define TableHeight 50
@interface ChooseProductViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate> @interface ChooseProductViewController ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
...@@ -15,6 +18,7 @@ ...@@ -15,6 +18,7 @@
UITextField *_selectTextFiled; UITextField *_selectTextFiled;
NSMutableArray *_indexArr; NSMutableArray *_indexArr;
NSIndexPath *_currentIndexPath; NSIndexPath *_currentIndexPath;
BOOL _isRefresh;
} }
@property (nonatomic,strong)NSMutableArray *dataArr; @property (nonatomic,strong)NSMutableArray *dataArr;
...@@ -27,17 +31,33 @@ ...@@ -27,17 +31,33 @@
[super viewDidLoad]; [super viewDidLoad];
[self initData]; [self initData];
[self bulidLayout]; [self bulidLayout];
//刷新
[self createRefresh];
} }
- (void)initData{ - (void)initData{
self.dataArr = [NSMutableArray array]; self.dataArr = [NSMutableArray array];
_indexArr = [NSMutableArray array]; _indexArr = [NSMutableArray array];
[self fetchProductList]; [self fetchProductList];
}
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
[self getData];
CLog(@"%@",[self.tableView.header.lastUpdatedTime httpParameterString]);
}];
}
- (void)getData{
__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];
__strong __typeof(weakSelf)strongSelf = weakSelf; __strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf endRefreshing];
[strongSelf fetchProductList]; [strongSelf fetchProductList];
}; };
void(^fail)(id) = ^(id data) { void(^fail)(id) = ^(id data) {
...@@ -47,8 +67,11 @@ ...@@ -47,8 +67,11 @@
[IBTLoadingView showProgressLabel:@"正在加载..."]; [IBTLoadingView showProgressLabel:@"正在加载..."];
[[ICRHTTPController sharedController] getProductWithPage_number:0 page_size:100 success:succ failure:fail]; [[ICRHTTPController sharedController] getProductWithPage_number:0 page_size:100 success:succ failure:fail];
} }
#pragma mark - 结束刷新
- (void)endRefreshing{
_isRefresh = NO;
[self.tableView.header endRefreshing];
}
#pragma mark -成功 #pragma mark -成功
- (void)fetchProductList{ - (void)fetchProductList{
ICRDatabaseFetchBlock fetchBlk = ^FMResultSet *(FMDatabase *db) { ICRDatabaseFetchBlock fetchBlk = ^FMResultSet *(FMDatabase *db) {
...@@ -59,9 +82,16 @@ ...@@ -59,9 +82,16 @@
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
ICRDatabaseFetchResultsBlock fetchResultsBlk = ^(NSArray *fetchedObjects) { ICRDatabaseFetchResultsBlock fetchResultsBlk = ^(NSArray *fetchedObjects) {
__strong __typeof(weakSelf)strongSelf = weakSelf; __strong __typeof(weakSelf)strongSelf = weakSelf;
[strongSelf.dataArr removeAllObjects]; if (!fetchedObjects) {
[strongSelf.dataArr addObjectsFromArray:fetchedObjects]; [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:self.tableView.header.lastUpdatedTimeKey];
[strongSelf.tableView reloadData]; [[NSUserDefaults standardUserDefaults] synchronize];
[self getData];
}else{
[strongSelf.dataArr removeAllObjects];
[strongSelf.dataArr addObject:self.tableView.header.lastUpdatedTime];
[strongSelf.dataArr addObjectsFromArray:fetchedObjects];
[self deletePerson];
}
}; };
ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController]; ICRDataBaseController *dbCtrl = [ICRDataBaseController sharedController];
...@@ -72,12 +102,11 @@ ...@@ -72,12 +102,11 @@
- (void)bulidLayout - (void)bulidLayout
{ {
self.view.backgroundColor = HexColor(@"f8f8f8");
_selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; _selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)];
_selectTextFiled.textAlignment = NSTextAlignmentLeft; _selectTextFiled.textAlignment = NSTextAlignmentLeft;
_selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; _selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
_selectTextFiled.delegate = self; _selectTextFiled.delegate = self;
_selectTextFiled.font = FontSize(15); _selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:_selectTextFiled]; [self.view addSubview:_selectTextFiled];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
...@@ -161,16 +190,25 @@ ...@@ -161,16 +190,25 @@
} }
} }
if (self.dataArr.count > 0) { if (self.dataArr.count > 0) {
Product *product = self.dataArr[indexPath.row]; if (indexPath.row == 0) {
NSString *proStr = [NSString stringWithFormat:@"%@[%@]",product.name,product.code]; NSString *dateStr = [self.dataArr[indexPath.row] httpParameterString];
[cell setTitleStr:proStr]; cell.titleLabel.textColor = GXF_CONTENT_COLOR;
[cell setTitleStr:[NSString stringWithFormat:@"上次更新时间:%@",dateStr]];
}else{
Product *product = self.dataArr[indexPath.row];
cell.titleLabel.textColor = GXF_LEFTSIX_COLOR;
NSString *proStr = [NSString stringWithFormat:@"%@[%@]",product.name,product.code];
[cell setTitleStr:proStr];
}
} }
return cell; return cell;
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == 0) {
return;
}
if (self.isMoreChose == YES) { if (self.isMoreChose == YES) {
MaskCell *cell = (MaskCell *)[tableView cellForRowAtIndexPath:indexPath]; MaskCell *cell = (MaskCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.Commitbtn.hidden = NO; cell.Commitbtn.hidden = NO;
......
...@@ -78,12 +78,11 @@ ...@@ -78,12 +78,11 @@
- (void)bulidLayout - (void)bulidLayout
{ {
self.view.backgroundColor = HexColor(@"f8f8f8");
_selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; _selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)];
_selectTextFiled.textAlignment = NSTextAlignmentLeft; _selectTextFiled.textAlignment = NSTextAlignmentLeft;
_selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; _selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
_selectTextFiled.delegate = self; _selectTextFiled.delegate = self;
_selectTextFiled.font = FontSize(15); _selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:_selectTextFiled]; [self.view addSubview:_selectTextFiled];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#define BtnHeight 44 #define BtnHeight 44
#define TableHeight 46 #define TableHeight 46
#define CornerRadius 5 #define CornerRadius 5
#define TitleSize 15
#define BtnSize 19 #define BtnSize 19
#define TotalHeight 432 #define TotalHeight 432
#define KeyboardHeight 258 #define KeyboardHeight 258
...@@ -96,10 +95,10 @@ typedef enum : NSUInteger { ...@@ -96,10 +95,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 50)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"50bd62")]; UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn]; [footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:HexColor(@"f69100")]; UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(saveBtn.frame.origin.x + saveBtn.frame.size.width + LeftMargin, 10, (ScreenSize.width - LeftMargin*3)/2, BtnHeight) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:CornerRadius bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
_tableView.tableFooterView = footView; _tableView.tableFooterView = footView;
...@@ -226,9 +225,9 @@ typedef enum : NSUInteger { ...@@ -226,9 +225,9 @@ typedef enum : NSUInteger {
if (indexPath.row == 0) { if (indexPath.row == 0) {
_titleField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight)]; _titleField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight)];
_titleField.textAlignment = NSTextAlignmentRight; _titleField.textAlignment = NSTextAlignmentRight;
_titleField.textColor = HexColor(@"444444"); _titleField.textColor = GXF_CONTENT_COLOR;
_titleField.placeholder = @"输入调研标题"; _titleField.placeholder = @"输入调研标题";
_titleField.font = FontSize(15); _titleField.font = GXF_FIFTEENTEN_SIZE;
_titleField.returnKeyType = UIReturnKeyDone; _titleField.returnKeyType = UIReturnKeyDone;
_titleField.delegate = self; _titleField.delegate = self;
[cell.contentView addSubview:_titleField]; [cell.contentView addSubview:_titleField];
...@@ -241,7 +240,7 @@ typedef enum : NSUInteger { ...@@ -241,7 +240,7 @@ typedef enum : NSUInteger {
_noteTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0); _noteTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
_noteTextView.minNumberOfLines = 1; _noteTextView.minNumberOfLines = 1;
_noteTextView.maxNumberOfLines = 4; _noteTextView.maxNumberOfLines = 4;
_noteTextView.font = FontSize(15); _noteTextView.font = GXF_FIFTEENTEN_SIZE;
_noteTextView.textAlignment = NSTextAlignmentRight; _noteTextView.textAlignment = NSTextAlignmentRight;
_noteTextView.delegate = self; _noteTextView.delegate = self;
_noteTextView.returnKeyType = UIReturnKeyDone; _noteTextView.returnKeyType = UIReturnKeyDone;
...@@ -257,8 +256,8 @@ typedef enum : NSUInteger { ...@@ -257,8 +256,8 @@ typedef enum : NSUInteger {
}else{ }else{
UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight))]; UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-15, TableHeight))];
contentLabel.textAlignment= NSTextAlignmentRight; contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = HexColor(@"bbbbbb"); contentLabel.textColor = GXF_PLACEHOLDER_COLOR;
contentLabel.font = FontSize(TitleSize); contentLabel.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView addSubview:contentLabel]; [cell.contentView addSubview:contentLabel];
if (indexPath.row == 1) { if (indexPath.row == 1) {
contentLabel.text = @"选择商品"; contentLabel.text = @"选择商品";
...@@ -271,7 +270,7 @@ typedef enum : NSUInteger { ...@@ -271,7 +270,7 @@ typedef enum : NSUInteger {
if (self.survey.beginDate.length > 9) { if (self.survey.beginDate.length > 9) {
_startDateLabel.text = [[IBTCommon checkString:self.survey.beginDate]substringToIndex:10]; _startDateLabel.text = [[IBTCommon checkString:self.survey.beginDate]substringToIndex:10];
} }
_startDateLabel.textColor = HexColor(@"444444"); _startDateLabel.textColor = GXF_CONTENT_COLOR;
self.beginDateStr =[IBTCommon checkString:self.survey.beginDate]; self.beginDateStr =[IBTCommon checkString:self.survey.beginDate];
} }
...@@ -282,7 +281,7 @@ typedef enum : NSUInteger { ...@@ -282,7 +281,7 @@ typedef enum : NSUInteger {
if (self.survey.endDate.length > 9) { if (self.survey.endDate.length > 9) {
_endDateLabel.text = [[IBTCommon checkString:self.survey.endDate]substringToIndex:10]; _endDateLabel.text = [[IBTCommon checkString:self.survey.endDate]substringToIndex:10];
} }
_endDateLabel.textColor = HexColor(@"444444"); _endDateLabel.textColor = GXF_CONTENT_COLOR;
self.endDateStr = [IBTCommon checkString:self.survey.endDate]; self.endDateStr = [IBTCommon checkString:self.survey.endDate];
} }
}else if(indexPath.row == 4){ }else if(indexPath.row == 4){
...@@ -304,7 +303,7 @@ typedef enum : NSUInteger { ...@@ -304,7 +303,7 @@ typedef enum : NSUInteger {
} }
} }
_personLabel.text = personStr; _personLabel.text = personStr;
_personLabel.textColor = HexColor(@"444444"); _personLabel.textColor = GXF_CONTENT_COLOR;
} }
if (self.users > 0) { if (self.users > 0) {
...@@ -315,7 +314,7 @@ typedef enum : NSUInteger { ...@@ -315,7 +314,7 @@ typedef enum : NSUInteger {
- (void)preferDataInProductLabel{ - (void)preferDataInProductLabel{
if (self.survey) { if (self.survey) {
_productLabel.text = [NSString stringWithFormat:@"%@[%@]",[IBTCommon checkString:self.survey.productName],[IBTCommon checkString:self.survey.productCode]]; _productLabel.text = [NSString stringWithFormat:@"%@[%@]",[IBTCommon checkString:self.survey.productName],[IBTCommon checkString:self.survey.productCode]];
_productLabel.textColor = HexColor(@"444444"); _productLabel.textColor = GXF_CONTENT_COLOR;
self.productCodeStr = [IBTCommon checkString:self.survey.productCode]; self.productCodeStr = [IBTCommon checkString:self.survey.productCode];
self.productNameStr = [IBTCommon checkString:self.survey.productName]; self.productNameStr = [IBTCommon checkString:self.survey.productName];
self.productUuidStr = [IBTCommon checkString:self.survey.productUuid]; self.productUuidStr = [IBTCommon checkString:self.survey.productUuid];
...@@ -355,7 +354,7 @@ typedef enum : NSUInteger { ...@@ -355,7 +354,7 @@ typedef enum : NSUInteger {
[self.users addObject:[user dictForCommit]]; [self.users addObject:[user dictForCommit]];
} }
_personLabel.text = textStr; _personLabel.text = textStr;
_personLabel.textColor = HexColor(@"444444"); _personLabel.textColor = GXF_CONTENT_COLOR;
} }
}; };
cvc.isMoreChose = YES; cvc.isMoreChose = YES;
...@@ -364,7 +363,7 @@ typedef enum : NSUInteger { ...@@ -364,7 +363,7 @@ typedef enum : NSUInteger {
ChooseProductViewController *cvc = [ChooseProductViewController new]; ChooseProductViewController *cvc = [ChooseProductViewController new];
cvc.choseProduct = ^(Product *product){ cvc.choseProduct = ^(Product *product){
_productLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code]; _productLabel.text = [NSString stringWithFormat:@"%@[%@]",product.name,product.code];
_productLabel.textColor = HexColor(@"444444"); _productLabel.textColor = GXF_CONTENT_COLOR;
self.productNameStr = product.name; self.productNameStr = product.name;
self.productUuidStr = product.uuid; self.productUuidStr = product.uuid;
self.productCodeStr = product.code; self.productCodeStr = product.code;
...@@ -396,11 +395,11 @@ typedef enum : NSUInteger { ...@@ -396,11 +395,11 @@ typedef enum : NSUInteger {
} }
- (void)okTimeView:(NSDate *)time{ - (void)okTimeView:(NSDate *)time{
if (_isClickStart) { if (_isClickStart) {
_startDateLabel.textColor = HexColor(@"444444"); _startDateLabel.textColor = GXF_CONTENT_COLOR;
_startDateLabel.text = [IBTCommon stringFromDate:time]; _startDateLabel.text = [IBTCommon stringFromDate:time];
self.beginDateStr = [time httpParameterString]; self.beginDateStr = [time httpParameterString];
}else{ }else{
_endDateLabel.textColor = HexColor(@"444444"); _endDateLabel.textColor = GXF_CONTENT_COLOR;
_endDateLabel.text = [IBTCommon stringFromDate:time]; _endDateLabel.text = [IBTCommon stringFromDate:time];
self.endDateStr = [time httpParameterString]; self.endDateStr = [time httpParameterString];
} }
......
...@@ -103,16 +103,16 @@ typedef enum : NSUInteger { ...@@ -103,16 +103,16 @@ typedef enum : NSUInteger {
- (void)fetchtSurveyDetail{ - (void)fetchtSurveyDetail{
self.billNumberLabel.text = [IBTCommon checkString:self.survey.billNumber]; self.billNumberLabel.text = [IBTCommon checkString:self.survey.billNumber];
if ([self.survey.state isEqualToString:@"initial"]) { if ([self.survey.state isEqualToString:SURVEY_STATE_INITIAL]) {
self.stateLabel.textColor = [UIColor redColor]; self.stateLabel.textColor = [UIColor redColor];
self.stateLabel.text = @"未提交"; self.stateLabel.text = @"未提交";
}else if ([self.survey.state isEqualToString:@"submitted"]) { }else if ([self.survey.state isEqualToString:SURVEY_STATE_SUBMITTED]) {
self.stateLabel.textColor = [UIColor greenColor]; self.stateLabel.textColor = [UIColor greenColor];
self.stateLabel.text = @"已提交"; self.stateLabel.text = @"已提交";
}else if ([self.survey.state isEqualToString:@"insurvey"]) { }else if ([self.survey.state isEqualToString:SURVEY_STATE_INSURVEY]) {
self.stateLabel.textColor = [UIColor grayColor]; self.stateLabel.textColor = [UIColor grayColor];
self.stateLabel.text = @"调研中"; self.stateLabel.text = @"调研中";
}else if ([self.survey.state isEqualToString:@"finished"]) { }else if ([self.survey.state isEqualToString:SURVEY_STATE_FINISHED]) {
self.stateLabel.textColor = [UIColor blackColor]; self.stateLabel.textColor = [UIColor blackColor];
self.stateLabel.text = @"已完成"; self.stateLabel.text = @"已完成";
} }
...@@ -142,11 +142,11 @@ typedef enum : NSUInteger { ...@@ -142,11 +142,11 @@ typedef enum : NSUInteger {
_scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)]; _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, ScreenSize.height - 64 - BottomHeight)];
_scrollView.showsHorizontalScrollIndicator = NO; _scrollView.showsHorizontalScrollIndicator = NO;
_scrollView.showsVerticalScrollIndicator = NO; _scrollView.showsVerticalScrollIndicator = NO;
_scrollView.backgroundColor = HexColor(@"f8f8f8"); _scrollView.backgroundColor = XXFBgColor;
[self.view addSubview:_scrollView]; [self.view addSubview:_scrollView];
UIButton *endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin*2, 40) target:self sel:@selector(btnClick:) tag:EndTag image:nil title:@"结束" titleColor:[UIColor whiteColor] isCorner:YES corner:8 bgColor:HexColor(@"f69100")]; UIButton *endBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, ScreenSize.height - 64 - BottomHeight +5, ScreenSize.width - LeftMargin*2, 40) target:self sel:@selector(btnClick:) tag:EndTag image:nil title:@"结束" titleColor:[UIColor whiteColor] isCorner:YES corner:8 bgColor:GXF_COMMIT_COLOR];
[self.view addSubview:endBtn]; [self.view addSubview:endBtn];
_surveyView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*9+LeftMargin/2)]; _surveyView= [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, LeftHeight*9+LeftMargin/2)];
...@@ -155,21 +155,21 @@ typedef enum : NSUInteger { ...@@ -155,21 +155,21 @@ typedef enum : NSUInteger {
UILabel *tagLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin/2, 10, LeftWidth*2, LeftHeight)]; UILabel *tagLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin/2, 10, LeftWidth*2, LeftHeight)];
tagLabel.text = @"【调研内容】"; tagLabel.text = @"【调研内容】";
tagLabel.font = FontSize(17); tagLabel.font = GXF_SEVENTEENTH_SIZE;
tagLabel.textColor = HexColor(@"7ebf74"); tagLabel.textColor = HexColor(@"7ebf74");
[_surveyView addSubview:tagLabel]; [_surveyView addSubview:tagLabel];
NSArray *leftArr = @[@"单号:",@"状态:",@"标题:",@"商品:",@"开始日期:",@"截止日期:",@"调研人员:",@"备注:"]; NSArray *leftArr = @[@"单号:",@"状态:",@"标题:",@"商品:",@"开始日期:",@"截止日期:",@"调研人员:",@"备注:"];
for (NSInteger i = 0 ; i < leftArr.count; i++) { for (NSInteger i = 0 ; i < leftArr.count; i++) {
UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, CGRectGetMaxY(tagLabel.frame) + LeftHeight *i, LeftWidth, LeftHeight)]; UILabel *leftLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin, CGRectGetMaxY(tagLabel.frame) + LeftHeight *i, LeftWidth, LeftHeight)];
leftLabel.font = FontSize(17); leftLabel.font = GXF_SEVENTEENTH_SIZE;
leftLabel.text = leftArr[i]; leftLabel.text = leftArr[i];
leftLabel.textColor = HexColor(@"888888"); leftLabel.textColor = GXF_DETAIL_COLOR;
[_surveyView addSubview:leftLabel]; [_surveyView addSubview:leftLabel];
UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), CGRectGetMaxY(tagLabel.frame) + LeftHeight *i, _surveyView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)]; UILabel *rightLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(leftLabel.frame), CGRectGetMaxY(tagLabel.frame) + LeftHeight *i, _surveyView.frame.size.width - LeftMargin - LeftWidth, LeftHeight)];
rightLabel.font = FontSize(17); rightLabel.font = GXF_SEVENTEENTH_SIZE;
rightLabel.textColor = HexColor(@"888888"); rightLabel.textColor = GXF_DETAIL_COLOR;
if (i == 0) { if (i == 0) {
self.billNumberLabel = rightLabel; self.billNumberLabel = rightLabel;
}else if (i == 1) { }else if (i == 1) {
...@@ -199,7 +199,7 @@ typedef enum : NSUInteger { ...@@ -199,7 +199,7 @@ typedef enum : NSUInteger {
UILabel *resultLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin/2, 10, LeftWidth*2, LeftHeight)]; UILabel *resultLabel = [[UILabel alloc]initWithFrame:CGRectMake(LeftMargin/2, 10, LeftWidth*2, LeftHeight)];
resultLabel.text = @"【行情反馈】"; resultLabel.text = @"【行情反馈】";
resultLabel.font = FontSize(17); resultLabel.font = GXF_SEVENTEENTH_SIZE;
resultLabel.textColor = HexColor(@"7ebf74"); resultLabel.textColor = HexColor(@"7ebf74");
[_bottomView addSubview:resultLabel]; [_bottomView addSubview:resultLabel];
......
...@@ -205,11 +205,11 @@ typedef enum : NSUInteger { ...@@ -205,11 +205,11 @@ typedef enum : NSUInteger {
{ {
_sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)]; _sureBtn = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
_sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil]; _sortBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(LeftMargin, 10, BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:SortTag image:@"black_arrow_down_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_sortBtn.titleLabel.font = FontSize(BtnSize); _sortBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_sortBtn]; [self.view addSubview:_sortBtn];
_boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:HexColor(@"888888") isCorner:NO corner:0 bgColor:nil]; _boltBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(ScreenSize.width-BtnWidth - LeftMargin,10,BtnWidth, BtnHeight) target:self sel:@selector(sortClick:) tag:BoltTag image:@"black_filter_with_text" title:nil titleColor:GXF_DETAIL_COLOR isCorner:NO corner:0 bgColor:nil];
_boltBtn.titleLabel.font = FontSize(BtnSize); _boltBtn.titleLabel.font = FontSize(BtnSize);
[self.view addSubview:_boltBtn]; [self.view addSubview:_boltBtn];
...@@ -304,7 +304,7 @@ typedef enum : NSUInteger { ...@@ -304,7 +304,7 @@ typedef enum : NSUInteger {
[btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal]; [btn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
if (_boltView == nil) { if (_boltView == nil) {
_boltView = [[BoltMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state title:self.titleLike bill:self.billNumberLike]; _boltView = [[BoltMaskView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state title:self.titleLike bill:self.billNumberLike];
_boltView.backgroundColor = HexColor(@"f8f8f8"); _boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self; _boltView.delegate = self;
_boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"不限",@"未提交",@"已提交" ,@"调研中",nil]; _boltView.dataArr = [[NSMutableArray alloc]initWithObjects:@"不限",@"未提交",@"已提交" ,@"调研中",nil];
[_maskView addSubview:_boltView]; [_maskView addSubview:_boltView];
...@@ -419,13 +419,13 @@ typedef enum : NSUInteger { ...@@ -419,13 +419,13 @@ typedef enum : NSUInteger {
if (self.dataArr.count > 0) { if (self.dataArr.count > 0) {
survey = self.dataArr[indexPath.row]; survey = self.dataArr[indexPath.row];
} }
if ([survey.state isEqualToString:@"initial"]) { if ([survey.state isEqualToString:SURVEY_STATE_INITIAL]) {
NewSurveyViewController *nvc = [[NewSurveyViewController alloc]init]; NewSurveyViewController *nvc = [[NewSurveyViewController alloc]init];
nvc.survey = survey; nvc.survey = survey;
nvc.navTitle = @"修改行情调研单"; nvc.navTitle = @"修改行情调研单";
[self PushViewController:nvc animated:YES]; [self PushViewController:nvc animated:YES];
}else if([survey.state isEqualToString:@"submitted"] || [survey.state isEqualToString:@"insurvey"]|| [survey.state isEqualToString:@"finished"]){ }else if([survey.state isEqualToString:SURVEY_STATE_SUBMITTED] || [survey.state isEqualToString:SURVEY_STATE_INSURVEY]|| [survey.state isEqualToString:SURVEY_STATE_FINISHED]){
SurveyDetailViewController *svc = [SurveyDetailViewController new]; SurveyDetailViewController *svc = [SurveyDetailViewController new];
svc.survey = survey; svc.survey = survey;
svc.surveyUuid = survey.uuid; svc.surveyUuid = survey.uuid;
......
...@@ -47,10 +47,10 @@ typedef enum : NSUInteger { ...@@ -47,10 +47,10 @@ typedef enum : NSUInteger {
UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenSize.height - BottomViewHeight - 64, ScreenSize.width, BottomViewHeight)]; UIView *footView = [[UIView alloc]initWithFrame:CGRectMake(0, ScreenSize.height - BottomViewHeight - 64, ScreenSize.width, BottomViewHeight)];
UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"50bd62")]; UIButton *saveBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:SaveTag image:nil title:@"保存" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_SAVE_COLOR];
[footView addSubview:saveBtn]; [footView addSubview:saveBtn];
UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(saveBtn.frame) + 15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:HexColor(@"f69100")]; UIButton *commitBtn = [IBTCustomButtom creatButtonWithFrame:CGRectMake(CGRectGetMaxX(saveBtn.frame) + 15, 8, (ScreenSize.width - 15*3)/2, 44) target:self sel:@selector(btnClick:) tag:CommitTag image:nil title:@"提交" titleColor: [UIColor whiteColor] isCorner:YES corner:5 bgColor:GXF_COMMIT_COLOR];
[footView addSubview:commitBtn]; [footView addSubview:commitBtn];
[self.view addSubview:footView]; [self.view addSubview:footView];
......
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
[btn setTitle:arr[i] forState:UIControlStateNormal]; [btn setTitle:arr[i] forState:UIControlStateNormal];
btn.frame = CGRectMake(SpaceWidth + (BtnWidth+SpaceWidth) * i, 0, BtnWidth, ContentHeight); btn.frame = CGRectMake(SpaceWidth + (BtnWidth+SpaceWidth) * i, 0, BtnWidth, ContentHeight);
[btn setTitleColor:HexColor(@"444444") forState:UIControlStateNormal]; [btn setTitleColor:GXF_CONTENT_COLOR forState:UIControlStateNormal];
[btn setTitleColor:HexColor(@"50bd62") forState:UIControlStateDisabled]; [btn setTitleColor:GXF_SAVE_COLOR forState:UIControlStateDisabled];
btn.titleLabel.font = FontSize(16); btn.titleLabel.font = GXF_SIXTEENTEH_SIZE;
btn.tag = i + BeginTag; btn.tag = i + BeginTag;
[btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside]; [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:btn]; [self addSubview:btn];
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#import "FooterCell.h" #import "FooterCell.h"
#define HeadWidth 70 #define HeadWidth 70
#define TitleSize 15
#define LeftMargin 13 #define LeftMargin 13
@interface FooterCell () @interface FooterCell ()
@property (nonatomic,strong)NSString *title; @property (nonatomic,strong)NSString *title;
...@@ -30,13 +29,13 @@ ...@@ -30,13 +29,13 @@
addBtn.frame = CGRectMake(0, 0, self.frame.size.width, 50); addBtn.frame = CGRectMake(0, 0, self.frame.size.width, 50);
[addBtn setTitle:self.title forState:UIControlStateNormal]; [addBtn setTitle:self.title forState:UIControlStateNormal];
addBtn.backgroundColor = [UIColor whiteColor]; addBtn.backgroundColor = [UIColor whiteColor];
[addBtn setTitleColor:HexColor(@"bbbbbb") forState:UIControlStateNormal]; [addBtn setTitleColor:GXF_PLACEHOLDER_COLOR forState:UIControlStateNormal];
[addBtn addTarget:self action:@selector(addBtn) forControlEvents:UIControlEventTouchUpInside]; [addBtn addTarget:self action:@selector(addBtn) forControlEvents:UIControlEventTouchUpInside];
addBtn.titleLabel.font = FontSize(15); addBtn.titleLabel.font = GXF_FIFTEENTEN_SIZE;
[self addSubview:addBtn]; [self addSubview:addBtn];
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.frame.size.height-1, ScreenSize.width - LeftMargin * 2, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.frame.size.height-1, ScreenSize.width - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.lineLabel.font = FontSize(TitleSize); self.lineLabel.font = GXF_FIFTEENTEN_SIZE;
[self addSubview:self.lineLabel]; [self addSubview:self.lineLabel];
} }
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
// //
#import "HeaderCell.h" #import "HeaderCell.h"
//#define HeadWidth 70
#define TitleSize 15
#define LeftMargin 13 #define LeftMargin 13
#define LeftWidth 45 #define LeftWidth 45
#define RightWidth 30 #define RightWidth 30
...@@ -34,15 +32,15 @@ ...@@ -34,15 +32,15 @@
CGFloat headWidth = (ScreenSize.width - LeftWidth - LeftWidth - SpaceMargin* (self.arr.count -1))/self.arr.count; CGFloat headWidth = (ScreenSize.width - LeftWidth - LeftWidth - SpaceMargin* (self.arr.count -1))/self.arr.count;
for (NSInteger i = 0; i < self.arr.count; i++) { for (NSInteger i = 0; i < self.arr.count; i++) {
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i, 0, headWidth, self.frame.size.height)]; UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(LeftWidth + (SpaceMargin + headWidth)*i, 0, headWidth, self.frame.size.height)];
label.font = FontSize(TitleSize); label.font = GXF_FIFTEENTEN_SIZE;
label.textAlignment = NSTextAlignmentLeft; label.textAlignment = NSTextAlignmentLeft;
label.textColor = HexColor(@"bbbbbb"); label.textColor = GXF_PLACEHOLDER_COLOR;
label.text = self.arr[i]; label.text = self.arr[i];
[self addSubview:label]; [self addSubview:label];
} }
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.frame.size.height-1, ScreenSize.width - LeftMargin * 2, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, self.frame.size.height-1, ScreenSize.width - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.lineLabel.font = FontSize(TitleSize); self.lineLabel.font = GXF_FIFTEENTEN_SIZE;
[self addSubview:self.lineLabel]; [self addSubview:self.lineLabel];
} }
@end @end
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#define TableHeight 44 #define TableHeight 44
#define SmallSize 15 #define SmallSize 15
#define SmallWidth 20 #define SmallWidth 20
#define ContentColor @"444444"
#define ContentSize 16
#define SpaceMargin 1 #define SpaceMargin 1
#define LeftWidth 45 #define LeftWidth 45
#define RightWidth 30 #define RightWidth 30
...@@ -42,27 +40,27 @@ ...@@ -42,27 +40,27 @@
self.smallImageView.image = [UIImage imageNamed:@"delete"]; self.smallImageView.image = [UIImage imageNamed:@"delete"];
self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, SmallWidth, TableHeight))]; self.seqLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.smallImageView.frame), 0, SmallWidth, TableHeight))];
self.seqLabel.textColor = HexColor(ContentColor); self.seqLabel.textColor = GXF_CONTENT_COLOR;
self.seqLabel.text = @"13"; self.seqLabel.text = @"13";
self.seqLabel.font = FontSize(ContentSize); self.seqLabel.font = GXF_SIXTEENTEH_SIZE;
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftWidth, 0, headWidth, TableHeight))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftWidth, 0, headWidth, TableHeight))];
self.titleLabel.textAlignment = NSTextAlignmentLeft; self.titleLabel.textAlignment = NSTextAlignmentLeft;
self.titleLabel.textColor = HexColor(ContentColor); self.titleLabel.textColor = GXF_CONTENT_COLOR;
self.titleLabel.text = @"苹果桃子"; self.titleLabel.text = @"苹果桃子";
self.titleLabel.font = FontSize(ContentSize); self.titleLabel.font = GXF_SIXTEENTEH_SIZE;
self.baseCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.titleLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))]; self.baseCountLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.titleLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))];
self.baseCountLabel.textAlignment = NSTextAlignmentLeft; self.baseCountLabel.textAlignment = NSTextAlignmentLeft;
self.baseCountLabel.textColor = HexColor(ContentColor); self.baseCountLabel.textColor = GXF_CONTENT_COLOR;
self.baseCountLabel.text = @"30000"; self.baseCountLabel.text = @"30000";
self.baseCountLabel.font = FontSize(ContentSize); self.baseCountLabel.font = GXF_SIXTEENTEH_SIZE;
self.dateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.baseCountLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))]; self.dateLabel = [[UILabel alloc]initWithFrame:(CGRectMake(CGRectGetMaxX(self.baseCountLabel.frame) + SpaceMargin, 0, headWidth, TableHeight))];
self.dateLabel.textAlignment = NSTextAlignmentLeft; self.dateLabel.textAlignment = NSTextAlignmentLeft;
self.dateLabel.text = @"2015-04-05"; self.dateLabel.text = @"2015-04-05";
self.dateLabel.textColor = HexColor(ContentColor); self.dateLabel.textColor = GXF_CONTENT_COLOR;
self.dateLabel.font = FontSize(ContentSize); self.dateLabel.font = GXF_SIXTEENTEH_SIZE;
self.showView = [[UIView alloc]initWithFrame:CGRectMake(0, TableHeight, ScreenSize.width, 0)]; self.showView = [[UIView alloc]initWithFrame:CGRectMake(0, TableHeight, ScreenSize.width, 0)];
self.showView.hidden = YES; self.showView.hidden = YES;
...@@ -120,7 +118,7 @@ ...@@ -120,7 +118,7 @@
self.editBtn.frame = CGRectMake(ScreenSize.width - LeftWidth, 0, LeftWidth, TableHeight); self.editBtn.frame = CGRectMake(ScreenSize.width - LeftWidth, 0, LeftWidth, TableHeight);
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin * 2, 1))];; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin,TableHeight-1, ScreenSize.width - LeftMargin * 2, 1))];;
self.lineLabel.backgroundColor = HexColor(@"e5e5e5"); self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.smallImageView]; [self.contentView addSubview:self.smallImageView];
[self.contentView addSubview:self.seqLabel]; [self.contentView addSubview:self.seqLabel];
[self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.titleLabel];
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#define LeftWidth 80 #define LeftWidth 80
#define TableHeight 44 #define TableHeight 44
#define SpaceHeight 10 #define SpaceHeight 10
#define TitleSize 16
@interface TopSheetView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate> @interface TopSheetView ()<UITableViewDataSource,UITableViewDelegate,HPGrowingTextViewDelegate,UITextFieldDelegate>
{ {
...@@ -74,8 +73,8 @@ ...@@ -74,8 +73,8 @@
if (indexPath.row == 0 || indexPath.row == 2 || indexPath.row == 3) { if (indexPath.row == 0 || indexPath.row == 2 || indexPath.row == 3) {
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight)];
textField.textAlignment = NSTextAlignmentRight; textField.textAlignment = NSTextAlignmentRight;
textField.textColor = HexColor(@"444444"); textField.textColor = GXF_CONTENT_COLOR;
textField.font = FontSize(15); textField.font = GXF_FIFTEENTEN_SIZE;
textField.returnKeyType = UIReturnKeyDone; textField.returnKeyType = UIReturnKeyDone;
textField.delegate = self; textField.delegate = self;
[cell.contentView addSubview:textField]; [cell.contentView addSubview:textField];
...@@ -95,7 +94,7 @@ ...@@ -95,7 +94,7 @@
self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0); self.remarkTextView.contentInset = UIEdgeInsetsMake(5, 5, 5, 0);
self.remarkTextView.minNumberOfLines = 1; self.remarkTextView.minNumberOfLines = 1;
self.remarkTextView.maxNumberOfLines = 2; self.remarkTextView.maxNumberOfLines = 2;
self.remarkTextView.font = FontSize(15); self.remarkTextView.font = GXF_FIFTEENTEN_SIZE;
self.remarkTextView.textAlignment = NSTextAlignmentRight; self.remarkTextView.textAlignment = NSTextAlignmentRight;
self.remarkTextView.delegate = self; self.remarkTextView.delegate = self;
self.remarkTextView.returnKeyType = UIReturnKeyDone; self.remarkTextView.returnKeyType = UIReturnKeyDone;
...@@ -104,8 +103,8 @@ ...@@ -104,8 +103,8 @@
}else{ }else{
UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight))]; UILabel *contentLabel = [[UILabel alloc]initWithFrame:(CGRectMake(100+LeftMargin, 0, ScreenSize.width - 100 - LeftMargin*2-10, TableHeight))];
contentLabel.textAlignment= NSTextAlignmentRight; contentLabel.textAlignment= NSTextAlignmentRight;
contentLabel.textColor = HexColor(@"bbbbbb"); contentLabel.textColor = GXF_PLACEHOLDER_COLOR;
contentLabel.font = FontSize(TitleSize); contentLabel.font = GXF_FIFTEENTEN_SIZE;
[cell.contentView addSubview:contentLabel]; [cell.contentView addSubview:contentLabel];
if (indexPath.row == 1) { if (indexPath.row == 1) {
contentLabel.text = @"选择供应商"; contentLabel.text = @"选择供应商";
......
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