| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906 |
- //
- // CustomerSearchDetailVC.m
- // IBOSS
- //
- // Created by guan hong hou on 17/7/1.
- // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved.
- //
- // 功能描述:客户报备详细控制器
- //
- #import "CustomerSearchDetailVC.h"
- #import "JSONKit.h"
- #import "NewCustomerViewController.h"
- #import "DKTextAlignmentFillLabel.h"
- #import "CustomerNameCell.h"
- #import "ContactsCell.h"
- #import "ContactsTelephoneCell.h"
- #import "AddressCell.h"
- #import "CustomerStatusCell.h"
- #import "CustomerClassCell.h"
- #import "ValueFlagCell.h"
- #import "DetailAddressCell.h"
- @interface CustomerSearchDetailVC()<CustomerReportBrowseProtocol>
- {
- // 客户名称cell
- CustomerNameCell *_customerNameCell;
- // 联系人cell
- ContactsCell *_contactsCell;
- // 地址cell
- AddressCell *_addressCell;
- DetailAddressCell *_detailAddressCell;
- BuildingCell *_buildingCell;
- }
- @end
- @implementation CustomerSearchDetailVC
- /**
- UITableView对象
- */
- @synthesize vCustomTableView;
- #pragma -mark - 公共事件
- /**
- viewDidLoad事件
- */
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- _customerReportDetail = [[ParseCustomerReportDetail alloc]init];
- _dataList = [[NSDictionary alloc]init];
- vCustomTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height)];
- vCustomTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
- vCustomTableView.separatorStyle=UITableViewCellSeparatorStyleNone;
- vCustomTableView.backgroundColor = [UIColor whiteColor];
- vCustomTableView.estimatedRowHeight = 42;
- vCustomTableView.rowHeight = UITableViewAutomaticDimension;
- vCustomTableView.delegate = self;
- vCustomTableView.dataSource=self;
- [self.view addSubview:vCustomTableView];
- [self initUI];
- [self initData];
- }
- /**
- 安全区视图发生变化
- */
- -(void)viewSafeAreaInsetsDidChange{
- [self.view setBackgroundColor:[UIColor whiteColor]];
- vCustomTableView.frame = self.view.safeAreaLayoutGuide.layoutFrame;
- [super viewSafeAreaInsetsDidChange];
- }
- /**
- didReceiveMemoryWarning事件
- */
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- }
- /**
- dealloc事件
- */
- - (void)dealloc{
- _customerReportDetail = nil;
- _dataList = nil;
- vCustomTableView = nil;
- _infocell = nil;
- _achievementInfoCell = nil;
- _decorationInfoCell = nil;
- _privacyInfoCell = nil;
- _imageCell = nil;
- _imageAttachmentCell=nil;
- _followInfoCell = nil;
- }
- #pragma -mark - 私有函数
- /**
- 返回
- */
- - (void)goBack
- {
- [self.navigationController popViewControllerAnimated:YES];
- }
- /**
- 初始化ui
- */
- - (void)initUI{
- self.navigationItem.title = @"客户报备明细";
-
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button setImage:[UIImage imageNamed:@"icon_back"] forState:UIControlStateNormal];
- [button addTarget:self action:@selector(goBack)
- forControlEvents:UIControlEventTouchUpInside];
- button.frame = CGRectMake(0, 0,45,22);
-
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
- self.navigationItem.leftBarButtonItem = menuButton;
-
- UIButton *btnRight = [UIButton buttonWithType:UIButtonTypeCustom];
- [btnRight setTitle:@"编辑" forState:UIControlStateNormal];
- btnRight.titleLabel.font = [UIFont systemFontOfSize:ButtonFontOfSize];
- [btnRight addTarget:self action:@selector(goEdit)
- forControlEvents:UIControlEventTouchUpInside];
- btnRight.frame = CGRectMake(0, 0, 35, 12);
- if (self.flagCustomerAndFollow) {
- UIBarButtonItem *menuRightButton = [[UIBarButtonItem alloc] initWithCustomView:btnRight];
- self.navigationItem.rightBarButtonItem = menuRightButton;
-
- }
- }
- /**
- 编辑按钮
- */
- - (void)goEdit{
- self.hidesBottomBarWhenPushed=YES;
- NewCustomerViewController *vc = [[NewCustomerViewController alloc] init];
- vc.sFilingId = self.filingId;
- vc.telephoneFlag=_telephoneFlag;
- vc.refreshDelegate = self;
- [self.navigationController pushViewController:vc animated:YES];
- }
- /**
- 初始化数据
- */
- - (void)initData{
- [self startLoading];
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetCustomersFilingDetailIphone" forKey:@"Action"];
- [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
- [dict setObject:kkUserCode forKey:@"UserCode"];
- [dict setObject:kkUserPwd forKey:@"UserPassword"];
- [dict setObject:kkSessionKey forKey:@"SessionKey"];
- [dict setObject:_filingId forKey:@"FilingID"];
-
- self.downManager = [[ASIDownManager alloc] init];
- NSString *JsonArr= [self.downManager syncPostHttpRequestUrl:urlStr dic:dict path:nil filename:nil fileType:nil];
- // 取消进度条
- [self cancel];
- if([JsonArr length] != 0){
- // 服务器返回数据
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:JsonArr];
- // 服务器返回数据状态值
- int iStatus = resultModel.status;
- // 服务器返回数据消息
- NSString *message = resultModel.message;
- // 服务器返回数据状态值正确
-
- if (iStatus == 0) {
- // 服务器返回数据结果
- NSDictionary *infodic = (NSDictionary *)resultModel.result;
- if(infodic != nil)
- {
- [_customerReportDetail ParseCustomerInfoDetailArr: infodic];
- [vCustomTableView reloadData];
- }
- }
- else if(iStatus == ActionResultStatusAuthError
- ||iStatus == ActionResultStatusNoLogin
- ||iStatus == ActionResultStatusLogined||iStatus==ActionResultSessionOverdue){
- [self showReLoginDialog:message];
- }
- else {
- [self showAlertViewText:message];
-
- }
- }
- }
- /**
- 进度条隐藏
- */
- - (void)cancel {
- [self stopLoading];
- }
- #pragma -mark - 回调函数
- - (void)refreshData{
- _imageCell = nil;
- _imageAttachmentCell=nil;
- [self initData];
- }
- /**
- cell回调函数
-
- @param text <#text description#>
- */
- - (void)showAlertView:(NSString *)text{
- [self showAlertViewText:text];
- }
- /**
- cell回调函数
-
- @param message <#message description#>
- */
- - (void)showReLoginAlertView:(NSString *)message{
- [self showReLoginDialog:message];
- }
- #pragma -mark - tableView回调
- /**
- Section
-
- @param tableView <#tableView description#>
- @return <#return value description#>
- */
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
- }
- /**
- 行数
-
- @param tableView <#tableView description#>
- @param section <#section description#>
- @return <#return value description#>
- */
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- int rowCount=0;
- if([kkAppName isEqualToString:@""])
- {
- rowCount=17;
- }
- else if([kkAppName isEqualToString:@"顺城"]){
- rowCount=16;
- }
- return rowCount;
- }
- /**
- 估计高度
-
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 53;
- }
- /**
- cell的高度
-
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- int row = (int)indexPath.row;
- _customerInfoDetail = [[_customerReportDetail customerInfoDetailArr] objectAtIndex:0];
-
-
- if(row==0)
- {
- // 客户名称
- if( _customerNameCell != nil){
- return _customerNameCell.height;
- }else{
- return 31;
- }
- }
-
-
- if(row==1)
- {
- // 联系人
- if( _contactsCell != nil){
- return _contactsCell.height;
- }else{
- return 31;
- }
-
- }
-
- if(row==3)
- {
- // 地址
- if( _addressCell != nil){
- return _addressCell.height;
- }else{
- return 31;
- }
- }
-
- if(row==4)
- {
- if(_customerInfoDetail.isCommunityFlag==0)
- {
- if(_detailAddressCell!=nil){
- return _detailAddressCell.height;
- }
- else{
- return 31;
- }
- }
- else
- {
- if(_buildingCell!=nil)
- {
- return _buildingCell.height;
- }
-
- else{
- return 31;
- }
- }
- }
-
-
- if(row==2||row==5||row==6||row==7||row==8)
- {
- return 31;
- }
-
-
- if(row==9)
- {
-
- return 40;
- }
-
- if(row==10)
- {
- // 基本信息
- if( _infocell != nil){
- if([_infocell.isOpen isEqualToString: @"1"])
- {
- return _infocell.height ;
-
- }
- else
- {
- return 50;
-
- }
- }
- }
-
- if(row==11)
-
- {
- // 业绩信息
- if(_achievementInfoCell != nil){
- if([_achievementInfoCell.isOpen isEqualToString: @"1"])
- {
- return _achievementInfoCell.height ;
-
- }
- else
- {
- return 50;
-
- }
- }
- }
- if(row==12){
- // 装修信息
- if(_decorationInfoCell != nil){
- if([_decorationInfoCell.isOpen isEqualToString: @"1"])
- {
- return _decorationInfoCell.height;
-
- }
- else
- {
- return 50;
-
- }
- }
- }
-
-
- if(row==13)
- {
- // 私密信息
- if(_privacyInfoCell != nil){
- if([_privacyInfoCell.isOpen isEqualToString: @"1"])
- {
- return _privacyInfoCell.height;
-
- }
- else
- {
- return 50;
-
- }
- }
- }
- if(row==14)
- {
- // 图片
- _customerInfoDetail = [[_customerReportDetail customerInfoDetailArr] objectAtIndex:0];
- NSMutableArray *imgArray = [_customerInfoDetail imageDisplayArr];
- if([_imageCell.isOpen isEqualToString: @"1"])
- {
-
- if(imgArray != nil&&[imgArray count]>0){
- CGFloat height;
-
- height= [_customerInfoDetail getPhotoFrame:imgArray].size.height;
- return height + 53;
-
- }
- else{
- return 53;
-
- }
-
- }
- else
- {
- return 53;
-
- }
-
-
- }
- if([kkAppName isEqualToString:@""])
- {
- if(row==15)
- {
- // 图片
- _customerInfoDetail = [[_customerReportDetail customerInfoDetailArr] objectAtIndex:0];
- NSMutableArray *imgArray = [_customerInfoDetail imageAttachmentDisplayArr];
- if([_imageAttachmentCell.isOpen isEqualToString: @"1"])
- {
-
- if(imgArray != nil&&[imgArray count]>0){
- CGFloat height;
-
- height= [_customerInfoDetail getPhotoFrame:imgArray].size.height;
- return height + 53;
-
- }
- else{
- return 53;
-
- }
-
- }
- else
- {
- return 53;
-
- }
-
-
- }
-
- if(row==16)
- {
- // 跟进
- if(_followInfoCell != nil){
- if([_followInfoCell.isOpen isEqualToString: @"1"]){
- int infocellHeight= [_followInfoCell subviewHeight]+54;
- return infocellHeight+53;
-
- }
- else{
- return 53;
-
- }
-
- }
-
- }
-
- }
-
- if([kkAppName isEqualToString:@"顺城"])
- {
- if(row==15)
- {
- // 跟进
- if(_followInfoCell != nil){
- if([_followInfoCell.isOpen isEqualToString: @"1"]){
- int infocellHeight= [_followInfoCell subviewHeight]+54;
- return infocellHeight+53;
-
- }
- else{
- return 53;
-
- }
-
- }
-
- }
- }
-
- return 0;
- }
-
-
- /**
- 单元格
-
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- - (UITableViewCell *)tableView:(UITableView *)tableView
- cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- if (_customerReportDetail == nil ||
- [_customerReportDetail customerInfoDetailArr] == nil
- || [[_customerReportDetail customerInfoDetailArr] count] == 0) {
- return [[UITableViewCell alloc] init];
- }
- int row = (int)indexPath.row;
-
- _customerInfoDetail = [[_customerReportDetail customerInfoDetailArr] objectAtIndex:0];
-
- if(row==7){
- // 有效标识
- ValueFlagCell *valueflagcell = [[ValueFlagCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell0"];
- valueflagcell.selectionStyle=UITableViewCellSelectionStyleNone;
- [valueflagcell setflagName:[_customerInfoDetail valueFlag]];
- return valueflagcell;
-
-
- }
-
- if(row==8)
- {
- AuditStatusCell *auditStatusCell=[[AuditStatusCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell20"];
- auditStatusCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [auditStatusCell setAuditStatusName:[_customerInfoDetail auditStatus]];
- return auditStatusCell;
-
- }
-
- if(row==9)
- {
- // 成交状态
- TurnoverStatusCell *cell = [[TurnoverStatusCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell13"];
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- [cell setstatusName:[_customerInfoDetail turnoverStatus]];
- return cell;
-
-
- }
-
- if(row==0)
- {
- // 客户名称
- _customerNameCell = [[CustomerNameCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell1"];
- _customerNameCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_customerNameCell setCustomerName:[_customerInfoDetail customerName]];
- return _customerNameCell;
-
-
- }
-
- if(row==1)
- {
- // 联系人
- _contactsCell = [[ContactsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell2"];
- _contactsCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_contactsCell setContactsName:[_customerInfoDetail contacts]];
- return _contactsCell;
-
-
- }
- if(row==2)
- {
- // 联系电话
- ContactsTelephoneCell *contactsTelephoneCell = [[ContactsTelephoneCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell3"];
- contactsTelephoneCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [contactsTelephoneCell setContactsTelephone:[_customerInfoDetail telephone] telephoneFlag:_telephoneFlag] ;
- return contactsTelephoneCell;
-
-
- }
-
- if(row==3)
- {
- // 地址
- _addressCell = [[AddressCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell4"];
- _addressCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_addressCell setAddress:[_customerInfoDetail address]];
- return _addressCell;
-
- }
-
- if(row==4)
- {
- NSInteger isCommunityFlag= _customerInfoDetail.isCommunityFlag;
- // 地址
- if(isCommunityFlag==0)
- {
- _detailAddressCell = [[DetailAddressCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell4"];
- _detailAddressCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_detailAddressCell setDetailAddress:[_customerInfoDetail detailAddress]];
- return _detailAddressCell;
- }
- else
- {
- _buildingCell=[[BuildingCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell4"];
- _buildingCell.selectionStyle=UITableViewCellSelectionStyleNone;
- NSString *detailAddress=[NSString stringWithFormat:@"%@%@%@%@%@%@%@%@%@%@%@",_customerInfoDetail.ban,@"栋",@" ",_customerInfoDetail.unit,@"单元/梯",@" ",_customerInfoDetail.floor,@"楼",@" ",_customerInfoDetail.roomNumber,@"号"];
- [_buildingCell setBuilding:detailAddress];
- return _buildingCell;
- }
-
- }
-
-
- if(row==5)
- {
- // 客户状态
- CustomerStatusCell *statusCell = [[CustomerStatusCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell5"];
- statusCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [statusCell setCustomerStatus:[_customerInfoDetail status]];
- return statusCell;
-
- }
- if(row==6)
- {
- // 客户级别
- CustomerClassCell *customerClassCell = [[CustomerClassCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell6"];
- customerClassCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [customerClassCell setCustomerClass:[_customerInfoDetail customerClass]];
- return customerClassCell;
-
-
- }
-
- if(row==10)
- {
- // 基本信息
- static NSString *cellIdentifier = @"cell7";
- _infocell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
- if (!_infocell) {
- _infocell = [[BasicInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
- _infocell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- else
- //当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
- {
- while ([_infocell.contentView.subviews lastObject] != nil) {
- [(UIView *)[_infocell.contentView.subviews lastObject] removeFromSuperview];
- }
- }
- _basicInfo = [[BasicInfo alloc]init];
- _basicInfo.channelName = [_customerInfoDetail channelName];
- _basicInfo.customerProperty = [_customerInfoDetail customerProperty];
- _basicInfo.otherContacts = [_customerInfoDetail otherContacts];
- _basicInfo.customerArea = [_customerInfoDetail customerArea];
- _basicInfo.remark = [_customerInfoDetail remark];
- [_infocell setBasicInfo:_basicInfo];
- _infocell.delegate=self;
- return _infocell;
-
-
-
- }
-
- if(row==11)
- {
- // 业绩信息
- static NSString *CellIdentifier = @"cell8";
- _achievementInfoCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (!_achievementInfoCell) {
- _achievementInfoCell = [[AchievementInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- _achievementInfoCell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- else
- //当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
- {
- while ([_achievementInfoCell.contentView.subviews lastObject] != nil) {
- [(UIView *)[_achievementInfoCell.contentView.subviews lastObject] removeFromSuperview];
- }
- }
- _achievementInfo = [[AchievementInfo alloc] init];
- _achievementInfo.organizationName = [_customerInfoDetail organizationName];
- _achievementInfo.depositAmount=[_customerInfoDetail depositAmount];
- _achievementInfo.userName=[_customerInfoDetail userName];
- _achievementInfo.salesman = [_customerInfoDetail salesman];
- _achievementInfo.intermediateCustomer = [_customerInfoDetail intermediateCustomer];
- _achievementInfo.intermediateCustomerStaff = [_customerInfoDetail intermediateCustomerStaff];
- _achievementInfo.estimateDealDate = [_customerInfoDetail estimateDealDate];
- _achievementInfo.estimateTransactionAmount = [_customerInfoDetail estimateTransactionAmount];
- _achievementInfo.relatedAmount = [_customerInfoDetail relatedAmount];
- _achievementInfo.discussionResult = [_customerInfoDetail discussionResult];
- [_achievementInfoCell setAchievementInfo:_achievementInfo];
- _achievementInfoCell.delegate=self;
- return _achievementInfoCell;
-
-
-
- }
- if(row==12)
- {
- // 装修信息
- static NSString *CellIdentifier = @"cell9";
- _decorationInfoCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (!_decorationInfoCell) {
- _decorationInfoCell = [[DecorationInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- _decorationInfoCell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- else
- //当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
- {
- while ([_decorationInfoCell.contentView.subviews lastObject] != nil) {
- [(UIView *)[_decorationInfoCell.contentView.subviews lastObject] removeFromSuperview];
- }
- }
-
- _decorationInfo = [[DecorationInfo alloc]init];
- _decorationInfo.area = [_customerInfoDetail area];
- _decorationInfo.decorationProcess = [_customerInfoDetail decorationProcess];
- _decorationInfo.furnitureColor = [_customerInfoDetail furnitureColor];
- _decorationInfo.household = [_customerInfoDetail household];
- _decorationInfo.decorationCompany = [_customerInfoDetail decorationCompany];
- _decorationInfo.productDisplay = [_customerInfoDetail productDisplay];
- _decorationInfo.estimatedStartDate = [_customerInfoDetail estimatedStartDate];
- [_decorationInfoCell setDecorationInfo:_decorationInfo];
- _decorationInfoCell.delegate=self;
-
- return _decorationInfoCell;;
-
-
-
- }
- if(row==13)
- {
- // 私密信息
- static NSString *CellIdentifier = @"cell10";
- _privacyInfoCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (!_privacyInfoCell) {
- _privacyInfoCell = [[PrivacyInfoCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
- _privacyInfoCell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- else
- // 当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
- {
- while ([_privacyInfoCell.contentView.subviews lastObject] != nil) {
- [(UIView *)[_privacyInfoCell.contentView.subviews lastObject] removeFromSuperview];
- }
- }
-
- _privacyInfo = [[PrivacyInfo alloc]init];
- _privacyInfo.birthday = [_customerInfoDetail birthday];
- _privacyInfo.gender = [_customerInfoDetail gender];
- _privacyInfo.occupation = [_customerInfoDetail occupation];
- _privacyInfo.hobby = [_customerInfoDetail hobby];
- _privacyInfo.loveStyle = [_customerInfoDetail loveStyle];
- _privacyInfo.phisicalCharacteristics = [_customerInfoDetail physicalCharacteristics];
- _privacyInfo.educational = [_customerInfoDetail educational];
- _privacyInfo.focusPeople = [_customerInfoDetail focusPeople];
- [_privacyInfoCell setPrivacyInfo:_privacyInfo];
- _privacyInfoCell.delegate=self;
-
- return _privacyInfoCell;
-
- }
-
- if(row==14){
- // 图片
- if(!_imageCell){
- _imageCell = [[ImageCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell11"];
- _imageCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_imageCell setImageInfo:_customerInfoDetail ];
- }
-
- _imageCell.delegate=self;
-
- return _imageCell;
-
- }
- if([kkAppName isEqualToString:@""])
- {
-
- if(row==15)
- {
- // 图片
- if(!_imageAttachmentCell){
- _imageAttachmentCell = [[ImageAttachmentCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell13"];
- _imageAttachmentCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_imageAttachmentCell setImageInfo:_customerInfoDetail];
- }
-
- _imageAttachmentCell.delegate=self;
-
- return _imageAttachmentCell;
-
- }
-
- if(row==16)
- {
- // 跟进信息
- if(!_followInfoCell){
- _followInfoCell = [[FollowInfoCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell12"];
- _followInfoCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_followInfoCell setFollowInfo:_filingId];
- _followInfoCell.delegate=self;
- _followInfoCell.alertDelegate = self;
- }
-
- return _followInfoCell;
-
- }
- }
-
- if([kkAppName isEqualToString:@"顺城"])
- {
- if(row==15)
- {
- // 跟进信息
- if(!_followInfoCell){
- _followInfoCell = [[FollowInfoCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell12"];
- _followInfoCell.selectionStyle=UITableViewCellSelectionStyleNone;
- [_followInfoCell setFollowInfo:_filingId];
- _followInfoCell.delegate=self;
- _followInfoCell.alertDelegate = self;
- }
-
- return _followInfoCell;
-
- }
-
-
-
-
-
-
-
-
-
-
-
- }
-
- return [[UITableViewCell alloc] init];
- }
- /**
- 单元格点击
-
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- */
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
- }
- /**
- 单元格颜色
-
- @param tableView <#tableView description#>
- @param cell <#cell description#>
- @param indexPath <#indexPath description#>
- */
- - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
- {
- cell.backgroundColor = [UIColor whiteColor];
- }
- /**
- 刷新数据源
- */
- - (void)refreshTableView
- {
- [vCustomTableView reloadData];
- }
- @end
|