Commit 1510915d authored by AvatarC's avatar AvatarC

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

parents f89f6359 280ce145
...@@ -28,7 +28,7 @@ typedef enum : NSUInteger { ...@@ -28,7 +28,7 @@ typedef enum : NSUInteger {
BoltTag BoltTag
} BtnTag; } BtnTag;
@interface PurchaseViewController ()<UITableViewDataSource,UITableViewDelegate,PurchaseViewDelegate,SortMaskViewDelegate> @interface PurchaseViewController ()<UITableViewDataSource,UITableViewDelegate,PurchaseViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -227,10 +227,24 @@ typedef enum : NSUInteger { ...@@ -227,10 +227,24 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
_maskView.hidden = YES; _maskView.hidden = YES;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
#pragma mark -按钮事件 #pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{ - (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
...@@ -275,7 +289,7 @@ typedef enum : NSUInteger { ...@@ -275,7 +289,7 @@ typedef enum : NSUInteger {
_boltView.backgroundColor = XXFBgColor; _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];
[_maskView addSubview:_boltView]; [_maskView addSubview:_boltView];
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame; CGRect sortFrame = _boltView.frame;
...@@ -411,7 +425,15 @@ typedef enum : NSUInteger { ...@@ -411,7 +425,15 @@ typedef enum : NSUInteger {
self.productLike = @""; self.productLike = @"";
} }
} }
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1; return 1;
......
...@@ -60,6 +60,10 @@ ...@@ -60,6 +60,10 @@
_currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0];
}else if ([self.state isEqualToString:PURCHASE_STATE_FINISHED]) { }else if ([self.state isEqualToString:PURCHASE_STATE_FINISHED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0];
}else if ([self.state isEqualToString:PURCHASE_STATE_PROCESS]) {
_currentIndexPath = [NSIndexPath indexPathForRow:6 inSection:0];
}else if ([self.state isEqualToString:PURCHASE_STATE_PROCESSFAIL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:7 inSection:0];
} }
self.billFiled.hidden = YES; self.billFiled.hidden = YES;
if(self.billNumber.length > 0){ if(self.billNumber.length > 0){
...@@ -84,7 +88,7 @@ ...@@ -84,7 +88,7 @@
{ {
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)]; _leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)];
[self addSubview:_leftView]; [self addSubview:_leftView];
NSArray *arr = @[@"按状态",@"采购单号",@"标题",@"供应商Uuid",@"商品单号"]; NSArray *arr = @[@"按状态",@"采购单号",@"标题",@"供应商Uuid",@"商品"];
for (NSInteger i = 0; i<arr.count; i++) { for (NSInteger i = 0; i<arr.count; i++) {
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);
...@@ -109,7 +113,7 @@ ...@@ -109,7 +113,7 @@
[self addSubview:_clearBtn]; [self addSubview:_clearBtn];
} }
- (void)createRightView{ - (void)createRightView{
NSArray *arr = @[@"输入类似采购单号",@"输入类似标题",@"输入类似供应商Uuid",@"输入类似商品单号"]; NSArray *arr = @[@"输入类似采购单号",@"输入类似标题",@"输入类似供应商Uuid",@"输入类似商品"];
UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)]; UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
contentView.backgroundColor = [UIColor whiteColor]; contentView.backgroundColor = [UIColor whiteColor];
[self addSubview:contentView]; [self addSubview:contentView];
...@@ -279,6 +283,10 @@ ...@@ -279,6 +283,10 @@
stateStr = PURCHASE_STATE_ABORTED; stateStr = PURCHASE_STATE_ABORTED;
}else if(indexPath.row == 5){ }else if(indexPath.row == 5){
stateStr = PURCHASE_STATE_FINISHED; stateStr = PURCHASE_STATE_FINISHED;
}else if(indexPath.row == 6){
stateStr = PURCHASE_STATE_PROCESS;
}else if(indexPath.row == 7){
stateStr = PURCHASE_STATE_PROCESSFAIL;
} }
[self.delegate getBoltValueSelectRow:stateStr]; [self.delegate getBoltValueSelectRow:stateStr];
} }
......
...@@ -28,7 +28,7 @@ typedef enum : NSUInteger { ...@@ -28,7 +28,7 @@ typedef enum : NSUInteger {
BoltTag BoltTag
} BtnTag; } BtnTag;
@interface PurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate> @interface PurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -205,10 +205,33 @@ typedef enum : NSUInteger { ...@@ -205,10 +205,33 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
_maskView.hidden = YES; _maskView.hidden = YES;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark -按钮事件 #pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{ - (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
......
...@@ -27,7 +27,7 @@ typedef enum : NSUInteger { ...@@ -27,7 +27,7 @@ typedef enum : NSUInteger {
} BtnTag; } BtnTag;
@interface ReceiveViewController ()<UITableViewDataSource,UITableViewDelegate,ReceiveBoltViewDelegate,SortMaskViewDelegate> @interface ReceiveViewController ()<UITableViewDataSource,UITableViewDelegate,ReceiveBoltViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -193,9 +193,23 @@ typedef enum : NSUInteger { ...@@ -193,9 +193,23 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = YES; _maskView.hidden = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
#pragma mark -按钮事件 #pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{ - (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
...@@ -344,7 +358,15 @@ typedef enum : NSUInteger { ...@@ -344,7 +358,15 @@ typedef enum : NSUInteger {
self.state = @""; self.state = @"";
} }
} }
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1; return 1;
......
...@@ -28,7 +28,7 @@ typedef enum : NSUInteger { ...@@ -28,7 +28,7 @@ typedef enum : NSUInteger {
} BtnTag; } BtnTag;
@interface SurveyViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate> @interface SurveyViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -226,10 +226,24 @@ typedef enum : NSUInteger { ...@@ -226,10 +226,24 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
_maskView.hidden = YES; _maskView.hidden = YES;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
//检测排序的颜色 //检测排序的颜色
- (void)checkSortBtnColor{ - (void)checkSortBtnColor{
if (self.orderDirection.length > 0) { if (self.orderDirection.length > 0) {
...@@ -393,6 +407,15 @@ typedef enum : NSUInteger { ...@@ -393,6 +407,15 @@ typedef enum : NSUInteger {
self.state = @""; self.state = @"";
} }
} }
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1; return 1;
......
...@@ -29,7 +29,7 @@ typedef enum : NSUInteger { ...@@ -29,7 +29,7 @@ typedef enum : NSUInteger {
} BtnTag; } BtnTag;
@interface TransferViewController ()<UITableViewDataSource,UITableViewDelegate,TransferBoltViewDelegate,SortMaskViewDelegate> @interface TransferViewController ()<UITableViewDataSource,UITableViewDelegate,TransferBoltViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -216,9 +216,23 @@ typedef enum : NSUInteger { ...@@ -216,9 +216,23 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = YES; _maskView.hidden = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
#pragma mark -按钮事件 #pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{ - (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
...@@ -263,7 +277,7 @@ typedef enum : NSUInteger { ...@@ -263,7 +277,7 @@ typedef enum : NSUInteger {
_boltView.backgroundColor = XXFBgColor; _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];
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame; CGRect sortFrame = _boltView.frame;
...@@ -393,7 +407,15 @@ typedef enum : NSUInteger { ...@@ -393,7 +407,15 @@ typedef enum : NSUInteger {
self.productLike = @""; self.productLike = @"";
} }
} }
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1; return 1;
......
...@@ -56,6 +56,10 @@ ...@@ -56,6 +56,10 @@
_currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_ABORTED]) { }else if ([self.state isEqualToString:TRANSPORT_STATE_ABORTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_PROCESS]) {
_currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_PROCESSFAIL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0];
} }
self.userFiled.hidden = YES; self.userFiled.hidden = YES;
if(self.userNumber.length > 0){ if(self.userNumber.length > 0){
...@@ -76,7 +80,7 @@ ...@@ -76,7 +80,7 @@
{ {
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)]; _leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)];
[self addSubview:_leftView]; [self addSubview:_leftView];
NSArray *arr = @[@"按状态",@"创建人代码",@"调研单号",@"商品单号"]; NSArray *arr = @[@"按状态",@"创建人代码",@"调研单号",@"商品"];
for (NSInteger i = 0; i<arr.count; i++) { for (NSInteger i = 0; i<arr.count; i++) {
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);
...@@ -103,7 +107,7 @@ ...@@ -103,7 +107,7 @@
- (void)createRightView{ - (void)createRightView{
NSArray *arr = @[@"输入类似创建人代码",@"输入类似调研单号",@"输入类似商品单号"]; NSArray *arr = @[@"输入类似创建人代码",@"输入类似调研单号",@"输入类似商品"];
UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)]; UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
contentView.backgroundColor = [UIColor whiteColor]; contentView.backgroundColor = [UIColor whiteColor];
[self addSubview:contentView]; [self addSubview:contentView];
...@@ -255,6 +259,10 @@ ...@@ -255,6 +259,10 @@
stateStr = TRANSFER_STATE_RECEIVED; stateStr = TRANSFER_STATE_RECEIVED;
}else if(indexPath.row == 3){ }else if(indexPath.row == 3){
stateStr = TRANSFER_STATE_ABORTED; stateStr = TRANSFER_STATE_ABORTED;
}else if(indexPath.row == 4){
stateStr = TRANSFER_STATE_PROCESS;
}else if(indexPath.row == 5){
stateStr = TRANSFER_STATE_PROCESSFAIL;
} }
[self.delegate getBoltValueSelectRow:stateStr]; [self.delegate getBoltValueSelectRow:stateStr];
} }
......
...@@ -30,7 +30,7 @@ typedef enum : NSUInteger { ...@@ -30,7 +30,7 @@ typedef enum : NSUInteger {
} BtnTag; } BtnTag;
@interface TransportViewController ()<UITableViewDataSource,UITableViewDelegate,TransportBoltViewDelegate,SortMaskViewDelegate> @interface TransportViewController ()<UITableViewDataSource,UITableViewDelegate,TransportBoltViewDelegate,SortMaskViewDelegate,UIGestureRecognizerDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
...@@ -219,9 +219,23 @@ typedef enum : NSUInteger { ...@@ -219,9 +219,23 @@ typedef enum : NSUInteger {
_maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)]; _maskView = [[UIView alloc]initWithFrame:CGRectMake(0, TopMargin, ScreenSize.width, ScreenSize.height - 64- TopMargin)];
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
_maskView.hidden = YES; _maskView.hidden = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hiddenMaskView)];
[_maskView addGestureRecognizer:tap];
tap.delegate = self;
[self.view addSubview:_maskView]; [self.view addSubview:_maskView];
} }
#pragma mark - 手势代理方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
// 输出点击的view的类名
NSLog(@"%@", NSStringFromClass([touch.view class]));
// 若为UITableViewCellContentView(即点击了tableViewCell),则不截获Touch事件
if ([NSStringFromClass([touch.view class]) isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}
return YES;
}
#pragma mark -按钮事件 #pragma mark -按钮事件
- (void)sortClick:(UIButton *)btn{ - (void)sortClick:(UIButton *)btn{
_maskView.backgroundColor = RGBA(0, 0, 0, 0.5); _maskView.backgroundColor = RGBA(0, 0, 0, 0.5);
...@@ -266,7 +280,7 @@ typedef enum : NSUInteger { ...@@ -266,7 +280,7 @@ typedef enum : NSUInteger {
_boltView.backgroundColor = XXFBgColor; _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];
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
CGRect sortFrame = _boltView.frame; CGRect sortFrame = _boltView.frame;
...@@ -395,7 +409,15 @@ typedef enum : NSUInteger { ...@@ -395,7 +409,15 @@ typedef enum : NSUInteger {
self.productLike = @""; self.productLike = @"";
} }
} }
#pragma mark - 隐藏maskView
- (void)hiddenMaskView{
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1; return 1;
......
...@@ -55,6 +55,10 @@ ...@@ -55,6 +55,10 @@
_currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:2 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_ABORTED]) { }else if ([self.state isEqualToString:TRANSPORT_STATE_ABORTED]) {
_currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0]; _currentIndexPath = [NSIndexPath indexPathForRow:3 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_PROCESS]) {
_currentIndexPath = [NSIndexPath indexPathForRow:4 inSection:0];
}else if ([self.state isEqualToString:TRANSPORT_STATE_PROCESSFAIL]) {
_currentIndexPath = [NSIndexPath indexPathForRow:5 inSection:0];
} }
self.userFiled.hidden = YES; self.userFiled.hidden = YES;
if(self.userNumber.length > 0){ if(self.userNumber.length > 0){
...@@ -75,7 +79,7 @@ ...@@ -75,7 +79,7 @@
{ {
_leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)]; _leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, LeftMargin,self.frame.size.height- BottomHeight)];
[self addSubview:_leftView]; [self addSubview:_leftView];
NSArray *arr = @[@"按状态",@"创建人代码",@"调研单号",@"商品单号"]; NSArray *arr = @[@"按状态",@"创建人代码",@"调研单号",@"商品"];
for (NSInteger i = 0; i<arr.count; i++) { for (NSInteger i = 0; i<arr.count; i++) {
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);
...@@ -102,7 +106,7 @@ ...@@ -102,7 +106,7 @@
- (void)createRightView{ - (void)createRightView{
NSArray *arr = @[@"输入类似创建人代码",@"输入类似调研单号",@"输入类似商品单号"]; NSArray *arr = @[@"输入类似创建人代码",@"输入类似调研单号",@"输入类似商品"];
UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)]; UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(LeftMargin, 0, ScreenSize.width - LeftMargin, self.frame.size.height - BottomHeight)];
contentView.backgroundColor = [UIColor whiteColor]; contentView.backgroundColor = [UIColor whiteColor];
[self addSubview:contentView]; [self addSubview:contentView];
...@@ -251,7 +255,12 @@ ...@@ -251,7 +255,12 @@
stateStr = TRANSPORT_STATE_RECEIVED; stateStr = TRANSPORT_STATE_RECEIVED;
}else if(indexPath.row == 3){ }else if(indexPath.row == 3){
stateStr = TRANSPORT_STATE_ABORTED; stateStr = TRANSPORT_STATE_ABORTED;
}else if(indexPath.row == 4){
stateStr = TRANSPORT_STATE_PROCESS;
}else if(indexPath.row == 5){
stateStr = TRANSPORT_STATE_PROCESSFAIL;
} }
[self.delegate getBoltValueSelectRow:stateStr]; [self.delegate getBoltValueSelectRow:stateStr];
} }
......
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