Commit fe3c961e authored by 勾芒's avatar 勾芒

增加公司字段

parent 1df7dae8
......@@ -180,6 +180,7 @@
myclientModel.address = objc.address;
myclientModel.picture = objc.picture;
myclientModel.lastVisitedTime = objc.lastVisitedTime;
myclientModel.company = objc.company;
[self.CustomerresultArray addObject:myclientModel];
}
......@@ -286,7 +287,7 @@
[Customermanager manager].customerID = model.fid;
[Customermanager manager].customerName = model.name;
[Customermanager manager].customerPhoneNumber = model.mobile;
[Customermanager manager].companyName = model.address;
[Customermanager manager].companyName = model.company;
[Customermanager manager].cutomerAddress = model.address;
[Customermanager manager].header = model.picture;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
......@@ -329,7 +330,7 @@
[Customermanager manager].customerID = model.fid;
[Customermanager manager].customerName = model.name;
[Customermanager manager].customerPhoneNumber = model.mobile;
[Customermanager manager].companyName = model.address;
[Customermanager manager].companyName = model.company;
[Customermanager manager].cutomerAddress = model.address;
[Customermanager manager].header = model.picture;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
......@@ -482,7 +483,7 @@
//保存客户信息
[Customermanager manager].customerName = customerEntity.name;
[Customermanager manager].customerPhoneNumber = customerEntity.mobile;
[Customermanager manager].companyName = customerEntity.address;
[Customermanager manager].companyName = customerEntity.company;
[Customermanager manager].cutomerAddress = customerEntity.address;
[Shoppersmanager manager].currentCustomer = YES;
[self.addpersonInformationButton setTitle:@"退出当前客户" forState:UIControlStateNormal];
......
......@@ -116,9 +116,8 @@
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:self.model.picture] placeholderImage:ReplaceImage];
self.customerName.text = self.model.name;
self.customerPhoneNumber.text = self.model.mobile;
self.companyName.text = self.model.name;
self.companyName.text = self.model.company;
self.customerLocation.text = self.model.address;
self.setupButton.selected = self.model.selectedState;
[self.setupButton setTitle:self.model.selectedState?@"退出当前客户":@"设为当前客户" forState:UIControlStateNormal];
}
......
......@@ -16,7 +16,7 @@
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:[[Customermanager manager] header]] placeholderImage:REPLACEIMAGE];
self.customerName.text = [[Customermanager manager] customerName];
self.companyName.text = [[Customermanager manager] customerName];
self.companyName.text = [[Customermanager manager] companyName];
self.companyLocation.text = [[Customermanager manager] cutomerAddress];
self.customerPhoneNumber.text = [[Customermanager manager] customerPhoneNumber];
......@@ -29,7 +29,7 @@
NSArray *images = [_model.picture componentsSeparatedByString:@","];
[self.customerHeader sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
self.customerName.text = _model.name;
self.companyName.text = _model.name;
self.companyName.text = _model.company;
self.customerAddress.text = _model.address;
self.customerPhoneNumber.text = _model.mobile;
}
......
......@@ -15,7 +15,7 @@
#import "ExperienceCentreViewController.h"
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate,TableviewSelectedIndexdelegate,SelectedCollectionItemDelegate>
@interface ProductLibraryViewController ()<UICollectionViewDelegate,UICollectionViewDataSource,UIGestureRecognizerDelegate,ScreeningButtonClickdelegate,TableviewSelectedIndexdelegate,SelectedCollectionItemDelegate,DZNEmptyDataSetSource>
/**
* 筛选背景框View
......@@ -183,6 +183,7 @@
[self CreateMBProgressHUDLoding];
[[NetworkRequestClassManager Manager] NetworkRequestWithURL:[NSString stringWithFormat:@"%@%@",ServerAddress,@"/goods/query"] WithRequestType:0 WithParameter:conditon WithReturnValueBlock:^(id returnValue) {
self.productCollectionView.emptyDataSetSource = self;
[self endRefreshingForTableView:self.productCollectionView];
[self RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) {
......@@ -214,6 +215,7 @@
- (void)uiConfigAction
{
self.indexPage = 1;
self.selectedIndex = 9999;
self.productCollectionLayout.itemSize = CGSizeMake((ScreenWidth-100)/3, (ScreenWidth-100)/3);
self.productCollectionLayout.sectionInset = UIEdgeInsetsMake(20, 30, 20, 30);
self.productCollectionLayout.minimumLineSpacing = 20;
......@@ -278,6 +280,7 @@
break;
default:
weakSelf.condtionModel.nameLike = weakSelf.selectedCode;
break;
}
......@@ -515,37 +518,37 @@
- (void)ScreeningButtonClick
{
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
//// [self presentViewController:ExperienceCenter animated:YES completion:nil];
//
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
// popover.sourceView = ExperienceCenter.view;
ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// [self presentViewController:ExperienceCenter animated:YES completion:nil];
self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject];
self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
self.screenView.delegate = self;
//点击手势
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView)];
tap.delegate = self;
tap.cancelsTouchesInView = NO;
[self.screenView addGestureRecognizer:tap];
self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
[self.view.window addSubview:self.screenView];
self.screenView.alpha = 0;
//监听Segmented菜单
[self.screenView.sortingSegmented addTarget:self action:@selector(sortingSegmentedClick:) forControlEvents:UIControlEventValueChanged];
self.selectedIndex = 0;
[self CreateClassificationView];
ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
popover.sourceView = ExperienceCenter.view;
[self presentViewController:ExperienceCenter animated:YES completion:nil];
[UIView animateWithDuration:0.2 animations:^{
self.screenView.alpha = 1;
}];
// self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject];
// self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
// self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
// self.screenView.delegate = self;
// //点击手势
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView)];
// tap.delegate = self;
// tap.cancelsTouchesInView = NO;
// [self.screenView addGestureRecognizer:tap];
// self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
// [self.view.window addSubview:self.screenView];
// self.screenView.alpha = 0;
//
// //监听Segmented菜单
// [self.screenView.sortingSegmented addTarget:self action:@selector(sortingSegmentedClick:) forControlEvents:UIControlEventValueChanged];
//
// self.selectedIndex = 0;
// [self CreateClassificationView];
//
// [UIView animateWithDuration:0.2 animations:^{
//
// self.screenView.alpha = 1;
// }];
}
......@@ -619,12 +622,7 @@
#pragma mark -选中条件
- (void)selectedItem:(NSString *)typecode withTitle:(NSString *)title
{
self.condtionModel.styleEquals = nil;
self.condtionModel.spaceEquals = nil;
self.condtionModel.categoryEquals = nil;
self.condtionModel.startprice = nil;
self.condtionModel.endprice = nil;
self.condtionModel.materialEqueals = nil;
[self emptyModel];
[self DismissScreenView];
if (self.selectedIndex == 4) {
self.selectedCode = title;
......@@ -776,6 +774,32 @@
#pragma mark -友好界面
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView
{
return TCImage(@"圆角矩形-3-副本");
}
- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
{
return [[NSAttributedString alloc]initWithString:@"暂无数据" attributes:nil];
}
#pragma mark -清空模型
- (void)emptyModel
{
self.condtionModel.nameLike = nil;
self.condtionModel.styleEquals = nil;
self.condtionModel.spaceEquals = nil;
self.condtionModel.categoryEquals = nil;
self.condtionModel.startprice = nil;
self.condtionModel.endprice = nil;
self.condtionModel.materialEqueals = nil;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -196,19 +196,25 @@
if (isScene) {
if (![self.sceneDatasArray containsObject:image]) {
isThere(NO);
[self.sceneDatasArray addObject:image];
}else
{
isThere(YES);
[self.sceneDatasArray removeObject:image];
[self.sceneScrollview reloadData];
}
}else
{
if (![self.productDatasArray containsObject:image]) {
isThere(NO);
[self.productDatasArray addObject:image];
}else
{
isThere(YES);
[self.productDatasArray removeObject:image];
[self.productScrollview reloadData];
}
}
}
......
......@@ -156,12 +156,6 @@
#define SEARCHHISTORY @"searchhistory"
/**
* PDF地址
*/
#define PDFSERADDRESS @"http://139.196.195.30:8090/opple-web/"
/**
* 默认图
*/
......
......@@ -18,6 +18,13 @@
self.goodsName.text = _model.name;
self.goodsSpecifications.text = _model.code;
self.goodsPrice.text = [NSString stringWithFormat:@"¥%@",[_model.tagPrice stringValue]];
if (model.isSelectedState) {
self.layer.borderWidth = 2.0f;
self.layer.borderColor = kMainBlueColor.CGColor;
}else
{
self.layer.borderWidth = 0.f;
}
}
@end
......@@ -16,7 +16,7 @@
#import "ProductScreeningCollectionViewCell.h"
#import "GoodsCategoryModel.h"
@interface SceneViewController ()<UITableViewDelegate,UITableViewDataSource,UIGestureRecognizerDelegate,UICollectionViewDelegate,UICollectionViewDataSource,DZNEmptyDataSetSource>
@interface SceneViewController ()<UITableViewDelegate,UITableViewDataSource,UIGestureRecognizerDelegate,UICollectionViewDelegate,UICollectionViewDataSource,DZNEmptyDataSetSource,UITextFieldDelegate>
/**
* 场景数据源
......@@ -196,7 +196,7 @@
self.styleButton.selected = YES;
self.styleButton.backgroundColor = kMainBlueColor;
self.rightSelectedIndex = 0;
self.searchProductField.delegate = self;
//筛选Tableview
self.screeningTableView.delegate = self;
......@@ -644,13 +644,7 @@
button.selected = YES;
button.backgroundColor = kTCColor(221, 221, 221);
}
//清空状态
self.goodsModel.styleEquals = nil;
self.goodsModel.spaceEquals = nil;
self.goodsModel.categoryEquals = nil;
self.goodsModel.startprice = nil;
self.goodsModel.endprice = nil;
self.goodsModel.materialEqueals = nil;
[self emptyModel];
switch (self.rightSelectedIndex) {
case 0://风格
{
......@@ -782,6 +776,7 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
__weak typeof(self) weakSelf = self;
[self emptyModel];
if (self.isScene) {
ScreeningCollectionViewCell *cell = (ScreeningCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
CGPoint startPoint = [cell convertPoint:cell.sceneImageView.center toView:self.sceneOrProductClollectionView.window];
......@@ -792,15 +787,15 @@
[weakSelf StartAddShoppingCarAnimationWithimage:[cell.sceneImageView image] withStartpoint:startPoint withSize:cell.mj_size];
SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item];
model.isSelectedSate = YES;
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}else
{
SceneListModel *model = [self.sceneDatasArray objectAtIndex_opple:indexPath.item];
model.isSelectedSate = NO;
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}
}];
}
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}else
{
ProductScreeningCollectionViewCell *cell = (ProductScreeningCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
......@@ -813,14 +808,15 @@
[self StartAddShoppingCarAnimationWithimage:[cell.goodsImageView image] withStartpoint:startPoint withSize:cell.mj_size];
GoodsCategoryModel *model = [self.productDatasArray objectAtIndex_opple:indexPath.item];
model.isSelectedState = YES;
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}else
{
GoodsCategoryModel *model = [self.productDatasArray objectAtIndex_opple:indexPath.item];
model.isSelectedState = NO;
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}
}];
}
[self.sceneOrProductClollectionView reloadItemsAtIndexPaths:@[indexPath]];
}
}
......@@ -944,6 +940,7 @@
for (int i=0; i<self.openArray.count; i++) {
[self.openArray replaceObjectAtIndex:i withObject:@"0"];
}
[self emptyModel];
self.rightSelectedIndex = sender.tag - 100;
[self RemoveAllButtonisSelected];
[self CancelTableviewSectionState];
......@@ -968,33 +965,6 @@
}
#pragma mark -UIGestureRecognizerDelegate代理
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
......@@ -1007,6 +977,18 @@
}
#pragma mark -搜索框
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
[self emptyModel];
self.goodsModel.nameLike = textField.text;
[self.sceneOrProductClollectionView.mj_header beginRefreshing];
return YES;
}
#pragma mark -返回手势
- (void)ReturnDismiss
{
......@@ -1022,6 +1004,19 @@
}
#pragma mark -清空模型
- (void)emptyModel
{
self.searchProductField.text = nil;
self.goodsModel.nameLike = nil;
self.goodsModel.styleEquals = nil;
self.goodsModel.spaceEquals = nil;
self.goodsModel.categoryEquals = nil;
self.goodsModel.startprice = nil;
self.goodsModel.endprice = nil;
self.goodsModel.materialEqueals = nil;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -19,8 +19,7 @@
self.layer.borderColor = kMainBlueColor.CGColor;
}else
{
self.layer.borderWidth = 0;
self.layer.borderColor = kMainBlueColor.CGColor;
self.layer.borderWidth = 0.f;
}
}
......
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