Commit d662c6ea authored by 曹云霄's avatar 曹云霄

debug

parent c7d75cd2
...@@ -121,7 +121,6 @@ ...@@ -121,7 +121,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.allCustomerTableview.mj_header = headerRefresh; self.allCustomerTableview.mj_header = headerRefresh;
[self.allCustomerTableview.mj_header beginRefreshing]; [self.allCustomerTableview.mj_header beginRefreshing];
self.allCustomerTableview.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.allCustomerTableview.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.allCustomerTableview.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -136,6 +135,7 @@ ...@@ -136,6 +135,7 @@
[self getShoppersAssociatedCustomer:self.conditionModel isRemove:NO]; [self getShoppersAssociatedCustomer:self.conditionModel isRemove:NO];
} }
}]; }];
self.allCustomerTableview.mj_footer.automaticallyHidden = YES;
} }
...@@ -253,7 +253,9 @@ ...@@ -253,7 +253,9 @@
UIPopoverPresentationController *pop = datevc.popoverPresentationController; UIPopoverPresentationController *pop = datevc.popoverPresentationController;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny; pop.permittedArrowDirections = UIPopoverArrowDirectionAny;
pop.sourceView = datevc.view; pop.sourceView = datevc.view;
[self presentViewController:datevc animated:YES completion:nil]; dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:datevc animated:YES completion:nil];
});
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]]; self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]];
self.goodsSpecifications.text = _model.goods.size; self.goodsSpecifications.text = _model.goods.size;
self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]]; self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]];
self.goodsNumber.text = [NSString stringWithFormat:@"%d",_model.goodsNum]; self.goodsNumber.text = [NSString stringWithFormat:@"%ld",(long)_model.goodsNum];
self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum]; self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum];
......
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
*/ */
@property (nonatomic,assign) int totalPages; @property (nonatomic,assign) int totalPages;
/**
* 查询条件
*/
@property (nonatomic,strong) ConsumerQueryCondition *condition;
@end @end
@implementation ClientViewController @implementation ClientViewController
...@@ -46,6 +51,14 @@ ...@@ -46,6 +51,14 @@
return _CustomerresultArray; return _CustomerresultArray;
} }
- (ConsumerQueryCondition *)condition
{
if (!_condition) {
_condition = [[ConsumerQueryCondition alloc]init];
}
return _condition;
}
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
...@@ -104,61 +117,61 @@ ...@@ -104,61 +117,61 @@
//清空当前客户数据 //清空当前客户数据
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ChangeCustomerName:) name:@"EMPTYCUSTOMERNAME" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ChangeCustomerName:) name:@"EMPTYCUSTOMERNAME" object:nil];
__weak typeof(self) weakSelf = self;
//下拉刷新 //下拉刷新
MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{ MjRefreshHeaderCustom *headerRefresh = [MjRefreshHeaderCustom headerWithRefreshingBlock:^{
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
condition.resellerCodeEquals = [[Shoppersmanager manager].Shoppers.employee.currentDepart orgCode]; weakSelf.condition.resellerCodeEquals = [[Shoppersmanager manager].Shoppers.employee.currentDepart orgCode];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = 1; page.page = 1;
condition.page = page; weakSelf.condition.page = page;
page.rows = KROWS; page.rows = KROWS;
self.indexPage = 1; weakSelf.indexPage = 1;
[self.informationTableview.mj_footer resetNoMoreData]; [weakSelf.informationTableview.mj_footer resetNoMoreData];
[self getShoppersAssociatedCustomer:condition isRemoveArray:YES]; [weakSelf getShoppersAssociatedCustomer:weakSelf.condition isRemoveArray:YES];
}]; }];
headerRefresh.stateLabel.hidden = YES; headerRefresh.stateLabel.hidden = YES;
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.informationTableview.mj_header =headerRefresh; self.informationTableview.mj_header =headerRefresh;
self.informationTableview.mj_footer.automaticallyHidden = YES;
//进入刷新状态 //进入刷新状态
[self.informationTableview.mj_header beginRefreshing]; [self.informationTableview.mj_header beginRefreshing];
//上拉加载 //上拉加载
self.informationTableview.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.informationTableview.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
if (++ self.indexPage > self.totalPages) { if (++ weakSelf.indexPage > weakSelf.totalPages) {
[self.informationTableview.mj_footer endRefreshingWithNoMoreData]; [weakSelf.informationTableview.mj_footer endRefreshingWithNoMoreData];
}else }else
{ {
ConsumerQueryCondition *condition = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init]; DataPage *page = [[DataPage alloc]init];
page.page = self.indexPage; page.page = weakSelf.indexPage;
page.rows = KROWS; page.rows = KROWS;
condition.page = page; weakSelf.condition.page = page;
[self getShoppersAssociatedCustomer:condition isRemoveArray:NO]; [weakSelf getShoppersAssociatedCustomer:weakSelf.condition isRemoveArray:NO];
} }
}]; }];
self.informationTableview.mj_footer.automaticallyHidden = YES;
} }
#pragma mark -获取导购关联客户 #pragma mark -获取导购关联客户
- (void)getShoppersAssociatedCustomer:(ConsumerQueryCondition *)condition isRemoveArray:(BOOL)remove - (void)getShoppersAssociatedCustomer:(ConsumerQueryCondition *)condition isRemoveArray:(BOOL)remove
{ {
__weak typeof(self) weakSelf = self;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:condition WithReturnValueBlock:^(id returnValue) {
self.informationTableview.emptyDataSetSource = self; weakSelf.informationTableview.emptyDataSetSource = weakSelf;
self.informationTableview.emptyDataSetDelegate = self; weakSelf.informationTableview.emptyDataSetDelegate = weakSelf;
[self RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
[self endRefreshingForTableView:self.informationTableview]; [weakSelf endRefreshingForTableView:weakSelf.informationTableview];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
if (remove) { if (remove) {
[self.CustomerresultArray removeAllObjects]; [weakSelf.CustomerresultArray removeAllObjects];
} }
NSDictionary *datas = returnValue[@"data"]; NSDictionary *datas = returnValue[@"data"];
ConsumerPageResult *Customerresult = [[ConsumerPageResult alloc]initWithDictionary:datas error:nil]; ConsumerPageResult *Customerresult = [[ConsumerPageResult alloc]initWithDictionary:datas error:nil];
self.totalPages = [datas[@"totalpages"] intValue]; weakSelf.totalPages = [datas[@"totalpages"] intValue];
for (TOConsumerEntity *objc in Customerresult.results) { for (TOConsumerEntity *objc in Customerresult.results) {
MyclientEntityModel *myclientModel = [[MyclientEntityModel alloc]init]; MyclientEntityModel *myclientModel = [[MyclientEntityModel alloc]init];
...@@ -177,32 +190,32 @@ ...@@ -177,32 +190,32 @@
myclientModel.lastVisitedTime = objc.lastVisitedTime; myclientModel.lastVisitedTime = objc.lastVisitedTime;
myclientModel.company = objc.company; myclientModel.company = objc.company;
[self.CustomerresultArray addObject:myclientModel]; [weakSelf.CustomerresultArray addObject:myclientModel];
} }
//刷新后添加选中状态 //刷新后添加选中状态
for (int i=0; i<self.CustomerresultArray.count; i++) { for (int i=0; i<weakSelf.CustomerresultArray.count; i++) {
MyclientEntityModel *myclientModel = [self.CustomerresultArray objectAtIndex_opple:i]; MyclientEntityModel *myclientModel = [weakSelf.CustomerresultArray objectAtIndex_opple:i];
if ([[Customermanager manager].model.fid isEqualToString:myclientModel.fid]) { if ([[Customermanager manager].model.fid isEqualToString:myclientModel.fid]) {
InformationTableViewCell *cell = [self.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; InformationTableViewCell *cell = [weakSelf.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
myclientModel.selectedState = YES; myclientModel.selectedState = YES;
cell.setCurrentCustomer.selected = YES; cell.setCurrentCustomer.selected = YES;
} }
} }
[self.informationTableview reloadData]; [weakSelf.informationTableview reloadData];
} }
else else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; [weakSelf ErrorMBProgressView:returnValue[@"message"]];
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
[self promptCustomerWithString:@"网络连接已断开"]; [weakSelf promptCustomerWithString:@"网络连接已断开"];
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
[self endRefreshingForTableView:self.informationTableview]; [weakSelf endRefreshingForTableView:weakSelf.informationTableview];
}]; }];
} }
...@@ -214,8 +227,9 @@ ...@@ -214,8 +227,9 @@
cell.indexNumber = indexPath.row; cell.indexNumber = indexPath.row;
cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row]; cell.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
//清空其他选中状态 //清空其他选中状态
__weak typeof(self) weakSelf = self;
[cell setBlockSeletced:^(NSInteger index) { [cell setBlockSeletced:^(NSInteger index) {
[self SetCustomerButtonClick:index]; [weakSelf SetCustomerButtonClick:index];
}]; }];
return cell; return cell;
} }
...@@ -238,16 +252,17 @@ ...@@ -238,16 +252,17 @@
clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row]; clientdetails.model = [self.CustomerresultArray objectAtIndex_opple:indexPath.row];
clientdetails.cellindex = indexPath.row; clientdetails.cellindex = indexPath.row;
//设置当前客户 //设置当前客户
__weak typeof(self) weakSelf = self;
[clientdetails setCurrentUserBlock:^(NSInteger index,NSString *title) { [clientdetails setCurrentUserBlock:^(NSInteger index,NSString *title) {
if ([title isEqualToString:@"设为当前客户"]) { if ([title isEqualToString:@"设为当前客户"]) {
InformationTableViewCell *cell = [self.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]]; InformationTableViewCell *cell = [weakSelf.informationTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
[self SetCustomerButtonClick:index]; [weakSelf SetCustomerButtonClick:index];
cell.setCurrentCustomer.selected = YES; cell.setCurrentCustomer.selected = YES;
}else if ([title isEqualToString:@"退出当前客户"]) }else if ([title isEqualToString:@"退出当前客户"])
{ {
[self ExitCurrentCustomer]; [weakSelf ExitCurrentCustomer];
[self.addpersonInformationButton setTitle:@"添加客户信息" forState:UIControlStateNormal]; [weakSelf.addpersonInformationButton setTitle:@"添加客户信息" forState:UIControlStateNormal];
} }
}]; }];
[self.navigationController pushViewController:clientdetails animated:YES]; [self.navigationController pushViewController:clientdetails animated:YES];
...@@ -350,7 +365,9 @@ ...@@ -350,7 +365,9 @@
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
[PcCamera setSourceType:UIImagePickerControllerSourceTypeCamera]; [PcCamera setSourceType:UIImagePickerControllerSourceTypeCamera];
PcCamera.allowsEditing = YES; PcCamera.allowsEditing = YES;
[weakSelf presentViewController:PcCamera animated:YES completion:nil]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf presentViewController:PcCamera animated:YES completion:nil];
});
} }
else else
{ {
...@@ -362,7 +379,9 @@ ...@@ -362,7 +379,9 @@
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
[PcCamera setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; [PcCamera setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
PcCamera.allowsEditing = YES; PcCamera.allowsEditing = YES;
[weakSelf presentViewController:PcCamera animated:YES completion:nil]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf presentViewController:PcCamera animated:YES completion:nil];
});
} }
else else
{ {
...@@ -372,7 +391,9 @@ ...@@ -372,7 +391,9 @@
[alertView addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { [alertView addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[alertView dismissViewControllerAnimated:YES completion:nil]; [alertView dismissViewControllerAnimated:YES completion:nil];
}]]; }]];
[self presentViewController:alertView animated:YES completion:nil]; dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf presentViewController:alertView animated:YES completion:nil];
});
} }
#pragma mark -拍照、从相册选择 #pragma mark -拍照、从相册选择
...@@ -387,12 +408,12 @@ ...@@ -387,12 +408,12 @@
[self uploadUserHeader:Headimage completeBlock:^(NSString *string) { [self uploadUserHeader:Headimage completeBlock:^(NSString *string) {
weskSelf.customerHeader.image = Headimage; weskSelf.customerHeader.image = Headimage;
[Customermanager manager].model.picture = string; [Customermanager manager].model.picture = string;
for (int i=0;i<self.CustomerresultArray.count;i++) { for (int i=0;i<weskSelf.CustomerresultArray.count;i++) {
MyclientEntityModel *customerModel = (MyclientEntityModel *)[self.CustomerresultArray objectAtIndex_opple:i]; MyclientEntityModel *customerModel = (MyclientEntityModel *)[weskSelf.CustomerresultArray objectAtIndex_opple:i];
if ([customerModel.fid isEqualToString:[Customermanager manager].model.fid]) { if ([customerModel.fid isEqualToString:[Customermanager manager].model.fid]) {
customerModel.picture = string; customerModel.picture = string;
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0];
[self.informationTableview reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationBottom]; [weskSelf.informationTableview reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationBottom];
break; break;
} }
} }
...@@ -448,21 +469,22 @@ ...@@ -448,21 +469,22 @@
MyclientEntityModel *customerEntity = [[MyclientEntityModel alloc]init]; MyclientEntityModel *customerEntity = [[MyclientEntityModel alloc]init];
customerEntity = [Customermanager manager].model; customerEntity = [Customermanager manager].model;
customerEntity.picture = headerurl; customerEntity.picture = headerurl;
__weak typeof(self) weskSelf = self;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
block(); block();
[self SuccessMBProgressView:@"修改成功"]; [weskSelf SuccessMBProgressView:@"修改成功"];
}else }else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; [weskSelf ErrorMBProgressView:returnValue[@"message"]];
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
} WithFailureBlock:^(NSError *error) { } WithFailureBlock:^(NSError *error) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
}]; }];
} }
...@@ -487,6 +509,7 @@ ...@@ -487,6 +509,7 @@
#pragma mark -设置为当前用户请求、写入访问时间 #pragma mark -设置为当前用户请求、写入访问时间
- (void)SetupUserRequest - (void)SetupUserRequest
{ {
__weak typeof(self) weskSelf = self;
MyclientEntityModel *model = [Customermanager manager].model; MyclientEntityModel *model = [Customermanager manager].model;
[[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SAVEVISITEDTIME),model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkWithDictionaryRequestWithURL:[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(SAVEVISITEDTIME),model.fid] WithRequestType:1 WithParameter:nil WithReturnValueBlock:^(id returnValue) {
...@@ -496,7 +519,7 @@ ...@@ -496,7 +519,7 @@
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self promptCustomerWithString:@"网络连接已断开"]; [weskSelf promptCustomerWithString:@"网络连接已断开"];
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
...@@ -580,52 +603,52 @@ ...@@ -580,52 +603,52 @@
if (isChange) { if (isChange) {
customerEntity.fid = [Customermanager manager].model.fid; customerEntity.fid = [Customermanager manager].model.fid;
} }
__weak typeof(self) weskSelf = self;
[self CreateMBProgressHUDLoding]; [self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDCONSUMER) WithRequestType:0 WithParameter:customerEntity WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
//进入刷新状态 //进入刷新状态
[self.informationTableview.mj_header beginRefreshing]; [weskSelf.informationTableview.mj_header beginRefreshing];
//新增保存ID //新增保存ID
if (!isChange) { if (!isChange) {
customerEntity.fid = returnValue[@"data"]; customerEntity.fid = returnValue[@"data"];
[Customermanager manager].model = customerEntity; [Customermanager manager].model = customerEntity;
[self SuccessMBProgressView:@"新增成功"]; [weskSelf SuccessMBProgressView:@"新增成功"];
[self addAddressInformationRequest]; [weskSelf addAddressInformationRequest];
}else }else
{ {
[self SuccessMBProgressView:@"修改成功"]; [weskSelf SuccessMBProgressView:@"修改成功"];
[self.changePersonInformationButton setTitle:@"更改客户信息" forState:UIControlStateNormal]; [weskSelf.changePersonInformationButton setTitle:@"更改客户信息" forState:UIControlStateNormal];
} }
//保存客户信息 //保存客户信息
[Customermanager manager].model = customerEntity; [Customermanager manager].model = customerEntity;
[Shoppersmanager manager].currentCustomer = YES; [Shoppersmanager manager].currentCustomer = YES;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal]; [weskSelf.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
self.changePersonInformationButton.hidden = NO; weskSelf.changePersonInformationButton.hidden = NO;
self.customerNameField.enabled = NO; weskSelf.customerNameField.enabled = NO;
self.customerAddress.enabled = NO; weskSelf.customerAddress.enabled = NO;
self.phoneNumberField.enabled = NO; weskSelf.phoneNumberField.enabled = NO;
self.companyNameField.enabled = NO; weskSelf.companyNameField.enabled = NO;
[self SetupUserShoppingCarNumberRequest]; [weskSelf SetupUserShoppingCarNumberRequest];
[self SetupUserRequest]; [weskSelf SetupUserRequest];
[self ChangeCustomerName]; [weskSelf ChangeCustomerName];
} }
else else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; [weskSelf ErrorMBProgressView:returnValue[@"message"]];
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
[self promptCustomerWithString:@"网络连接已断开"]; [weskSelf promptCustomerWithString:@"网络连接已断开"];
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding]; [weskSelf RemoveMBProgressHUDLoding];
}]; }];
} }
...@@ -640,7 +663,7 @@ ...@@ -640,7 +663,7 @@
address.name = self.customerNameField.text; address.name = self.customerNameField.text;
address.miblephone = self.phoneNumberField.text; address.miblephone = self.phoneNumberField.text;
address.address = self.customerAddress.text; address.address = self.customerAddress.text;
__weak typeof(self) weskSelf = self;
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDADDRESS) WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) { [[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(ADDADDRESS) WithRequestType:0 WithParameter:address WithReturnValueBlock:^(id returnValue) {
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
...@@ -649,12 +672,12 @@ ...@@ -649,12 +672,12 @@
} }
else else
{ {
[self ErrorMBProgressView:returnValue[@"message"]]; [weskSelf ErrorMBProgressView:returnValue[@"message"]];
} }
} WithErrorCodeBlock:^(id errorCodeValue) { } WithErrorCodeBlock:^(id errorCodeValue) {
[self promptCustomerWithString:@"网络连接已断开"]; [weskSelf promptCustomerWithString:@"网络连接已断开"];
} WithFailureBlock:^(id error) { } WithFailureBlock:^(id error) {
...@@ -700,62 +723,13 @@ ...@@ -700,62 +723,13 @@
- (void)searchCustomerInforMation - (void)searchCustomerInforMation
{ {
if (self.searchPersonInformationField.text.length == 0) { if (self.searchPersonInformationField.text.length == 0) {
self.condition.nameEquals = nil;
[self ErrorMBProgressView:@"搜索信息不能为空"]; self.condition.mobileEquals = nil;
return; }else {
self.condition.nameEquals = self.searchPersonInformationField.text;
self.condition.mobileEquals = self.searchPersonInformationField.text;
} }
[self CreateMBProgressHUDLoding]; [self.informationTableview.mj_header beginRefreshing];
ConsumerQueryCondition *searchCustomer = [[ConsumerQueryCondition alloc]init];
DataPage *page = [[DataPage alloc]init];
page.page = 1;
page.rows = 10;
searchCustomer.page = page;
searchCustomer.nameEquals = self.searchPersonInformationField.text;
searchCustomer.mobileEquals = self.searchPersonInformationField.text;
//request
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:SERVERREQUESTURL(GETSHOPPERSCONSUMER) WithRequestType:0 WithParameter:searchCustomer WithReturnValueBlock:^(id returnValue) {
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
ConsumerPageResult *result = [[ConsumerPageResult alloc]initWithDictionary:returnValue[@"data"] error:nil];
[self.CustomerresultArray removeAllObjects];
for (TOConsumerEntity *objc in result.results) {
MyclientEntityModel *myclientModel = [[MyclientEntityModel alloc]init];
myclientModel.fid = objc.fid;
myclientModel.createName = objc.createName;
myclientModel.createBy = objc.createBy;
myclientModel.createDate = objc.createDate;
myclientModel.sysOrgCode = objc.sysOrgCode;
myclientModel.name = objc.name;
myclientModel.mobile = objc.mobile;
myclientModel.province = objc.province;
myclientModel.city = objc.city;
myclientModel.country = objc.country;
myclientModel.address = objc.address;
myclientModel.picture = objc.picture;
myclientModel.lastVisitedTime = objc.lastVisitedTime;
[self.CustomerresultArray addObject:myclientModel];
}
[self.informationTableview reloadData];
}
else
{
[self ErrorMBProgressView:returnValue[@"message"]];
}
} WithErrorCodeBlock:^(id errorCodeValue) {
[self RemoveMBProgressHUDLoding];
[self promptCustomerWithString:@"网络连接已断开"];
} WithFailureBlock:^(id error) {
[self RemoveMBProgressHUDLoding];
}];
} }
...@@ -796,6 +770,11 @@ ...@@ -796,6 +770,11 @@
return YES; return YES;
} }
- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView
{
return 100;
}
@end @end
...@@ -156,7 +156,6 @@ ...@@ -156,7 +156,6 @@
headerRefresh.stateLabel.hidden = YES; headerRefresh.stateLabel.hidden = YES;
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.ClientdetailsTableview.mj_header =headerRefresh; self.ClientdetailsTableview.mj_header =headerRefresh;
self.ClientdetailsTableview.mj_footer.automaticallyHidden = YES;
//进入刷新状态 //进入刷新状态
[self.ClientdetailsTableview.mj_header beginRefreshing]; [self.ClientdetailsTableview.mj_header beginRefreshing];
//上拉加载 //上拉加载
...@@ -195,6 +194,8 @@ ...@@ -195,6 +194,8 @@
} }
} }
}]; }];
self.ClientdetailsTableview.mj_footer.automaticallyHidden = YES;
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
self.goodsName.text = _model.goods.name; self.goodsName.text = _model.goods.name;
self.specifications.text = _model.goods.size; self.specifications.text = _model.goods.size;
self.goodsCode.text = _model.goods.code; self.goodsCode.text = _model.goods.code;
self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%d",_model.goodsNum]; self.goodsNumber.text = [NSString stringWithFormat:@"数量 X%ld",(long)_model.goodsNum];
self.clinchPrice.text = [NSString stringWithFormat:@"成交价 ¥%.2f",[_model.costPrice floatValue]]; self.clinchPrice.text = [NSString stringWithFormat:@"成交价 ¥%.2f",[_model.costPrice floatValue]];
//计算总价格 //计算总价格
NSInteger number = _model.goodsNum; NSInteger number = _model.goodsNum;
......
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.customerOrderTableView.mj_header = headerRefresh; self.customerOrderTableView.mj_header = headerRefresh;
[self.customerOrderTableView.mj_header beginRefreshing]; [self.customerOrderTableView.mj_header beginRefreshing];
self.customerOrderTableView.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.customerOrderTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.customerOrderTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -126,6 +125,8 @@ ...@@ -126,6 +125,8 @@
[weakSelf getGuideAllcustomerOrder:NO WithorderBill:weakSelf.model]; [weakSelf getGuideAllcustomerOrder:NO WithorderBill:weakSelf.model];
} }
}]; }];
self.customerOrderTableView.mj_footer.automaticallyHidden = YES;
} }
......
...@@ -284,7 +284,6 @@ ...@@ -284,7 +284,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.productCollectionView.mj_header = headerRefresh; self.productCollectionView.mj_header = headerRefresh;
[self.productCollectionView.mj_header beginRefreshing]; [self.productCollectionView.mj_header beginRefreshing];
self.productCollectionView.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.productCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.productCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -344,6 +343,8 @@ ...@@ -344,6 +343,8 @@
} }
} }
}]; }];
self.productCollectionView.mj_footer.automaticallyHidden = YES;
} }
......
...@@ -144,7 +144,6 @@ ...@@ -144,7 +144,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.seceneLibararyCollectionView.mj_header = headerRefresh; self.seceneLibararyCollectionView.mj_header = headerRefresh;
[self.seceneLibararyCollectionView.mj_header beginRefreshing]; [self.seceneLibararyCollectionView.mj_header beginRefreshing];
self.seceneLibararyCollectionView.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.seceneLibararyCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.seceneLibararyCollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -160,6 +159,8 @@ ...@@ -160,6 +159,8 @@
[self getSceneLibrarydatas:self.conditionModel isRemove:NO]; [self getSceneLibrarydatas:self.conditionModel isRemove:NO];
} }
}]; }];
self.seceneLibararyCollectionView.mj_footer.automaticallyHidden = YES;
} }
#pragma mark -获取场景筛选数据 #pragma mark -获取场景筛选数据
......
...@@ -187,7 +187,6 @@ ...@@ -187,7 +187,6 @@
{ {
ProductDetailsViewController *productDetails = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"productdetails"]; ProductDetailsViewController *productDetails = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"productdetails"];
productDetails.goodsID = [[self.shopResponseArray objectAtIndex_opple:indexPath.row] goodsId]; productDetails.goodsID = [[self.shopResponseArray objectAtIndex_opple:indexPath.row] goodsId];
// productDetails.inventory = [[self.shopResponseArray objectAtIndex_opple:indexPath.row] inv];
[self.navigationController pushViewController:productDetails animated:YES]; [self.navigationController pushViewController:productDetails animated:YES];
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#import "BaseViewController.h" #import "BaseViewController.h"
#import "QRViewController.h" #import "QRViewController.h"
#import "ExperienceCentreViewController.h" #import "ExperienceCentreViewController.h"
#import <AVFoundation/AVFoundation.h>
@interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate,UITextFieldDelegate> @interface CustomTabbarController ()<TabbarButtonClickdelegate,ChangpasswordDelegate,CancelButtondelegate,UITextFieldDelegate>
...@@ -37,6 +38,11 @@ ...@@ -37,6 +38,11 @@
*/ */
@property (nonatomic,strong) NSArray *vcArray; @property (nonatomic,strong) NSArray *vcArray;
/**
* 工具栏
*/
@property (nonatomic,strong) Toolview *toolview;
@end @end
@implementation CustomTabbarController @implementation CustomTabbarController
...@@ -94,12 +100,11 @@ ...@@ -94,12 +100,11 @@
- (void)uiConfigAction - (void)uiConfigAction
{ {
self.tabBar.frame = CGRectMake(Zero, Zero, ScreenWidth, NavigationHeight); self.tabBar.frame = CGRectMake(Zero, Zero, ScreenWidth, NavigationHeight);
Toolview *toolview = [[Toolview alloc]initWithFrame:CGRectMake(Zero, Zero, ScreenWidth, NavigationHeight)]; self.toolview = [[Toolview alloc]initWithFrame:CGRectMake(Zero, Zero, ScreenWidth, NavigationHeight)];
toolview.delegate = self; self.toolview.delegate = self;
toolview.inputField.delegate = self; self.toolview.inputField.delegate = self;
self.delegate = self; self.delegate = self;
[self.tabBar addSubview:toolview]; [self.tabBar addSubview:self.toolview];
//显示体验中心 //显示体验中心
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ShowFollowHeart:) name:@"FollowHeartVC" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ShowFollowHeart:) name:@"FollowHeartVC" object:nil];
} }
...@@ -113,7 +118,6 @@ ...@@ -113,7 +118,6 @@
SearchViewController *searchVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:0]]; SearchViewController *searchVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:0]];
ShoppingViewController *shoppingVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:1]]; ShoppingViewController *shoppingVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:1]];
ClientViewController *clientVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:2]]; ClientViewController *clientVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:2]];
SceneLibraryViewController *sceneVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:4]]; SceneLibraryViewController *sceneVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:4]];
ProductLibraryViewController *productVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:5]]; ProductLibraryViewController *productVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:5]];
CustomerManagementViewController *customerVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:6]]; CustomerManagementViewController *customerVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:6]];
...@@ -142,9 +146,7 @@ ...@@ -142,9 +146,7 @@
#pragma mark -移除系统自带的UITabBarButton #pragma mark -移除系统自带的UITabBarButton
- (void)viewWillLayoutSubviews { - (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews]; [super viewWillLayoutSubviews];
for (UIView *view in self.tabBar.subviews) { for (UIView *view in self.tabBar.subviews) {
if ([view isKindOfClass:NSClassFromString(@"UITabBarButton")]) { if ([view isKindOfClass:NSClassFromString(@"UITabBarButton")]) {
[view removeFromSuperview]; [view removeFromSuperview];
} }
...@@ -155,13 +157,14 @@ ...@@ -155,13 +157,14 @@
#pragma amrk -TabbarButtonClickdelegate代理 #pragma amrk -TabbarButtonClickdelegate代理
- (void)ButtonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button - (void)ButtonClickAction:(NSInteger)Buttontag withButton:(UIButton *)button
{ {
[self.toolview.inputField resignFirstResponder];
[self dismissViewControllerAnimated:NO completion:nil];
_Newbutton = button; _Newbutton = button;
switch (Buttontag) { switch (Buttontag) {
//右侧视图 //右侧视图
case 100: case 100:
[self dismissViewControllerAnimated:YES completion:nil];
[SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil]; [SHARED_APPDELEGATE.mmdrawer toggleDrawerSide:MMDrawerSideRight animated:YES completion:nil];
break; break;
...@@ -185,7 +188,6 @@ ...@@ -185,7 +188,6 @@
//我的客户 //我的客户
case 102: case 102:
[self dismissViewControllerAnimated:YES completion:nil];
self.selectedIndex = 6; self.selectedIndex = 6;
break; break;
...@@ -193,7 +195,6 @@ ...@@ -193,7 +195,6 @@
//购物车 //购物车
case 103: case 103:
[self dismissViewControllerAnimated:YES completion:nil];
//必须设置当前客户才能跳转到购物车 //必须设置当前客户才能跳转到购物车
if (![Shoppersmanager manager].currentCustomer) { if (![Shoppersmanager manager].currentCustomer) {
...@@ -255,21 +256,38 @@ ...@@ -255,21 +256,38 @@
}]; }];
} }
#pragma mark -二维码扫描 #pragma mark -二维码扫描
- (void)QrcodeButtonClick - (void)QrcodeButtonClick
{ {
__weak typeof(self) weakSelf = self;
QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) { //判断权限
[self dismissViewControllerAnimated:YES completion:^{ AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
if(status !=AVAuthorizationStatusAuthorized) {
ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:4]; UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"提示" message:@"请在iPad的“设置-隐私-相机”选项中,允许欧立方访问你的相机" preferredStyle:UIAlertControllerStyleAlert];
product.barcode = url; [alertVC addAction:[UIAlertAction actionWithTitle:@"去设置" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
self.selectedIndex = 4; NSURL * url = [NSURL URLWithString:@"prefs:root=com.gomore.opple"];
dispatch_after(0.2, dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication]openURL:url];
});
}]];
[alertVC addAction:[UIAlertAction actionWithTitle:@"知道了" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}]];
[self presentViewController:alertVC animated:YES completion:nil];
}else {
QRViewController *qrVC = [[QRViewController alloc] initWithScanCompleteHandler:^(NSString *url) {
[self dismissViewControllerAnimated:YES completion:^{
ProductLibraryViewController *product = [SHARED_APPDELEGATE.allControllerArray objectAtIndex_opple:4];
product.barcode = url;
self.selectedIndex = 4;
}];
}]; }];
}]; dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:qrVC animated:YES completion:nil]; [weakSelf presentViewController:qrVC animated:YES completion:nil];
});
}
} }
...@@ -287,7 +305,6 @@ ...@@ -287,7 +305,6 @@
#pragma mark -Search按钮 #pragma mark -Search按钮
- (BOOL)textFieldShouldReturn:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField
{ {
//搜索 //搜索
if (textField.text.length != 0) { if (textField.text.length != 0) {
...@@ -340,28 +357,8 @@ ...@@ -340,28 +357,8 @@
UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController; UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
popover.sourceView = ExperienceCenter.view; popover.sourceView = ExperienceCenter.view;
[self presentViewController:ExperienceCenter animated:YES completion:nil]; [self presentViewController:ExperienceCenter animated:YES completion:nil];
// FollowHeartViewController *followVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:3]];
// [self presentViewController:followVC animated:YES completion:nil];
} }
} }
#pragma mark -禁止跳转
//- (void)
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end @end
...@@ -184,7 +184,6 @@ ...@@ -184,7 +184,6 @@
} }
} }
//点击代理 //点击代理
if ([self.delegate respondsToSelector:@selector(ButtonClickAction:withButton:)]) { if ([self.delegate respondsToSelector:@selector(ButtonClickAction:withButton:)]) {
......
...@@ -40,6 +40,14 @@ ...@@ -40,6 +40,14 @@
<string>wb1111393286</string> <string>wb1111393286</string>
</array> </array>
</dict> </dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>prefs</string>
</array>
</dict>
</array> </array>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>
<array> <array>
......
...@@ -487,7 +487,9 @@ ...@@ -487,7 +487,9 @@
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:nil];
}]]; }]];
[self presentViewController:alertVC animated:YES completion:nil]; dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:alertVC animated:YES completion:nil];
});
} }
......
...@@ -132,12 +132,10 @@ ...@@ -132,12 +132,10 @@
- (void)startRunning { - (void)startRunning {
_device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; _device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
// Input // Input
_input = [AVCaptureDeviceInput deviceInputWithDevice:self.device error:nil]; _input = [AVCaptureDeviceInput deviceInputWithDevice:self.device error:nil];
// Output // Output
_output = [[AVCaptureMetadataOutput alloc]init]; _output = [[AVCaptureMetadataOutput alloc]init];
[_output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()]; [_output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
......
...@@ -289,7 +289,6 @@ ...@@ -289,7 +289,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.sceneOrProductClollectionView.mj_header = headerRefresh; self.sceneOrProductClollectionView.mj_header = headerRefresh;
[self.sceneOrProductClollectionView.mj_header beginRefreshing]; [self.sceneOrProductClollectionView.mj_header beginRefreshing];
self.sceneOrProductClollectionView.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.sceneOrProductClollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.sceneOrProductClollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -306,6 +305,8 @@ ...@@ -306,6 +305,8 @@
[weakSelf getSceneLibrarydatas:weakSelf.conditionModel isRemove:NO]; [weakSelf getSceneLibrarydatas:weakSelf.conditionModel isRemove:NO];
} }
}]; }];
self.sceneOrProductClollectionView.mj_footer.automaticallyHidden = YES;
} }
...@@ -382,7 +383,6 @@ ...@@ -382,7 +383,6 @@
headerRefresh.lastUpdatedTimeLabel.hidden = YES; headerRefresh.lastUpdatedTimeLabel.hidden = YES;
self.sceneOrProductClollectionView.mj_header = headerRefresh; self.sceneOrProductClollectionView.mj_header = headerRefresh;
[self.sceneOrProductClollectionView.mj_header beginRefreshing]; [self.sceneOrProductClollectionView.mj_header beginRefreshing];
self.sceneOrProductClollectionView.mj_footer.automaticallyHidden = YES;
//上拉加载 //上拉加载
self.sceneOrProductClollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ self.sceneOrProductClollectionView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
...@@ -399,6 +399,8 @@ ...@@ -399,6 +399,8 @@
[weakSelf getGoodsListDatasisRemove:NO Withobject:weakSelf.goodsModel]; [weakSelf getGoodsListDatasisRemove:NO Withobject:weakSelf.goodsModel];
} }
}]; }];
self.sceneOrProductClollectionView.mj_footer.automaticallyHidden = 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