|
|
@@ -495,7 +495,7 @@ class ProductController extends BaseController
|
|
|
$join = $shop->join ?? 0;
|
|
|
$default = $shop->default ?? 0;
|
|
|
if ($join == 0 && $default == 0) {
|
|
|
- util::fail('请在总店修改');
|
|
|
+ util::fail('当前是直营分店,请切回总店修改');
|
|
|
}
|
|
|
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
@@ -679,6 +679,11 @@ class ProductController extends BaseController
|
|
|
public function actionBatchChangeMore()
|
|
|
{
|
|
|
$shop = $this->shop;
|
|
|
+ $default = $shop->default ?? 0;
|
|
|
+ if ($default == 0) {
|
|
|
+ util::fail('当前是直营分店,请切回总店修改');
|
|
|
+ }
|
|
|
+
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
util::fail('超管才能操作');
|
|
|
@@ -735,6 +740,11 @@ class ProductController extends BaseController
|
|
|
public function actionBatchChangeAddPrice()
|
|
|
{
|
|
|
$shop = $this->shop;
|
|
|
+ $join = $shop->join ?? 0;
|
|
|
+ $default = $shop->default ?? 0;
|
|
|
+ if ($join == 0 && $default == 0) {
|
|
|
+ util::fail('当前是直营分店,请切回总店操作');
|
|
|
+ }
|
|
|
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
@@ -912,6 +922,13 @@ class ProductController extends BaseController
|
|
|
public function actionAdd()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
+ $shop = $this->shop;
|
|
|
+ $join = $shop->join ?? 0;
|
|
|
+ $default = $shop->default ?? 0;
|
|
|
+ if ($join == 0 && $default == 0) {
|
|
|
+ util::fail('当前是直营分店,请切回总店添加花材');
|
|
|
+ }
|
|
|
+
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
util::fail('管理员才能添加花材');
|
|
|
@@ -958,12 +975,6 @@ class ProductController extends BaseController
|
|
|
util::fail('管理员才能添加花材');
|
|
|
}
|
|
|
|
|
|
- $shop = $this->shop;
|
|
|
- $default = $shop->default ?? 0;
|
|
|
- if ($default != 1) {
|
|
|
- util::fail('请在总店添加');
|
|
|
- }
|
|
|
-
|
|
|
$post['sjId'] = $this->sjId;
|
|
|
$post['adminId'] = $this->adminId;
|
|
|
$post['mainId'] = $this->mainId;
|
|
|
@@ -1023,6 +1034,14 @@ class ProductController extends BaseController
|
|
|
public function actionBatchModifyClass()
|
|
|
{
|
|
|
$post = Yii::$app->request->post();
|
|
|
+
|
|
|
+ $shop = $this->shop;
|
|
|
+ $join = $shop->join ?? 0;
|
|
|
+ $default = $shop->default ?? 0;
|
|
|
+ if ($join == 0 && $default == 0) {
|
|
|
+ util::fail('当前是直营分店,请切回总店操作');
|
|
|
+ }
|
|
|
+
|
|
|
$classId = $post['classId'] ?? 0;
|
|
|
$class = ItemClassClass::getById($classId, true);
|
|
|
if (empty($class) || $class->mainId != $this->mainId) {
|