|
|
@@ -27,6 +27,42 @@ use Yii;
|
|
|
class CustomController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //批量设置是否可看库存 ssh 20251031
|
|
|
+ public function actionAllSetLookStock()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $showStock = $get['showStock'] ?? 0;
|
|
|
+ $mainId = $this->mainId;
|
|
|
+ CustomClass::updateByCondition(['ownMainId' => $mainId], ['showStock' => $showStock]);
|
|
|
+ \bizGhs\ghs\classes\GhsClass::updateByCondition(['mainId' => $mainId], ['showStock' => $showStock]);
|
|
|
+ util::complete('设置成功');
|
|
|
+ }
|
|
|
+
|
|
|
+ //批量设置是否可看销量 ssh 20251031
|
|
|
+ public function actionAllSetLookSale()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $showSold = $get['showSold'] ?? 0;
|
|
|
+ $mainId = $this->mainId;
|
|
|
+ CustomClass::updateByCondition(['ownMainId' => $mainId], ['showSold' => $showSold]);
|
|
|
+ \bizGhs\ghs\classes\GhsClass::updateByCondition(['mainId' => $mainId], ['showSold' => $showSold]);
|
|
|
+ util::complete('设置成功');
|
|
|
+ }
|
|
|
+
|
|
|
+ //批量授信 ssh 20251031
|
|
|
+ public function actionAllCredit()
|
|
|
+ {
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
+ if ($staff->mobile != 15280215347) {
|
|
|
+ util::fail('请管理员操作');
|
|
|
+ }
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $amount = $get['amount'] ?? 0;
|
|
|
+ $mainId = $this->mainId;
|
|
|
+ CustomClass::updateByCondition(['ownMainId' => $mainId], ['debtLimit' => $amount]);
|
|
|
+ util::complete('设置成功');
|
|
|
+ }
|
|
|
+
|
|
|
//客户设置相关 ssh 20250310
|
|
|
public function actionSetChange()
|
|
|
{
|
|
|
@@ -775,8 +811,8 @@ class CustomController extends BaseController
|
|
|
public function actionChangeShowStock()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
- $showStock = isset($get['showStock']) ? $get['showStock'] : 0;
|
|
|
- $customId = isset($get['customId']) ? $get['customId'] : 0;
|
|
|
+ $showStock = $get['showStock'] ?? 0;
|
|
|
+ $customId = $get['customId'] ?? 0;
|
|
|
$custom = CustomClass::getById($customId, true);
|
|
|
CustomClass::valid($custom, $this->shopId);
|
|
|
$ghsId = $custom->ghsId ?? 0;
|