feat: 添加批次字段到商品列表和逻辑类
This commit is contained in:
parent
f1219258c3
commit
097ca47c07
@ -46,7 +46,7 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
||||
public function lists(): array
|
||||
{
|
||||
return StoreProduct::where($this->searchWhere)
|
||||
->field(['id', 'image', 'store_name','swap', 'cate_id', 'price','vip_price','sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase','bar_code'])
|
||||
->field(['id', 'image', 'store_name','swap', 'cate_id','batch', 'price','vip_price','sales', 'stock', 'is_show', 'unit', 'cost','rose','purchase','bar_code'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function ($item) {
|
||||
|
@ -49,6 +49,7 @@ class StoreProductLogic extends BaseLogic
|
||||
'rose' => $params['rose'],
|
||||
'is_return' => $params['is_return'],
|
||||
'swap' => $params['swap']??0,
|
||||
'batch' => $params['batch']??0,
|
||||
];
|
||||
// if ($params['rose'] > 0) {
|
||||
// $rose_price = bcmul($params['cost'], $params['rose'], 2);
|
||||
@ -120,6 +121,7 @@ class StoreProductLogic extends BaseLogic
|
||||
'price' => $params['price'],
|
||||
'vip_price' => $params['vip_price'],
|
||||
'cost' => $params['cost'],
|
||||
'batch' => $params['batch'],
|
||||
'swap' => $params['swap']??0,
|
||||
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user