PayInRealityTableViewCell.m 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // PayInRealityTableViewCell.m
  3. // LN_School
  4. //
  5. // Created by apple on 2017/4/21.
  6. // Copyright © 2017年 Danson. All rights reserved.
  7. //
  8. #import "PayInRealityTableViewCell.h"
  9. @implementation PayInRealityTableViewCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setDataDic:(NSDictionary *)dataDic {
  15. _dataDic = dataDic;
  16. NSString *stateString = @"";
  17. NSInteger auditStatus = [dataDic[@"AUDITSTATUS"] integerValue];
  18. switch (auditStatus) {
  19. case 0: {
  20. stateString = @"未审核";
  21. break;
  22. }
  23. case 1: {
  24. stateString = @"审核通过";
  25. break;
  26. }
  27. case 2: {
  28. stateString = @"审核拒绝";
  29. break;
  30. }
  31. default: {
  32. stateString = @"未知";
  33. break;
  34. }
  35. }
  36. _orderNumLabel.text = [NSString stringWithFormat:@"订单号:%@",dataDic[@"ORDER_ID"]];
  37. _stuNameLabel.text = [NSString stringWithFormat:@"学员:%@",dataDic[@"RO_USER_NAME"]];
  38. _priceLabel.text = [NSString stringWithFormat:@"%@元",dataDic[@"MONEY"]];
  39. _cashierLabel.text = [NSString stringWithFormat:@"收款人:%@",dataDic[@"CRUSERNAME"]];
  40. _stateLabel.text = stateString;
  41. _timeLabel.text = [NSString stringWithFormat:@"收款时间:%@",dataDic[@"CRTIME"]];
  42. self.userInteractionEnabled = [dataDic[@"AUDITSTATUS"] integerValue] == 0 ? YES : NO;
  43. }
  44. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  45. [super setSelected:selected animated:animated];
  46. // Configure the view for the selected state
  47. }
  48. @end