feat(admin): 优化订单列表和仓库产品列表
- 在订单列表中添加订单号字段和按店铺ID搜索功能 - 在仓库产品列表中增加订单类型名称和相关处理逻辑
This commit is contained in:
parent
025a143de9
commit
0594ce6f76
@ -34,7 +34,7 @@ class StoreOrderCartInfoLists extends BaseAdminDataLists implements ListsSearchI
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['oid','product_id','is_pay'],
|
||||
'=' => ['oid','product_id','is_pay','store_id'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@ class StoreOrderCartInfoLists extends BaseAdminDataLists implements ListsSearchI
|
||||
return StoreOrderCartInfo::where($this->searchWhere)
|
||||
->field('id,oid,uid,product_id,store_id,cart_num,price,total_price,create_time,refund_num,refund_amount')->limit($this->limitOffset, $this->limitLength)
|
||||
->select()->each(function ($item) {
|
||||
$item['order_id']=StoreOrder::where('id',$item['oid'])->value('order_id')??"";//订单号
|
||||
$find=StoreProduct::where('id',$item['product_id'])->field('image,unit,store_name,store_info')->withTrashed()->find();
|
||||
$item['nickname']='无';
|
||||
$item['mobile']='';
|
||||
|
@ -134,6 +134,27 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
||||
}
|
||||
$item->expiration_date = $item->expiration_date ? date('Y-m-d', $item->expiration_date) : '';
|
||||
$item->manufacture = $item->manufacture ? date('Y-m-d', $item->manufacture) : '';
|
||||
|
||||
if ($item->order_type == 1) {
|
||||
$item->order_type_name = '铺货订单';
|
||||
} elseif ($item->order_type == 2) {
|
||||
$item->order_type_name = '商贩订单';
|
||||
} elseif ($item->order_type == 3) {
|
||||
$item->order_type_name = '一条龙订单';
|
||||
} elseif ($item->order_type == 4) {
|
||||
$item->order_type_name = '线上订单';
|
||||
} elseif ($item->order_type == 5) {
|
||||
$item->order_type_name = '仓库补货';
|
||||
$item->outbound = '无须出库';
|
||||
} elseif ($item->order_type == 6) {
|
||||
$item->order_type_name = '往期补单-出库';
|
||||
} elseif ($item->order_type == 7) {
|
||||
$item->order_type_name = '采购订单';
|
||||
} elseif ($item->order_type == 8) {
|
||||
$item->order_type_name = '其他订单';
|
||||
}elseif ($item->order_type == 9) {
|
||||
$item->order_type_name = '往期补单-入库';
|
||||
}
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user