Commit 97704d9f authored by 陈俊俊's avatar 陈俊俊

采购通知筛选

parent 21e2a3fd
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
72F9D4821BA7EC9600795A00 /* NoticeProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4811BA7EC9600795A00 /* NoticeProductViewController.m */; }; 72F9D4821BA7EC9600795A00 /* NoticeProductViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4811BA7EC9600795A00 /* NoticeProductViewController.m */; };
72F9D4851BA7FFC400795A00 /* PurchaseNotice.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4841BA7FFC400795A00 /* PurchaseNotice.m */; }; 72F9D4851BA7FFC400795A00 /* PurchaseNotice.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4841BA7FFC400795A00 /* PurchaseNotice.m */; };
72F9D4881BA8065500795A00 /* PurchaseNoticeListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */; }; 72F9D4881BA8065500795A00 /* PurchaseNoticeListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */; };
72F9D48B1BA8582100795A00 /* NoticeBoltView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72F9D48A1BA8582100795A00 /* NoticeBoltView.m */; };
871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86D33EC280C440156ED1B976 /* libPods.a */; }; 871F9F047CDDAC523E4358DC /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 86D33EC280C440156ED1B976 /* libPods.a */; };
C10214CD1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; }; C10214CD1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
C10214CE1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; }; C10214CE1AD8FE200024637E /* ICRStoreDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C10214CC1AD8FE200024637E /* ICRStoreDetailViewController.m */; };
...@@ -697,6 +698,8 @@ ...@@ -697,6 +698,8 @@
72F9D4841BA7FFC400795A00 /* PurchaseNotice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNotice.m; sourceTree = "<group>"; }; 72F9D4841BA7FFC400795A00 /* PurchaseNotice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNotice.m; sourceTree = "<group>"; };
72F9D4861BA8065500795A00 /* PurchaseNoticeListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeListCell.h; sourceTree = "<group>"; }; 72F9D4861BA8065500795A00 /* PurchaseNoticeListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PurchaseNoticeListCell.h; sourceTree = "<group>"; };
72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeListCell.m; sourceTree = "<group>"; }; 72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PurchaseNoticeListCell.m; sourceTree = "<group>"; };
72F9D4891BA8582100795A00 /* NoticeBoltView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoticeBoltView.h; sourceTree = "<group>"; };
72F9D48A1BA8582100795A00 /* NoticeBoltView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NoticeBoltView.m; sourceTree = "<group>"; };
7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; }; 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 86D33EC280C440156ED1B976 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
C10214CB1AD8FE200024637E /* ICRStoreDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRStoreDetailViewController.h; sourceTree = "<group>"; }; C10214CB1AD8FE200024637E /* ICRStoreDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICRStoreDetailViewController.h; sourceTree = "<group>"; };
...@@ -1097,6 +1100,8 @@ ...@@ -1097,6 +1100,8 @@
72F9D4811BA7EC9600795A00 /* NoticeProductViewController.m */, 72F9D4811BA7EC9600795A00 /* NoticeProductViewController.m */,
72F9D4861BA8065500795A00 /* PurchaseNoticeListCell.h */, 72F9D4861BA8065500795A00 /* PurchaseNoticeListCell.h */,
72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */, 72F9D4871BA8065500795A00 /* PurchaseNoticeListCell.m */,
72F9D4891BA8582100795A00 /* NoticeBoltView.h */,
72F9D48A1BA8582100795A00 /* NoticeBoltView.m */,
); );
path = Views; path = Views;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2632,6 +2637,7 @@ ...@@ -2632,6 +2637,7 @@
C1374F581B33C40D00594D19 /* IBTWebViewController.m in Sources */, C1374F581B33C40D00594D19 /* IBTWebViewController.m in Sources */,
C159186B1AC1A03B0013B391 /* ICRSyncViewController.m in Sources */, C159186B1AC1A03B0013B391 /* ICRSyncViewController.m in Sources */,
C1C564431AD66C6E006A1050 /* ICRTaskEditViewController.m in Sources */, C1C564431AD66C6E006A1050 /* ICRTaskEditViewController.m in Sources */,
72F9D48B1BA8582100795A00 /* NoticeBoltView.m in Sources */,
C142D2AA1AC3A155000109A7 /* NSDate+FormatterAdditions.m in Sources */, C142D2AA1AC3A155000109A7 /* NSDate+FormatterAdditions.m in Sources */,
C1B307A31ADD199600657F11 /* ICRTaskResultContentView.m in Sources */, C1B307A31ADD199600657F11 /* ICRTaskResultContentView.m in Sources */,
72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */, 72873CEB1BA27BA6007B3387 /* GXFPopView.m in Sources */,
......
...@@ -276,8 +276,9 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) { ...@@ -276,8 +276,9 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
//3·采购通知单明细(读) //3·采购通知单明细(读)
- (void)getPurchaseNoticeDetailedWithPurchaseUuid:(NSString *)purchaseUuid success:(void (^)(id))succ - (void)getPurchaseNoticeDetailedWithPurchaseUuid:(NSString *)purchaseUuid
failure:(void (^)(id))fail; success:(void (^)(id))succ
failure:(void (^)(id))fail;
//4·保存并提交采购通知单 //4·保存并提交采购通知单
- (void)saveAndSubmitPurchaseNoticeWithData:(id)data - (void)saveAndSubmitPurchaseNoticeWithData:(id)data
success:(void (^)(id))succ success:(void (^)(id))succ
...@@ -288,12 +289,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) { ...@@ -288,12 +289,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
//6·接受采购通知单 //6·接受采购通知单
- (void)acceptPurchaseNoticeWithData:(id)data - (void)acceptPurchaseNoticeWithUuid:(NSString *)purchaseNoticeuuid
version:(NSNumber *)version
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
//7·结束采购通知单 //7·结束采购通知单
- (void)finishPurchaseNoticeWithData:(id)data - (void)finishPurchaseNoticeWithUuid:(NSString *)purchaseNoticeuuid
success:(void (^)(id))succ version:(NSNumber *)version success:(void (^)(id))succ
failure:(void (^)(id))fail; failure:(void (^)(id))fail;
//8·获取采购通知单跟进记录 //8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data - (void)getPurchaseNoticeRecodWithData:(id)data
......
...@@ -187,8 +187,8 @@ static NSString * const ICRHTTPInterface[] = { ...@@ -187,8 +187,8 @@ static NSString * const ICRHTTPInterface[] = {
[XFFHttp_getPurchaseNoticeDetailed] = @"purchase/notice/get", [XFFHttp_getPurchaseNoticeDetailed] = @"purchase/notice/get",
[XFFHttp_saveAndSubmitPurchaseNotice] = @"purchase/notice/saveandsubmit", [XFFHttp_saveAndSubmitPurchaseNotice] = @"purchase/notice/saveandsubmit",
[XFFHttp_ComitPurchaseNotice] = @"purchase/notice/submit/", [XFFHttp_ComitPurchaseNotice] = @"purchase/notice/submit/",
[XFFHttp_acceptPurchaseNotice] = @"purchase/notice/accept/", [XFFHttp_acceptPurchaseNotice] = @"purchase/notice/accept",
[XFFHttp_finishPurchaseNotice] = @"purchase/notice/finish/", [XFFHttp_finishPurchaseNotice] = @"purchase/notice/finish",
[XFFHttp_getPurchaseNoticeRecod] = @"purchase/trace/get/", [XFFHttp_getPurchaseNoticeRecod] = @"purchase/trace/get/",
...@@ -2392,18 +2392,77 @@ acceptTypeJson:YES ...@@ -2392,18 +2392,77 @@ acceptTypeJson:YES
} }
//6·接受采购通知单 //6·接受采购通知单
- (void)acceptPurchaseNoticeWithData:(id)data - (void)acceptPurchaseNoticeWithUuid:(NSString *)purchaseNoticeuuid
version:(NSNumber *)version
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail failure:(void (^)(id))fail
{ {
if (!purchaseNoticeuuid) {
if (fail) {
fail( [[self class] ErrorWithMsg:ERROR_PARAMETER code:0] );
}
return;
}
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_acceptPurchaseNotice] stringByAppendingFormat:@"/%@?version=%@&time=%@&operId=%@&operName=%@",purchaseNoticeuuid,version,[[NSDate date] httpParameterString],userUtil.userCode,userUtil.displayName];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self POST:encodeUrlStr
parameters:nil
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
} }
//7·结束采购通知单 //7·结束采购通知单
- (void)finishPurchaseNoticeWithData:(id)data - (void)finishPurchaseNoticeWithUuid:(NSString *)purchaseNoticeuuid
version:(NSNumber *)version
success:(void (^)(id))succ success:(void (^)(id))succ
failure:(void (^)(id))fail failure:(void (^)(id))fail
{ {
if (!purchaseNoticeuuid) {
if (fail) {
fail( [[self class] ErrorWithMsg:ERROR_PARAMETER code:0] );
}
return;
}
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
NSString *urlStr = [[[self class] UrlForPluginHTTPAction:XFFHttp_finishPurchaseNotice] stringByAppendingFormat:@"/%@?version=%@&time=%@&operId=%@&operName=%@",purchaseNoticeuuid,version,[[NSDate date] httpParameterString],userUtil.userCode,userUtil.displayName];
NSString *encodeUrlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[self POST:encodeUrlStr
parameters:nil
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
} }
//8·获取采购通知单跟进记录 //8·获取采购通知单跟进记录
- (void)getPurchaseNoticeRecodWithData:(id)data - (void)getPurchaseNoticeRecodWithData:(id)data
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#import "ICRBaseViewController.h" #import "ICRBaseViewController.h"
#import "PurchaseBill.h" #import "PurchaseBill.h"
#import "PurchaseNotice.h"
@interface NewPurchaseViewController : ICRBaseViewController @interface NewPurchaseViewController : ICRBaseViewController
@property (nonatomic,strong)PurchaseBill *purchaseBill; @property (nonatomic,strong)PurchaseBill *purchaseBill;
@property (nonatomic,strong)PurchaseNotice *purchaseNotice;
@end @end
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#import "ShopDetaileViewController.h" #import "ShopDetaileViewController.h"
#import "PurchaseBillProduct.h" #import "PurchaseBillProduct.h"
#import "GXFPopView.h" #import "GXFPopView.h"
#import "NoticeProduct.h"
#define TopHeight 328 #define TopHeight 328
#define BottomHeight 300 #define BottomHeight 300
#define SpaceHeight 20 #define SpaceHeight 20
...@@ -61,6 +62,13 @@ typedef enum : NSUInteger { ...@@ -61,6 +62,13 @@ typedef enum : NSUInteger {
if (self.purchaseBill) { if (self.purchaseBill) {
[self getDataFromServer]; [self getDataFromServer];
} }
if (self.purchaseNotice) {
_purchaseView.noticeUuid = self.purchaseNotice.uuid;
_purchaseView.noticeNumber = self.purchaseNotice.billnumber;
//转换
NSMutableArray *arr = [self coverPurchaseBillProduct:self.purchaseNotice.products];
_pvc.productArr = arr;
}
} }
- (void)getDataFromServer{ - (void)getDataFromServer{
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
...@@ -344,7 +352,27 @@ typedef enum : NSUInteger { ...@@ -344,7 +352,27 @@ typedef enum : NSUInteger {
return shopDetail; return shopDetail;
} }
- (NSMutableArray *)coverPurchaseBillProduct:(NSArray *)arr{
NSMutableArray *billArr = [NSMutableArray array];
for (NoticeProduct *product in arr) {
PurchaseBillProduct *billProduct = [PurchaseBillProduct new];
billProduct.uuid = product.uuid;
billProduct.product_name = product.productName;
billProduct.product_uuid = product.productUuid;
billProduct.product_code = product.productCode;
billProduct.qpc = product.qpc;
billProduct.unit = product.packUnit;
billProduct.qty = [NSNumber numberWithFloat:0];
billProduct.price = [NSNumber numberWithFloat:0];
billProduct.baseQty = [NSNumber numberWithFloat:0];
billProduct.basePrice = [NSNumber numberWithFloat:0];
billProduct.total = [NSNumber numberWithFloat:0];
billProduct.remark = product.remark;
billProduct.qpcStr = @"";
[billArr addObject:billProduct];
}
return billArr;
}
#pragma mark - 协议方法 #pragma mark - 协议方法
- (void)hiddenKeyBoard{ - (void)hiddenKeyBoard{
......
...@@ -183,11 +183,14 @@ ...@@ -183,11 +183,14 @@
} }
} }
} }
#warning 有点问题
- (void)prepareDataInCell{ - (void)prepareDataInCell{
if (self.total) { if (self.total) {
self.purchasePriceLabel.text = [self.total stringValue]; self.purchasePriceLabel.text = [self.total stringValue];
} }
if (self.noticeNumber.length > 0) {
self.purchaseNoticeLabel.text = self.noticeNumber;
self.purchaseNoticeLabel.textColor = GXF_CONTENT_COLOR;
}
} }
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.row == 2){ if(indexPath.row == 2){
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#import "NewPurchaseNoticeViewController.h" #import "NewPurchaseNoticeViewController.h"
#import "QueryOrder.h" #import "QueryOrder.h"
#import "SortMaskView.h" #import "SortMaskView.h"
#import "PurchaseBoltView.h" #import "NoticeBoltView.h"
#import "MJRefresh.h" #import "MJRefresh.h"
#import "PurchaseNoticeListCell.h" #import "PurchaseNoticeListCell.h"
#import "PurchaseNotice.h" #import "PurchaseNotice.h"
...@@ -27,12 +27,12 @@ typedef enum : NSUInteger { ...@@ -27,12 +27,12 @@ typedef enum : NSUInteger {
BoltTag BoltTag
} BtnTag; } BtnTag;
@interface PurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,PurchaseViewDelegate,SortMaskViewDelegate> @interface PurchaseNoticeViewController ()<UITableViewDataSource,UITableViewDelegate,BoltMaskViewDelegate,SortMaskViewDelegate>
{ {
UIView *_maskView; UIView *_maskView;
UIButton *currentBtn; UIButton *currentBtn;
SortMaskView *_sortView; SortMaskView *_sortView;
PurchaseBoltView *_boltView; NoticeBoltView *_boltView;
UIBarButtonItem *_sureBtn; UIBarButtonItem *_sureBtn;
UIButton *_sortBtn; UIButton *_sortBtn;
UIButton *_boltBtn; UIButton *_boltBtn;
...@@ -42,7 +42,7 @@ typedef enum : NSUInteger { ...@@ -42,7 +42,7 @@ typedef enum : NSUInteger {
} }
@property (nonatomic,strong)NSMutableArray *dataArr; @property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,strong)UITableView *tableView; @property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSString *noticeLike; @property (nonatomic,strong)NSString *titleLike;
@property (nonatomic,strong)NSString *state; @property (nonatomic,strong)NSString *state;
@property (nonatomic,strong)NSString *billLike; @property (nonatomic,strong)NSString *billLike;
@property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序) @property (nonatomic,strong)NSString *orderDirection;//asc(升序),desc(降序)
...@@ -76,7 +76,7 @@ typedef enum : NSUInteger { ...@@ -76,7 +76,7 @@ typedef enum : NSUInteger {
[IBTLoadingView showTips:data]; [IBTLoadingView showTips:data];
}; };
[IBTLoadingView showProgressLabel:@"正在加载..."]; [IBTLoadingView showProgressLabel:@"正在加载..."];
ICRUserUtil *userUtil = [ICRUserUtil sharedInstance]; // ICRUserUtil *userUtil = [ICRUserUtil sharedInstance];
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"]) {
...@@ -106,11 +106,11 @@ typedef enum : NSUInteger { ...@@ -106,11 +106,11 @@ typedef enum : NSUInteger {
} }
} }
id noticeObject = [NSNull null]; id noticeObject = [NSNull null];
if (self.noticeLike.length > 0) { if (self.titleLike.length > 0) {
noticeObject = self.noticeLike; noticeObject = self.titleLike;
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 = @"noticeNumber"; order.field = @"titleLike";
order.direction = self.orderDirection; order.direction = self.orderDirection;
[orderArr addObject:[order dictForCommit]]; [orderArr addObject:[order dictForCommit]];
} }
...@@ -260,13 +260,10 @@ typedef enum : NSUInteger { ...@@ -260,13 +260,10 @@ typedef enum : NSUInteger {
}else{ }else{
[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 = [[PurchaseBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billLike titleStr:@"采购通知" vendorNumber:self.noticeLike]; _boltView = [[NoticeBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state title:self.titleLike bill:self.billLike];
// _boltView = [[PurchaseBoltView alloc]initWithFrame:CGRectMake(0, -105, ScreenSize.width, 274) state:self.state billNumber:self.billLike noticeNumber:self.noticeLike];
_boltView.backgroundColor = XXFBgColor; _boltView.backgroundColor = XXFBgColor;
_boltView.delegate = self; _boltView.delegate = self;
//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;
...@@ -328,7 +325,7 @@ typedef enum : NSUInteger { ...@@ -328,7 +325,7 @@ typedef enum : NSUInteger {
} }
} }
- (void)checkBoltBtnColor{ - (void)checkBoltBtnColor{
if (self.state.length > 0 || self.noticeLike.length > 0 || self.billLike.length > 0) { if (self.state.length > 0 || self.titleLike.length > 0 || self.billLike.length > 0) {
[_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal]; [_boltBtn setImage:[UIImage imageNamed:@"selected-filter_with_text"] forState:UIControlStateNormal];
}else{ }else{
[_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal]; [_boltBtn setImage:[UIImage imageNamed:@"black_filter_with_text"] forState:UIControlStateNormal];
...@@ -338,23 +335,19 @@ typedef enum : NSUInteger { ...@@ -338,23 +335,19 @@ typedef enum : NSUInteger {
#pragma mark - 确定 #pragma mark - 确定
- (void)sureClick{ - (void)sureClick{
if (self.state.length > 0 || self.billLike.length > 0 || self.noticeLike.length > 0 ||self.orderDirection.length > 0) { [_boltView.titleFiled resignFirstResponder];
[_boltView.titleFiled resignFirstResponder]; [_boltView.billFiled resignFirstResponder];
[_boltView.vendorFiled resignFirstResponder]; _currentPage = 0;
[_boltView.billFiled resignFirstResponder];
_currentPage = 0;
//请求
[self getData];
//还原数据
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
}
//请求
[self getData];
//还原数据
if (_sortView) {
[self hiddenSortMaskView:YES];
}
if (_boltView) {
[self hiddenBoltMaskView:YES];
}
} }
#pragma mark - sortDelegate #pragma mark - sortDelegate
...@@ -369,21 +362,21 @@ typedef enum : NSUInteger { ...@@ -369,21 +362,21 @@ typedef enum : NSUInteger {
self.state = state; self.state = state;
CLog(@"%@",state); CLog(@"%@",state);
} }
- (void)getbillLike:(NSString *)billLike{ - (void)getBillNumber:(NSString *)billNumber{
self.billLike = billLike; self.billLike = billNumber;
CLog(@"%@",billLike); CLog(@"%@",billNumber);
} }
- (void)getnoticeLike:(NSString *)noticeLike{ - (void)getTitleLike:(NSString *)titleLike{
self.noticeLike = noticeLike; self.titleLike = titleLike;
CLog(@"%@",noticeLike); CLog(@"%@",titleLike);
} }
- (void)clearBoltInformation{ - (void)clearBoltInformation{
//清空所有条件 //清空所有条件
if (self.billLike.length > 0) { if (self.billLike.length > 0) {
self.billLike = @""; self.billLike = @"";
} }
if (self.noticeLike.length > 0) { if (self.titleLike.length > 0) {
self.noticeLike = @""; self.titleLike = @"";
} }
if (self.state.length > 0) { if (self.state.length > 0) {
self.state = @""; self.state = @"";
...@@ -432,6 +425,12 @@ typedef enum : NSUInteger { ...@@ -432,6 +425,12 @@ typedef enum : NSUInteger {
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return TableHeight; return TableHeight;
} }
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
if ([ICRUserUtil sharedInstance].needFresh && self.tableView != nil) {
[self.tableView.header beginRefreshing];
}
}
- (void)createBackBtn{ - (void)createBackBtn{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
......
//
// NoticeBoltView.h
// XFFruit
//
// Created by 陈俊俊 on 15/9/15.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol BoltMaskViewDelegate <NSObject>
- (void)getBoltValueSelectRow:(NSString *)state;
- (void)getTitleLike:(NSString *)titleLike;
- (void)getBillNumber:(NSString *)billNumber;
- (void)clearBoltInformation;
@end
@interface NoticeBoltView : UIView<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArr;
@property (nonatomic,weak)id <BoltMaskViewDelegate>delegate;
@property (nonatomic,strong)UITextField *titleFiled;
@property (nonatomic,strong)UITextField *billFiled;
- (instancetype)initWithFrame:(CGRect)frame state:(NSString *)state title:(NSString *)title bill:(NSString *)bill;
@end
This diff is collapsed.
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