OrderListCell.m 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // OrderListCell.m
  3. // yunbaolive
  4. //
  5. // Created by ybRRR on 2020/2/7.
  6. // Copyright © 2020 cat. All rights reserved.
  7. //
  8. #import "OrderListCell.h"
  9. #import "shopDetailVC.h"
  10. @implementation OrderListCell
  11. - (void)awakeFromNib {
  12. [super awakeFromNib];
  13. // Initialization code
  14. /// 待付款
  15. [_dfk_fukuanBtn setTitle:YZMsg(@"付款") forState:0];
  16. [_dfk_qxddBtn setTitle:YZMsg(@"取消订单") forState:0];
  17. /// 待收货
  18. [_dsh_sureBtn setTitle:YZMsg(@"确认收货") forState:0];
  19. [_dsh_ckwlBtn setTitle:YZMsg(@"查看物流") forState:0];
  20. /// 待评价
  21. [_dpj_pjBtn setTitle:YZMsg(@"评价") forState:0];
  22. /// 退款
  23. [_tk_tkxqBtn setTitle:YZMsg(@"退款详情") forState:0];
  24. /// 已关闭
  25. [_ygb_scddBtn setTitle:YZMsg(@"删除订单") forState:0];
  26. /// 退款中
  27. [_tkz_tkxqBtn setTitle:YZMsg(@"退款详情") forState:0];
  28. /// 已评价可追加
  29. [_ypjkzj_zjpjBtn setTitle:YZMsg(@"追加评价") forState:0];
  30. [_ypjkzj_ckwlBtn setTitle:YZMsg(@"查看物流") forState:0];
  31. [_ypjkzj_scddBtn setTitle:YZMsg(@"删除订单") forState:0];
  32. /// 已评价不可追加
  33. [_ypjbkzj_scBtn setTitle:YZMsg(@"删除订单") forState:0];
  34. }
  35. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  36. [super setSelected:selected animated:animated];
  37. }
  38. -(void)setModel:(OrderModel *)model
  39. {
  40. _model = model;
  41. [self.shopNameBtn setTitle:[model.shop_info valueForKey:@"name"] forState:0];
  42. self.statusLb.text = model.status_name;
  43. [self.commodityImg sd_setImageWithURL:[NSURL URLWithString:model.spec_thumb]];
  44. self.commNameLb.text = model.goods_name;
  45. self.standardLb.text =model.spec_name;
  46. self.priceLb.text =[NSString stringWithFormat:@"%@%@",YZMsg(@"¥"), model.price];
  47. self.countLb.text = [NSString stringWithFormat:@"x%@",model.nums];
  48. self.allPriceLb.text = [NSString stringWithFormat:YZMsg(@"共%@件商品,合计¥%@"),model.nums, model.total];
  49. }
  50. - (IBAction)btnClick:(UIButton *)sender {
  51. NSLog(@"点击了标题------:%@",sender.titleLabel.text);
  52. [self.delegate btnClickWithTitle:sender.titleLabel.text AndModel:_model];
  53. }
  54. - (IBAction)shopTitleClick:(UIButton *)sender {
  55. shopDetailVC *vc = [[shopDetailVC alloc]init];
  56. vc.toUserID = _model.shop_uid;
  57. [[YBBaseAppDelegate sharedAppDelegate] pushViewController:vc animated:YES];
  58. }
  59. @end