feat(beforehand_order): 添加用户组标题并优化订单导出功能
- 在订单导出时添加用户组标题字段 - 优化订单数据查询,增加 uid 字段 - 在 OrderSupplyOutbound 服务中添加用户组标题的导出
This commit is contained in:
parent
95262ab5af
commit
195d71519b
@ -81,9 +81,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
$oid=WarehouseOrder::where('financial_pm',0)->where('code','like','%'.$order_ck)->column('id');
|
||||
$this->searchWhere[] = ['outbound_id','in',$oid];
|
||||
}
|
||||
$file=['id', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file'];
|
||||
$file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file'];
|
||||
if($export==2){
|
||||
$file=['id', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data'];
|
||||
$file=['id','uid', 'order_id', 'order_sn','store_id', 'order_type', 'total_num', 'total_price', 'outbound_id', 'admin_id', 'create_time', 'status', 'mark', 'warehousing_id', 'file','other_data'];
|
||||
}
|
||||
return BeforehandOrder::where($this->searchWhere)
|
||||
->field($file)
|
||||
|
@ -22,6 +22,7 @@ use app\common\model\store_product_unit\StoreProductUnit;
|
||||
use app\common\model\system_store\SystemStore;
|
||||
use app\common\model\user\User;
|
||||
use app\common\model\user\UserAddress;
|
||||
use app\common\model\user_ship\UserShip;
|
||||
use app\common\model\warehouse_order\WarehouseOrder;
|
||||
use app\common\model\warehouse_product\WarehouseProduct;
|
||||
use app\common\model\warehouse_product_return\WarehouseProductReturn;
|
||||
@ -893,6 +894,10 @@ class BeforehandOrderLogic extends BaseLogic
|
||||
$order['pay_price'] = $pay_price;
|
||||
$order['total_profit'] = $total_profit;
|
||||
$order['total_price'] = $total_price;
|
||||
$order['group_title'] = '';
|
||||
if($user_ship){
|
||||
$order['group_title'] = UserShip::where('id',$user_ship)->value('title');
|
||||
}
|
||||
$file_path = $order_info->export($data, $order, $other_data, 2);
|
||||
return $file_path;
|
||||
}
|
||||
|
@ -83,6 +83,8 @@ class OrderSupplyOutbound
|
||||
$sheet->setCellValue('A' . ($count + 4),'合计');
|
||||
$sheet->setCellValue('B' . ($count + 4),$count);
|
||||
|
||||
$sheet->setCellValue('J' . ($count + 4),$order['group_title']??'');
|
||||
|
||||
$sheet->setCellValue('A' . ($count + 5),'累计接单:');
|
||||
$sheet->setCellValue('C' . ($count + 5),'预收金额:');
|
||||
$sheet->setCellValue('D' . ($count + 5),0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user