备货单调整
This commit is contained in:
@@ -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, '.', ',');
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<div class="container">
|
||||
<!-- 头部 -->
|
||||
<div class="header">
|
||||
<h1 class="title">合塑实业-汽车事业部-备货单(客户下定)</h1>
|
||||
<h1 class="title">合塑实业-汽车事业部-备货单<?php if ($data['is_final'] == 0) { echo '(客户下定)'; } else { echo '(终版)'; } ?></h1>
|
||||
<div>
|
||||
<span class="sub-title">备货单号: <?php echo htmlspecialchars($data['order_no'] ?? 'N/A'); ?></span>
|
||||
<span class="sub-title">业务员: <?php echo htmlspecialchars($data['salesperson_snapshot'] ?? ' - '); ?></span>
|
||||
@@ -126,7 +126,7 @@
|
||||
<th>车型</th>
|
||||
<th>数量</th>
|
||||
<th>颜色</th>
|
||||
<th colspan="7">费用明细</th>
|
||||
<th colspan="8">费用明细</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -142,9 +142,12 @@
|
||||
|
||||
<!-- 车型 跨4行(不含备注行) -->
|
||||
<td rowspan="4">
|
||||
<?php echo htmlspecialchars($vehicle['model_snapshot'] ?? ' - '); ?>
|
||||
<?php echo htmlspecialchars($vehicle['model_snapshot'] ?? ' - '); ?><br/><br/>
|
||||
<?php if (!empty($vehicle['mileage']) && $vehicle['mileage'] > 0): ?>
|
||||
<span class="nowrap">(<?php echo htmlspecialchars($vehicle['mileage']); ?>km)</span>
|
||||
<span class="nowrap">里程:<?php echo htmlspecialchars($vehicle['mileage']); ?>km</span>
|
||||
<?php endif; ?><br/>
|
||||
<?php if ($vehicle['vin']): ?>
|
||||
<span class="nowrap">VIN:<?php echo htmlspecialchars($vehicle['vin']); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
@@ -160,6 +163,7 @@
|
||||
</td>
|
||||
|
||||
<!-- 费用明细(第1组)标题 -->
|
||||
<th>手续费</th>
|
||||
<th>改装费</th>
|
||||
<th>配件费</th>
|
||||
<th>收款价</th>
|
||||
@@ -171,6 +175,7 @@
|
||||
|
||||
<!-- 行2:费用明细(第1组)数据 -->
|
||||
<tr>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['handling_fee']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['retrofit_fee']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['accessory_price']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['unit_price']['currency_info'] ?? ' - '); ?></td>
|
||||
@@ -191,6 +196,7 @@
|
||||
|
||||
<!-- 行3:费用明细(第2组)标题 -->
|
||||
<tr>
|
||||
<th>加价</th>
|
||||
<th>报关价</th>
|
||||
<th>FOB运费</th>
|
||||
<th>车价</th>
|
||||
@@ -202,6 +208,7 @@
|
||||
|
||||
<!-- 行4:费用明细(第2组)数据 -->
|
||||
<tr>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['increase_price']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['clearance_price']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['fob_transport_fee']['currency_info'] ?? ' - '); ?></td>
|
||||
<td class="nowrap"><?php echo htmlspecialchars($vehicle['car_price']['currency_info'] ?? ' - '); ?></td>
|
||||
@@ -214,7 +221,7 @@
|
||||
<!-- 行5:备注(因为“编号”已跨到本行,所以这里合并剩余10列) -->
|
||||
<tr>
|
||||
<td colspan="1"><strong>备注</strong></td>
|
||||
<td colspan="9" style="text-align:left;">
|
||||
<td colspan="10" style="text-align:left;">
|
||||
<span class="info-value">
|
||||
<?php echo nl2br($vehicle['remark'] ?? ''); ?>
|
||||
</span>
|
||||
@@ -231,7 +238,7 @@
|
||||
<span class="info-label">合同汇率:</span>
|
||||
<span class="info-value"><?php echo htmlspecialchars($data['contract_exchange_rate'] ?? ' - '); ?></span>
|
||||
</td>
|
||||
<td colspan="7" style="text-align:left;">
|
||||
<td colspan="8" style="text-align:left;">
|
||||
<span class="info-label">合计到岸价:</span>
|
||||
<span class="info-value"><?php echo htmlspecialchars($data['cif_total']['currency_info'] ?? ' - '); ?></span>
|
||||
</td>
|
||||
@@ -261,7 +268,8 @@
|
||||
|
||||
<td><span class="info-label">出运方式:</span> <span class="info-value"><?php echo htmlspecialchars($data['shipping_method_snapshot'] ?? ' - '); ?></span></td>
|
||||
<td><span class="info-label">国内收货港:</span> <span class="info-value"><?php echo htmlspecialchars($data['domestic_port_snapshot'] ?? ' - '); ?></span></td>
|
||||
<td><span class="info-label">贸易条款/清关目的港:</span> <span class="info-value"><?php echo htmlspecialchars($data['trade_term_snapshot'] ?? ' - '); ?>/<?php echo htmlspecialchars($data['clearance_port_snapshot'] ?? ' - '); ?></span></td>
|
||||
<td><span class="info-label">贸易条款:</span> <span class="info-value"><?php echo htmlspecialchars($data['trade_term_snapshot'] ?? ' - '); ?></span></td>
|
||||
<td><span class="info-label">清关目的港:</span> <span class="info-value"><?php echo htmlspecialchars($data['clearance_port_snapshot'] ?? ' - '); ?></span></td>
|
||||
|
||||
<?php if ($data['is_final'] == 1): ?>
|
||||
<td><span class="info-label">提车日期:</span> <span class="info-value nowrap"><?php echo htmlspecialchars($data['pick_up_date'] ?? ' - '); ?></span></td>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user