|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace pt\controllers;
|
|
|
|
|
|
+use biz\item\classes\PtItemClass;
|
|
|
use bizHd\goods\services\GoodsService;
|
|
|
use bizHd\retail\services\RetailAssetService;
|
|
|
use Yii;
|
|
|
@@ -11,14 +12,26 @@ use common\components\util;
|
|
|
class GoodsController extends BaseController
|
|
|
{
|
|
|
|
|
|
- //商品列表 ssh 2019.12.7
|
|
|
- public function actionList()
|
|
|
- {
|
|
|
- $where = [];
|
|
|
- $data = GoodsService::getGoodsList($where);
|
|
|
- $asset = RetailAssetService::getAsset();
|
|
|
- $data['RetailAsset'] = $asset;
|
|
|
- util::success($data);
|
|
|
- }
|
|
|
+ //商品列表 ssh 2019.12.7
|
|
|
+ public function actionList()
|
|
|
+ {
|
|
|
+ $where = [];
|
|
|
+ $data = GoodsService::getGoodsList($where);
|
|
|
+ $asset = RetailAssetService::getAsset();
|
|
|
+ $data['RetailAsset'] = $asset;
|
|
|
+ util::success($data);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function actionSort()
|
|
|
+ {
|
|
|
+ $id = Yii::$app->request->get('id', 0);
|
|
|
+ $inTurn = Yii::$app->request->get('inTurn', 0);
|
|
|
+ $item = PtItemClass::getById($id, true);
|
|
|
+ if (!empty($item)) {
|
|
|
+ $item->inTurn = $inTurn;
|
|
|
+ $item->save();
|
|
|
+ }
|
|
|
+ util::complete('操作成功');
|
|
|
+ }
|
|
|
|
|
|
}
|