| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // SalesPaymentRankFrame.m
- // IBOSS
- //
- // Created by guan hong hou on 2017/8/23.
- // Copyright © 2017年 elongtian. All rights reserved.
- //
- // 功能描述:销售回款排行frame
- #import "SalesPaymentRankFrame.h"
- #import "NSString+Tools.h"
- @implementation SalesPaymentRankFrame
- #pragma 私有函数
- /**
- 设置销售回款排行frame
- @param rankModel <#rankModel description#>
- */
- - (void)setSalesPaymentListFrame:(SalesPaymentRankModel *)rankModel{
- _paymentRankModel = rankModel;
- NSString *salerName = _paymentRankModel.objectName;
- CGFloat xpadding = 20;
- CGFloat ypadding = 15;
- CGRect lblSalesNameFrame = [salerName textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic14];
- lblSalesNameFrame.origin.x = xpadding;
- lblSalesNameFrame.origin.y = ypadding;
- _salerNameF = lblSalesNameFrame;
- NSInteger orderOrder = _paymentRankModel.orderSort;
- NSString *orderSortStr= [NSString stringWithFormat:@"%ld",(long)orderOrder];
- CGRect lblOrderSortFrame = [orderSortStr textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic14];
- lblOrderSortFrame.origin.x = Screen_Width - CGRectGetWidth(lblOrderSortFrame)-20;
- lblOrderSortFrame.origin.y = ypadding;
- _lblRankF=lblOrderSortFrame;
- NSString *titleRank = @"排行:";
- CGRect lblTitleRankFrame = [titleRank textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic14];
- lblTitleRankFrame.origin.x = CGRectGetMinX(_lblRankF)-CGRectGetWidth(lblTitleRankFrame)-5;
- lblTitleRankFrame.origin.y = 15;
- _lblTitleRankF=lblTitleRankFrame;
- NSString *titleBackAmount=@"回款金额:";
- CGRect lblTitleBackAmountFrame = [titleBackAmount textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic13];
- lblTitleBackAmountFrame.origin.x = xpadding;
- lblTitleBackAmountFrame.origin.y = CGRectGetMaxY(_salerNameF)+ypadding;
- _lblTitleBackAmountF = lblTitleBackAmountFrame;
- NSString *backAmount = [NSString stringWithFormat:@"¥%.2f",[_paymentRankModel paymentAmount]];
- CGRect lblBackAmountFrame = [backAmount textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic13];
- lblBackAmountFrame.origin.x = CGRectGetMaxX(_lblTitleBackAmountF)+3;
- lblBackAmountFrame.origin.y = CGRectGetMaxY(_salerNameF)+ypadding;
- _lblBackAmountF=lblBackAmountFrame;
- NSString *percent=[NSString stringWithFormat:@"%@%s" ,[_paymentRankModel backPercent],"%"];
- CGRect lblPercentFrame = [percent textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic13];
- lblPercentFrame.origin.x = Screen_Width -CGRectGetWidth(lblPercentFrame)-20;
- lblPercentFrame.origin.y = CGRectGetMaxY(_salerNameF) + ypadding;
- _lblPercentF = lblPercentFrame;
- NSString *titlePercentCount = @"所占比重:";
- CGRect lblTitlePercentCountFrame = [titlePercentCount textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes: FontAttributeNameDic13];
- lblTitlePercentCountFrame.origin.x = CGRectGetMinX(_lblPercentF) - CGRectGetWidth(lblTitlePercentCountFrame) - 5;
- lblTitlePercentCountFrame.origin.y = CGRectGetMaxY(_salerNameF) + ypadding;
- _lblTitlePercentF=lblTitlePercentCountFrame;
- _separatorF = CGRectMake(0,CGRectGetMaxY(_lblTitleBackAmountF) + 15, Screen_Width, 1);
- _cellHeight = CGRectGetMaxY(_separatorF);
-
- }
- @end
|