| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- //
- // ExpenseCell.m
- // IBOSS
- //
- // Created by apple on 2017/7/10.
- // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved.
- //
- // 功能描述:费用明细表单元格
- //
- #import "ExpenseCell.h"
- @implementation ExpenseCell
- - (void)awakeFromNib{
- [super awakeFromNib];
- }
- /**
- 后台代码创建单元cell
-
- @param style style description
- @param reuseIdentifier reuseIdentifier description
- @return <#return value description#>
- */
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- [self initUI];
- return self;
- }
- /**
- 初始化ui
- */
- - (void)initUI{
- CGFloat heightLine = 1;
- CGFloat heightRow = 31;
- CGFloat lblx = 20;
- CGFloat lbly = 0;
- CGFloat lblwidth = 70;
- CGFloat lblheight = 31;
-
- CGFloat valuex = 85;
- CGFloat valuey = 0;
- CGFloat valueheight = 31;
-
- //title —————————
- UIView *vTitle = [UIView new];
- vTitle.frame=CGRectMake(0, 0, Screen_Width, 10);
- vTitle.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:vTitle];
-
- //费用方向 费用项目 —————————
- UIView *vFeeDirectionItem = [UIView new];
- vFeeDirectionItem.frame=CGRectMake(0, CGRectGetMaxY(vTitle.frame)+8, Screen_Width, heightRow);
- [self.contentView addSubview:vFeeDirectionItem];
-
- UIView *vFeeDirection = [UIView new];
- vFeeDirection.frame=CGRectMake(0, 0, Screen_Width/2, heightRow);
- [vFeeDirectionItem addSubview:vFeeDirection];
-
- UILabel *lblFeeDirection = [UILabel new];
- lblFeeDirection.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblFeeDirection.text = @"费用方向:";
- lblFeeDirection.textColor = LabelGrayTextColor;
- lblFeeDirection.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFeeDirection addSubview:lblFeeDirection];
- _lblValueFeeDirection = [UILabel new];
- _lblValueFeeDirection.frame=CGRectMake(valuex, valuey, Screen_Width/2 - valuex, valueheight);
- _lblValueFeeDirection.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
-
- [vFeeDirection addSubview:_lblValueFeeDirection];
-
- UIView *vFeeItem = [UIView new];
- vFeeItem.frame=CGRectMake(Screen_Width/2, 0, Screen_Width/2, heightRow);
- [vFeeDirectionItem addSubview:vFeeItem];
-
- UILabel *lblFeeItem = [UILabel new];
- lblFeeItem.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblFeeItem.text = @"费用项目:";
- lblFeeItem.textColor = LabelGrayTextColor;
- lblFeeItem.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFeeItem addSubview:lblFeeItem];
- _lblValueFeeItem = [UILabel new];
- _lblValueFeeItem.frame=CGRectMake(lblwidth, valuey, Screen_Width/2 - lblwidth - 10, valueheight);
- _lblValueFeeItem.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFeeItem addSubview:_lblValueFeeItem];
-
- //分割线
- UIView *viewBackgroud = [UIView new];
- viewBackgroud.frame = CGRectMake(0, CGRectGetMaxY(vFeeDirectionItem.frame)+8, Screen_Width, heightLine);
- viewBackgroud.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:viewBackgroud];
-
- //业务部门 业务员 —————————
- UIView *vOrgStaff = [UIView new];
- vOrgStaff.frame=CGRectMake(0, CGRectGetMaxY(viewBackgroud.frame)+8, Screen_Width, heightRow);
- [self.contentView addSubview:vOrgStaff];
-
- UIView *vOrg = [UIView new];
- vOrg.frame=CGRectMake(0, 0, Screen_Width/2, heightRow);
- [vOrgStaff addSubview:vOrg];
-
- UILabel *lblOrg = [UILabel new];
- lblOrg.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblOrg.text = @"业务部门:";
- lblOrg.textColor = LabelGrayTextColor;
- lblOrg.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vOrg addSubview:lblOrg];
- _lblValueOrg = [UILabel new];
- _lblValueOrg.frame=CGRectMake(valuex, valuey, Screen_Width/2 - valuex, valueheight);
- _lblValueOrg.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vOrg addSubview:_lblValueOrg];
-
- UIView *vStaff = [UIView new];
- vStaff.frame=CGRectMake(Screen_Width/2, 0, Screen_Width/2, heightRow);
- [vOrgStaff addSubview:vStaff];
-
- UILabel *lblStaff = [UILabel new];
- lblStaff.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblStaff.text = @"业 务 员:";
- lblStaff.textColor = LabelGrayTextColor;
- lblStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vStaff addSubview:lblStaff];
- _lblValueStaff = [UILabel new];
- _lblValueStaff.frame=CGRectMake(lblwidth, valuey, Screen_Width/2 - lblwidth - 10, valueheight);
- _lblValueStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vStaff addSubview:_lblValueStaff];
- //费用金额 支付金额 —————————
- UIView *vFeePaySum = [UIView new];
- vFeePaySum.frame=CGRectMake(0, CGRectGetMaxY(vOrgStaff.frame), Screen_Width, heightRow);
- [self.contentView addSubview:vFeePaySum];
-
- UIView *vFeeSum = [UIView new];
- vFeeSum.frame=CGRectMake(0, 0, Screen_Width/2, heightRow);
- [vFeePaySum addSubview:vFeeSum];
-
- UILabel *lblFeeSum = [UILabel new];
- lblFeeSum.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblFeeSum.text = @"费用金额:";
- lblFeeSum.textColor = LabelGrayTextColor;
- lblFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFeeSum addSubview:lblFeeSum];
- _lblValueFeeSum = [UILabel new];
- _lblValueFeeSum.frame=CGRectMake(valuex, valuey, Screen_Width/2 - valuex, valueheight);
- _lblValueFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFeeSum addSubview:_lblValueFeeSum];
-
- UIView *vPaySum = [UIView new];
- vPaySum.frame=CGRectMake(Screen_Width/2, 0, Screen_Width/2, heightRow);
- [vFeePaySum addSubview:vPaySum];
-
- UILabel *lblPaySum = [UILabel new];
- lblPaySum.frame=CGRectMake(5, lbly, lblwidth, lblheight);
- lblPaySum.text = @"支付金额:";
- lblPaySum.textColor = LabelGrayTextColor;
- lblPaySum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vPaySum addSubview:lblPaySum];
- _lblValuePaySum = [UILabel new];
- _lblValuePaySum.frame=CGRectMake(lblwidth, valuey, Screen_Width/2 - lblwidth - 10, valueheight);
- _lblValuePaySum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vPaySum addSubview:_lblValuePaySum];
- }
- @end
|