OrderFeesDetailListCell.m 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. //
  2. // OrderFeesDetailListCell.m
  3. // IBOSS
  4. //
  5. // Created by 关宏厚 on 2018/11/19.
  6. // Copyright © 2018 elongtian. All rights reserved.
  7. //
  8. #import "OrderFeesDetailListCell.h"
  9. @implementation OrderFeesDetailListCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. if (self) {
  13. self.layer.cornerRadius=CornerRadius;
  14. self.layer.backgroundColor = [UIColor clearColor].CGColor;
  15. self.layer.masksToBounds=YES;
  16. }
  17. return self;
  18. }
  19. - (void)setOrderFeesDetailCell:(OrderFeesDetailModel *)feesDetailModel
  20. {
  21. CGFloat heightRow = 31;
  22. CGFloat lblx = 10;
  23. CGFloat lbly = 0;
  24. CGFloat lblheight = 31;
  25. CGFloat valuey = 0;
  26. CGFloat valueheight = 31;
  27. UIView *vFeeNo = [UIView new];
  28. vFeeNo.frame=CGRectMake(0,0, Screen_Width, heightRow);
  29. [self.contentView addSubview:vFeeNo];
  30. UILabel *lblTitleFeeNo = [UILabel new];
  31. lblTitleFeeNo.frame=CGRectMake(lblx, lbly, 80, lblheight);
  32. lblTitleFeeNo.text = @"费用单号:";
  33. lblTitleFeeNo.textColor = [UIColor blackColor];
  34. lblTitleFeeNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  35. [vFeeNo addSubview:lblTitleFeeNo];
  36. UILabel *lblFeeNo = [UILabel new];
  37. lblFeeNo.frame=CGRectMake(CGRectGetMaxX(lblTitleFeeNo.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFeeNo.frame), valueheight);
  38. lblFeeNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  39. [vFeeNo addSubview:lblFeeNo];
  40. lblFeeNo.text = feesDetailModel.feeNo;
  41. UIView *vObjectType = [UIView new];
  42. vObjectType.frame=CGRectMake(0,CGRectGetMaxY(vFeeNo.frame)+8, Screen_Width, heightRow);
  43. [self.contentView addSubview:vObjectType];
  44. UILabel *lblTitleObjectType = [UILabel new];
  45. lblTitleObjectType.frame=CGRectMake(lblx, lbly,80, lblheight);
  46. lblTitleObjectType.text = @"对象类型:";
  47. lblTitleObjectType.textColor = [UIColor blackColor];
  48. lblTitleObjectType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  49. [vObjectType addSubview:lblTitleObjectType];
  50. UILabel *lblObjectType = [UILabel new];
  51. lblObjectType.frame=CGRectMake(CGRectGetMaxX(lblTitleObjectType.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleObjectType.frame), valueheight);
  52. lblObjectType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  53. [vObjectType addSubview:lblObjectType];
  54. lblObjectType.text = feesDetailModel.objectTypeName;
  55. UIView *vObjectName = [UIView new];
  56. vObjectName.frame=CGRectMake(0,CGRectGetMaxY(vObjectType.frame)+8, Screen_Width, heightRow);
  57. [self.contentView addSubview:vObjectName];
  58. UILabel *lblTitleObjectName = [UILabel new];
  59. lblTitleObjectName.frame=CGRectMake(lblx, lbly, 80, lblheight);
  60. lblTitleObjectName.text = @"对象名称:";
  61. lblTitleObjectName.textColor = [UIColor blackColor];
  62. lblTitleObjectName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  63. [vObjectName addSubview:lblTitleObjectName];
  64. UILabel *lblObjectName = [UILabel new];
  65. lblObjectName.frame=CGRectMake(CGRectGetMaxX(lblTitleObjectName.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleObjectName.frame), valueheight);
  66. lblObjectName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  67. [vObjectName addSubview:lblObjectName];
  68. lblObjectName.text = feesDetailModel.objectName;
  69. UIView *vFeeItemName = [UIView new];
  70. vFeeItemName.frame=CGRectMake(0,CGRectGetMaxY(vObjectName.frame)+8, Screen_Width, heightRow);
  71. [ self.contentView addSubview:vFeeItemName];
  72. UILabel *lblTitleFeeItem = [UILabel new];
  73. lblTitleFeeItem.frame=CGRectMake(lblx, lbly,80, lblheight);
  74. lblTitleFeeItem.text = @"费用项目:";
  75. lblTitleFeeItem.textColor = [UIColor blackColor];
  76. lblTitleFeeItem.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  77. [vFeeItemName addSubview:lblTitleFeeItem];
  78. UILabel *lblFeeItem = [UILabel new];
  79. lblFeeItem.frame=CGRectMake(CGRectGetMaxX(lblTitleFeeItem.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFeeItem.frame), valueheight);
  80. lblFeeItem.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  81. [vFeeItemName addSubview:lblFeeItem];
  82. lblFeeItem.text = feesDetailModel.feeItemName;
  83. UIView *vFeeSum = [UIView new];
  84. vFeeSum.frame=CGRectMake(0,CGRectGetMaxY(vFeeItemName.frame)+8, Screen_Width, heightRow);
  85. [self.contentView addSubview:vFeeSum];
  86. UILabel *lblTitleFeeSum = [UILabel new];
  87. lblTitleFeeSum.frame=CGRectMake(lblx, lbly, 80, lblheight);
  88. lblTitleFeeSum.text = @"费用金额:";
  89. lblTitleFeeSum.textColor = [UIColor blackColor];
  90. lblTitleFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  91. [vFeeSum addSubview:lblTitleFeeSum];
  92. UILabel *lblFeeSum = [UILabel new];
  93. lblFeeSum.frame=CGRectMake(CGRectGetMaxX(lblTitleFeeSum.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFeeSum.frame), valueheight);
  94. lblFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  95. [vFeeSum addSubview:lblFeeSum];
  96. lblFeeSum.text = feesDetailModel.feeSum;
  97. UIView *vConfirmFeeSum = [UIView new];
  98. vConfirmFeeSum.frame=CGRectMake(0,CGRectGetMaxY(vFeeSum.frame)+8, Screen_Width, heightRow);
  99. [self.contentView addSubview:vConfirmFeeSum];
  100. UILabel *lblTitleConfirmFeeSum = [UILabel new];
  101. lblTitleConfirmFeeSum.frame=CGRectMake(lblx, lbly, 100, lblheight);
  102. lblTitleConfirmFeeSum.text = @"确认费用金额:";
  103. lblTitleConfirmFeeSum.textColor = [UIColor blackColor];
  104. lblTitleConfirmFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  105. [vConfirmFeeSum addSubview:lblTitleConfirmFeeSum];
  106. UILabel *lblConfirmFeeSum = [UILabel new];
  107. lblConfirmFeeSum.frame=CGRectMake(CGRectGetMaxX(lblTitleConfirmFeeSum.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleConfirmFeeSum.frame), valueheight);
  108. lblConfirmFeeSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  109. [vConfirmFeeSum addSubview:lblConfirmFeeSum];
  110. lblConfirmFeeSum.text = feesDetailModel.confirmFeeSum;
  111. UIView *vFactManufactureSum = [UIView new];
  112. vFactManufactureSum.frame=CGRectMake(0,CGRectGetMaxY(vConfirmFeeSum.frame)+8, Screen_Width, heightRow);
  113. [self.contentView addSubview:vFactManufactureSum];
  114. UILabel *lblTitleFactManufactureSum = [UILabel new];
  115. lblTitleFactManufactureSum.frame=CGRectMake(lblx, lbly, 120, lblheight);
  116. lblTitleFactManufactureSum.text = @"对外加工费用金额:";
  117. lblTitleFactManufactureSum.textColor = [UIColor blackColor];
  118. lblTitleFactManufactureSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  119. [vFactManufactureSum addSubview:lblTitleFactManufactureSum];
  120. UILabel *lblFactManufactureSum = [UILabel new];
  121. lblFactManufactureSum.frame=CGRectMake(CGRectGetMaxX(lblTitleFactManufactureSum.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFactManufactureSum.frame), valueheight);
  122. lblFactManufactureSum.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  123. [vFactManufactureSum addSubview:lblFactManufactureSum];
  124. lblFactManufactureSum.text = feesDetailModel.factManufactureSum;
  125. UIView *vFeeAuditFlag = [UIView new];
  126. vFeeAuditFlag.frame=CGRectMake(0,CGRectGetMaxY(vFactManufactureSum.frame)+8, Screen_Width, heightRow);
  127. [self.contentView addSubview:vFeeAuditFlag];
  128. UILabel *lblTitleFeeAuditFlag = [UILabel new];
  129. lblTitleFeeAuditFlag.frame=CGRectMake(lblx, lbly, 120, lblheight);
  130. lblTitleFeeAuditFlag.text = @"费用审核标识:";
  131. lblTitleFeeAuditFlag.textColor = [UIColor blackColor];
  132. lblTitleFeeAuditFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  133. [vFeeAuditFlag addSubview:lblTitleFeeAuditFlag];
  134. UILabel *lblFeeAuditFlag = [UILabel new];
  135. lblFeeAuditFlag.frame=CGRectMake(CGRectGetMaxX(lblTitleFeeAuditFlag.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleFeeAuditFlag.frame), valueheight);
  136. lblFeeAuditFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  137. [vFeeAuditFlag addSubview:lblFeeAuditFlag];
  138. int feeAuditFlag= feesDetailModel.feeAuditFlag;
  139. NSString *feeAuditFlagStr;
  140. if(feeAuditFlag==0){
  141. feeAuditFlagStr=@"否";
  142. }
  143. else
  144. {
  145. feeAuditFlagStr=@"是";
  146. }
  147. lblFeeAuditFlag.text =feeAuditFlagStr;
  148. UIView *vCheckUser= [UIView new];
  149. vCheckUser.frame=CGRectMake(0,CGRectGetMaxY(vFeeAuditFlag.frame)+8, Screen_Width, heightRow);
  150. [self.contentView addSubview:vCheckUser];
  151. UILabel *lblTitleCheckUser = [UILabel new];
  152. lblTitleCheckUser.frame=CGRectMake(lblx, lbly, 80, lblheight);
  153. lblTitleCheckUser.text = @"审核人:";
  154. lblTitleCheckUser.textColor = [UIColor blackColor];
  155. lblTitleCheckUser.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  156. [vCheckUser addSubview:lblTitleCheckUser];
  157. UILabel *lblCheckUser = [UILabel new];
  158. lblCheckUser.frame=CGRectMake(CGRectGetMaxX(lblTitleCheckUser.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleCheckUser.frame), valueheight);
  159. lblCheckUser.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  160. [vCheckUser addSubview:lblCheckUser];
  161. lblCheckUser.text = feesDetailModel.checkUserName;
  162. UIView *vInvoiceStatus= [UIView new];
  163. vInvoiceStatus.frame=CGRectMake(0,CGRectGetMaxY(vCheckUser.frame)+8, Screen_Width, heightRow);
  164. [self.contentView addSubview:vInvoiceStatus];
  165. UILabel *lblTitleInvoiceStatus = [UILabel new];
  166. lblTitleInvoiceStatus.frame=CGRectMake(lblx, lbly, 70, lblheight);
  167. lblTitleInvoiceStatus.text = @"状态:";
  168. lblTitleInvoiceStatus.textColor = [UIColor blackColor];
  169. lblTitleInvoiceStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  170. [vInvoiceStatus addSubview:lblTitleInvoiceStatus];
  171. UILabel *lblInvoiceStatus = [UILabel new];
  172. lblInvoiceStatus.frame=CGRectMake(CGRectGetMaxX(lblTitleInvoiceStatus.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleInvoiceStatus.frame), valueheight);
  173. lblInvoiceStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  174. [vInvoiceStatus addSubview:lblInvoiceStatus];
  175. lblInvoiceStatus.text = feesDetailModel.invoiceStatusName;
  176. UIView *vRemarks= [UIView new];
  177. vRemarks.frame=CGRectMake(0,CGRectGetMaxY(vInvoiceStatus.frame)+8, Screen_Width, heightRow);
  178. [self.contentView addSubview:vRemarks];
  179. UILabel *lblTitleRemarks = [UILabel new];
  180. lblTitleRemarks.frame=CGRectMake(lblx, lbly, 70, lblheight);
  181. lblTitleRemarks.text = @"备注:";
  182. lblTitleRemarks.textColor = [UIColor blackColor];
  183. lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  184. [vRemarks addSubview:lblTitleRemarks];
  185. UILabel *lblRemarks = [UILabel new];
  186. lblRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleRemarks.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleRemarks.frame), valueheight);
  187. lblRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  188. [vRemarks addSubview:lblRemarks];
  189. lblRemarks.text = feesDetailModel.remarks;
  190. }
  191. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  192. [super setSelected:selected animated:animated];
  193. }
  194. @end