|
@@ -329,6 +329,7 @@ class StoreCombination extends AuthController
|
|
|
$productAttr[0]['volume'] = 0;
|
|
|
$productAttr[0]['brokerage'] = 0;
|
|
|
$productAttr[0]['return'] = 0;
|
|
|
+ $productAttr[0]['integral'] = 0;
|
|
|
$productAttr[0]['brokerage_two'] = 0;
|
|
|
$productAttr[0]['check'] = 0;
|
|
|
}
|
|
@@ -398,6 +399,7 @@ class StoreCombination extends AuthController
|
|
|
if ($v['detail'] == $vv['detail']) {
|
|
|
$attrFormat[$k]['price'] = $vv['price'];
|
|
|
$attrFormat[$k]['return'] = $vv['return'];
|
|
|
+ $attrFormat[$k]['integral'] = $vv['integral'];
|
|
|
$attrFormat[$k]['sales'] = $vv['sales'];
|
|
|
$attrFormat[$k]['pic'] = $vv['pic'];
|
|
|
$attrFormat[$k]['check'] = false;
|
|
@@ -405,6 +407,7 @@ class StoreCombination extends AuthController
|
|
|
} else {
|
|
|
$attrFormat[$k]['price'] = '';
|
|
|
$attrFormat[$k]['return'] = '';
|
|
|
+ $attrFormat[$k]['integral'] = '';
|
|
|
$attrFormat[$k]['sales'] = '';
|
|
|
$attrFormat[$k]['pic'] = $product['image'];
|
|
|
$attrFormat[$k]['check'] = true;
|
|
@@ -415,6 +418,7 @@ class StoreCombination extends AuthController
|
|
|
foreach ($attrFormat as $k => $v) {
|
|
|
$attrFormat[$k]['price'] = $product['price'];
|
|
|
$attrFormat[$k]['return'] = $product['return'] ?? 0;
|
|
|
+ $attrFormat[$k]['integral'] = $product['integral'] ?? 0;
|
|
|
$attrFormat[$k]['sales'] = $product['stock'];
|
|
|
$attrFormat[$k]['pic'] = $product['image'];
|
|
|
$attrFormat[$k]['check'] = false;
|
|
@@ -553,7 +557,7 @@ class StoreCombination extends AuthController
|
|
|
$detail = $item['detail'];
|
|
|
|
|
|
$suk = implode(',', $item['detail']);
|
|
|
- $sukValue = StoreProductAttrValue::where('product_id', $id)->where('type', $type)->where('suk', $suk)->column('bar_code,cost,price,ot_price,stock,image as pic,weight,volume,brokerage,brokerage_two,quota,return', 'suk');
|
|
|
+ $sukValue = StoreProductAttrValue::where('product_id', $id)->where('type', $type)->where('suk', $suk)->column('bar_code,cost,price,ot_price,stock,image as pic,weight,volume,brokerage,brokerage_two,quota,return,integral', 'suk');
|
|
|
if (count($sukValue)) {
|
|
|
foreach (array_values($detail) as $k => $v) {
|
|
|
$valueNew[$count]['value' . ($k + 1)] = $v;
|
|
@@ -562,6 +566,7 @@ class StoreCombination extends AuthController
|
|
|
$valueNew[$count]['pic'] = $sukValue[$suk]['pic'] ?? '';
|
|
|
$valueNew[$count]['price'] = $sukValue[$suk]['price'] ? floatval($sukValue[$suk]['price']) : 0;
|
|
|
$valueNew[$count]['return'] = $sukValue[$suk]['return'] ? floatval($sukValue[$suk]['return']) : 0;
|
|
|
+ $valueNew[$count]['integral'] = $sukValue[$suk]['integral'] ? floatval($sukValue[$suk]['integral']) : 0;
|
|
|
$valueNew[$count]['cost'] = $sukValue[$suk]['cost'] ? floatval($sukValue[$suk]['cost']) : 0;
|
|
|
$valueNew[$count]['ot_price'] = isset($sukValue[$suk]['ot_price']) ? floatval($sukValue[$suk]['ot_price']) : 0;
|
|
|
$valueNew[$count]['stock'] = $sukValue[$suk]['stock'] ? intval($sukValue[$suk]['stock']) : 0;
|