完善企业编辑页面并修复采购建单重试
This commit is contained in:
@@ -56,7 +56,7 @@ test('supports a standalone dialog and keeps the unpushed billing-weight state v
|
||||
})
|
||||
|
||||
test('shows the published merchant inbound, measurement details and customer confirmation entry', () => {
|
||||
for (const label of ['入仓码', '平台收货仓', '实际毛重', '实测体积', '托盘与库位', '换算与精度', '最终计费量', '单价', '基础费用', '附加费用', '费用合计', '平台备注']) {
|
||||
for (const label of ['入仓码', '平台收货仓', '实际毛重', '实测体积', '换算与精度', '最终计费量', '单价', '基础费用', '附加费用', '费用合计', '平台备注']) {
|
||||
assert.ok(source.includes(label), `missing label: ${label}`)
|
||||
}
|
||||
assert.match(source, /formatInboundMoney\(props\.data\.latestFee\.totalAmount/)
|
||||
@@ -67,7 +67,7 @@ test('shows the published merchant inbound, measurement details and customer con
|
||||
assert.match(source, /confirmMerchantInboundFee/)
|
||||
assert.match(source, /measurementItems/)
|
||||
assert.doesNotMatch(source, /调整费用|发送费用|下载照片/)
|
||||
assert.doesNotMatch(source, /internalNotes|statusHistory|files/)
|
||||
assert.doesNotMatch(source, /internalNotes|statusHistory|files|palletLocations|托盘与库位/)
|
||||
assert.doesNotMatch(source, /latestFee\.(feeVersion|ruleCode|rateCode|chargeRuleVersion|carrierRateVersion|sentAt)/)
|
||||
assert.match(source, /箱规规则/)
|
||||
assert.match(source, /getCalculationRuleLabel\(row\.calculationRuleVersion\)/)
|
||||
@@ -87,7 +87,7 @@ test('keeps the billing summary, confirmation table, notice and footer', () => {
|
||||
test('confirms the selected billing weight and volume even when outer carton totals differ', async () => {
|
||||
const html = await renderConfirmation({
|
||||
latestFee: {
|
||||
actualWeightKg: 570.5, actualVolumeCbm: 3.6894,
|
||||
actualWeightKg: 393, actualVolumeCbm: 3.6894, convertedQuantity: 616.1298,
|
||||
chargeableQuantity: 616.1298, chargeMode: 'KG', chargeUnit: 'KG',
|
||||
unitPrice: 13.6, totalAmount: 8379.37, currency: 'CNY',
|
||||
},
|
||||
@@ -96,10 +96,12 @@ test('confirms the selected billing weight and volume even when outer carton tot
|
||||
unitVolumeCbm: 0.177, totalVolumeCbm: 3.894, volumeWeightKg: 650.298 }],
|
||||
})
|
||||
|
||||
assert.match(html, /570\.5 kg/)
|
||||
assert.match(html, /393 kg/)
|
||||
assert.match(html, /3\.6894 m³/)
|
||||
assert.match(html, /616\.13 kg/)
|
||||
assert.match(html, /8,379\.37/)
|
||||
assert.match(html, /按体积重计费/)
|
||||
assert.doesNotMatch(html, /按重量计费|按毛重计费/)
|
||||
assert.doesNotMatch(html, /3\.894|650\.298|0\.177/)
|
||||
assert.doesNotMatch(confirmationBody, /measurementItems|billingBasis|箱规长|每箱体积/)
|
||||
})
|
||||
@@ -107,7 +109,7 @@ test('confirms the selected billing weight and volume even when outer carton tot
|
||||
test('uses the published volume charge quantity and retains six decimal places', async () => {
|
||||
const html = await renderConfirmation({
|
||||
latestFee: {
|
||||
actualWeightKg: 600, actualVolumeCbm: 1.234567,
|
||||
actualWeightKg: 600, actualVolumeCbm: 1.234567, convertedQuantity: 1.652893,
|
||||
chargeableQuantity: 1.652893, chargeMode: 'CBM', chargeUnit: 'CBM',
|
||||
unitPrice: 100, totalAmount: 165.29, currency: 'CNY',
|
||||
},
|
||||
@@ -115,7 +117,7 @@ test('uses the published volume charge quantity and retains six decimal places',
|
||||
})
|
||||
|
||||
assert.match(html, /计费量/)
|
||||
assert.match(html, /按体积计费/)
|
||||
assert.match(html, /按重量折算体积计费/)
|
||||
assert.match(html, /600 kg/)
|
||||
assert.match(html, /1\.234567 m³/)
|
||||
assert.match(html, /1\.652893 m³/)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user