| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- //
- // InventoryFrozenOrderListCell.m
- // IBOSS
- //
- // Created by 关宏厚 on 2020/5/13.
- // Copyright © 2020 elongtian. All rights reserved.
- //
- #import "InventoryFrozenOrderListCell.h"
- @implementation InventoryFrozenOrderListCell
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
-
- return self;
- }
- -(void)setInventoryFrozenOrderListCell:(InventoryFreezeOrderListModel*)orderListModel
- {
- CGFloat heightLine = 1;
- CGFloat heightRow = 31;
- CGFloat lblx = 10;
- CGFloat lbly = 0;
- CGFloat lblwidth = 70;
- CGFloat lblheight = 31;
- CGFloat valuey = 0;
- CGFloat valueheight = 31;
- CGFloat topMargin=8;
-
- UIView *vFreezeNo = [UIView new];
- vFreezeNo.frame=CGRectMake(0,0, Screen_Width,35);
- [self.contentView addSubview:vFreezeNo];
-
- UILabel *lblFreezeNo = [UILabel new];
- lblFreezeNo.frame=CGRectMake(lblx, 5, Screen_Width-lblx-100, valueheight);
- lblFreezeNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeNo addSubview:lblFreezeNo];
- lblFreezeNo.text = orderListModel.freezeNo;
-
- UILabel *lblUnfreezeStatusName = [UILabel new];
- lblUnfreezeStatusName.frame=CGRectMake(Screen_Width-100, 5, 100, valueheight);
- lblUnfreezeStatusName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeNo addSubview:lblUnfreezeStatusName];
- [vFreezeNo addSubview:lblFreezeNo];
- lblFreezeNo.text = orderListModel.freezeNo;
- lblUnfreezeStatusName.text=orderListModel.unfreezeStatusName;
-
- UIView *viewBackgroud = [UIView new];
- viewBackgroud.frame = CGRectMake(0, CGRectGetMaxY(vFreezeNo.frame)-1, Screen_Width, 1);
- viewBackgroud.backgroundColor = LineBackgroundColor;
- [vFreezeNo addSubview:viewBackgroud];
-
- UIView *vCustomerCode = [UIView new];
- vCustomerCode.frame=CGRectMake(0,CGRectGetMaxY(vFreezeNo.frame)+10, Screen_Width/2, heightRow);
-
- UILabel *lblTitleCustomerCode = [UILabel new];
- lblTitleCustomerCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCustomerCode.text = @"客户编码:";
- lblTitleCustomerCode.textColor = [UIColor lightGrayColor];
- lblTitleCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:lblTitleCustomerCode];
- UILabel *lblCustomerCode = [UILabel new];
- lblCustomerCode.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerCode.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleCustomerCode.frame), valueheight);
- lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:lblCustomerCode];
- lblCustomerCode.text = orderListModel.customerCode;
-
- [self.contentView addSubview:vCustomerCode];
-
- UIView *vCustomerName = [UIView new];
- vCustomerName.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vFreezeNo.frame)+10, Screen_Width/2, heightRow);
-
- UILabel *lblTitleCustomerName = [UILabel new];
- lblTitleCustomerName.frame=CGRectMake(0, lbly, lblwidth, lblheight);
- lblTitleCustomerName.text = @"客户名称:";
- lblTitleCustomerName.textColor = [UIColor lightGrayColor];
- lblTitleCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:lblTitleCustomerName];
- UILabel *lblCustomerName = [UILabel new];
- lblCustomerName.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleCustomerName.frame), valueheight);
- lblCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:lblCustomerName];
- lblCustomerName.text = orderListModel.customerName;
-
- [self.contentView addSubview:vCustomerName];
-
- UIView *vStaff = [UIView new];
- vStaff.frame=CGRectMake(0,CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
-
- UILabel *lblTitleStaff = [UILabel new];
- lblTitleStaff.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleStaff.text = @"业 务 员:";
- lblTitleStaff.textColor = [UIColor lightGrayColor];
- lblTitleStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vStaff addSubview:lblTitleStaff];
- UILabel *lblStaff = [UILabel new];
- lblStaff.frame=CGRectMake(CGRectGetMaxX(lblTitleStaff.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleStaff.frame), valueheight);
- lblStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vStaff addSubview:lblStaff];
- lblStaff.text = orderListModel.staffName;
- [self.contentView addSubview:vStaff];
-
- UIView *vAuditStatus = [UIView new];
- vAuditStatus.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
-
- UILabel *lblTitleAuditStatus = [UILabel new];
- lblTitleAuditStatus.frame=CGRectMake(0, lbly, lblwidth, lblheight);
- lblTitleAuditStatus.text = @"审批状态:";
- lblTitleAuditStatus.textColor = [UIColor lightGrayColor];
- lblTitleAuditStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAuditStatus addSubview:lblTitleAuditStatus];
- UILabel *lblAuditStatus = [UILabel new];
- lblAuditStatus.frame=CGRectMake(CGRectGetMaxX(lblTitleAuditStatus.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleAuditStatus.frame), valueheight);
- lblAuditStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAuditStatus addSubview:lblAuditStatus];
- lblAuditStatus.text = orderListModel.invoiceStatusName;
-
- [self.contentView addSubview:vAuditStatus];
-
-
- UIView *vFreezeDate = [UIView new];
- vFreezeDate.frame=CGRectMake(0,CGRectGetMaxY(vStaff.frame), Screen_Width/2, heightRow);
-
- UILabel *lblTitleFreezeDate = [UILabel new];
- lblTitleFreezeDate.frame=CGRectMake(lblx, lbly, lblwidth+20, lblheight);
- lblTitleFreezeDate.text = @"冻结截止日期:";
- lblTitleFreezeDate.textColor = [UIColor lightGrayColor];
- lblTitleFreezeDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeDate addSubview:lblTitleFreezeDate];
- UILabel *lblFreezeDate = [UILabel new];
- lblFreezeDate.frame=CGRectMake(CGRectGetMaxX(lblTitleFreezeDate.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleFreezeDate.frame), valueheight);
- lblFreezeDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeDate addSubview:lblFreezeDate];
- lblFreezeDate.text = orderListModel.freezePeriod;
- [self.contentView addSubview:vFreezeDate];
-
-
- UIView *vAccountDate = [UIView new];
- vAccountDate.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vStaff.frame), Screen_Width/2, heightRow);
-
- UILabel *lblTitleAccountDate = [UILabel new];
- lblTitleAccountDate.frame=CGRectMake(0, lbly, lblwidth, lblheight);
- lblTitleAccountDate.text = @"账务日期:";
- lblTitleAccountDate.textColor = [UIColor lightGrayColor];
- lblTitleAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAccountDate addSubview:lblTitleAccountDate];
- UILabel *lblAccountDate = [UILabel new];
- lblAccountDate.frame=CGRectMake(CGRectGetMaxX(lblTitleAccountDate.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleAccountDate.frame), valueheight);
- lblAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAccountDate addSubview:lblAccountDate];
- lblAccountDate.text = orderListModel.accountDate;
-
- [self.contentView addSubview:vAccountDate];
-
- UIView *vFreezeReason=[UIView new];
- vFreezeReason.frame=CGRectMake(0,CGRectGetMaxY(vFreezeDate.frame), Screen_Width, heightRow);
-
- UILabel *lblTitleFreezeReason=[UILabel new];
- lblTitleFreezeReason.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleFreezeReason.text = @"冻结原因:";
- lblTitleFreezeReason.textColor = [UIColor lightGrayColor];
- lblTitleFreezeReason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeReason addSubview:lblTitleFreezeReason];
-
-
- UILabel *lblFreezeReason=[UILabel new];
- lblFreezeReason.frame=CGRectMake(CGRectGetMaxX(lblTitleFreezeReason.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFreezeReason.frame), valueheight);
- lblFreezeReason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vFreezeReason addSubview:lblFreezeReason];
- lblFreezeReason.text = orderListModel.freezeReason;
- [self.contentView addSubview:vFreezeReason];
-
- UIView *bottomSeparator= [UIView new];
- bottomSeparator.frame=CGRectMake(0,CGRectGetMaxY(vFreezeReason.frame), Screen_Width, 1);
- bottomSeparator.backgroundColor = LineBackgroundColor;
- [self.contentView addSubview:bottomSeparator];
- _height=CGRectGetMaxY(bottomSeparator.frame);
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- }
- @end
|