|
|
@@ -369,6 +369,26 @@ class CustomController extends BaseController
|
|
|
util::success($info);
|
|
|
}
|
|
|
|
|
|
+ //修改是否显示库存 ssh 20221022
|
|
|
+ public function actionChangeShowStock()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $showStock = isset($get['showStock']) ? $get['showStock'] : 0;
|
|
|
+ $customId = isset($get['customId']) ? $get['customId'] : 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ CustomClass::valid($custom, $this->shopId);
|
|
|
+ $ghsId = $custom->ghsId ?? 0;
|
|
|
+ $ghs = GhsClass::getById($ghsId, true);
|
|
|
+ if (empty($ghs)) {
|
|
|
+ util::fail('没有找到供货商');
|
|
|
+ }
|
|
|
+ $ghs->showStock = $showStock;
|
|
|
+ $ghs->save();
|
|
|
+ $custom->showStock = $showStock;
|
|
|
+ $custom->save();
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
//允许月结开关 ssh 2021.1.8
|
|
|
public function actionDebt()
|
|
|
{
|