diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 03dbbc0c4..7566b559f 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -76,6 +76,7 @@ class BeforehandOrderLogic extends BaseLogic $datas[$k]['gross_weight'] = $v['gross_weight'] ?? ''; $datas[$k]['net_weight'] = $v['net_weight'] ?? ''; $datas[$k]['cart_num'] = $v['nums']; + $datas[$k]['accept_num'] = $v['nums']; $datas[$k]['price'] = $v['price']; $datas[$k]['package'] = $v['package'] ?? ''; $datas[$k]['total_price'] = $v['total_price']; @@ -93,7 +94,6 @@ class BeforehandOrderLogic extends BaseLogic 'total_num' => $total_num, 'total_price' => $total_price, 'pay_price' => $total_price, - 'pay_price' => 0, 'pay_type' => 0, 'deduction_price' => 0, 'paid' => 0, @@ -577,6 +577,7 @@ class BeforehandOrderLogic extends BaseLogic $item['store_name'] = $find['store_name']; return $item; }); + $order['system_store_name']=SystemStore::where('id', $order['store_id'])->value('name'); $other_data = $order['other_data']; unset($order['other_data']); $file_path = $order_info->export($data, $order, $other_data); diff --git a/app/common/service/xlsx/OrderOutbound.php b/app/common/service/xlsx/OrderOutbound.php index 302db32fb..366b45d91 100644 --- a/app/common/service/xlsx/OrderOutbound.php +++ b/app/common/service/xlsx/OrderOutbound.php @@ -38,9 +38,9 @@ class OrderOutbound $sheet->setCellValue('A3', '编号'); $sheet->setCellValue('B3', '品名'); - $sheet->setCellValue('C3', '型号'); - $sheet->setCellValue('D3', '单位'); - $sheet->setCellValue('E3', '净重(约)'); + $sheet->setCellValue('C3', '单位'); + $sheet->setCellValue('D3', '净重(约)'); + $sheet->setCellValue('E3', '数量'); $sheet->setCellValue('F3', '单价'); $sheet->setCellValue('G3', '金额'); $sheet->setCellValue('H3', '备注'); @@ -59,9 +59,9 @@ class OrderOutbound foreach ($data as $k => $v) { $sheet->setCellValue('A' . ($k + 4), $v['product_id']); $sheet->setCellValue('B' . ($k + 4), $v['store_name']); - $sheet->setCellValue('C' . ($k + 4), $v['marques']); - $sheet->setCellValue('D' . ($k + 4), $v['unit_name']); - $sheet->setCellValue('E' . ($k + 4), $v['gross_weight']); + $sheet->setCellValue('C' . ($k + 4), $v['unit_name']); + $sheet->setCellValue('D' . ($k + 4), $v['gross_weight']); + $sheet->setCellValue('E' . ($k + 4), $v['accept_num']==0 ? $v['cart_num'] : $v['accept_num']); $sheet->setCellValue('F' . ($k + 4), $v['price']); $sheet->setCellValue('G' . ($k + 4), $v['pay_price']); $sheet->mergeCells('H' . ($k + 4) . ':I' . $k + 4); @@ -74,16 +74,24 @@ class OrderOutbound $sheet->setCellValue('A' . ($count + 5),'累计接单:'); $sheet->setCellValue('C' . ($count + 5),'预收金额:'); + $sheet->setCellValue('D' . ($count + 5),$order['pay_price']==0?$order['total_price']:$order['pay_price']); $sheet->setCellValue('E' . ($count + 5),'预收押金:'); $sheet->setCellValue('G' . ($count + 5),'合计预收:'); + $sheet->setCellValue('H' . ($count + 5),$order['pay_price']==0?$order['total_price']:$order['pay_price']); $sheet->setCellValue('A' . ($count + 6),'出库合计:'); $sheet->setCellValue('C' . ($count + 6),'出库金额:'); + $sheet->setCellValue('D' . ($count + 6),$order['pay_price']==0?$order['total_price']:$order['pay_price']); $sheet->setCellValue('E' . ($count + 6),'实收押金:'); $sheet->setCellValue('G' . ($count + 6),'合计:'); + $sheet->setCellValue('H' . ($count + 6),$order['pay_price']==0?$order['total_price']:$order['pay_price']); $sheet->setCellValue('A' . ($count + 7),'应收:'); + $sheet->setCellValue('B' . ($count + 7),$order['pay_price']==0?$order['total_price']:$order['pay_price']); $sheet->setCellValue('C' . ($count + 7),'应退:'); + $sheet->setCellValue('G' . ($count + 7),'门店:'); + $sheet->mergeCells('H' . ($count + 7) . ':I' . $count + 7); + $sheet->setCellValue('H' . ($count + 7),$order['system_store_name']); $sheet->mergeCells('B' . ($count + 8) . ':I' . $count + 8); $sheet->setCellValue('A'. ($count + 8), '收货地址:');