PurchaseinController.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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\models\Goods;
  9. use app\models\Option;
  10. use app\constants\OptionSetting;
  11. use app\modules\admin\models\erp\PurchaseinForm;
  12. use app\modules\admin\models\erp\ERP;
  13. class PurchaseinController extends BaseController
  14. {
  15. public function actionTest()
  16. {
  17. $id = '22528';
  18. return $this->asJson($res);
  19. }
  20. public function actionSave()
  21. {
  22. $form = new PurchaseinForm();
  23. $form->store_id = get_store_id();
  24. $form->attributes = all_params();
  25. $res = $form->save();
  26. return $this->asJson($res);
  27. }
  28. /**
  29. * @return \yii\web\Response
  30. * 获取列表
  31. */
  32. public function actionList()
  33. {
  34. $form = new PurchaseinForm();
  35. $form->store_id = get_store_id();
  36. $form->attributes = all_params();
  37. $res = $form->search();
  38. return $this->asJson($res);
  39. }
  40. public function actionInfo()
  41. {
  42. $form = new PurchaseinForm();
  43. $form->store_id = get_store_id();
  44. $form->attributes = all_params();
  45. $res = $form->info();
  46. return $this->asJson($res);
  47. }
  48. public function actionPurchase()
  49. {
  50. $form = new PurchaseinForm();
  51. $form->store_id = get_store_id();
  52. $form->attributes = all_params();
  53. $res = $form->searchPurchase();
  54. return $this->asJson($res);
  55. }
  56. public function actionStatusPrint()
  57. {
  58. $form = new PurchaseinForm();
  59. $form->store_id = get_store_id();
  60. $form->attributes = all_params();
  61. $res = $form->statusPrint();
  62. return $this->asJson($res);
  63. }
  64. }