|
|
@@ -651,7 +651,7 @@ class StoreProduct extends AuthController
|
|
|
// sort($item['detail'], SORT_STRING);
|
|
|
$suk = implode(',', $item['detail']);
|
|
|
if ($id) {
|
|
|
- $sukValue = StoreProductAttrValue::where('product_id', $id)->where('type', 0)->where('suk', $suk)->column('bar_code,cost,price,ot_price,integral,stock,image as pic,weight,volume,brokerage,brokerage_two', 'suk');
|
|
|
+ $sukValue = StoreProductAttrValue::where('product_id', $id)->where('type', 0)->where('suk', $suk)->column('bar_code,cost,price,ot_price,integral,stock,image as pic,weight,volume,brokerage,brokerage_two,dealer_visible_grade', 'suk');
|
|
|
if (!count($sukValue)) {
|
|
|
$sukValue[$suk]['pic'] = '';
|
|
|
$sukValue[$suk]['price'] = 0;
|
|
|
@@ -664,6 +664,7 @@ class StoreProduct extends AuthController
|
|
|
$sukValue[$suk]['volume'] = 0;
|
|
|
$sukValue[$suk]['brokerage'] = 0;
|
|
|
$sukValue[$suk]['brokerage_two'] = 0;
|
|
|
+ $sukValue[$suk]['dealer_visible_grade'] = 0;
|
|
|
}
|
|
|
} else {
|
|
|
$sukValue[$suk]['pic'] = '';
|
|
|
@@ -677,6 +678,7 @@ class StoreProduct extends AuthController
|
|
|
$sukValue[$suk]['volume'] = 0;
|
|
|
$sukValue[$suk]['brokerage'] = 0;
|
|
|
$sukValue[$suk]['brokerage_two'] = 0;
|
|
|
+ $sukValue[$suk]['dealer_visible_grade'] = 0;
|
|
|
}
|
|
|
foreach (array_keys($detail) as $k => $title) {
|
|
|
$header[$k]['title'] = $title;
|
|
|
@@ -699,6 +701,7 @@ class StoreProduct extends AuthController
|
|
|
$valueNew[$count]['volume'] = $sukValue[$suk]['volume'] ?? 0;
|
|
|
$valueNew[$count]['brokerage'] = $sukValue[$suk]['brokerage'] ?? 0;
|
|
|
$valueNew[$count]['brokerage_two'] = $sukValue[$suk]['brokerage_two'] ?? 0;
|
|
|
+ $valueNew[$count]['dealer_visible_grade'] = $sukValue[$suk]['dealer_visible_grade'] ?? 0;
|
|
|
$count++;
|
|
|
}
|
|
|
$header[] = ['title' => '图片', 'slot' => 'pic', 'align' => 'center', 'minWidth' => 80];
|
|
|
@@ -710,6 +713,7 @@ class StoreProduct extends AuthController
|
|
|
$header[] = ['title' => '产品编号', 'slot' => 'bar_code', 'align' => 'center', 'minWidth' => 140];
|
|
|
$header[] = ['title' => '重量(KG)', 'slot' => 'weight', 'align' => 'center', 'minWidth' => 140];
|
|
|
$header[] = ['title' => '体积(m³)', 'slot' => 'volume', 'align' => 'center', 'minWidth' => 140];
|
|
|
+ $header[] = ['title' => '特供', 'slot' => 'dealer_visible_grade', 'align' => 'center', 'minWidth' => 80];
|
|
|
$header[] = ['title' => '操作', 'slot' => 'action', 'align' => 'center', 'minWidth' => 70];
|
|
|
$info = ['attr' => $attr, 'value' => $valueNew, 'header' => $header];
|
|
|
return Json::successful($info);
|