This commit is contained in:
2026-08-17 17:49:10 +08:00
parent 911a3620e1
commit c7334b2cf8
30 changed files with 1043 additions and 249 deletions
@@ -10,8 +10,7 @@ import { getPlatformInbound } from '../core/api'
import InboundHistoryPanel from '../core/InboundHistoryPanel.vue'
import InboundSummaryPanel from '../core/InboundSummaryPanel.vue'
import type { InboundOrderDetail } from '../core/types'
import { InboundMeasurementPanel } from '../measurement'
import { WeightOcrPanel } from '../weight'
import { InboundMeasurementDialog } from '../measurement'
import { MeasurementReviewPanel } from '../review'
import { InboundFeePanel } from '../fee'
import { inboundProcessStatusLabels, inboundStatusLabel } from '../status'
@@ -29,7 +28,6 @@ const access = useAccessPreviewStore()
const activeTab = ref('overview')
const measurementDialogOpen = ref(false)
const reviewDialogOpen = ref(false)
const measurementPanelRef = ref<InstanceType<typeof InboundMeasurementPanel> | null>(null)
const reviewPanelRef = ref<InstanceType<typeof MeasurementReviewPanel> | null>(null)
const loading = ref(false)
const loadError = ref<ApiErrorDetails | null>(null)
@@ -136,16 +134,14 @@ onBeforeUnmount(() => {
<el-tab-pane label="货品与测量" name="measurement" lazy>
<div class="workflow-action-row">
<span>核对原单数据、确认扫描箱数,并查看服务端计算的重量和体积结果。</span>
<el-button type="primary" @click="measurementDialogOpen = true"><Pencil :size="16" />编辑测量数据</el-button>
</div>
<div class="measurement-workflow">
<WeightOcrPanel
:key="`weight-${revision}`"
:tenant-id="customerId"
:inbound-id="inboundId"
@changed="handleDomainChanged"
/>
<el-button v-if="canViewMeasurement" type="primary" @click="measurementDialogOpen = true"><Pencil :size="16" />编辑测量数据</el-button>
</div>
<el-alert
:title="canViewMeasurement ? '称重图片、OCR、托盘与箱规统一在测量弹框中维护。' : '当前账号缺少测量查看权限。'"
:type="canViewMeasurement ? 'info' : 'warning'"
:closable="false"
show-icon
/>
</el-tab-pane>
<el-tab-pane label="测量审核" name="review" lazy>
<div v-if="canViewMeasurement" class="workflow-action-row">
@@ -191,32 +187,14 @@ onBeforeUnmount(() => {
</el-tab-pane>
</el-tabs>
<el-dialog
<InboundMeasurementDialog
v-model="measurementDialogOpen"
class="inbound-operation-dialog inbound-measurement-dialog"
:title="`测量 · ${title}`"
width="min(1240px, calc(100vw - 32px))"
top="4vh"
destroy-on-close
:close-on-click-modal="false"
>
<div class="inbound-operation-dialog__body">
<InboundMeasurementPanel
ref="measurementPanelRef"
:key="`measurement-dialog-${revision}`"
:tenant-id="customerId"
:inbound-id="inboundId"
@changed="handleDomainChanged"
/>
</div>
<template #footer>
<div class="inbound-operation-dialog__footer">
<el-button @click="measurementDialogOpen = false">取消</el-button>
<el-button v-if="measurementPanelRef?.canEdit" type="primary" plain :loading="measurementPanelRef?.saving" :disabled="!measurementPanelRef?.mayMaintain" @click="measurementPanelRef?.saveDraft()">保存测量数据</el-button>
<el-button v-if="measurementPanelRef?.canSubmit" type="primary" :loading="measurementPanelRef?.submitting" :disabled="!measurementPanelRef?.maySubmit" @click="measurementPanelRef?.submitForReview()">提交审核</el-button>
</div>
</template>
</el-dialog>
:customer-id="customerId"
:inbound-id="inboundId"
:inbound-code="title"
@updated="handleDomainChanged"
@submitted="handleDomainChanged"
/>
<el-dialog
v-model="reviewDialogOpen"
@@ -263,7 +241,6 @@ onBeforeUnmount(() => {
.workflow-tabs :deep(.el-tabs__active-bar) { height: 2px; background: var(--cc-primary); }
.workflow-tabs :deep(.el-tabs__item) { min-height: 44px; padding: 0 18px; color: #475467; font-size: 13px; font-weight: 500; }
.workflow-tabs :deep(.el-tabs__item.is-active) { color: var(--cc-primary); font-weight: 650; }
.measurement-workflow { display: grid; min-width: 0; gap: 28px; }
.workflow-action-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 14px; border-bottom: 1px solid var(--cc-border); color: var(--cc-muted); font-size: 12px; line-height: 1.5; }
.inbound-operation-dialog__body { min-width: 0; }
.inbound-operation-dialog__footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
@@ -272,8 +249,6 @@ onBeforeUnmount(() => {
:global(.inbound-operation-dialog .el-dialog__header) { flex: 0 0 auto; margin: 0; padding: 18px 24px; border-bottom: 1px solid var(--cc-border); }
:global(.inbound-operation-dialog .el-dialog__body) { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 20px 24px; }
:global(.inbound-operation-dialog .el-dialog__footer) { flex: 0 0 auto; padding: 14px 24px; border-top: 1px solid var(--cc-border); }
:global(.inbound-measurement-dialog .measurement-panel) { border: 0; border-radius: 0; box-shadow: none; }
:global(.inbound-measurement-dialog .measurement-panel__heading .measurement-panel__actions), :global(.inbound-measurement-dialog .measurement-panel__footer) { display: none; }
:global(.inbound-review-dialog .review-actions .action-buttons) { display: none; }
@media (max-width: 720px) {
.workspace-header { align-items: stretch; flex-direction: column; padding: 16px; }