|
@@ -247,6 +247,7 @@ class ProductService extends Service
|
|
|
$model->cost = $data['cost'] ?? 0;
|
|
|
$model->retail_price = $data['retail_price'] ?? 0;
|
|
|
$model->build_fee = $data['build_fee'] ?? 0;
|
|
|
+ $model->item_code = $data['item_code'] ?? "";
|
|
|
$model->mark = $data['mark'] ?? '';
|
|
|
$model->state = $data['state'] ?? 0;
|
|
|
$model->product_attribute = $data['product_attribute'] ?? 0;
|
|
@@ -368,6 +369,7 @@ class ProductService extends Service
|
|
|
$model->cost = $data['cost'] ?? 0;
|
|
|
$model->retail_price = $data['retail_price'] ?? 0;
|
|
|
$model->build_fee = $data['build_fee'] ?? 0;
|
|
|
+ $model->item_code = $data['item_code'] ?? "";
|
|
|
$model->mark = $data['mark'] ?? '';
|
|
|
$model->state = $data['state'] ?? 0;
|
|
|
$model->product_attribute = $data['product_attribute'] ?? 0;
|
|
@@ -591,7 +593,7 @@ class ProductService extends Service
|
|
|
public function productListIndex($data,$user){
|
|
|
$model = Product::ProductClear($user,$data);
|
|
|
$model = $model->where('del_time',0)
|
|
|
- ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','install_time','product_attribute','is_use','build_fee')
|
|
|
+ ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','install_time','product_attribute','is_use','build_fee','item_code')
|
|
|
->orderby('product_attribute', 'desc')
|
|
|
->orderby('id', 'desc');
|
|
|
|
|
@@ -651,7 +653,7 @@ class ProductService extends Service
|
|
|
public function productList($data,$user){
|
|
|
$model = Product::ProductClear($user,$data);
|
|
|
$model = $model->where('del_time',0)
|
|
|
- ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','install_time','product_attribute','is_use','build_fee')
|
|
|
+ ->select('title','id','product_category_id','code','size','unit','bar_code','retail_price','cost','state','crt_id','crt_time','mark','depart_id','top_depart_id','install_time','product_attribute','is_use','build_fee','item_code')
|
|
|
->where('is_use', Product::is_use_one)
|
|
|
->orderby('product_attribute', 'desc')
|
|
|
->orderby('id', 'desc');
|
|
@@ -869,7 +871,7 @@ class ProductService extends Service
|
|
|
$data['data'][$key]['color'] = Product::$product_attribute_color[$value['product_attribute']] ?? [];
|
|
|
$data['data'][$key]['img'] = $img[$value['id']] ?? "";
|
|
|
//库存
|
|
|
- $data['data'][$key]['stock'] = $stock_map[$value['id']] ?? [];
|
|
|
+ $data['data'][$key]['stock'] = $stock_map[$value['id']] ?? (object)[];
|
|
|
//成本
|
|
|
$data['data'][$key]['cost_show'] = $value['cost'];
|
|
|
}
|