shish 5 vuotta sitten
vanhempi
commit
8ffc352314

+ 24 - 0
app-ghs/controllers/ShopCapitalController.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace ghs\controllers;
+
+use biz\shop\classes\ShopCapitalClass;
+use common\components\util;
+use Yii;
+
+class ShopCapitalController extends BaseController
+{
+
+    public $guestAccess = [];
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $shopId = $get['shopId'] ?? 0;
+        $where = [];
+        $where['shopId'] = $shopId;
+        $list = ShopCapitalClass::getCapitalList($where);
+        util::success($list);
+    }
+
+}

+ 24 - 0
app-hd/controllers/ShopCapitalController.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace hd\controllers;
+
+use biz\shop\classes\ShopCapitalClass;
+use common\components\util;
+use Yii;
+
+class ShopCapitalController extends BaseController
+{
+
+    public $guestAccess = [];
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $shopId = $get['shopId'] ?? 0;
+        $where = [];
+        $where['shopId'] = $shopId;
+        $list = ShopCapitalClass::getCapitalList($where);
+        util::success($list);
+    }
+
+}

+ 3 - 1
app-pt/controllers/PtYeChangeController.php

@@ -23,7 +23,9 @@ class PtYeChangeController extends BaseController
             $where['status'] = $status;
         }
         $where['ptStyle'] = $ptStyle;
-        $where['tx'] = $tx;
+        if (!empty($tx)) {
+            $where['tx'] = $tx;
+        }
         $list = PtYeChangeClass::getChangeList($where);
         util::success($list);
     }

+ 24 - 0
app-pt/controllers/ShopCapitalController.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace pt\controllers;
+
+use biz\shop\classes\ShopCapitalClass;
+use common\components\util;
+use Yii;
+
+class ShopCapitalController extends BaseController
+{
+
+    public $guestAccess = [];
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $shopId = $get['shopId'] ?? 0;
+        $where = [];
+        $where['shopId'] = $shopId;
+        $list = ShopCapitalClass::getCapitalList($where);
+        util::success($list);
+    }
+
+}

+ 13 - 7
biz/shop/classes/ShopCapitalClass.php

@@ -2,19 +2,25 @@
 
 namespace biz\shop\classes;
 
-use biz\sj\classes\SjCapitalClass;
 use Yii;
 use biz\base\classes\BaseClass;
 
 class ShopCapitalClass extends BaseClass
 {
 
-	public static $baseFile = '\biz\shop\models\ShopCapital';
+    public static $baseFile = '\biz\shop\models\ShopCapital';
 
-	//门店流水增加 ssh 2021.3.18
-	public static function addCapital($data)
-	{
-		return self::add($data);
-	}
+    //门店流水增加 ssh 2021.3.18
+    public static function addCapital($data)
+    {
+        return self::add($data);
+    }
+
+    //流水列表 shish 2021.5.23
+    public static function getCapitalList($where)
+    {
+        $data = self::getList('*', $where, 'addTime DESC');
+        return $data;
+    }
 
 }