Commit ff0b3ea6 authored by 陈俊俊's avatar 陈俊俊

选择采购单刷新

parent 372eed79
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
#define ChooseWarehouseUpdateDate @"chooseWarehouseUpdateDate" #define ChooseWarehouseUpdateDate @"chooseWarehouseUpdateDate"
#define PurchaseUpdateDate @"purchaseUpdateDate" #define PurchaseUpdateDate @"purchaseUpdateDate"
#define TransportUpdateDate @"TransportUpdateDate" #define TransportUpdateDate @"TransportUpdateDate"
#define PurchaseNoticeUpdateDate @"purchaseNoticeUpdateDate"
//行情调研状态 //行情调研状态
......
...@@ -81,43 +81,25 @@ typedef enum : NSUInteger { ...@@ -81,43 +81,25 @@ typedef enum : NSUInteger {
NSMutableArray *orderArr =[NSMutableArray array]; NSMutableArray *orderArr =[NSMutableArray array];
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) { if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new]; QueryOrder *order = [QueryOrder new];
order.field = @"lastModified"; order.field = @"created";
order.direction = self.orderDirection; order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]]; [orderArr addObject:[order dictForCommit]];
} }
id billObject = [NSNull null]; id billObject = [NSNull null];
if (self.billLike.length > 0) { if (self.billLike.length > 0) {
billObject = self.billLike; billObject = self.billLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"billNumber";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
} }
id stateObject = [NSNull null]; id stateObject = [NSNull null];
if (self.state.length > 0 && ![self.state isEqualToString:@"none"]) { if (self.state.length > 0 && ![self.state isEqualToString:@"none"]) {
stateObject = self.state; stateObject = self.state;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"state";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
} }
id titleObject = [NSNull null]; id titleObject = [NSNull null];
if (self.titleLike.length > 0) { if (self.titleLike.length > 0) {
titleObject = self.titleLike; titleObject = self.titleLike;
if (self.orderDirection.length > 0 && ![self.orderDirection isEqualToString:@"none"]) {
QueryOrder *order = [QueryOrder new];
order.field = @"titleLike";
order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]];
}
} }
if (orderArr.count == 0) { if (orderArr.count == 0) {
QueryOrder *order = [QueryOrder new]; QueryOrder *order = [QueryOrder new];
order.field = @"billNumber"; order.field = @"created";
order.direction = @"desc"; order.direction = @"desc";
[orderArr addObject:[order dictForCommit]]; [orderArr addObject:[order dictForCommit]];
...@@ -176,7 +158,7 @@ typedef enum : NSUInteger { ...@@ -176,7 +158,7 @@ typedef enum : NSUInteger {
_currentPage = 0; _currentPage = 0;
[self getData]; [self getData];
}]; }];
self.tableView.header.lastUpdatedTimeKey = PurchaseUpdateDate; self.tableView.header.lastUpdatedTimeKey = PurchaseNoticeUpdateDate;
self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (_isLoadMore) { if (_isLoadMore) {
......
...@@ -34,22 +34,6 @@ ...@@ -34,22 +34,6 @@
if (!self.transportProductArr) { if (!self.transportProductArr) {
self.transportProductArr = [NSMutableArray array]; self.transportProductArr = [NSMutableArray array];
} }
// TransportPdtDetail *pdtDetail = [TransportPdtDetail new];
//
// pdtDetail.productName = @"dd";
// pdtDetail.productUuid = @"402880e64e287fe2014e28895b8a0032";
// pdtDetail.productCode = @"农夫山泉";
// pdtDetail.qpc = [NSNumber numberWithFloat:22];
// pdtDetail.unit = @"筐";
// pdtDetail.qty = [NSNumber numberWithFloat:23];
// pdtDetail.price = [NSNumber numberWithFloat:333];
// pdtDetail.baseQty = [NSNumber numberWithFloat:333];
// pdtDetail.total = [NSNumber numberWithFloat:80];
// pdtDetail.note = @"hshshshsh";
// pdtDetail.qpcStr = @"fdsfdsfdsa";
//
//
// [self.transportProductArr addObject:pdtDetail];
} }
- (void)setViewFrame:(CGRect)viewFrame{ - (void)setViewFrame:(CGRect)viewFrame{
......
...@@ -10,9 +10,15 @@ ...@@ -10,9 +10,15 @@
#import "TransportPurchaseCell.h" #import "TransportPurchaseCell.h"
#import "QueryOrder.h" #import "QueryOrder.h"
#import "TransportPdtDetail.h" #import "TransportPdtDetail.h"
#import "MJRefresh.h"
#define TopMargin 50 #define TopMargin 50
#define TableHeight 50 #define TableHeight 50
@interface TransportPurchaseViewController ()<UITextFieldDelegate,UITableViewDataSource,UITableViewDelegate> @interface TransportPurchaseViewController ()<UITextFieldDelegate,UITableViewDataSource,UITableViewDelegate>
{
BOOL _isRefresh;
BOOL _isLoadMore;
NSInteger _currentPage;
}
@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;
...@@ -24,12 +30,11 @@ ...@@ -24,12 +30,11 @@
- (instancetype)init{ - (instancetype)init{
self = [super init]; self = [super init];
if (self) { if (self) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getSelectPurchaseProduct:) name:KNOTIFICATION_getSelectPurchaseProduct object:nil];
} }
return self; return self;
} }
- (void)dealloc{ - (void)dealloc{
[[NSNotificationCenter defaultCenter] removeObserver:self];
} }
- (void)viewDidLoad { - (void)viewDidLoad {
...@@ -37,6 +42,7 @@ ...@@ -37,6 +42,7 @@
self.title = @"选择采购单"; self.title = @"选择采购单";
[self initData]; [self initData];
[self bulidLayout]; [self bulidLayout];
[self createRefresh];
[self getData]; [self getData];
} }
- (void)initData{ - (void)initData{
...@@ -59,7 +65,6 @@ ...@@ -59,7 +65,6 @@
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSMutableArray *orderArr =[NSMutableArray array]; NSMutableArray *orderArr =[NSMutableArray array];
if (orderArr.count == 0) { if (orderArr.count == 0) {
QueryOrder *order = [QueryOrder new]; QueryOrder *order = [QueryOrder new];
order.field = @"billNumber"; order.field = @"billNumber";
...@@ -71,7 +76,8 @@ ...@@ -71,7 +76,8 @@
@"state":@"submitted", @"state":@"submitted",
@"queryOrders":orderArr, @"queryOrders":orderArr,
@"userUuid":userUtil.userId, @"userUuid":userUtil.userId,
@"pageNumber":@(0), @"fetchParts":@"products",
@"pageNumber":@(_currentPage),
@"pageSize":@(20)}; @"pageSize":@(20)};
[[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail]; [[ICRHTTPController sharedController] queryPurchaseWithData:dict success:succ failure:fail];
} }
...@@ -80,13 +86,29 @@ ...@@ -80,13 +86,29 @@
NSInteger success = [data[@"success"] integerValue]; NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ; NSString *message = data[@"message"] ;
if (success == 1) { if (success == 1) {
if (_currentPage == 0) {
if (self.dataArr.count > 0) {
[self.dataArr removeAllObjects];
}
}
NSArray *recodesArr = data[ @"data" ][ @"records" ]; NSArray *recodesArr = data[ @"data" ][ @"records" ];
for (NSDictionary *purchaseBillDict in recodesArr) { for (NSDictionary *purchaseBillDict in recodesArr) {
PurchaseBill *purchaseBill = [[PurchaseBill alloc]init]; PurchaseBill *purchaseBill = [[PurchaseBill alloc]init];
[purchaseBill setValuesForKeysWithDictionary:purchaseBillDict]; [purchaseBill setValuesForKeysWithDictionary:purchaseBillDict];
purchaseBill.products = [self coverTransportDetProduct:purchaseBillDict[@"products"]];
[self.dataArr addObject:purchaseBill]; [self.dataArr addObject:purchaseBill];
} }
NSDictionary *pageDict = data[ @"data" ][ @"paging" ];
NSInteger pageCount = [pageDict[@"pageCount"] integerValue];
[self.tableView reloadData]; [self.tableView reloadData];
[self endRefreshing];
if (pageCount <= _currentPage) {
[self.tableView.footer noticeNoMoreData];
}
if (_currentPage == 0 && self.dataArr.count > 0) {
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
}else{ }else{
[IBTLoadingView showTips:message]; [IBTLoadingView showTips:message];
} }
...@@ -96,6 +118,22 @@ ...@@ -96,6 +118,22 @@
[IBTLoadingView showTips:@" 无记录 "]; [IBTLoadingView showTips:@" 无记录 "];
} }
} }
- (NSMutableArray *)coverTransportDetProduct:(NSArray *)arr{
NSMutableArray *transArr = [NSMutableArray array];
for (NSDictionary *arrDict in arr) {
TransportPdtDetail *detail = [TransportPdtDetail new];
[detail setValuesForKeysWithDictionary:arrDict];
detail.productUuid = arrDict[@"product_uuid"];
detail.productCode = arrDict[@"product_code"];
detail.productName = arrDict[@"product_name"];
detail.price = arrDict[@"basePrice"];
detail.note = arrDict[@"remark"];
[transArr addObject:detail];
}
return transArr;
}
#pragma mark - 布局 #pragma mark - 布局
- (void)bulidLayout - (void)bulidLayout
{ {
...@@ -130,7 +168,33 @@ ...@@ -130,7 +168,33 @@
UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)]; UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"确定" style:UIBarButtonItemStylePlain target:self action:@selector(sureClick)];
self.navigationItem.rightBarButtonItem = rightItem; self.navigationItem.rightBarButtonItem = rightItem;
} }
- (void)createRefresh{
self.tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
if (_isRefresh) {
return ;
}
_isRefresh = YES;
_currentPage = 0;
[self getData];
}];
self.tableView.header.lastUpdatedTimeKey = TransportUpdateDate;
self.tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (_isLoadMore) {
return ;
}
_isLoadMore = YES;
_currentPage ++;
[self getData];
} ];
}
#pragma mark - 结束刷新
- (void)endRefreshing{
_isLoadMore = NO;
_isRefresh = NO;
[self.tableView.header endRefreshing];
[self.tableView.footer endRefreshing];
}
- (void)deleteTextFieldStr{ - (void)deleteTextFieldStr{
self.selectTextFiled.text = @""; self.selectTextFiled.text = @"";
} }
...@@ -146,55 +210,25 @@ ...@@ -146,55 +210,25 @@
TransportPurchaseCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; TransportPurchaseCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
if (cell == nil) { if (cell == nil) {
cell = [[TransportPurchaseCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID]; cell = [[TransportPurchaseCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
} }
if(self.dataArr.count > 0){ if(self.dataArr.count > 0){
PurchaseBill *bill = _dataArr[indexPath.row]; PurchaseBill *bill = _dataArr[indexPath.row];
NSMutableArray *arr = [NSMutableArray array];
TransportPdtDetail *billProduct = [TransportPdtDetail new];
billProduct.productName = @"dd";
billProduct.productUuid = @"402880e64e287fe2014e28895b8a0032";
billProduct.productCode = @"农夫山泉";
billProduct.qpc = [NSNumber numberWithFloat:22];
billProduct.unit = @"筐";
billProduct.qty = [NSNumber numberWithFloat:23];
billProduct.price = [NSNumber numberWithFloat:333];
billProduct.baseQty = [NSNumber numberWithFloat:333];
billProduct.total = [NSNumber numberWithFloat:80];
billProduct.note = @"hshshshsh";
billProduct.qpcStr = @"fdsfdsfdsa";
billProduct.purchasebillnumber = bill.billNumber;
[arr addObject:billProduct];
[arr addObject:billProduct];
bill.products = arr;
[cell setPurchaseBill:bill selectArr:self.indexArr]; [cell setPurchaseBill:bill selectArr:self.indexArr];
} }
return cell; return cell;
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 210; return 180;
} }
#pragma mark - 按钮确定 #pragma mark - 按钮确定
- (void)sureClick{ - (void)sureClick{
[self PopViewControllerAnimated:YES]; [self PopViewControllerAnimated:YES];
if (self.indexArr.count > 0) { if (self.indexArr.count > 0) {
NSLog(@"%@",self.indexArr);
self.getProchaseProduct(self.indexArr); self.getProchaseProduct(self.indexArr);
} }
} }
#pragma mark - 得到通知的方法
- (void)getSelectPurchaseProduct:(NSNotification *)fination{
NSDictionary *dict = fination.userInfo;
TransportPdtDetail *billProduct = dict[@"selectArr"];
NSString *state = dict[@"state"];
if ([state isEqualToString:@"add"]) {
[self.indexArr addObject:billProduct];
}else{
[self.indexArr removeObject:billProduct];
}
}
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "PurchaseBill.h" #import "PurchaseBill.h"
@interface TransportPurchaseCell : UITableViewCell<UITableViewDataSource,UITableViewDelegate> @interface TransportPurchaseCell : UITableViewCell<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UILabel *titleLabel; @property (nonatomic,strong)UILabel *titleLabel;
@property (nonatomic,strong)UILabel *lineLabel; @property (nonatomic,strong)UILabel *lineLabel;
...@@ -23,4 +24,5 @@ ...@@ -23,4 +24,5 @@
- (void)setPurchaseBill:(PurchaseBill *)bill selectArr:(NSMutableArray *)selectArr; - (void)setPurchaseBill:(PurchaseBill *)bill selectArr:(NSMutableArray *)selectArr;
@end @end
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
{ {
self.contentView.backgroundColor = XXFBgColor; self.contentView.backgroundColor = XXFBgColor;
UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 200)]; UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenSize.width, 170)];
bgView.backgroundColor = [UIColor whiteColor]; bgView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:bgView]; [self.contentView addSubview:bgView];
...@@ -38,19 +38,15 @@ ...@@ -38,19 +38,15 @@
self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, 0, ScreenSize.width, 44))]; self.titleLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, 0, ScreenSize.width, 44))];
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.text = @"苹果桃子";
self.titleLabel.font = GXF_SEVENTEENTH_SIZE; self.titleLabel.font = GXF_SEVENTEENTH_SIZE;
self.secondLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0,44-1, ScreenSize.width, 1))];; self.secondLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0,44-1, ScreenSize.width, 1))];;
self.secondLabel.backgroundColor = GXF_LINE_COLOR; self.secondLabel.backgroundColor = GXF_LINE_COLOR;
self.threeLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0,200-1, ScreenSize.width, 1))];;
self.threeLabel.backgroundColor = GXF_LINE_COLOR;
[bgView addSubview:self.titleLabel]; [bgView addSubview:self.titleLabel];
[bgView addSubview:self.lineLabel]; [bgView addSubview:self.lineLabel];
[bgView addSubview:self.secondLabel]; [bgView addSubview:self.secondLabel];
[bgView addSubview:self.threeLabel];
} }
...@@ -59,13 +55,7 @@ ...@@ -59,13 +55,7 @@
self.secondArr = [NSMutableArray array]; self.secondArr = [NSMutableArray array];
self.selectArr = selectArr; self.selectArr = selectArr;
[self.secondArr addObjectsFromArray:bill.products]; [self.secondArr addObjectsFromArray:bill.products];
// for (NSDictionary *billDict in bill.products) { self.secondTable = [[UITableView alloc]initWithFrame:(CGRectMake(0, 44,ScreenSize.width, 170-45)) style:(UITableViewStylePlain)];
// PurchaseBillProduct *billProcuct = [PurchaseBillProduct new];
// [billProcuct setValuesForKeysWithDictionary:billDict];
// [self.secondArr addObject:billProcuct];
// }
self.secondTable = [[UITableView alloc]initWithFrame:(CGRectMake(0, 44,ScreenSize.width, 200-45)) style:(UITableViewStylePlain)];
self.secondTable.delegate = self; self.secondTable.delegate = self;
self.secondTable.dataSource = self; self.secondTable.dataSource = self;
...@@ -99,72 +89,57 @@ ...@@ -99,72 +89,57 @@
} }
TransportPdtDetail * billProduct = self.secondArr[indexPath.row]; TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
[cell setPdtDetail:billProduct row:indexPath.row]; [cell setPdtDetail:billProduct row:indexPath.row];
if ([self isHaveIndexPath:billProduct]) {
if ([self isHaveIndexPath:indexPath]) {
cell.editBtn.hidden = NO; cell.editBtn.hidden = NO;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"]; // cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// CGRect Linefrmame = cell.lineLabel.frame; // cell.lineLabel.y = ShowHeight + TableHeight -1;
// Linefrmame.origin.y = ShowHeight + TableHeight -1; // cell.showView.height = ShowHeight;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = ShowHeight;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = XXFBgColor; // cell.backgroundColor = XXFBgColor;
}else{ }else{
cell.editBtn.hidden = YES; cell.editBtn.hidden = YES;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"]; // cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// CGRect Linefrmame = cell.lineLabel.frame; // cell.lineLabel.y = TableHeight -1;
// Linefrmame.origin.y = TableHeight-1; // cell.showView.height = 0;
// cell.lineLabel.frame = Linefrmame;
// CGRect showfrmame = cell.showView.frame;
// showfrmame.size.height = 0;
// cell.showView.frame = showfrmame;
// cell.backgroundColor = [UIColor whiteColor]; // cell.backgroundColor = [UIColor whiteColor];
} }
//
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell; return cell;
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if ([self isHaveIndexPath:indexPath]) { // TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
return ShowHeight + TableHeight; // if ([self isHaveIndexPath:billProduct]) {
} // return ShowHeight + TableHeight;
// }
return TableHeight; return TableHeight;
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
// TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath]; TransportPurductCell *cell = (TransportPurductCell *)[tableView cellForRowAtIndexPath:indexPath];
// TransportPdtDetail * billProduct = self.secondArr[indexPath.row]; TransportPdtDetail * billProduct = self.secondArr[indexPath.row];
// CGRect Linefrmame = cell.lineLabel.frame; if (![self isHaveIndexPath:billProduct]) {
// CGRect showfrmame = cell.showView.frame; cell.editBtn.hidden = NO;
// if (![self isHaveIndexPath:indexPath]) {
// cell.editBtn.hidden = NO;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"]; // cell.smallImageView.image = [UIImage imageNamed:@"arrowdown"];
// Linefrmame.origin.y = ShowHeight + TableHeight - 1; // cell.lineLabel.y = ShowHeight + TableHeight -1;
// showfrmame.size.height = ShowHeight; // cell.showView.height = ShowHeight;
// cell.backgroundColor = [UIColor whiteColor]; // cell.backgroundColor = [UIColor whiteColor];
// [self.selectArr addObject:billProduct]; [self.selectArr addObject:billProduct];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}]; // [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"add"}];
// }else{ }else{
// [self.selectArr removeObject:billProduct]; [self.selectArr removeObject:billProduct];
// cell.editBtn.hidden = YES; cell.editBtn.hidden = YES;
// cell.smallImageView.image = [UIImage imageNamed:@"arrowright"]; // cell.smallImageView.image = [UIImage imageNamed:@"arrowright"];
// Linefrmame.origin.y = TableHeight -1; // cell.lineLabel.y = TableHeight -1;
// showfrmame.size.height = 0; // cell.showView.height = 0;
// cell.backgroundColor = [UIColor whiteColor]; // cell.backgroundColor = [UIColor whiteColor];
// [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"remove"}]; // [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_getSelectPurchaseProduct object:nil userInfo:@{@"selectArr":billProduct,@"state":@"remove"}];
// } }
// [self.secondTable reloadData];
// cell.lineLabel.frame = Linefrmame;
// cell.showView.frame = showfrmame;
// [self.secondTable reloadData];
} }
- (BOOL)isHaveIndexPath:(NSIndexPath *)indexPath{ - (BOOL)isHaveIndexPath:(TransportPdtDetail *)billProduct{
for (NSIndexPath *path in self.selectArr) { for (TransportPdtDetail *detail in self.selectArr) {
if (path.row == indexPath.row) { if (detail.uuid == billProduct.uuid) {
return YES; return YES;
} }
} }
......
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