From d515bc07fede8a201f4328117d7fa20d74253614 Mon Sep 17 00:00:00 2001 From: mzl Date: Tue, 11 Nov 2025 08:38:32 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E8=B4=A7=E5=8D=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/StockOrdersService.php | 40 ++++++++++--------- app/common/utils/pdf/template/stockOrder.stub | 22 ++++++---- app/controller/IndexController.php | 4 +- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/app/common/service/StockOrdersService.php b/app/common/service/StockOrdersService.php index 6da7a24..7ee30a4 100644 --- a/app/common/service/StockOrdersService.php +++ b/app/common/service/StockOrdersService.php @@ -655,7 +655,7 @@ class StockOrdersService */ private function generateVehicleUniqueId(array $veh): string { - $keysToRemove = ['vin', 'remark', 'modify_list', 'order_id']; + $keysToRemove = ['remark', 'modify_list', 'order_id']; $array = array_diff_key($veh, array_flip($keysToRemove)); $uniqueIdStr = json_encode($array); return md5($uniqueIdStr); @@ -884,6 +884,7 @@ class StockOrdersService 'num' => 1, 'mileage' => $v->mileage, 'remark' => $v->remark, + 'vin' => $v->vin, ] + $moneyValues; } return ['list' => $vehList]; @@ -925,25 +926,26 @@ class StockOrdersService { $vehicleData['num'] += 1; - $fieldList = [ - 'fob_transport_fee', - 'car_price', - 'ocean_freight', - 'commission', - 'retention_price', - 'port_misc_fee', - 'total_price', - 'clearance_price', - 'profit' - ]; + // ** 11.11 remove 价格*数量 + // $fieldList = [ + // 'fob_transport_fee', + // 'car_price', + // 'ocean_freight', + // 'commission', + // 'retention_price', + // 'port_misc_fee', + // 'total_price', + // 'clearance_price', + // 'profit' + // ]; - foreach ($vehicleData as $field => $value) { - if (in_array($field, $fieldList)) { - $amount = $vehicleData[$field]['amount'] * $vehicleData['num']; - $currencySymbol = SysCurrency::where('currency_code', $vehicleData[$field]['currency'])->value('currency_symbol'); - $vehicleData[$field]['currency_info'] = $currencySymbol . number_format($amount, 2, '.', ','); - } - } + // foreach ($vehicleData as $field => $value) { + // if (in_array($field, $fieldList)) { + // $amount = $vehicleData[$field]['amount'] * $vehicleData['num']; + // $currencySymbol = SysCurrency::where('currency_code', $vehicleData[$field]['currency'])->value('currency_symbol'); + // $vehicleData[$field]['currency_info'] = $currencySymbol . number_format($amount, 2, '.', ','); + // } + // } } /** diff --git a/app/common/utils/pdf/template/stockOrder.stub b/app/common/utils/pdf/template/stockOrder.stub index 697b8eb..807c3e3 100644 --- a/app/common/utils/pdf/template/stockOrder.stub +++ b/app/common/utils/pdf/template/stockOrder.stub @@ -89,7 +89,7 @@
-

合塑实业-汽车事业部-备货单(客户下定)

+

合塑实业-汽车事业部-备货单

备货单号: 业务员: @@ -126,7 +126,7 @@ 车型 数量 颜色 - 费用明细 + 费用明细 @@ -142,9 +142,12 @@ - +

0): ?> - (km) + 里程:km +
+ + VIN: @@ -160,6 +163,7 @@ + 手续费 改装费 配件费 收款价 @@ -171,6 +175,7 @@ + @@ -191,6 +196,7 @@ + 加价 报关价 FOB运费 车价 @@ -202,6 +208,7 @@ + @@ -214,7 +221,7 @@ 备注 - + @@ -231,7 +238,7 @@ 合同汇率: - + 合计到岸价: @@ -261,7 +268,8 @@ 出运方式: 国内收货港: - 贸易条款/清关目的港: / + 贸易条款: + 清关目的港: 提车日期: diff --git a/app/controller/IndexController.php b/app/controller/IndexController.php index dbc493a..c3c75ae 100644 --- a/app/controller/IndexController.php +++ b/app/controller/IndexController.php @@ -15,9 +15,9 @@ use GuzzleHttp\Client; class IndexController { - protected $noNeedLogin = ['index', 'view', 'perm', 'createResource', 'test']; + protected $noNeedLogin = ['index', 'view', 'perm', 'createResource', 'pdf', 'test']; - protected $noNeedHeaderData = ['index', 'view', 'perm', 'createResource', 'test']; + protected $noNeedHeaderData = ['index', 'view', 'perm', 'createResource', 'pdf', 'test']; public function index(Request $request) {