| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320 |
- //
- // CustomerCurrentListCell.m
- // IBOSS
- //
- // Created by 关宏厚 on 2021/2/25.
- // Copyright © 2021 elongtian. All rights reserved.
- //
- #import "CustomerCurrentListCell.h"
- @implementation CustomerCurrentListCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- }
- -(void) setCustomerCurrentListCell:(CustomerCurrentSummaryListModel*)currentSummaryListModel advanceFlag:(NSString*)advanceFlag
- {
- CGFloat heightRow = 40;
- CGFloat lblx = 20;
- CGFloat lbly = 8;
- CGFloat lblwidth = 100;
- CGFloat lblheight = 25;
- CGFloat valuey = 8;
- CGFloat valueheight = 25;
-
- //客户名称 —————————
- UIView *vCustomerName = [UIView new];
- vCustomerName.frame=CGRectMake(0, 8, Screen_Width, heightRow);
- [self.contentView addSubview:vCustomerName];
- UILabel *lblTitleCustomerName = [UILabel new];
- lblTitleCustomerName.frame=CGRectMake(lblx, lbly, lblwidth+2, lblheight);
- lblTitleCustomerName.text = @"客户名称:";
- lblTitleCustomerName.textColor =LabelGrayTextColor;
- lblTitleCustomerName.font = [UIFont systemFontOfSize: TitleFontOfSize];
- [vCustomerName addSubview:lblTitleCustomerName];
-
- _lblCustomerName= [UILabel new];
- _lblCustomerName.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame), valuey, Screen_Width -CGRectGetMaxX(lblTitleCustomerName.frame), valueheight);
- _lblCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:_lblCustomerName];
- _lblCustomerName.text=currentSummaryListModel.customerName;
-
-
-
- UIView *vAddress = [UIView new];
- vAddress.frame=CGRectMake(0, CGRectGetMaxY(vCustomerName.frame), Screen_Width, heightRow);
- [self.contentView addSubview:vAddress];
-
- UILabel *lblAddressTitle=[UILabel new];
- lblAddressTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblAddressTitle.text=@"客户地址:";
- lblAddressTitle.textColor =LabelGrayTextColor;
- lblAddressTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAddress addSubview:lblAddressTitle];
-
- _lblAddress= [UILabel new];
- _lblAddress.frame=CGRectMake(CGRectGetMaxX(lblAddressTitle.frame), valuey, Screen_Width -CGRectGetMaxX(lblAddressTitle.frame)-3, valueheight);
- _lblAddress.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAddress addSubview:_lblAddress];
- _lblAddress.text = currentSummaryListModel.address;
-
-
- UIView *vCustomerCode = [UIView new];
- vCustomerCode.frame=CGRectMake(0, CGRectGetMaxY(vAddress.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vCustomerCode];
-
- UILabel *lblCustomerCodeTitle=[UILabel new];
- lblCustomerCodeTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblCustomerCodeTitle.text=@"客户编码:";
- lblCustomerCodeTitle.textColor =LabelGrayTextColor;
- lblCustomerCodeTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:lblCustomerCodeTitle];
-
- _lblCustomerCode= [UILabel new];
- _lblCustomerCode.frame=CGRectMake(CGRectGetMaxX(lblCustomerCodeTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblCustomerCodeTitle.frame)-3, valueheight);
- _lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:_lblCustomerCode];
- _lblCustomerCode.text = currentSummaryListModel.customerCode;
-
-
- UIView *vTelephone = [UIView new];
- vTelephone.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vAddress.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vTelephone];
-
- UILabel *lblTelephoneTitle=[UILabel new];
- lblTelephoneTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblTelephoneTitle.text=@"客户电话:";
- lblTelephoneTitle.textColor = LabelGrayTextColor;
- lblTelephoneTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vTelephone addSubview:lblTelephoneTitle];
-
- _lblTelephone= [UILabel new];
- _lblTelephone.frame=CGRectMake(CGRectGetMaxX(lblTelephoneTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblTelephone.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vTelephone addSubview:_lblTelephone];
- _lblTelephone.text = currentSummaryListModel.telephone;
-
- if([advanceFlag intValue]==1)
- {
- UIView *vLastDepositReceived = [UIView new];
- vLastDepositReceived.frame=CGRectMake(0, CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vLastDepositReceived];
-
-
- UILabel *lblLastDepositReceivedTitle=[UILabel new];
- lblLastDepositReceivedTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblLastDepositReceivedTitle.text=@"预存期初额:";
- lblLastDepositReceivedTitle.textColor =LabelGrayTextColor;
- lblLastDepositReceivedTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vLastDepositReceived addSubview:lblLastDepositReceivedTitle];
- _lblLastDepositReceived = [UILabel new];
- _lblLastDepositReceived.frame=CGRectMake(CGRectGetMaxX(lblLastDepositReceivedTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblLastDepositReceivedTitle.frame)-3, valueheight);
- _lblLastDepositReceived.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vLastDepositReceived addSubview:_lblLastDepositReceived];
- _lblLastDepositReceived.text = currentSummaryListModel.lastDepositReceived;
-
-
- UIView *vNextDepositReceived = [UIView new];
- vNextDepositReceived.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vCustomerCode.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vNextDepositReceived];
-
- UILabel *lblNextDepositReceivedTitle=[UILabel new];
- lblNextDepositReceivedTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblNextDepositReceivedTitle.text=@"预存余额:";
- lblNextDepositReceivedTitle.textColor = LabelGrayTextColor;
- lblNextDepositReceivedTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vNextDepositReceived addSubview:lblNextDepositReceivedTitle];
-
- _lblNextDepositReceived= [UILabel new];
- _lblNextDepositReceived.frame=CGRectMake(CGRectGetMaxX(lblNextDepositReceivedTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblNextDepositReceived.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vNextDepositReceived addSubview:_lblNextDepositReceived];
- _lblNextDepositReceived.text = currentSummaryListModel.nextDepositReceived;
-
- _bottomSeparator = [[UIView alloc]init];
- _bottomSeparator.frame =CGRectMake(0, CGRectGetMaxY(vLastDepositReceived.frame),Screen_Width, 10);
- _bottomSeparator.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:_bottomSeparator];
-
- _cellHeight=CGRectGetMaxY(_bottomSeparator.frame);
-
- }
-
-
- if([advanceFlag intValue]==2)
- {
-
- UIView *vLastAccountReceivable = [UIView new];
- vLastAccountReceivable.frame=CGRectMake(0, CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vLastAccountReceivable];
-
- UILabel *lblLastAccountReceivableTitle=[UILabel new];
- lblLastAccountReceivableTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblLastAccountReceivableTitle.text=@"应收期初额:";
- lblLastAccountReceivableTitle.textColor =LabelGrayTextColor;
- lblLastAccountReceivableTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vLastAccountReceivable addSubview:lblLastAccountReceivableTitle];
- _lblLastAccountReceivable = [UILabel new];
- _lblLastAccountReceivable.frame=CGRectMake(CGRectGetMaxX(lblLastAccountReceivableTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblLastAccountReceivableTitle.frame)-3, valueheight);
- _lblLastAccountReceivable.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vLastAccountReceivable addSubview:_lblLastAccountReceivable];
- _lblLastAccountReceivable.text = currentSummaryListModel.lastAccountReceivable;
-
-
- UIView *vSalesAmount = [UIView new];
- vSalesAmount.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vCustomerCode.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vSalesAmount];
-
- UILabel *lblSalesAmountTitle=[UILabel new];
- lblSalesAmountTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblSalesAmountTitle.text=@"销售额:";
- lblSalesAmountTitle.textColor = LabelGrayTextColor;
- lblSalesAmountTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vSalesAmount addSubview:lblSalesAmountTitle];
-
- _lblSalesAmount= [UILabel new];
- _lblSalesAmount.frame=CGRectMake(CGRectGetMaxX(lblSalesAmountTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblSalesAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vSalesAmount addSubview:_lblSalesAmount];
- _lblSalesAmount.text = currentSummaryListModel.salesAmount;
-
-
- UIView *vRefundAmount = [UIView new];
- vRefundAmount.frame=CGRectMake(0, CGRectGetMaxY(vLastAccountReceivable.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vRefundAmount];
-
- UILabel *lblRefundAmountTitle=[UILabel new];
- lblRefundAmountTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblRefundAmountTitle.text=@"回款额:";
- lblRefundAmountTitle.textColor =LabelGrayTextColor;
- lblRefundAmountTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRefundAmount addSubview:lblRefundAmountTitle];
-
- _lblRefundAmount = [UILabel new];
- _lblRefundAmount.frame=CGRectMake(CGRectGetMaxX(lblRefundAmountTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblRefundAmountTitle.frame)-3, valueheight);
- _lblRefundAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRefundAmount addSubview:_lblRefundAmount];
- _lblRefundAmount.text = currentSummaryListModel.depositReceived;
-
-
-
- UIView *vAdjustAmount = [UIView new];
- vAdjustAmount.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vLastAccountReceivable.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vAdjustAmount];
-
- UILabel *lblAdjustAmountTitle=[UILabel new];
- lblAdjustAmountTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblAdjustAmountTitle.text=@"调账额:";
- lblAdjustAmountTitle.textColor = LabelGrayTextColor;
- lblAdjustAmountTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAdjustAmount addSubview:lblAdjustAmountTitle];
-
- _lblAdjustAmount= [UILabel new];
- _lblAdjustAmount.frame=CGRectMake(CGRectGetMaxX(lblAdjustAmountTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblAdjustAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAdjustAmount addSubview:_lblAdjustAmount];
- _lblAdjustAmount.text = currentSummaryListModel.adjustAmount;
-
- UIView *vVerificationSum = [UIView new];
- vVerificationSum.frame=CGRectMake(0, CGRectGetMaxY(vRefundAmount.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vVerificationSum];
-
- UILabel *lblVerificationSumTitle=[UILabel new];
- lblVerificationSumTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblVerificationSumTitle.text=@"核销额:";
- lblVerificationSumTitle.textColor =LabelGrayTextColor;
- lblVerificationSumTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vVerificationSum addSubview:lblVerificationSumTitle];
-
- _lblVerificationSum = [UILabel new];
- _lblVerificationSum.frame=CGRectMake(CGRectGetMaxX(lblVerificationSumTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblVerificationSumTitle.frame)-3, valueheight);
- _lblVerificationSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vVerificationSum addSubview:_lblVerificationSum];
- _lblVerificationSum.text = currentSummaryListModel.verificationSum;
-
-
- UIView *vNextAccountReceivable = [UIView new];
- vNextAccountReceivable.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vRefundAmount.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vNextAccountReceivable];
-
- UILabel *lblNextAccountReceivableTitle=[UILabel new];
- lblNextAccountReceivableTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblNextAccountReceivableTitle.text=@"期末应收:";
- lblNextAccountReceivableTitle.textColor = LabelGrayTextColor;
- lblNextAccountReceivableTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vNextAccountReceivable addSubview:lblNextAccountReceivableTitle];
-
- _lblNextAccountReceivable= [UILabel new];
- _lblNextAccountReceivable.frame=CGRectMake(CGRectGetMaxX(lblNextAccountReceivableTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblNextAccountReceivable.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vNextAccountReceivable addSubview:_lblNextAccountReceivable];
- _lblNextAccountReceivable.text = currentSummaryListModel.nextAccountReceivable;
-
-
- _bottomSeparator = [[UIView alloc]init];
- _bottomSeparator.frame =CGRectMake(0, CGRectGetMaxY(vVerificationSum.frame),Screen_Width, 10);
- _bottomSeparator.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:_bottomSeparator];
-
- _cellHeight=CGRectGetMaxY(_bottomSeparator.frame);
-
-
- }
-
- if([advanceFlag intValue]==3)
- {
-
- UIView *vBalanceAmount = [UIView new];
- vBalanceAmount.frame=CGRectMake(0, CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
- [self.contentView addSubview:vBalanceAmount];
-
- UILabel *lblBalanceAmountTitle=[UILabel new];
- lblBalanceAmountTitle.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblBalanceAmountTitle.text=@"余额:";
- lblBalanceAmountTitle.textColor =LabelGrayTextColor;
- lblBalanceAmountTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vBalanceAmount addSubview:lblBalanceAmountTitle];
- _lblBalanceAmount = [UILabel new];
- _lblBalanceAmount.frame=CGRectMake(CGRectGetMaxX(lblBalanceAmountTitle.frame), valuey, Screen_Width/2 -CGRectGetMaxX(lblBalanceAmountTitle.frame)-3, valueheight);
- _lblBalanceAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vBalanceAmount addSubview:_lblBalanceAmount];
- _lblBalanceAmount.text = currentSummaryListModel.balanceAmount;
-
-
- UIView *vDepositReceivedEarnest = [UIView new];
- vDepositReceivedEarnest.frame=CGRectMake(Screen_Width / 2, CGRectGetMaxY(vCustomerCode.frame), Screen_Width / 2, heightRow);
- [self.contentView addSubview: vDepositReceivedEarnest];
-
- UILabel *lblDepositReceivedEarnestTitle=[UILabel new];
- lblDepositReceivedEarnestTitle.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblDepositReceivedEarnestTitle.text=@"未用定金:";
- lblDepositReceivedEarnestTitle.textColor = LabelGrayTextColor;
- lblDepositReceivedEarnestTitle.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDepositReceivedEarnest addSubview:lblDepositReceivedEarnestTitle];
-
- _lblDepositReceivedEarnest= [UILabel new];
- _lblDepositReceivedEarnest.frame=CGRectMake(CGRectGetMaxX(lblDepositReceivedEarnestTitle.frame), valuey, Screen_Width/2-lblwidth-5 , valueheight);
- _lblDepositReceivedEarnest.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDepositReceivedEarnest addSubview:_lblDepositReceivedEarnest];
- _lblDepositReceivedEarnest.text = currentSummaryListModel.depositReceivedEarnest;
-
- _bottomSeparator = [[UIView alloc]init];
- _bottomSeparator.frame =CGRectMake(0, CGRectGetMaxY(vBalanceAmount.frame),Screen_Width, 10);
- _bottomSeparator.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:_bottomSeparator];
-
- _cellHeight=CGRectGetMaxY(_bottomSeparator.frame);
- }
-
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
-
- }
- @end
|