SupplierController.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\admin\controllers\agent\front_erp;
  8. use app\modules\admin\models\agent\front_erp\SupplierForm;
  9. class SupplierController extends BaseController
  10. {
  11. public function actionTest()
  12. {
  13. $order_id = '6839';
  14. return $this->asJson($res);
  15. }
  16. public function actionSelectList()
  17. {
  18. $form = new SupplierForm();
  19. $form->front_agent_admin_id = $this->front_agent_admin_id;
  20. $form->attributes = all_params();
  21. $res = $form->selectList();
  22. return $this->asJson($res);
  23. }
  24. /**
  25. * @return \yii\web\Response
  26. * 获取列表
  27. */
  28. public function actionList()
  29. {
  30. $form = new SupplierForm();
  31. $form->front_agent_admin_id = $this->front_agent_admin_id;
  32. $form->attributes = all_params();
  33. $res = $form->search();
  34. return $this->asJson($res);
  35. }
  36. /**
  37. * @return \yii\web\Response
  38. * 保存信息
  39. */
  40. public function actionSave()
  41. {
  42. $form = new SupplierForm();
  43. $form->store_id = get_store_id();
  44. $form->attributes = all_params();
  45. $res = $form->save();
  46. return $this->asJson($res);
  47. }
  48. public function actionSaveKey()
  49. {
  50. $form = new SupplierForm();
  51. $form->store_id = get_store_id();
  52. $form->attributes = all_params();
  53. $res = $form->saveKey();
  54. return $this->asJson($res);
  55. }
  56. /**
  57. * @return \yii\web\Response
  58. * 获取信息
  59. */
  60. public function actionGetInfo()
  61. {
  62. $form = new SupplierForm();
  63. $form->store_id = get_store_id();
  64. $form->attributes = all_params();
  65. $res = $form->getInfo();
  66. return $this->asJson($res);
  67. }
  68. /**
  69. * @return \yii\web\Response
  70. * 修改状态
  71. */
  72. public function actionDel()
  73. {
  74. $form = new SupplierForm();
  75. $form->store_id = get_store_id();
  76. $form->attributes = all_params();
  77. $res = $form->del();
  78. return $this->asJson($res);
  79. }
  80. }