WarehouseZoneController.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\erp;
  8. use app\modules\admin\controllers\BaseController;
  9. use app\modules\admin\models\erp\WarehouseZoneForm;
  10. class WarehouseZoneController extends BaseController
  11. {
  12. /**
  13. * @return \yii\web\Response
  14. * 获取列表
  15. */
  16. public function actionList()
  17. {
  18. $_GET['pageSize'] = $_GET['pageSize'] ?? 1000;
  19. $form = new WarehouseZoneForm();
  20. $form->store_id = get_store_id();
  21. $form->attributes = all_params();
  22. $res = $form->search();
  23. return $this->asJson($res);
  24. }
  25. /**
  26. * @return \yii\web\Response
  27. * 保存信息
  28. */
  29. public function actionSave()
  30. {
  31. $form = new WarehouseZoneForm();
  32. $form->store_id = get_store_id();
  33. $form->attributes = all_params();
  34. $res = $form->save();
  35. return $this->asJson($res);
  36. }
  37. /**
  38. * @return \yii\web\Response
  39. * 修改状态
  40. */
  41. public function actionDel()
  42. {
  43. $form = new WarehouseZoneForm();
  44. $form->store_id = get_store_id();
  45. $form->attributes = all_params();
  46. $res = $form->del();
  47. return $this->asJson($res);
  48. }
  49. }