完善企业编辑页面并修复采购建单重试

This commit is contained in:
2026-10-30 15:42:38 +08:00
parent d6ef770e48
commit 55868177cd
19 changed files with 568 additions and 224 deletions
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { CircleAlert, Clock3, PackageCheck, RefreshCw, TriangleAlert } from '@lucide/vue'
import { CircleAlert, Clock3, RefreshCw, TriangleAlert } from '@lucide/vue'
import { confirmMerchantInboundFee } from '@/modules/first-leg/api/inboundBilling'
import type { MerchantInboundBilling } from '@/modules/first-leg/types/inboundBilling'
import {
@@ -136,34 +136,13 @@ async function confirmFee() {
</el-table>
</div>
<div class="inbound-result-section">
<div class="inbound-section-title">
<h4>托盘与库位</h4>
<span>{{ props.data.inbound.palletLocations.length }} 个托盘</span>
</div>
<div v-if="props.data.inbound.palletLocations.length" class="pallet-location-list">
<article v-for="item in props.data.inbound.palletLocations" :key="`${item.palletId}-${item.locationId}`">
<PackageCheck :size="18" />
<div class="pallet-location-main">
<strong>{{ item.palletCode }}</strong>
<span>库位 {{ item.locationCode }}</span>
</div>
<div class="pallet-location-quantity">
<span>{{ formatInboundMeasure(item.allocatedVolumeCbm, 'm³') }}</span>
<span>{{ formatInboundNumber(item.allocatedPackageCount, 0) }} 箱</span>
</div>
</article>
</div>
<p v-else class="inbound-inline-empty">暂无托盘和库位明细</p>
</div>
<div class="inbound-result-section fee-result">
<div class="inbound-section-title">
<h4>费用结果</h4>
<span>{{ props.data.latestFee.feeNo }}</span>
</div>
<dl class="fee-calculation-grid">
<div><dt>计费方式</dt><dd>{{ getChargeModeLabel(props.data.latestFee.chargeMode) }} · {{ getTaxModeLabel(props.data.latestFee.taxMode) }}</dd></div>
<div><dt>计费方式</dt><dd>{{ getChargeModeLabel(props.data.latestFee.chargeMode, props.data.latestFee.actualWeightKg, props.data.latestFee.actualVolumeCbm, props.data.latestFee.convertedQuantity) }} · {{ getTaxModeLabel(props.data.latestFee.taxMode) }}</dd></div>
<div>
<dt>换算与精度</dt>
<dd>{{ formatConversionPrecision(
@@ -219,7 +198,7 @@ async function confirmFee() {
<el-table class="measurement-detail-table fee-dialog-table" :data="[props.data.latestFee]" border>
<el-table-column label="计费毛重" min-width="180"><template #default="{ row }">{{ formatInboundMeasure(row.actualWeightKg, 'kg') }}</template></el-table-column>
<el-table-column label="计费体积" min-width="180"><template #default="{ row }">{{ formatInboundMeasure(row.actualVolumeCbm, 'm³', 6) }}</template></el-table-column>
<el-table-column label="计费方式" min-width="150"><template #default="{ row }">{{ getChargeModeLabel(row.chargeMode) }}</template></el-table-column>
<el-table-column label="计费方式" min-width="150"><template #default="{ row }">{{ getChargeModeLabel(row.chargeMode, row.actualWeightKg, row.actualVolumeCbm, row.convertedQuantity) }}</template></el-table-column>
<el-table-column label="最终计费量" min-width="180"><template #default="{ row }">{{ formatInboundMeasure(row.chargeableQuantity, row.chargeUnit === 'KG' ? 'kg' : 'm³', row.chargeUnit === 'KG' ? 3 : 6) }}</template></el-table-column>
</el-table>
<div class="fee-confirm-notice" :class="{ 'is-confirmed': props.data.latestFee.customerConfirmationStatus === 'CONFIRMED' }" role="status">
@@ -281,14 +260,6 @@ async function confirmFee() {
.fee-confirm-notice > svg { flex:0 0 auto; fill:#eda332; color:#fff; filter:drop-shadow(0 2px 3px rgba(233,154,37,.25)); }
.fee-confirm-notice.is-confirmed { border-color:#b7dfc2; background:#f1faf3; color:#2d8a46; }
.fee-confirm-notice.is-confirmed > svg { fill:#4eae67; }
.pallet-location-list { margin-top: 9px; border-top: 1px solid var(--border); }
.pallet-location-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pallet-location-list article > svg { color: var(--primary); }
.pallet-location-main, .pallet-location-quantity { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.pallet-location-main strong { overflow-wrap: anywhere; color: var(--navy); font-size: 12px; }
.pallet-location-main span, .pallet-location-quantity span { color: var(--muted); font-size: 10px; }
.pallet-location-quantity { align-items: flex-end; }
.inbound-inline-empty { margin: 9px 0 0; padding: 14px; background: #f6f8f8; color: var(--muted); font-size: 11px; text-align: center; }
.fee-result { padding-top: 18px; border-top: 1px solid var(--border); }
.fee-calculation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0 0; border: 1px solid var(--border); }
.fee-calculation-grid > div { min-width: 0; padding: 11px 12px; border-bottom: 1px solid var(--border); }
@@ -327,8 +298,6 @@ async function confirmFee() {
.inbound-overview, .inbound-measurements, .fee-calculation-grid { grid-template-columns: 1fr; }
.inbound-overview > div, .inbound-overview > div:nth-child(odd), .fee-calculation-grid > div, .fee-calculation-grid > div:not(:nth-child(3n)) { border-right: 0; border-bottom: 1px solid var(--border); }
.inbound-overview > div:last-child, .fee-calculation-grid > div:last-child { border-bottom: 0; }
.pallet-location-list article { grid-template-columns: auto minmax(0, 1fr); }
.pallet-location-quantity { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 360px) {