TeamController.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace app\modules\admin\controllers\team_grades;
  3. use app\modules\admin\controllers\BaseController;
  4. use app\modules\admin\models\team_grades\TeamForm;
  5. class TeamController extends BaseController
  6. {
  7. //审核列表
  8. public function actionAuditList() {
  9. $form = new TeamForm();
  10. $form->attributes = get_params();
  11. $form->store_id = get_store_id();
  12. return $this->asJson($form->auditList());
  13. }
  14. //审核处理
  15. public function actionHandle() {
  16. $form = new TeamForm();
  17. $form->attributes = post_params();
  18. $form->store_id = get_store_id();
  19. return $this->asJson($form->handle());
  20. }
  21. //团队人员列表
  22. public function actionList() {
  23. $form = new TeamForm();
  24. $form->attributes = get_params();
  25. $form->store_id = get_store_id();
  26. return $this->asJson($form->list());
  27. }
  28. //添加团队人员
  29. public function actionAddTeam() {
  30. $form = new TeamForm();
  31. $form->attributes = post_params();
  32. $form->store_id = get_store_id();
  33. return $this->asJson($form->addTeam());
  34. }
  35. //删除团队人员
  36. public function actionDelTeam() {
  37. $form = new TeamForm();
  38. $form->attributes = get_params();
  39. $form->store_id = get_store_id();
  40. return $this->asJson($form->delTeam());
  41. }
  42. //分红设置
  43. public function actionSetDividends() {
  44. $form = new TeamForm();
  45. $form->attributes = post_params();
  46. $form->store_id = get_store_id();
  47. return $this->asJson($form->setDividends());
  48. }
  49. //人员分红明细
  50. public function actionGetTeamDividendsList() {
  51. $form = new TeamForm();
  52. $form->attributes = get_params();
  53. $form->store_id = get_store_id();
  54. return $this->asJson($form->getTeamDividendsList());
  55. }
  56. }