Commit 3195eeaa authored by 陈俊俊's avatar 陈俊俊

选择

parent bdc0ca20
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
{ {
PurchaseViewController *tVC = [[PurchaseViewController alloc] init]; PurchaseViewController *tVC = [[PurchaseViewController alloc] init];
tVC.title = @"审核采购单"; tVC.title = @"审核采购单";
tVC.assessorState = PURCHASE_STATE_SUBMITTED; tVC.assessorVendor = [ICRUserUtil sharedInstance].userId;
[self PushViewController:tVC animated:YES]; [self PushViewController:tVC animated:YES];
} }
break; break;
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
[cell setTitleStr:[NSString stringWithFormat:@"上次更新时间:%@",dateStr]]; [cell setTitleStr:[NSString stringWithFormat:@"上次更新时间:%@",dateStr]];
}else{ }else{
GXFProductUnit *product = self.dataArr[indexPath.row]; GXFProductUnit *product = self.dataArr[indexPath.row];
cell.titleLabel.textColor = GXF_LEFTSIX_COLOR;
NSString *proStr = [NSString stringWithFormat:@"%@",product.name]; NSString *proStr = [NSString stringWithFormat:@"%@",product.name];
[cell setTitleStr:proStr]; [cell setTitleStr:proStr];
} }
...@@ -98,7 +97,7 @@ ...@@ -98,7 +97,7 @@
if (!self.isMoreChose) { if (!self.isMoreChose) {
for (NSInteger i = 1;i< self.dataArr.count; i++) { for (NSInteger i = 1;i< self.dataArr.count; i++) {
GXFProductUnit *type = self.dataArr[i]; GXFProductUnit *type = self.dataArr[i];
if ([type.uuid isEqualToString:self.selectStr]) { if ([type.name isEqualToString:self.selectStr]) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
self.currentIndexPath = indexPath; self.currentIndexPath = indexPath;
break; break;
......
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
@interface PurchaseViewController : ICRBaseViewController @interface PurchaseViewController : ICRBaseViewController
@property (nonatomic,strong)NSString *assessorState;//从审核采购单跳转过来的 @property (nonatomic,strong)NSString *assessorVendor;//从审核采购单跳转过来的
@end @end
...@@ -65,8 +65,8 @@ typedef enum : NSUInteger { ...@@ -65,8 +65,8 @@ typedef enum : NSUInteger {
} }
- (void)initData{ - (void)initData{
self.dataArr = [NSMutableArray array]; self.dataArr = [NSMutableArray array];
if (self.assessorState.length > 0) { if (self.assessorVendor.length > 0) {
self.state = self.assessorState; self.vendorLike = self.assessorVendor;
} }
} }
- (void)getData{ - (void)getData{
......
...@@ -181,8 +181,8 @@ ...@@ -181,8 +181,8 @@
[attributeStr1 appendAttributedString:[IBTCommon setTextViewFontOfString:str paragraphStyle:0 fontSize:13 color:[UIColor redColor]]]; [attributeStr1 appendAttributedString:[IBTCommon setTextViewFontOfString:str paragraphStyle:0 fontSize:13 color:[UIColor redColor]]];
self.showShippedFlag.attributedText = attributeStr1; self.showShippedFlag.attributedText = attributeStr1;
self.showShippedBaseQty.text = [NSString stringWithFormat:@"发运包装数量:%@",[billProduct.shippedBaseQty stringValue]]; self.showShippedBaseQty.text = [NSString stringWithFormat:@"发运包装数量:%@",billProduct.shippedBaseQty ? [billProduct.shippedBaseQty stringValue]:@"0"];
self.showShippedQty.text = [NSString stringWithFormat:@"发运基础数量:%@",[billProduct.shippedQty stringValue]]; self.showShippedQty.text = [NSString stringWithFormat:@"发运基础数量:%@",billProduct.shippedQty ? [billProduct.shippedQty stringValue]:@"0"];
[self.showView addSubview:self.showShippedFlag]; [self.showView addSubview:self.showShippedFlag];
[self.showView addSubview:self.showShippedQty]; [self.showView addSubview:self.showShippedQty];
[self.showView addSubview:self.showShippedBaseQty]; [self.showView addSubview:self.showShippedBaseQty];
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#import "HeaderCell.h" #import "HeaderCell.h"
#import "FooterCell.h" #import "FooterCell.h"
#import "CostCell.h" #import "CostCell.h"
@interface CostViewController ()<UITableViewDataSource,UITableViewDelegate,FooterCellDelegate> @interface CostViewController ()<UITableViewDataSource,UITableViewDelegate,FooterCellDelegate,HeaderCellDelegate>
{ {
CGRect _tableFrame; CGRect _tableFrame;
} }
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
NSArray *arr = @[@"费用",@"应付金额",@"已付金额",@"尾款"]; NSArray *arr = @[@"费用",@"应付金额",@"已付金额",@"尾款"];
HeaderCell *headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr]; HeaderCell *headCell = [[HeaderCell alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 38) withArr:arr withHiddenEdit:self.isHiddenEdit];
headCell.delegate = self;
[self.view addSubview:headCell]; [self.view addSubview:headCell];
self.tableView.tableHeaderView = headCell; self.tableView.tableHeaderView = headCell;
if (!self.isHiddenEdit) { if (!self.isHiddenEdit) {
...@@ -48,7 +49,9 @@ ...@@ -48,7 +49,9 @@
self.tableView.tableFooterView = footCell; self.tableView.tableFooterView = footCell;
} }
} }
- (void)addClickList{
[self addClick];
}
- (void)addClick{ - (void)addClick{
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_AddTransportCost object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_AddTransportCost object:nil];
} }
......
...@@ -18,11 +18,13 @@ ...@@ -18,11 +18,13 @@
BOOL _isRefresh; BOOL _isRefresh;
BOOL _isLoadMore; BOOL _isLoadMore;
NSInteger _currentPage; NSInteger _currentPage;
id billNumberObject;
} }
@property (nonatomic,strong)NSMutableArray *indexArr; @property (nonatomic,strong)NSMutableArray *indexArr;
@property (nonatomic,strong)NSMutableArray *dataArr; @property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)UITextField *selectTextFiled; @property (nonatomic,strong)UITextField *selectTextFiled;
@property (nonatomic,strong)NSString *contentStr;
@end @end
@implementation TransportPurchaseViewController @implementation TransportPurchaseViewController
...@@ -49,6 +51,8 @@ ...@@ -49,6 +51,8 @@
self.dataArr = [NSMutableArray array]; self.dataArr = [NSMutableArray array];
self.indexArr = [NSMutableArray array]; self.indexArr = [NSMutableArray array];
} }
- (void)getData{ - (void)getData{
[ICRUserUtil sharedInstance].needFresh = NO; [ICRUserUtil sharedInstance].needFresh = NO;
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
...@@ -70,10 +74,14 @@ ...@@ -70,10 +74,14 @@
order.field = @"billNumber"; order.field = @"billNumber";
order.direction = @"desc"; order.direction = @"desc";
[orderArr addObject:[order dictForCommit]]; [orderArr addObject:[order dictForCommit]];
}
billNumberObject = [NSNull null];
if (self.contentStr.length > 0) {
billNumberObject = self.contentStr;
} }
NSDictionary *dict = @{ NSDictionary *dict = @{
@"state":@"submitted", @"state":@"shipping",
@"billNumberLike":billNumberObject,
@"queryOrders":orderArr, @"queryOrders":orderArr,
@"userUuid":userUtil.userId, @"userUuid":userUtil.userId,
@"fetchParts":@"products", @"fetchParts":@"products",
...@@ -134,18 +142,43 @@ ...@@ -134,18 +142,43 @@
} }
return transArr; return transArr;
} }
- (void)checkWithBillNumber{
if (self.indexArr.count > 0) {
[self.indexArr removeAllObjects];
}
[self.selectTextFiled resignFirstResponder];
if (self.selectTextFiled.text.length > 0) {
self.contentStr = self.selectTextFiled.text;
}else{
self.contentStr = @"";
}
[self getData];
}
#pragma mark - 布局 #pragma mark - 布局
- (void)bulidLayout - (void)bulidLayout
{ {
self.selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 40,TopMargin -10)]; self.selectTextFiled = [[UITextField alloc] initWithFrame:CGRectMake(20,5,ScreenSize.width - 100,TopMargin -10)];
self.selectTextFiled.textAlignment = NSTextAlignmentLeft; self.selectTextFiled.textAlignment = NSTextAlignmentLeft;
self.selectTextFiled.background = [UIImage imageNamed:@"textFiled"]; self.selectTextFiled.background = [UIImage imageNamed:@"textFiled"];
self.selectTextFiled.delegate = self; self.selectTextFiled.delegate = self;
self.selectTextFiled.placeholder = @"输入类似采购单号";
self.selectTextFiled.font = GXF_FIFTEENTEN_SIZE; self.selectTextFiled.font = GXF_FIFTEENTEN_SIZE;
[self.view addSubview:self.selectTextFiled]; [self.view addSubview:self.selectTextFiled];
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(self.selectTextFiled.right + 5, 10, 60, TopMargin - 20);
[btn setTitle:@"开始查询" forState:UIControlStateNormal];
btn.titleLabel.font = FontSize(13);
btn.layer.cornerRadius = 5;
btn.layer.masksToBounds = YES;
btn.backgroundColor = GXF_NAVIGAYION_COLOR;
[btn addTarget:self action:@selector(checkWithBillNumber) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)]; UIImageView *leftView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 35, 40)];
leftView.image = [UIImage imageNamed:@"search"]; leftView.image = [UIImage imageNamed:@"search"];
self.selectTextFiled.leftView = leftView; self.selectTextFiled.leftView = leftView;
......
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