RegionsCell.m 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // RegionsCell.m
  3. // LNManager
  4. //
  5. // Created by EchoShacolee on 2017/4/18.
  6. // Copyright © 2017年 lee. All rights reserved.
  7. //
  8. #import "RegionsCell.h"
  9. @implementation RegionsCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  15. [super setSelected:selected animated:animated];
  16. // Configure the view for the selected state
  17. }
  18. -(void)upDataWithDic:(NSDictionary *)dic{
  19. NSArray *array = @[];
  20. NSString *text = @"";
  21. array = @[@"RI_NAME",@"NAME",@"TR_NAME",@"TSP_NAME"];
  22. for (NSString *str in array) {
  23. if ([[dic allKeys] containsObject:str]) {
  24. text = dic[str];
  25. }
  26. }
  27. self.nameLab.text = text;
  28. self.nameLab.textColor = defGreen;
  29. array = @[@"RI_ADDRESS",@"ADDRESS",@"TR_ADDRESS",@"TSP_ADDRESS"];
  30. for (NSString *str in array) {
  31. if ([[dic allKeys] containsObject:str]) {
  32. text = dic[str];
  33. }
  34. }
  35. self.address.text = [NSString stringWithFormat:@"地址:%@",text];
  36. NSString * statusStr = [NSString stringWithFormat:@"%@",dic[@"RI_AUDIT_STATUS"]];//审核状态: 0未申请; 1审核中; 2已审核;
  37. NSInteger status = [statusStr integerValue];
  38. if (status == 0) {
  39. self.statusLab.text = @"未申请";
  40. self.statusLab.textColor = [UIColor redColor];
  41. }else if (status == 1){
  42. self.statusLab.text = @"审核中";
  43. self.statusLab.textColor = [UIColor lightGrayColor];
  44. }else if (status == 2){
  45. self.statusLab.text = @"已审核";
  46. self.statusLab.textColor = [UIColor darkGrayColor];
  47. }
  48. }
  49. @end