|
@@ -207,15 +207,20 @@ class ProductController extends BaseController
|
|
|
$join = $shop->join ?? 0;
|
|
$join = $shop->join ?? 0;
|
|
|
$shopAdmin = $this->shopAdmin;
|
|
$shopAdmin = $this->shopAdmin;
|
|
|
$adminId = $this->adminId ?? 0;
|
|
$adminId = $this->adminId ?? 0;
|
|
|
|
|
+ //normal常规改价,cg采购改价
|
|
|
|
|
+ $changeType = Yii::$app->request->post('changeType', 'normal');
|
|
|
|
|
+ $doType = Yii::$app->request->post('doType', 0);
|
|
|
|
|
|
|
|
- if (getenv('YII_ENV') == 'production') {
|
|
|
|
|
- //小蔡鲜花的几个分店的零售店不能修改体系
|
|
|
|
|
- if (in_array($shopId, [29153, 29155, 29157, 29162, 29164])) {
|
|
|
|
|
- util::fail('本店无法改价');
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if (in_array($shopId, [36545])) {
|
|
|
|
|
- util::fail('本店无法改价哦');
|
|
|
|
|
|
|
+ if ($changeType == 'cg' && $doType == 0) {
|
|
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
|
|
+ //小蔡鲜花的几个分店的零售店不能修改体系
|
|
|
|
|
+ if (in_array($shopId, [29153, 29155, 29157, 29162, 29164])) {
|
|
|
|
|
+ util::fail('本店无法改价');
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (in_array($shopId, [36545])) {
|
|
|
|
|
+ util::fail('本店无法改价哦');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -225,9 +230,7 @@ class ProductController extends BaseController
|
|
|
if ($join == 0 && $default == 0) {
|
|
if ($join == 0 && $default == 0) {
|
|
|
util::fail('当前直营分店,只能回总店修改价格');
|
|
util::fail('当前直营分店,只能回总店修改价格');
|
|
|
}
|
|
}
|
|
|
- //normal常规改价,cg采购改价
|
|
|
|
|
- $changeType = Yii::$app->request->post('changeType', 'normal');
|
|
|
|
|
- $doType = Yii::$app->request->post('doType', 0);
|
|
|
|
|
|
|
+
|
|
|
$targetId = Yii::$app->request->post('targetId', 0);
|
|
$targetId = Yii::$app->request->post('targetId', 0);
|
|
|
$changeParams = ['staffId' => $shopAdmin->id, 'staffName' => $shopAdmin->name, 'changeType' => $changeType, 'targetId' => $targetId];
|
|
$changeParams = ['staffId' => $shopAdmin->id, 'staffName' => $shopAdmin->name, 'changeType' => $changeType, 'targetId' => $targetId];
|
|
|
$post = Yii::$app->request->post();
|
|
$post = Yii::$app->request->post();
|