|
|
@@ -82,7 +82,7 @@ class ProductController extends BaseController
|
|
|
{
|
|
|
$py = Yii::$app->request->get('py', '');
|
|
|
$version = Yii::$app->request->get('version', 0);
|
|
|
- if($version == 0){
|
|
|
+ if ($version == 0) {
|
|
|
util::fail('请先升级版本到1.0.70以上');
|
|
|
}
|
|
|
$classIds = ItemClassClass::getGhsItemClassAll($this->mainId);
|
|
|
@@ -280,7 +280,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;
|
|
|
@@ -290,9 +290,11 @@ class ProductController extends BaseController
|
|
|
|
|
|
$shop = $this->shop;
|
|
|
$default = $shop->default ?? 0;
|
|
|
-
|
|
|
$adminId = $this->adminId ?? 0;
|
|
|
- $changeParams = ['staffId' => $shopAdmin->id, 'staffName' => $shopAdmin->name];
|
|
|
+ //normal常规改价,cg采购改价
|
|
|
+ $changeType = Yii::$app->request->post('changeType', 'normal');
|
|
|
+ $targetId = Yii::$app->request->post('targetId', 0);
|
|
|
+ $changeParams = ['staffId' => $shopAdmin->id, 'staffName' => $shopAdmin->name, 'changeType' => $changeType, 'targetId' => $targetId];
|
|
|
|
|
|
$data = Yii::$app->request->post('data', '');
|
|
|
if (empty($data)) {
|
|
|
@@ -356,7 +358,7 @@ class ProductController extends BaseController
|
|
|
}
|
|
|
$chainMainId = $chain->mainId ?? 0;
|
|
|
$staff = ShopAdminClass::getByCondition(['mainId' => $chainMainId, 'adminId' => $adminId], true);
|
|
|
- $changeParams2 = ['staffId' => $staff->id, 'staffName' => $staff->name];
|
|
|
+ $changeParams2 = ['staffId' => $staff->id, 'staffName' => $staff->name, 'changeType' => $changeType, 'targetId' => $targetId];
|
|
|
ProductClass::changeSinglePrice($chain, $ptItemId, $price, $skPrice, $changeParams2);
|
|
|
}
|
|
|
}
|