|
@@ -423,6 +423,9 @@ class ProductService extends Service
|
|
|
->first();
|
|
|
if(empty($customer)) return [false,'产品不存在或已被删除'];
|
|
|
$customer = $customer->toArray();
|
|
|
+ //成本隐藏
|
|
|
+ $customer['cost_show'] = "*";
|
|
|
+
|
|
|
$customer['product_category'] = ! empty($customer['product_category']) ? json_decode($customer['product_category'],true): [];
|
|
|
$category = ProductCategory::where('id',$customer['product_category_id'])
|
|
|
->value('title');
|
|
@@ -690,6 +693,9 @@ class ProductService extends Service
|
|
|
$data['data'][$key]['product_category_name'] = $category[$value['product_category_id']] ?? '';
|
|
|
$data['data'][$key]['state_name'] = Product::$state[$value['state']] ?? '';
|
|
|
$data['data'][$key]['unit_name'] = $basic_map[$value['unit']] ?? '';
|
|
|
+
|
|
|
+ //成本隐藏
|
|
|
+ $data['data'][$key]['cost_show'] = "*";
|
|
|
}
|
|
|
|
|
|
return $data;
|