| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- //
- // RepairUnReceiptCell.m
- // IBOSS
- //
- // Created by guan hong hou on 16/4/15.
- // Copyright © 2017年 沈阳东科云信软件有限公司. All rights reserved.
- //
- //功能描述:维修未回执单元格类
- #import "RepairUnReceiptCell.h"
- #import "DateFormat.h"
- #define kTextFont [UIFont systemFontOfSize:LabelAndTextFontOfSize]
- #define kTitleFont [UIFont systemFontOfSize:14]
- @implementation RepairUnReceiptCell
- #pragma 公有函数
- /**
- 初始化单元格
- @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];
- if(self){
- self.layer.cornerRadius=CornerRadius;
- self.layer.backgroundColor = [UIColor clearColor].CGColor;
- self.layer.masksToBounds=YES;
- }
- return self;
- }
- /**
- 设置单元格选中
- @param selected <#selected description#>
- @param animated <#animated description#>
- */
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- }
- #pragma 私有函数
- /**
- 设置维修未回执frame
- @param frame <#frame description#>
- */
- - (void)setUnRepairInfoFrame:(RepairUnReceiptFrame *)frame{
-
- UILabel *repairNoLabelView = [[UILabel alloc] initWithFrame:[frame lblRepairNoF]];
- repairNoLabelView.backgroundColor = [UIColor clearColor];
- repairNoLabelView.textColor = [UIColor blackColor];
- repairNoLabelView.text = @"维修单号:";
- repairNoLabelView.font =kTitleFont;
- repairNoLabelView.textAlignment = NSTextAlignmentLeft;
- [self addSubview:repairNoLabelView];
- NSString *repairNo = [frame.unRepairModel repairNo];
- if(repairNo != nil&& repairNo.length>0){
- _repairNo= [[UILabel alloc] initWithFrame:[frame repairNoF]];
- _repairNo.backgroundColor = [UIColor clearColor];
- _repairNo.textColor = [UIColor blackColor];
- _repairNo.textAlignment = NSTextAlignmentLeft;
- _repairNo.font =kTitleFont;
- [self addSubview: _repairNo];
- _repairNo.text=repairNo;
- }
- UIView *separator = [UIView new];
- separator.frame = [frame separatorF];
- separator.backgroundColor=LineBackgroundColor;
- [self addSubview:separator];
- UILabel *arrangementNoLabelView = [[UILabel alloc] initWithFrame:[frame lblArrangementNoF]];
- arrangementNoLabelView.backgroundColor = [UIColor clearColor];
- arrangementNoLabelView.textColor =LabelGrayTextColor;
- arrangementNoLabelView.text = @"安排单号:";
- arrangementNoLabelView.textAlignment = NSTextAlignmentLeft;
- arrangementNoLabelView.font =kTextFont;
- [self addSubview: arrangementNoLabelView];
- NSString *arrangementNo = [frame.unRepairModel arrangementNo];
- if(arrangementNo != nil&&arrangementNo.length>0){
- _arrangementNo = [[UILabel alloc] initWithFrame:[frame arrangementNoF]];
- _arrangementNo.backgroundColor = [UIColor clearColor];
- _arrangementNo.textColor = [UIColor blackColor];
- _arrangementNo.textAlignment = NSTextAlignmentLeft;
- _arrangementNo.font =kTextFont;
- [self addSubview: _arrangementNo];
- _arrangementNo.text=arrangementNo;
- }
-
-
- UILabel *lblcustomerName = [[UILabel alloc] initWithFrame:[frame lblCustomerNameF]];
- lblcustomerName.backgroundColor = [UIColor clearColor];
- lblcustomerName.textColor = [UIColor blackColor];
- lblcustomerName.text = @"客户名称:";
- lblcustomerName.textColor=LabelGrayTextColor;
- lblcustomerName.textAlignment = NSTextAlignmentLeft;
- lblcustomerName.font =kTextFont;
- [self addSubview:lblcustomerName];
- NSString *customerName = [frame.unRepairModel customerName];
- if(customerName != nil||customerName.length>0){
- _customerName = [[UILabel alloc] initWithFrame:[frame customerNameF]];
- _customerName.backgroundColor = [UIColor clearColor];
- _customerName.textColor = [UIColor blackColor];
- _customerName.textAlignment = NSTextAlignmentLeft;
- _customerName.font =kTextFont;
- [self addSubview:_customerName];
- NSString *customerName = [frame.unRepairModel customerName];
- _customerName.text=customerName;
- }
-
-
- UILabel *lblCustomerTelephone= [[UILabel alloc] initWithFrame:[frame lblCustomerTelephoneF]];
- lblCustomerTelephone.backgroundColor = [UIColor clearColor];
- lblCustomerTelephone.textColor = LabelGrayTextColor;
- lblCustomerTelephone.text = @"客户电话:";
- lblCustomerTelephone.textAlignment = NSTextAlignmentLeft;
- lblCustomerTelephone.font =kTextFont;
- [self addSubview:lblCustomerTelephone];
- NSString *customerTelephone = [frame.unRepairModel telephone];
- if(customerTelephone != nil&&customerTelephone.length>0){
- _telephone = [[UILabel alloc] initWithFrame:[frame customerTelephoneF]];
- _telephone.backgroundColor = [UIColor clearColor];
- _telephone.textColor = [UIColor blackColor];
- _telephone.textAlignment = NSTextAlignmentLeft;
- _telephone.font =kTextFont;
- [self addSubview:_telephone];
- _telephone.text=customerTelephone;
- }
-
- UILabel *repairDateLabelView = [[UILabel alloc] initWithFrame:[frame lblRepairDateF]];
- repairDateLabelView.backgroundColor = [UIColor clearColor];
- repairDateLabelView.textColor = LabelGrayTextColor;
- repairDateLabelView.text = @"维修日期:";
- repairDateLabelView.font =kTextFont;
- repairDateLabelView.textAlignment = NSTextAlignmentLeft;
- [self addSubview:repairDateLabelView];
-
- NSString *repairDate= [frame.unRepairModel repairDate];
- if(repairDate != nil&& repairDate.length>0){
- NSString *repairTime = [DateFormat dateFormatSplit:repairDate];
- _repairDate= [[UILabel alloc] initWithFrame:[frame repairDateF]];
- _repairDate.backgroundColor = [UIColor clearColor];
- _repairDate.textColor = [UIColor blackColor];
- _repairDate.textAlignment = NSTextAlignmentLeft;
- _repairDate.font =kTextFont;
- [self addSubview:_repairDate];
- _repairDate.text=repairTime;
- }
-
- UILabel *lblCustomerAddress= [[UILabel alloc] initWithFrame:[frame lblCustomerAddressF]];
- lblCustomerAddress.backgroundColor = [UIColor clearColor];
- lblCustomerAddress.textColor =LabelGrayTextColor;
- lblCustomerAddress.text = @"客户地址:";
- lblCustomerAddress.font =kTextFont;
- lblCustomerAddress.textAlignment = NSTextAlignmentLeft;
- [self addSubview: lblCustomerAddress];
- NSString *customerAddressStr = [frame.unRepairModel customerAddress];
- if(customerAddressStr != nil&&customerAddressStr.length>0){
- _customerAddress = [[UILabel alloc] initWithFrame:[frame customerAddressF]];
- _customerAddress.backgroundColor = [UIColor clearColor];
- _customerAddress.textColor = [UIColor blackColor];
- _customerAddress.textAlignment = NSTextAlignmentLeft;
- _customerAddress.numberOfLines=0;
- _customerAddress.font =kTextFont;
- [self addSubview:_customerAddress];
- NSString *customerAddress = [frame.unRepairModel customerAddress];
- _customerAddress.text=customerAddress;
-
- }
-
- NSString *organizationName=[frame.unRepairModel organizationName];
- NSString *staffName=[frame.unRepairModel staffName];
- if((organizationName!=nil&&organizationName.length>0)){
- UILabel *lblTitleOrganization= [[UILabel alloc] initWithFrame:[frame lblOrganizationNameF]];
- lblTitleOrganization.backgroundColor = [UIColor clearColor];
- lblTitleOrganization.textColor = LabelGrayTextColor;
- lblTitleOrganization.text = @"业务部门:";
- lblTitleOrganization.font =kTextFont;
- lblTitleOrganization.textAlignment = NSTextAlignmentLeft;
- [self addSubview: lblTitleOrganization];
-
- _lblDepartment = [[UILabel alloc] initWithFrame:[frame organizationNameF]];
- _lblDepartment.backgroundColor = [UIColor clearColor];
- _lblDepartment.textColor = [UIColor blackColor];
- _lblDepartment.textAlignment = NSTextAlignmentLeft;
- _lblDepartment.numberOfLines=0;
- _lblDepartment.font =kTextFont;
- [self addSubview:_lblDepartment];
- _lblDepartment.text=organizationName;
- if(staffName!=nil&&staffName.length>0){
- UILabel *lblTitleStaff= [[UILabel alloc] initWithFrame:[frame lblStaffNameF]];
- lblTitleStaff.backgroundColor = [UIColor clearColor];
- lblTitleStaff.textColor = LabelGrayTextColor;
- lblTitleStaff.text = @"业 务 员:";
- lblTitleStaff.font =kTextFont;
- lblTitleStaff.textAlignment = NSTextAlignmentLeft;
- [self addSubview: lblTitleStaff];
-
- _lblStaff = [[UILabel alloc] initWithFrame:[frame staffNameF]];
- _lblStaff.backgroundColor = [UIColor clearColor];
- _lblStaff.textColor = [UIColor blackColor];
- _lblStaff.textAlignment = NSTextAlignmentLeft;
- _lblStaff.numberOfLines=0;
- _lblStaff.font =kTextFont;
- [self addSubview:_lblStaff];
- _lblStaff.text=staffName;
- }
-
- }
-
-
- }
- @end
|