InventoryFrozenOrderListCell.m 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. //
  2. // InventoryFrozenOrderListCell.m
  3. // IBOSS
  4. //
  5. // Created by 关宏厚 on 2020/5/13.
  6. // Copyright © 2020 elongtian. All rights reserved.
  7. //
  8. #import "InventoryFrozenOrderListCell.h"
  9. @implementation InventoryFrozenOrderListCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. return self;
  13. }
  14. -(void)setInventoryFrozenOrderListCell:(InventoryFreezeOrderListModel*)orderListModel
  15. {
  16. CGFloat heightLine = 1;
  17. CGFloat heightRow = 31;
  18. CGFloat lblx = 10;
  19. CGFloat lbly = 0;
  20. CGFloat lblwidth = 70;
  21. CGFloat lblheight = 31;
  22. CGFloat valuey = 0;
  23. CGFloat valueheight = 31;
  24. CGFloat topMargin=8;
  25. UIView *vFreezeNo = [UIView new];
  26. vFreezeNo.frame=CGRectMake(0,0, Screen_Width,35);
  27. [self.contentView addSubview:vFreezeNo];
  28. UILabel *lblFreezeNo = [UILabel new];
  29. lblFreezeNo.frame=CGRectMake(lblx, 5, Screen_Width-lblx-100, valueheight);
  30. lblFreezeNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  31. [vFreezeNo addSubview:lblFreezeNo];
  32. lblFreezeNo.text = orderListModel.freezeNo;
  33. UILabel *lblUnfreezeStatusName = [UILabel new];
  34. lblUnfreezeStatusName.frame=CGRectMake(Screen_Width-100, 5, 100, valueheight);
  35. lblUnfreezeStatusName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  36. [vFreezeNo addSubview:lblUnfreezeStatusName];
  37. [vFreezeNo addSubview:lblFreezeNo];
  38. lblFreezeNo.text = orderListModel.freezeNo;
  39. lblUnfreezeStatusName.text=orderListModel.unfreezeStatusName;
  40. UIView *viewBackgroud = [UIView new];
  41. viewBackgroud.frame = CGRectMake(0, CGRectGetMaxY(vFreezeNo.frame)-1, Screen_Width, 1);
  42. viewBackgroud.backgroundColor = LineBackgroundColor;
  43. [vFreezeNo addSubview:viewBackgroud];
  44. UIView *vCustomerCode = [UIView new];
  45. vCustomerCode.frame=CGRectMake(0,CGRectGetMaxY(vFreezeNo.frame)+10, Screen_Width/2, heightRow);
  46. UILabel *lblTitleCustomerCode = [UILabel new];
  47. lblTitleCustomerCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  48. lblTitleCustomerCode.text = @"客户编码:";
  49. lblTitleCustomerCode.textColor = [UIColor lightGrayColor];
  50. lblTitleCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  51. [vCustomerCode addSubview:lblTitleCustomerCode];
  52. UILabel *lblCustomerCode = [UILabel new];
  53. lblCustomerCode.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerCode.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleCustomerCode.frame), valueheight);
  54. lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  55. [vCustomerCode addSubview:lblCustomerCode];
  56. lblCustomerCode.text = orderListModel.customerCode;
  57. [self.contentView addSubview:vCustomerCode];
  58. UIView *vCustomerName = [UIView new];
  59. vCustomerName.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vFreezeNo.frame)+10, Screen_Width/2, heightRow);
  60. UILabel *lblTitleCustomerName = [UILabel new];
  61. lblTitleCustomerName.frame=CGRectMake(0, lbly, lblwidth, lblheight);
  62. lblTitleCustomerName.text = @"客户名称:";
  63. lblTitleCustomerName.textColor = [UIColor lightGrayColor];
  64. lblTitleCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  65. [vCustomerName addSubview:lblTitleCustomerName];
  66. UILabel *lblCustomerName = [UILabel new];
  67. lblCustomerName.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleCustomerName.frame), valueheight);
  68. lblCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  69. [vCustomerName addSubview:lblCustomerName];
  70. lblCustomerName.text = orderListModel.customerName;
  71. [self.contentView addSubview:vCustomerName];
  72. UIView *vStaff = [UIView new];
  73. vStaff.frame=CGRectMake(0,CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
  74. UILabel *lblTitleStaff = [UILabel new];
  75. lblTitleStaff.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  76. lblTitleStaff.text = @"业 务 员:";
  77. lblTitleStaff.textColor = [UIColor lightGrayColor];
  78. lblTitleStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  79. [vStaff addSubview:lblTitleStaff];
  80. UILabel *lblStaff = [UILabel new];
  81. lblStaff.frame=CGRectMake(CGRectGetMaxX(lblTitleStaff.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleStaff.frame), valueheight);
  82. lblStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  83. [vStaff addSubview:lblStaff];
  84. lblStaff.text = orderListModel.staffName;
  85. [self.contentView addSubview:vStaff];
  86. UIView *vAuditStatus = [UIView new];
  87. vAuditStatus.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vCustomerCode.frame), Screen_Width/2, heightRow);
  88. UILabel *lblTitleAuditStatus = [UILabel new];
  89. lblTitleAuditStatus.frame=CGRectMake(0, lbly, lblwidth, lblheight);
  90. lblTitleAuditStatus.text = @"审批状态:";
  91. lblTitleAuditStatus.textColor = [UIColor lightGrayColor];
  92. lblTitleAuditStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  93. [vAuditStatus addSubview:lblTitleAuditStatus];
  94. UILabel *lblAuditStatus = [UILabel new];
  95. lblAuditStatus.frame=CGRectMake(CGRectGetMaxX(lblTitleAuditStatus.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleAuditStatus.frame), valueheight);
  96. lblAuditStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  97. [vAuditStatus addSubview:lblAuditStatus];
  98. lblAuditStatus.text = orderListModel.invoiceStatusName;
  99. [self.contentView addSubview:vAuditStatus];
  100. UIView *vFreezeDate = [UIView new];
  101. vFreezeDate.frame=CGRectMake(0,CGRectGetMaxY(vStaff.frame), Screen_Width/2, heightRow);
  102. UILabel *lblTitleFreezeDate = [UILabel new];
  103. lblTitleFreezeDate.frame=CGRectMake(lblx, lbly, lblwidth+20, lblheight);
  104. lblTitleFreezeDate.text = @"冻结截止日期:";
  105. lblTitleFreezeDate.textColor = [UIColor lightGrayColor];
  106. lblTitleFreezeDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  107. [vFreezeDate addSubview:lblTitleFreezeDate];
  108. UILabel *lblFreezeDate = [UILabel new];
  109. lblFreezeDate.frame=CGRectMake(CGRectGetMaxX(lblTitleFreezeDate.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleFreezeDate.frame), valueheight);
  110. lblFreezeDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  111. [vFreezeDate addSubview:lblFreezeDate];
  112. lblFreezeDate.text = orderListModel.freezePeriod;
  113. [self.contentView addSubview:vFreezeDate];
  114. UIView *vAccountDate = [UIView new];
  115. vAccountDate.frame=CGRectMake(Screen_Width/2,CGRectGetMaxY(vStaff.frame), Screen_Width/2, heightRow);
  116. UILabel *lblTitleAccountDate = [UILabel new];
  117. lblTitleAccountDate.frame=CGRectMake(0, lbly, lblwidth, lblheight);
  118. lblTitleAccountDate.text = @"账务日期:";
  119. lblTitleAccountDate.textColor = [UIColor lightGrayColor];
  120. lblTitleAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  121. [vAccountDate addSubview:lblTitleAccountDate];
  122. UILabel *lblAccountDate = [UILabel new];
  123. lblAccountDate.frame=CGRectMake(CGRectGetMaxX(lblTitleAccountDate.frame), valuey, Screen_Width/2-CGRectGetMaxX(lblTitleAccountDate.frame), valueheight);
  124. lblAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  125. [vAccountDate addSubview:lblAccountDate];
  126. lblAccountDate.text = orderListModel.accountDate;
  127. [self.contentView addSubview:vAccountDate];
  128. UIView *vFreezeReason=[UIView new];
  129. vFreezeReason.frame=CGRectMake(0,CGRectGetMaxY(vFreezeDate.frame), Screen_Width, heightRow);
  130. UILabel *lblTitleFreezeReason=[UILabel new];
  131. lblTitleFreezeReason.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  132. lblTitleFreezeReason.text = @"冻结原因:";
  133. lblTitleFreezeReason.textColor = [UIColor lightGrayColor];
  134. lblTitleFreezeReason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  135. [vFreezeReason addSubview:lblTitleFreezeReason];
  136. UILabel *lblFreezeReason=[UILabel new];
  137. lblFreezeReason.frame=CGRectMake(CGRectGetMaxX(lblTitleFreezeReason.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFreezeReason.frame), valueheight);
  138. lblFreezeReason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  139. [vFreezeReason addSubview:lblFreezeReason];
  140. lblFreezeReason.text = orderListModel.freezeReason;
  141. [self.contentView addSubview:vFreezeReason];
  142. UIView *bottomSeparator= [UIView new];
  143. bottomSeparator.frame=CGRectMake(0,CGRectGetMaxY(vFreezeReason.frame), Screen_Width, 1);
  144. bottomSeparator.backgroundColor = LineBackgroundColor;
  145. [self.contentView addSubview:bottomSeparator];
  146. _height=CGRectGetMaxY(bottomSeparator.frame);
  147. }
  148. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  149. [super setSelected:selected animated:animated];
  150. }
  151. @end