feat(admin): 增加入库出库金额字段及显示

This commit is contained in:
mkm 2024-11-30 15:12:46 +08:00
parent 91877cd4a3
commit 35c39f40da

View File

@ -145,6 +145,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
$address = '';
$arrival_time = '';
$pay_price = '';
$warehousing_price='';
$outbound_price='';
if($export==2){
if($item['order_sn']!=''){
$find=StoreOrder::where('order_id',$item['order_sn'])->field('paid,pay_type,pay_price')->find();
@ -179,10 +181,18 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
}
}
if($item['warehousing_id']>0){
$order_rk=WarehouseOrder::where('id',$item['warehousing_id'])->value('code');
$warehouseOrder=WarehouseOrder::where('id',$item['warehousing_id'])->field('code,total_price')->find();
if($warehouseOrder){
$order_rk=$warehouseOrder['code'];
$warehousing_price=$warehouseOrder['total_price'];
}
}
if($item['outbound_id']>0){
$order_ck=WarehouseOrder::where('id',$item['outbound_id'])->value('code');
$warehouseOrder=WarehouseOrder::where('id',$item['outbound_id'])->field('code,total_price')->find();
if($warehouseOrder){
$order_ck=$warehouseOrder['code'];
$outbound_price=$warehouseOrder['total_price'];
}
}
$nickname = $item->other_data?->nickname??'';
$phone = $item->other_data?->phone??'';
@ -193,6 +203,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
$item['pay_type_name'] = $pay_type_name;
$item['order_ck'] = $order_ck;
$item['order_rk'] = $order_rk;
$item['warehousing_price']=$warehousing_price;
$item['outbound_price']=$outbound_price;
$item['nickname'] = $nickname;
$item['phone'] = $phone;
$item['address'] = $address;
@ -245,7 +257,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
'system_store' => '门店',
'admin_name' => '门店',
'warehousing' => '入库',
'warehousing_price' => '入库金额',
'outbound' => '出库',
'outbound_price' => '出库金额',
'total_price' => '总价',
'admin_name' => '用户',
'mark' => '备注',