|
|
@@ -62,15 +62,15 @@ class ProductController extends BaseController
|
|
|
|
|
|
//给客户开单,价格显示不同客户不同价格
|
|
|
$customId = Yii::$app->request->get('customId', 0);
|
|
|
- if(!empty($customId)){
|
|
|
- $custom = CustomClass::getById($customId,true);
|
|
|
+ if (!empty($customId)) {
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
Yii::$app->params['customDiscount'] = isset($custom->discount) ? $custom->discount : 1;
|
|
|
}
|
|
|
|
|
|
$itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");
|
|
|
$itemInfoData = ProductClass::groupProductInfo($itemInfoData);
|
|
|
|
|
|
- $data = ProductService::assembleData($classIds, $itemInfoData, true);
|
|
|
+ $data = ProductService::assembleData($classIds, $itemInfoData, true);
|
|
|
|
|
|
util::success($data);
|
|
|
}
|
|
|
@@ -544,6 +544,9 @@ class ProductController extends BaseController
|
|
|
if ($productData['shopId'] != $this->shopId) {
|
|
|
util::fail("无效花材");
|
|
|
}
|
|
|
+ if (isset($productData['variety']) && $productData['variety'] != 0) {
|
|
|
+ util::fail('特殊花材无法复制');
|
|
|
+ }
|
|
|
//去除无用的字段
|
|
|
unset($productData['stock']); //库存去掉
|
|
|
unset($productData['viewNum']);
|