Merge pull request 'feat(store-product): 优化商品状态显示和库存字段' (#387) from dev into main
Reviewed-on: #387
This commit is contained in:
commit
d31fdf90f2
@ -128,6 +128,11 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
||||
if ($userShip == 4) {
|
||||
$item['price'] = $item['cost'];
|
||||
}
|
||||
if($item['is_show']==1){
|
||||
$item['status_msg']='上架|常用';
|
||||
}else{
|
||||
$item['status_msg']='下架|不常用|是否有替换';
|
||||
}
|
||||
return $item;
|
||||
})?->toArray();
|
||||
if ($userShip > 0 && $userShip != 4) {
|
||||
|
@ -320,7 +320,7 @@ class StoreProductLogic extends BaseLogic
|
||||
}else{
|
||||
$data['status_msg']='下架|不常用|是否有替换';
|
||||
}
|
||||
$data['warehouse_nums']=WarehouseProductStorege::where('product_id', $params['id'])->where('warehouse_id',1)->value('nums')??0;
|
||||
$data['stock']=WarehouseProductStorege::where('product_id', $params['id'])->where('warehouse_id',1)->value('nums')??0;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user