You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StaffModel.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. declare (strict_types=1);
  3. namespace app\model\store;
  4. use app\common\model\CommonModel;
  5. class StaffModel extends CommonModel{
  6. protected $table_splice = false;
  7. protected $name = 'store_shop_staff';
  8. protected $pk = 'staff_id';
  9. protected $type=[
  10. 'add_value_jurisdiction'=>'array'
  11. ];
  12. public function getJurisdictionAttr($value,$data)
  13. {
  14. $return='';
  15. $jurisdiction=[
  16. 1=>'办理会员',
  17. 2=>'余额充值',
  18. 3=>'积分充值',
  19. 4=>'送券',
  20. 5=>'订单管理',
  21. 6=>'囤货订单',
  22. 7=>'代客下单',
  23. 8=>'线下余额补单',
  24. 9=>'相册管理',
  25. 10=>'办理次卡',
  26. 11=> '预约管理', //这个是普通比如门店店长或者核销员的权限
  27. 12=> '我的预约', //技师能看到自己的被预约的
  28. 13=> '技师我的排班',
  29. 14=> '业绩填单',
  30. ];
  31. // if($data['adviser_jurisdiction']==1){
  32. // $return.='顾问权限、';
  33. // }
  34. if($data['write_off_jurisdiction']==1){
  35. $return.='核销权限、';
  36. }
  37. $add_value_jurisdiction=json_decode($data['add_value_jurisdiction'],true);
  38. if(!empty($add_value_jurisdiction)){
  39. $return.='加值权限(';
  40. foreach ($add_value_jurisdiction as $v){
  41. $return.=$jurisdiction[$v].',' ?? '';
  42. }
  43. $return.=')';
  44. }
  45. return $return;
  46. }
  47. }