|
|
@@ -484,17 +484,21 @@ class ProductController extends BaseController
|
|
|
|
|
|
public function actionUpdate()
|
|
|
{
|
|
|
+ $shopAdmin = $this->shopAdmin;
|
|
|
+ if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
+ util::fail('超管才能操作');
|
|
|
+ }
|
|
|
+
|
|
|
$shop = $this->shop;
|
|
|
$join = $shop->join ?? 0;
|
|
|
$default = $shop->default ?? 0;
|
|
|
if ($join == 0 && $default == 0) {
|
|
|
- //util::fail('请在首店操作');
|
|
|
+ //因为盘点不能将花材盘成0,所以这边放出入口允许创始人在分店修改分店的库存
|
|
|
+ if ($shopAdmin->founder != 2) {
|
|
|
+ util::fail('请在首店操作');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- $shopAdmin = $this->shopAdmin;
|
|
|
- if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
- util::fail('超管才能操作');
|
|
|
- }
|
|
|
$post = Yii::$app->request->post();
|
|
|
$post['adminId'] = $this->adminId;
|
|
|
$post['staffName'] = $this->shopAdmin->name;
|