| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971 |
- //
- // CustomerCurrentAccountSummaryReportVC.m
- // IBOSS
- //
- // Created by 关宏厚 on 2021/2/24.
- // Copyright © 2021 elongtian. All rights reserved.
- //
- #import "CustomerCurrentAccountSummaryReportVC.h"
- #import "DateFormat.h"
- @interface CustomerCurrentAccountSummaryReportVC ()
- {
- UIView *headView;
- UIButton *btnAdvance;
- UIButton *btnReceivable;
- UIButton *btnBalance;
- CAShapeLayer *btnAdvanceMaskLayer;
- CAShapeLayer *btnBalanceMaskLayer;
- UIView *advanceView;
- UIView *receivableView;
- UIView *balanceTotalView;
- UIView *totalTitleView;
- UIView *advanceListTitleView;
-
-
- UIView *advanceListTitleView1;
-
- UIView *advanceListTitleView2;
- NSMutableDictionary *_cellHeight;
- }
- @end
- @implementation CustomerCurrentAccountSummaryReportVC
- - (void)viewDidLoad {
- [super viewDidLoad];
- _customerCurrentSummaryList=[[NSMutableArray alloc]init];
- _customerCurrentSummaryFilterList=[[NSMutableArray alloc]init];
- _cellHeight = [[NSMutableDictionary alloc] init];
- _startDate=[DateFormat getCurrentDate];
- _endDate=[DateFormat getCurrentDate];
- [self initSlideSlip];
- [self initUI];
- [self loadNavStyle];
- _advanceFlag=@"1";
- _startDate=[DateFormat getCurrentDate];
- _endDate=[DateFormat getCurrentDate];
- _isFilterZeroAmount=YES;
- [self startLoading];
- [self loadData];
-
- }
- /**
- 抽屉初始化
- */
- - (void)initSlideSlip{
- // 抽屉对象
- __weak typeof(self) weakself=self;
- self.filterController = [[SideSlipFilterController alloc] initWithSponsor:self resetBlock:^(NSArray *dataList) {
- for (SideSlipModel *model in dataList) {
- model.selectedItemList = nil;
- model.customDict = nil;
- }
- } commitBlock:^(NSArray *dataList) {
- // 查询条件
- SideSlipModel *model = dataList[0];
-
- self->_currentSummarySearchModel = [model.customDict objectForKey:CUSTOMER_CURRENT_SUMMARY_SEARCH_MODEL];
-
-
- self->_channelId=self->_currentSummarySearchModel.channelId;
-
- self->_organizationCode=self->_currentSummarySearchModel.organizationCode;
-
-
- self->_startDate=self->_currentSummarySearchModel.startDate;
-
- self->_endDate=self->_currentSummarySearchModel.endDate;
-
- self->_customerCode=self->_currentSummarySearchModel.customerCode;
- self->_customerName=self->_currentSummarySearchModel.customerName;
- self->_customerTelephone=self->_currentSummarySearchModel.customerTelephone;
- self->_customerAddress=self->_currentSummarySearchModel.customerAddress;
- self->_isFilterZeroAmount=self->_currentSummarySearchModel.isFilterZeroAmount;
- if(self->_customerCurrentSummaryList!=nil&&self->_customerCurrentSummaryList.count>0)
- {
- [self->_customerCurrentSummaryList removeAllObjects];
-
- }
- if(self->_customerCurrentSummaryFilterList!=nil&&self->_customerCurrentSummaryFilterList.count>0)
- {
- [self->_customerCurrentSummaryFilterList removeAllObjects];
- [self->_vTableView reloadData];
- }
-
- [self startLoading];
- [self clearData];
- [self loadData];
-
- [weakself.filterController dismiss];
-
- }];
- _filterController.animationDuration = AnimationDuration;
- _filterController.hasHeadView = YES;
- _filterController.sideSlipLeading = 0.1*[UIScreen mainScreen].bounds.size.width;
- _filterController.dataList = [self packageDataList];
- }
- -(void)clearData
- {
- _lblLastDepositReceived.text=@"0.00";
- _lblNextDepositReceived.text=@"0.00";
- _lblLastAccountReceivable.text=@"0.00";
- _lblSalesAmount.text=@"0.00";
- _lblRefundAmount.text=@"0.00";
- _lblAdjustAmount.text=@"0.00";
- _lblVerificationSum.text=@"0.00";
- _lblNextAccountReceivable.text=@"0.00";
- _lblBalanceAmount.text=@"0.00";
- _lblDepositReceivedEarnest.text=@"0.00";
- }
- -(void)initUI
- {
- CGFloat topMargin=10;
- headView=[UIView new];
- headView.frame=CGRectMake(0, 0,Screen_Width,0);
- [headView setBackgroundColor:[UIColor whiteColor]];
- [self.view addSubview:headView];
- btnAdvance= [[UIButton alloc] initWithFrame:CGRectMake(Screen_Width/2-105-10,topMargin, 70, 25)];
- [btnAdvance setTitle:@"预收" forState:UIControlStateNormal];
- btnAdvance.tag=1000;
- [btnAdvance setTitleColor:[UIColor redColor]
- forState:UIControlStateNormal];
-
- btnAdvance.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [btnAdvance addTarget:self action:@selector(selectAmount:) forControlEvents:UIControlEventTouchUpInside];
- UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:btnAdvance.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerBottomLeft cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer = [CAShapeLayer layer];
- maskLayer.frame = btnAdvance.bounds;
- maskLayer.path = maskPath.CGPath;
- btnAdvance.layer.mask = maskLayer;
-
- [headView addSubview:btnAdvance];
-
- btnAdvanceMaskLayer = [CAShapeLayer layer];
- btnAdvanceMaskLayer.frame = btnAdvance.bounds;
- btnAdvanceMaskLayer.path = maskPath.CGPath;
- btnAdvanceMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnAdvanceMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnAdvanceMaskLayer.lineWidth=1;
- [btnAdvance.layer addSublayer:btnAdvanceMaskLayer];
-
- btnReceivable = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(btnAdvance.frame),topMargin, 70, 25)];
-
- [btnReceivable setTitle:@"应收" forState:UIControlStateNormal];
- btnReceivable.layer.cornerRadius=0;
- btnReceivable.layer.borderWidth=1;
- btnReceivable.tag=1001;
- [btnReceivable addTarget:self action:@selector(selectAmount:) forControlEvents:UIControlEventTouchUpInside];
- [btnReceivable setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- [btnReceivable.layer setMasksToBounds:YES];//设置按钮的圆角半径不会被遮挡
- btnReceivable.layer.borderColor=[UIColor lightGrayColor].CGColor;
-
- btnReceivable.titleLabel.font = [UIFont systemFontOfSize: 10.0];
-
- [headView addSubview:btnReceivable];
-
- btnBalance= [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(btnReceivable.frame),topMargin, 70, 25)];
-
-
- [btnBalance setTitle:@"余额" forState:UIControlStateNormal];
- btnBalance.tag=1002;
- btnBalance.titleLabel.font = [UIFont systemFontOfSize: 10.0];
- [btnBalance addTarget:self action:@selector(selectAmount:) forControlEvents:UIControlEventTouchUpInside];
- [btnBalance setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
- UIBezierPath *maskPath2 = [UIBezierPath bezierPathWithRoundedRect:btnBalance.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(25.0, 25.0)];
- CAShapeLayer *maskLayer2 = [CAShapeLayer layer];
- maskLayer2.frame = btnBalance.bounds;
- maskLayer2.path = maskPath2.CGPath;
- btnBalance.layer.mask = maskLayer2;
-
- [headView addSubview:btnBalance];
-
- btnBalanceMaskLayer = [CAShapeLayer layer];
- btnBalanceMaskLayer.frame = btnBalance.bounds;
- btnBalanceMaskLayer.path = maskPath2.CGPath;
- btnBalanceMaskLayer.fillColor=[UIColor clearColor].CGColor;
- btnBalanceMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnBalanceMaskLayer.lineWidth=1;
- [btnBalance.layer addSublayer:btnBalanceMaskLayer];
-
-
- totalTitleView = [[UIView alloc]init];
-
- totalTitleView.frame = CGRectMake(0,CGRectGetMaxY(btnAdvance.frame)+topMargin ,Screen_Width, 45);
- [headView addSubview:totalTitleView];
-
- UIView *totalImgView=[UIImageView new];
- totalImgView.frame=CGRectMake(10, 10,10 , 25);
- [totalImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [totalTitleView addSubview:totalImgView];
-
-
- UILabel *titleTotal = [[UILabel alloc]init];
- titleTotal.frame = CGRectMake(CGRectGetMaxX(totalImgView.frame)+10, 10, 90, 25);
- titleTotal.text = @"合计";
- titleTotal.textColor = [UIColor blackColor];
- titleTotal.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [totalTitleView addSubview:titleTotal];
-
-
- UIView *separator=[UIView new];
- separator.frame=CGRectMake(0,totalTitleView.frame.size.height-1, totalTitleView.frame.size.width, 0.5);
- [separator setBackgroundColor:[UIColor lightGrayColor]];
- [totalTitleView addSubview:separator ];
-
- int rowHeight=50;
- advanceView=[UIView new];
- advanceView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame), Screen_Width, 0);
- [headView addSubview:advanceView];
- UIView *lastDepositReceivedView = [[UIView alloc]init];
- lastDepositReceivedView.frame = CGRectMake(0,topMargin,Screen_Width/2, rowHeight);
- _lblLastDepositReceived= [[UILabel alloc]init];
- _lblLastDepositReceived.frame = CGRectMake(0, 0,lastDepositReceivedView.frame.size.width, 25);
- _lblLastDepositReceived.textAlignment=UITextAlignmentCenter;
- _lblLastDepositReceived.textColor = [UIColor blackColor];
- _lblLastDepositReceived.text=@"0.00";
- _lblLastDepositReceived.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [lastDepositReceivedView addSubview:_lblLastDepositReceived];
- UILabel *lblTitleLastDepositReceived= [[UILabel alloc]init];
- lblTitleLastDepositReceived.frame = CGRectMake(0,CGRectGetMaxY(_lblLastDepositReceived.frame),lastDepositReceivedView.frame.size.width, 25);
- lblTitleLastDepositReceived.text = @"预存期初额";
- lblTitleLastDepositReceived.textColor = [UIColor blackColor];
- lblTitleLastDepositReceived.textAlignment=UITextAlignmentCenter;
- lblTitleLastDepositReceived.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [lastDepositReceivedView addSubview:lblTitleLastDepositReceived];
- [advanceView addSubview:lastDepositReceivedView];
- UIView *middleSeparator=[UIView new];
- middleSeparator.frame=CGRectMake(Screen_Width/2,topMargin, 0.5, 50);
- middleSeparator.backgroundColor=[UIColor lightGrayColor];
- [advanceView addSubview:middleSeparator];
- //预存余额
- UIView *nextDepositReceivedView = [[UIView alloc]init];
- nextDepositReceivedView.frame = CGRectMake(Screen_Width/2,topMargin, Screen_Width/2, rowHeight);
- _lblNextDepositReceived = [[UILabel alloc]init];
- _lblNextDepositReceived.frame = CGRectMake(0, 0, nextDepositReceivedView.frame.size.width, 25);
- _lblNextDepositReceived.textAlignment=UITextAlignmentCenter;
- _lblNextDepositReceived.text=@"0.00";
- _lblNextDepositReceived.textColor = [UIColor blackColor];
- _lblNextDepositReceived.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [nextDepositReceivedView addSubview:_lblNextDepositReceived];
- UILabel *lblNextDepositReceivedTitle = [[UILabel alloc]init];
- lblNextDepositReceivedTitle.frame = CGRectMake(0,CGRectGetMaxY(_lblNextDepositReceived.frame), nextDepositReceivedView.frame.size.width, 25);
- lblNextDepositReceivedTitle.text = @"预存余额";
- lblNextDepositReceivedTitle.textAlignment=UITextAlignmentCenter;
- lblNextDepositReceivedTitle.textColor = [UIColor blackColor];
- lblNextDepositReceivedTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [nextDepositReceivedView addSubview:lblNextDepositReceivedTitle];
- [advanceView addSubview:nextDepositReceivedView];
- advanceListTitleView = [[UIView alloc]init];
- advanceListTitleView.frame = CGRectMake(0,CGRectGetMaxY(lastDepositReceivedView.frame)+topMargin ,Screen_Width, 45);
- [advanceView addSubview:advanceListTitleView];
- UIView *advanceListImgView=[UIImageView new];
- advanceListImgView.frame=CGRectMake(10, 10,10 , 25);
- [advanceListImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [advanceListTitleView addSubview:advanceListImgView];
- UILabel *titleAdvanceList = [[UILabel alloc]init];
- titleAdvanceList.frame = CGRectMake(CGRectGetMaxX(advanceListImgView.frame)+10, 10, 90, 25);
- titleAdvanceList.text = @"列表";
- titleAdvanceList.textColor = [UIColor blackColor];
- titleAdvanceList.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [advanceListTitleView addSubview:titleAdvanceList];
- advanceView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView.frame));
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(advanceView.frame));
- advanceView.hidden=NO;
- receivableView=[UIView new];
- receivableView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame), Screen_Width, 0);
- [headView addSubview:receivableView];
- UIView *lastAccountReceivableView = [[UIView alloc]init];
- lastAccountReceivableView.frame = CGRectMake(0,10,Screen_Width/2, rowHeight);
- _lblLastAccountReceivable= [[UILabel alloc]init];
- _lblLastAccountReceivable.frame = CGRectMake(0, 0,lastAccountReceivableView.frame.size.width, 25);
- _lblLastAccountReceivable.textAlignment=UITextAlignmentCenter;
- _lblLastAccountReceivable.textColor = [UIColor blackColor];
- _lblLastAccountReceivable.text=@"0.00";
- _lblLastAccountReceivable.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [lastAccountReceivableView addSubview:_lblLastAccountReceivable];
- UILabel *lblTitleLastAccountReceivable= [[UILabel alloc]init];
- lblTitleLastAccountReceivable.frame = CGRectMake(0,CGRectGetMaxY(_lblLastAccountReceivable.frame),lastAccountReceivableView.frame.size.width, 25);
- lblTitleLastAccountReceivable.text = @"应收期初额";
- lblTitleLastAccountReceivable.textColor = [UIColor blackColor];
- lblTitleLastAccountReceivable.textAlignment=UITextAlignmentCenter;
- lblTitleLastAccountReceivable.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [lastAccountReceivableView addSubview:lblTitleLastAccountReceivable];
- [receivableView addSubview:lastAccountReceivableView];
- UIView *refundAmountView = [[UIView alloc]init];
- refundAmountView.frame = CGRectMake(0,CGRectGetMaxY(lastAccountReceivableView.frame)+10, Screen_Width/2, rowHeight);
- [receivableView addSubview:refundAmountView];
- _lblRefundAmount = [[UILabel alloc]init];
- _lblRefundAmount.frame = CGRectMake(0, 0,refundAmountView.frame.size.width, 25);
- _lblRefundAmount.textAlignment=UITextAlignmentCenter;
- _lblRefundAmount.textColor = [UIColor blackColor];
- _lblRefundAmount.text=@"0.00";
- _lblRefundAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [refundAmountView addSubview:_lblRefundAmount];
- UILabel *lblTitleRefundAmount = [[UILabel alloc]init];
- lblTitleRefundAmount.frame = CGRectMake(0, CGRectGetMaxY(_lblRefundAmount.frame),refundAmountView.frame.size.width , 25);
- lblTitleRefundAmount.text = @"回款额";
- lblTitleRefundAmount.textAlignment=UITextAlignmentCenter;
- lblTitleRefundAmount.textColor = [UIColor blackColor];
- lblTitleRefundAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [refundAmountView addSubview:lblTitleRefundAmount];
- UIView *verificationAmountView = [[UIView alloc]init];
- verificationAmountView.frame = CGRectMake(0,CGRectGetMaxY(refundAmountView.frame)+10, Screen_Width/2, rowHeight);
- [receivableView addSubview:verificationAmountView];
- _lblVerificationSum = [[UILabel alloc]init];
- _lblVerificationSum.frame = CGRectMake(0, 0,verificationAmountView.frame.size.width, 25);
- _lblVerificationSum.textAlignment=UITextAlignmentCenter;
- _lblVerificationSum.textColor = [UIColor blackColor];
- _lblVerificationSum.text=@"0.00";
- _lblVerificationSum.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [verificationAmountView addSubview:_lblVerificationSum];
- UILabel *lblTitleVerificationSum = [[UILabel alloc]init];
- lblTitleVerificationSum.frame = CGRectMake(0, CGRectGetMaxY(_lblVerificationSum.frame),verificationAmountView.frame.size.width , 25);
- lblTitleVerificationSum.text = @"核销额";
- lblTitleVerificationSum.textAlignment=UITextAlignmentCenter;
- lblTitleVerificationSum.textColor = [UIColor blackColor];
- lblTitleVerificationSum.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [verificationAmountView addSubview:lblTitleVerificationSum];
- UIView *middleSeparator1=[UIView new];
- middleSeparator1.frame=CGRectMake(Screen_Width/2, 10, 0.5, 150);
- middleSeparator1.backgroundColor=[UIColor lightGrayColor];
- [receivableView addSubview:middleSeparator1];
- UIView *salesAmountView = [[UIView alloc]init];
- salesAmountView.frame = CGRectMake(Screen_Width/2,10, Screen_Width/2, rowHeight);
- _lblSalesAmount = [[UILabel alloc]init];
- _lblSalesAmount.frame = CGRectMake(0, 0, salesAmountView.frame.size.width, 25);
- _lblSalesAmount.textAlignment=UITextAlignmentCenter;
- _lblSalesAmount.text=@"0.00";
- _lblSalesAmount.textColor = [UIColor blackColor];
- _lblSalesAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [salesAmountView addSubview:_lblSalesAmount];
- UILabel *lblSalesAmountTitle = [[UILabel alloc]init];
- lblSalesAmountTitle.frame = CGRectMake(0,CGRectGetMaxY(_lblSalesAmount.frame), salesAmountView.frame.size.width, 25);
- lblSalesAmountTitle.text = @"销售额";
- lblSalesAmountTitle.textAlignment=UITextAlignmentCenter;
- lblSalesAmountTitle.textColor = [UIColor blackColor];
- lblSalesAmountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [salesAmountView addSubview:lblSalesAmountTitle];
- [receivableView addSubview:salesAmountView];
- UIView *adjustAmountView = [[UIView alloc]init];
- adjustAmountView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(salesAmountView.frame)+10, Screen_Width/2, rowHeight);
- _lblAdjustAmount = [[UILabel alloc]init];
- _lblAdjustAmount.frame = CGRectMake(0, 0, adjustAmountView.frame.size.width, 25);
- _lblAdjustAmount.textAlignment=UITextAlignmentCenter;
- _lblAdjustAmount.text=@"0.00";
- _lblAdjustAmount.textColor = [UIColor blackColor];
- _lblAdjustAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [adjustAmountView addSubview:_lblAdjustAmount];
- UILabel *lblAdjustAmountTitle = [[UILabel alloc]init];
- lblAdjustAmountTitle.frame = CGRectMake(0,CGRectGetMaxY(_lblAdjustAmount.frame), adjustAmountView.frame.size.width, 25);
- lblAdjustAmountTitle.text = @"调账额";
- lblAdjustAmountTitle.textAlignment=UITextAlignmentCenter;
- lblAdjustAmountTitle.textColor = [UIColor blackColor];
- lblAdjustAmountTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [adjustAmountView addSubview:lblAdjustAmountTitle];
- [receivableView addSubview:adjustAmountView];
- UIView *nextAccountReceivableView = [[UIView alloc]init];
- nextAccountReceivableView.frame = CGRectMake(Screen_Width/2,CGRectGetMaxY(adjustAmountView.frame)+10, Screen_Width/2, rowHeight);
- _lblNextAccountReceivable = [[UILabel alloc]init];
- _lblNextAccountReceivable.frame = CGRectMake(0, 0, nextAccountReceivableView.frame.size.width, 25);
- _lblNextAccountReceivable.textAlignment=UITextAlignmentCenter;
- _lblNextAccountReceivable.text=@"0.00";
- _lblNextAccountReceivable.textColor = [UIColor blackColor];
- _lblNextAccountReceivable.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [nextAccountReceivableView addSubview:_lblNextAccountReceivable];
- UILabel *lblNextAccountReceivableTitle = [[UILabel alloc]init];
- lblNextAccountReceivableTitle.frame = CGRectMake(0,CGRectGetMaxY(_lblNextAccountReceivable.frame), nextAccountReceivableView.frame.size.width, 25);
- lblNextAccountReceivableTitle.text = @"期末应收";
- lblNextAccountReceivableTitle.textAlignment=UITextAlignmentCenter;
- lblNextAccountReceivableTitle.textColor = [UIColor blackColor];
- lblNextAccountReceivableTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [nextAccountReceivableView addSubview:lblNextAccountReceivableTitle];
- [receivableView addSubview:nextAccountReceivableView];
- advanceListTitleView1 = [[UIView alloc]init];
- advanceListTitleView1.frame = CGRectMake(0,CGRectGetMaxY(nextAccountReceivableView.frame)+topMargin ,Screen_Width, 45);
- [receivableView addSubview:advanceListTitleView1];
- advanceListImgView=[UIImageView new];
- advanceListImgView.frame=CGRectMake(10, 10,10 , 25);
- [advanceListImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [advanceListTitleView1 addSubview:advanceListImgView];
- titleAdvanceList = [[UILabel alloc]init];
- titleAdvanceList.frame = CGRectMake(CGRectGetMaxX(advanceListImgView.frame)+10, 10, 90, 25);
- titleAdvanceList.text = @"列表";
- titleAdvanceList.textColor = [UIColor blackColor];
- titleAdvanceList.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [advanceListTitleView1 addSubview:titleAdvanceList];
- receivableView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView1.frame));
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(receivableView.frame));
- receivableView.hidden=YES;
-
- balanceTotalView=[UIView new];
- balanceTotalView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame), Screen_Width, 0);
- [headView addSubview:balanceTotalView];
- UIView *balanceView = [[UIView alloc]init];
- balanceView.frame = CGRectMake(0,10,Screen_Width/2, rowHeight);
- _lblBalanceAmount= [[UILabel alloc]init];
- _lblBalanceAmount.frame = CGRectMake(0, 0,balanceView.frame.size.width, 25);
- _lblBalanceAmount.textAlignment=UITextAlignmentCenter;
- _lblBalanceAmount.textColor = [UIColor blackColor];
- _lblBalanceAmount.text=@"0.00";
- _lblBalanceAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [balanceView addSubview:_lblBalanceAmount];
- UILabel *lblTitleBalanceAmount= [[UILabel alloc]init];
- lblTitleBalanceAmount.frame = CGRectMake(0,CGRectGetMaxY(_lblBalanceAmount.frame),balanceView.frame.size.width, 25);
- lblTitleBalanceAmount.text = @"余额";
- lblTitleBalanceAmount.textColor = [UIColor blackColor];
- lblTitleBalanceAmount.textAlignment=UITextAlignmentCenter;
- lblTitleBalanceAmount.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [balanceView addSubview:lblTitleBalanceAmount];
- [balanceTotalView addSubview:balanceView];
- UIView *middleSeparator2=[UIView new];
- middleSeparator2.frame=CGRectMake(Screen_Width/2, 10, 0.5, 50);
- middleSeparator2.backgroundColor=[UIColor lightGrayColor];
- [balanceTotalView addSubview:middleSeparator2];
- // //未用定金
- UIView *depositReceivedEarnestView = [[UIView alloc]init];
- depositReceivedEarnestView.frame = CGRectMake(Screen_Width/2,10, Screen_Width/2, rowHeight);
- _lblDepositReceivedEarnest = [[UILabel alloc]init];
- _lblDepositReceivedEarnest.frame = CGRectMake(0, 0, depositReceivedEarnestView.frame.size.width, 25);
- _lblDepositReceivedEarnest.textAlignment=UITextAlignmentCenter;
- _lblDepositReceivedEarnest.text=@"0.00";
- _lblDepositReceivedEarnest.textColor = [UIColor blackColor];
- _lblDepositReceivedEarnest.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [depositReceivedEarnestView addSubview:_lblDepositReceivedEarnest];
- UILabel *lblDepositReceivedEarnestTitle = [[UILabel alloc]init];
- lblDepositReceivedEarnestTitle.frame = CGRectMake(0,CGRectGetMaxY(_lblDepositReceivedEarnest.frame), depositReceivedEarnestView.frame.size.width, 25);
- lblDepositReceivedEarnestTitle.text = @"未用定金";
- lblDepositReceivedEarnestTitle.textAlignment=UITextAlignmentCenter;
- lblDepositReceivedEarnestTitle.textColor = [UIColor blackColor];
- lblDepositReceivedEarnestTitle.font = [UIFont systemFontOfSize:BoldSystemFontOfSize16];
- [depositReceivedEarnestView addSubview:lblDepositReceivedEarnestTitle];
- [balanceTotalView addSubview:depositReceivedEarnestView];
- advanceListTitleView2 = [[UIView alloc]init];
- advanceListTitleView2.frame = CGRectMake(0,CGRectGetMaxY(depositReceivedEarnestView.frame)+topMargin ,Screen_Width, 45);
- [balanceTotalView addSubview:advanceListTitleView2];
- advanceListImgView=[UIImageView new];
- advanceListImgView.frame=CGRectMake(10, 10,10 , 25);
- [advanceListImgView setBackgroundColor:[UIColor hexColor:LIGHT_BROWN]];
- [advanceListTitleView2 addSubview:advanceListImgView];
- titleAdvanceList = [[UILabel alloc]init];
- titleAdvanceList.frame = CGRectMake(CGRectGetMaxX(advanceListImgView.frame)+10, 10, 90, 25);
- titleAdvanceList.text = @"列表";
- titleAdvanceList.textColor = [UIColor blackColor];
- titleAdvanceList.font = [UIFont systemFontOfSize:NoDataFontOfSize];
- [advanceListTitleView2 addSubview:titleAdvanceList];
- balanceTotalView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView2.frame));
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(balanceTotalView.frame));
- balanceTotalView.hidden=YES;
-
- _vTableView=[[UITableView alloc]init];
- _vTableView.frame=CGRectZero;
- _vTableView.separatorStyle=UITableViewCellSeparatorStyleNone;
- _vTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
- _vTableView.dataSource=self;
- _vTableView.delegate = self;
- [self.view addSubview:_vTableView];
-
-
- }
- -(void)selectAmount:(UIButton*)sender
- {
-
- [self changeButtonColor];
-
-
-
- if(_customerCurrentSummaryFilterList!=nil&&_customerCurrentSummaryFilterList.count>0)
- {
- [_customerCurrentSummaryFilterList removeAllObjects];
- [_vTableView reloadData];
- }
- NSArray *customerCurrentSummaryFilterTempList= [_customerCurrentSummaryList subarrayWithRange:NSMakeRange(0, _customerCurrentSummaryList.count)];
-
- [_customerCurrentSummaryFilterList removeAllObjects];
-
- [_customerCurrentSummaryFilterList addObjectsFromArray:customerCurrentSummaryFilterTempList];
-
- if(sender.tag==1000)
- {
-
- btnAdvanceMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnAdvance.layer.borderColor=[UIColor redColor].CGColor;
- [btnAdvance setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- _advanceFlag=@"1";
- advanceView.hidden=NO;
- receivableView.hidden=YES;
- balanceTotalView.hidden=YES;
- advanceView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView.frame));
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(advanceView.frame));
- _vTableView.frame=CGRectMake(0,CGRectGetMaxY(headView.frame)+5, self.view.frame.size.width, self.view.frame.size.height-CGRectGetMaxY(headView.frame));
- [_vTableView reloadData];
-
-
- }
-
- if(sender.tag==1001)
- {
- _advanceFlag=@"2";
-
- btnReceivable.layer.borderColor=[UIColor redColor].CGColor;
- [btnReceivable setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
-
- advanceView.hidden=YES;
- receivableView.hidden=NO;
- balanceTotalView.hidden=YES;
- receivableView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView1.frame));
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(receivableView.frame));
- _vTableView.frame=CGRectMake(0,CGRectGetMaxY(headView.frame)+5, self.view.frame.size.width, self.view.frame.size.height-CGRectGetMaxY(headView.frame));
- [_vTableView reloadData];
- }
-
- if(sender.tag==1002)
- {
- _advanceFlag=@"3";
- btnBalanceMaskLayer.strokeColor=[UIColor redColor].CGColor;
- btnBalance.layer.borderColor=[UIColor redColor].CGColor;
- [btnBalance setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
- advanceView.hidden=YES;
- receivableView.hidden=YES;
- balanceTotalView.hidden=NO;
-
- balanceTotalView.frame=CGRectMake(0, CGRectGetMaxY(totalTitleView.frame),Screen_Width,CGRectGetMaxY(advanceListTitleView2.frame));
-
- headView.frame=CGRectMake(0, 0, Screen_Width, CGRectGetMaxY(balanceTotalView.frame));
- _vTableView.frame=CGRectMake(0,CGRectGetMaxY(headView.frame)+5, self.view.frame.size.width, self.view.frame.size.height-CGRectGetMaxY(headView.frame));
- [_vTableView reloadData];
- }
- }
- -(void)changeButtonColor
- {
- btnAdvanceMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnAdvance.layer.borderColor=[UIColor lightGrayColor].CGColor;
- btnReceivable.layer.borderColor=[UIColor lightGrayColor].CGColor;
-
- btnBalanceMaskLayer.strokeColor=[UIColor lightGrayColor].CGColor;
- btnBalance.layer.borderColor=[UIColor lightGrayColor].CGColor;
- [btnAdvance setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- [btnReceivable setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
- [btnBalance setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
-
-
- }
- /**
- 导航按钮样式
- */
- - (void)loadNavStyle {
- 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;
-
- // 右边
- UIView *v = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 42, 12)];
-
- UIButton *btnfilter = [UIButton buttonWithType:UIButtonTypeCustom];
- [btnfilter addTarget:self action:@selector(search)
- forControlEvents:UIControlEventTouchUpInside];
- btnfilter.frame = CGRectMake(0, 0,16, 16);
- [btnfilter setTitleColor:NavBarItemColor forState:UIControlStateNormal];
- [btnfilter setBackgroundImage:[UIImage imageNamed:@"icon_filter_white"]
- forState:UIControlStateNormal];
- [v addSubview:btnfilter];
- UIButton *filterLbl = [[UIButton alloc]init];
- filterLbl.frame=CGRectMake(CGRectGetMaxX(btnfilter.frame)+3,0,28, 16);
- [filterLbl setTitle:@"筛选" forState:UIControlStateNormal];
- [filterLbl setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
- filterLbl.titleLabel.font = [UIFont systemFontOfSize:ButtonFontOfSize];
- [filterLbl addTarget:self action:@selector(search)
- forControlEvents:UIControlEventTouchUpInside];
- [v addSubview:filterLbl];
- UIBarButtonItem *menubtnAdd = [[UIBarButtonItem alloc] initWithCustomView:v];
- self.navigationItem.rightBarButtonItem = menubtnAdd;
-
- }
- -(void)search
- {
- [_filterController show];
- }
- /**
- 数据源
-
- @return <#return value description#>
- */
- - (NSArray *)packageDataList {
- NSMutableArray *dataArray = [NSMutableArray array];
- SideSlipModel *model = [[SideSlipModel alloc] init];
- model.containerCellClass = @"CustomerCurrentAccountSummarySearchCell";
- model.regionTitle = @"查询条件";
- [dataArray addObject:model];
- return [dataArray mutableCopy];
- }
- -(void)loadData
- {
- NSString *urlStr = ServerURL;
- NSMutableDictionary *dict = [NSMutableDictionary dictionary];
- [dict setObject:@"GetCustomerSummary" 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:@"0" forKey:@"CustomerID"];
- [dict setObject:_customerCode forKeyedSubscript:@"CustomerCode"];
- [dict setObject:_customerName forKeyedSubscript:@"CustomerName"];
- [dict setObject:_startDate forKeyedSubscript:@"AccountDateFrom"];
- [dict setObject:_endDate forKeyedSubscript:@"AccountDateTo"];
- [dict setObject:_customerTelephone forKeyedSubscript:@"Telephone"];
- [dict setObject:_customerAddress forKeyedSubscript:@"Address"];
-
- [dict setObject:_channelId forKeyedSubscript:@"ChannelID"];
- [dict setObject:_isFilterZeroAmount?@ "1":@"0" forKeyedSubscript:@"FilterZero"];
- [dict setObject:_organizationCode forKeyedSubscript:@"OrganizationCode"];
-
- _downManager = [[ASIDownManager alloc] init];
- _downManager.delegate = self;
- _downManager.onRequestSuccess = @selector(onDataLoadFinish:);
- _downManager.onRequestFail = @selector(onDataLoadFail:);
- [_downManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
- }
- -(void)onDataLoadFinish:(ASIDownManager*)sender
- {
- // 服务器返回数据
- RequestResultModel *resultModel = [RequestResultModel dk_modelWithJSON:sender.mWebStr];
- [self stopLoading];
- // 服务器返回数据状态值
- int iStatus = resultModel.status;
- // 服务器返回数据消息
- NSString *message = resultModel.message;
-
-
- if (iStatus == 0)
- {
- NSDictionary *dic=(NSDictionary*)resultModel.result;
- NSArray *resultArray= [dic objectForKey:@"Table"];
- if(resultArray!=nil&&resultArray.count>0)
- {
- double totalLastDepositReceived=0;
- double totalNextDepositReceived=0;
- double totalLastAccountReceivable=0;
- double totalRefundAmount=0;
- double totalVerificationSum=0;
- double totalSalesAmount=0;
- double totalAdjustAmount=0;
- double totalNextAccountReceivable =0;
- double totalBalance=0;
- double totalDepositReceivedEarnest = 0.0;
-
-
- for(int i=0;i<resultArray.count;i++)
- {
- NSDictionary *resultDic=[resultArray objectAtIndex:i];
- CustomerCurrentSummaryListModel *summaryListModel=[CustomerCurrentSummaryListModel new];
-
- double adjustAmount=[[resultDic objectForKey:@"AdjustAmount"]doubleValue];
-
- totalAdjustAmount+=adjustAmount;
- double depositReceived=[[resultDic objectForKey:@"DepositReceived"]doubleValue];
-
- totalRefundAmount+=depositReceived;
- double depositReceivedEarnest=[[resultDic objectForKey:@"DepositReceivedEarnest"]doubleValue];
-
- totalDepositReceivedEarnest+=depositReceivedEarnest;
-
- double lastAccountReceivable=[[resultDic objectForKey:@"LastAccountReceivable"]doubleValue];
-
- totalLastAccountReceivable+=lastAccountReceivable;
-
- double lastDepositReceived=[[resultDic objectForKey:@"LastDepositReceived"]doubleValue];
-
- totalLastDepositReceived+=lastDepositReceived;
-
- double nextAccountReceivable=[[resultDic objectForKey:@"NextAccountReceivable"]doubleValue];
- totalNextAccountReceivable+=nextAccountReceivable;
-
- double nextDepositReceived=[[resultDic objectForKey:@"NextDepositReceived"]doubleValue];
- totalNextDepositReceived+=nextDepositReceived;
-
- double receivableAmount =[[resultDic objectForKey:@"ReceivableAmount"]doubleValue];
-
- double salesAmount =[[resultDic objectForKey:@"SalesAmount"]doubleValue];
- totalSalesAmount+=salesAmount;
-
- double verificationSum =[[resultDic objectForKey:@"VerificationSum"]doubleValue];
-
- totalVerificationSum+=verificationSum;
-
- double balanceAmount=nextAccountReceivable-nextDepositReceived;
- totalBalance+=balanceAmount;
-
- [summaryListModel setAddress:[resultDic objectForKey:@"Address"]];
- [summaryListModel setCustomerCode:[resultDic objectForKey:@"CustomerCode"]];
- [summaryListModel setBalanceAmount:[NSString stringWithFormat:@"%.2f",balanceAmount]];
- [summaryListModel setCustomerName:[resultDic objectForKey:@"CustomerName"]];
- [summaryListModel setTelephone:[resultDic objectForKey:@"Telephone"]];
-
- [summaryListModel setAdjustAmount:[NSString stringWithFormat:@"%.2f",adjustAmount]];
- [summaryListModel setDepositReceived:[NSString stringWithFormat:@"%.2f",depositReceived]];
- [summaryListModel setDepositReceivedEarnest:[NSString stringWithFormat:@"%.2f",depositReceivedEarnest]];
-
- [summaryListModel setLastAccountReceivable:[NSString stringWithFormat:@"%.2f",lastAccountReceivable]];
-
- [summaryListModel setLastDepositReceived:[NSString stringWithFormat:@"%.2f",lastDepositReceived]];
-
- [summaryListModel setNextAccountReceivable:[NSString stringWithFormat:@"%.2f",nextAccountReceivable]];
-
- [summaryListModel setNextDepositReceived:[NSString stringWithFormat:@"%.2f",nextDepositReceived]];
-
- [summaryListModel setReceivableAmount:[NSString stringWithFormat:@"%.2f",receivableAmount]];
-
- [summaryListModel setSalesAmount:[NSString stringWithFormat:@"%.2f",salesAmount]];
- [summaryListModel setVerificationSum:[NSString stringWithFormat:@"%.2f",verificationSum]];
- [_customerCurrentSummaryList addObject:summaryListModel];
-
- [_customerCurrentSummaryFilterList addObject:summaryListModel];
- }
- _vTableView.frame=CGRectMake(0,CGRectGetMaxY(headView.frame)+5, self.view.frame.size.width, self.view.frame.size.height-CGRectGetMaxY(headView.frame));
-
-
- [_vTableView reloadData];
-
- _lblLastDepositReceived.text=[NSString stringWithFormat:@"%.2f",totalLastDepositReceived];
-
-
- _lblNextDepositReceived.text=[NSString stringWithFormat:@"%.2f",totalNextDepositReceived];
-
- _lblLastAccountReceivable.text=[NSString stringWithFormat:@"%.2f",totalLastAccountReceivable];
-
- _lblRefundAmount.text=[NSString stringWithFormat:@"%.2f",totalRefundAmount];
-
- _lblVerificationSum.text=[NSString stringWithFormat:@"%.2f",totalVerificationSum];
-
- _lblSalesAmount.text=[NSString stringWithFormat:@"%.2f",totalSalesAmount];
-
- _lblAdjustAmount.text=[NSString stringWithFormat:@"%.2f",totalAdjustAmount];
-
- _lblNextAccountReceivable.text=[NSString stringWithFormat:@"%.2f",totalNextAccountReceivable];
-
- _lblBalanceAmount.text=[NSString stringWithFormat:@"%.2f",totalBalance];
-
- _lblDepositReceivedEarnest.text=[NSString stringWithFormat:@"%.2f",totalDepositReceivedEarnest];
-
- }
- else{
- [self showAlertViewText:@"无数据"];
- }
-
- }
- else if(iStatus == ActionResultStatusAuthError
- ||iStatus == ActionResultStatusNoLogin
- ||iStatus == ActionResultStatusLogined||iStatus==ActionResultSessionOverdue){
-
- [self showReLoginDialog:message];
- }
- else{
-
- [self showAlertViewText:message];
- }
- }
- -(void)onDataLoadFail:(ASIDownManager*)sender
- {
- [self stopLoading];
- [self showAlertViewText:@"网络异常"];
- }
- /**
- tableview的行数
- @param tableView <#tableView description#>
- @param section <#section description#>
- @return <#return value description#>
- */
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return _customerCurrentSummaryFilterList.count;
- }
- /**
- tableview的分区数
- @param tableView <#tableView description#>
- @return <#return value description#>
- */
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
- return 1;
- }
- /**
- 获取tableview cell
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- static NSString *cellIdentifier = @"CurrentSummaryCellId";
- CustomerCurrentListCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
- if (cell == nil) {
- cell = [[CustomerCurrentListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
- cell.selectionStyle=UITableViewCellSelectionStyleNone;
- }
- else
- //当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
- {
- while ([cell.contentView.subviews lastObject] != nil) {
- [(UIView *)[cell.contentView.subviews lastObject] removeFromSuperview];
- }
- }
-
- NSUInteger row = [indexPath row];
- CustomerCurrentSummaryListModel *summaryListModel = [_customerCurrentSummaryFilterList objectAtIndex:row];
- [cell setCustomerCurrentListCell:summaryListModel advanceFlag:_advanceFlag];
- _cellHeight[@(indexPath.row)] = @(cell.cellHeight);
- return cell;
-
- }
- /**
- 预防高度
-
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- -(CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 250;
- }
- /**
- tableview的高度
- @param tableView <#tableView description#>
- @param indexPath <#indexPath description#>
- @return <#return value description#>
- */
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return [_cellHeight[@(indexPath.row)] floatValue];
- }
- @end
|