ClearController.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace ghs\controllers;
  3. use biz\ghs\classes\GhsClass;
  4. use bizGhs\clear\classes\ClearClass;
  5. use bizGhs\clear\services\ClearService;
  6. use bizGhs\custom\classes\CustomClass;
  7. use common\components\util;
  8. use Yii;
  9. class ClearController extends BaseController
  10. {
  11. //供应商的结帐单 shish 20210625
  12. public function actionList()
  13. {
  14. $get = Yii::$app->request->get();
  15. $where['status'] = 2;
  16. $ghsId = $get['ghsId'] ?? 0;
  17. $ghs = GhsClass::getById($ghsId, true);
  18. GhsClass::valid($ghs, $this->shopId);
  19. $where['ghsId'] = $ghsId;
  20. $list = ClearService::getClearList($where);
  21. util::success($list);
  22. }
  23. //获取基本信息 shish 20210625
  24. public function actionGetFullInfo()
  25. {
  26. $id = Yii::$app->request->get('id', '');
  27. $respond = ClearClass::getGhsCgInfo($id);
  28. util::success($respond);
  29. }
  30. //客户的结帐单 shish 20210625
  31. public function actionCustomList()
  32. {
  33. $get = Yii::$app->request->get();
  34. $where['status'] = 2;
  35. $customId = $get['customId'] ?? 0;
  36. $custom = CustomClass::getById($customId, true);
  37. CustomClass::valid($custom, $this->shopId);
  38. $where['customId'] = $customId;
  39. $list = ClearService::getClearList($where);
  40. util::success($list);
  41. }
  42. //获取基本信息 shish 20210625
  43. public function actionGetCustomFullInfo()
  44. {
  45. $id = Yii::$app->request->get('id', '');
  46. $respond = ClearClass::getSaleInfo($id);
  47. util::success($respond);
  48. }
  49. }