|
|
@@ -801,6 +801,25 @@ class CustomController extends BaseController
|
|
|
util::complete();
|
|
|
}
|
|
|
|
|
|
+ public function actionChangeHome()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $home = isset($get['home']) ? $get['home'] : 0;
|
|
|
+ $customId = !empty($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->home = $home;
|
|
|
+ $ghs->save();
|
|
|
+ $custom->home = $home;
|
|
|
+ $custom->save();
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
//允许月结开关 ssh 2021.1.8
|
|
|
public function actionDebt()
|
|
|
{
|