优化
This commit is contained in:
@@ -110,6 +110,10 @@ describe('InboundTaskList measurement scope', () => {
|
||||
expect(columnsSource).toContain("key: 'measureCompletedAt', label: '提交时间'")
|
||||
expect(columnsSource).not.toContain("key: 'id'")
|
||||
expect(columnsSource).not.toContain("key: 'orderId'")
|
||||
expect(source).toContain('{{ formatNumber((row as InboundOrderSummary).actualGrossWeightKg) }}')
|
||||
expect(source).toContain('{{ formatNumber((row as InboundOrderSummary).actualNetWeightKg) }}')
|
||||
expect(source).not.toContain('actualGrossWeightKg ||')
|
||||
expect(source).not.toContain('actualNetWeightKg ||')
|
||||
})
|
||||
|
||||
it('renders missing list facts as an explicit dash instead of guessing values', () => {
|
||||
|
||||
@@ -39,12 +39,11 @@ describe('InboundWorkflowWorkspace', () => {
|
||||
expect(source).toContain('@click="reviewDialogOpen = true"')
|
||||
expect(source).toContain(':key="`review-dialog-${revision}`"')
|
||||
expect(source).toContain('@changed="handleReviewChanged"')
|
||||
expect(source).toContain('<template #footer>')
|
||||
expect(source).not.toContain('<template #footer>')
|
||||
expect(source).toContain('@updated="handleDomainChanged"')
|
||||
expect(source).toContain('@submitted="handleDomainChanged"')
|
||||
expect(source).toContain("reviewPanelRef?.openReasonDialog('reject')")
|
||||
expect(source).toContain('reviewPanelRef?.confirmApprove()')
|
||||
expect(source).toContain('inbound-operation-dialog__footer')
|
||||
expect(source).not.toContain('reviewPanelRef')
|
||||
expect(source).not.toContain('inbound-operation-dialog__footer')
|
||||
expect(source).not.toContain('approveMeasurement')
|
||||
expect(source).not.toContain('submitInboundMeasurement')
|
||||
})
|
||||
@@ -93,8 +92,7 @@ describe('InboundWorkflowWorkspace', () => {
|
||||
expect(source).toContain('<el-button type="primary" @click="reviewDialogOpen = true">')
|
||||
expect(measurementDialogSource).toContain('type="primary"')
|
||||
expect(measurementDialogSource).toContain('plain')
|
||||
expect(source).toContain('type="danger" plain')
|
||||
expect(source).toContain('type="warning" plain')
|
||||
expect(source).not.toContain('异常放行')
|
||||
expect(source).toContain('<Pencil :size="16" />编辑测量数据')
|
||||
expect(source).toContain('<ClipboardCheck :size="16" />审核测量数据')
|
||||
expect(source).toContain('@media (max-width: 360px)')
|
||||
|
||||
@@ -28,7 +28,6 @@ const access = useAccessPreviewStore()
|
||||
const activeTab = ref('overview')
|
||||
const measurementDialogOpen = ref(false)
|
||||
const reviewDialogOpen = ref(false)
|
||||
const reviewPanelRef = ref<InstanceType<typeof MeasurementReviewPanel> | null>(null)
|
||||
const loading = ref(false)
|
||||
const loadError = ref<ApiErrorDetails | null>(null)
|
||||
const detail = ref<InboundOrderDetail | null>(null)
|
||||
@@ -208,21 +207,12 @@ onBeforeUnmount(() => {
|
||||
<div class="inbound-operation-dialog__body">
|
||||
<MeasurementReviewPanel
|
||||
v-if="canViewMeasurement"
|
||||
ref="reviewPanelRef"
|
||||
:key="`review-dialog-${revision}`"
|
||||
:tenant-id="customerId"
|
||||
:inbound-id="inboundId"
|
||||
@changed="handleReviewChanged"
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="inbound-operation-dialog__footer">
|
||||
<el-button :disabled="Boolean(reviewPanelRef?.actionLoading)" @click="reviewDialogOpen = false">取消</el-button>
|
||||
<el-button v-if="reviewPanelRef?.isPending && reviewPanelRef?.canReview" type="danger" plain :loading="reviewPanelRef?.actionLoading === 'reject'" @click="reviewPanelRef?.openReasonDialog('reject')">驳回</el-button>
|
||||
<el-button v-if="reviewPanelRef?.isPending && reviewPanelRef?.canReview" type="primary" :loading="reviewPanelRef?.actionLoading === 'approve'" @click="reviewPanelRef?.confirmApprove()">通过并进入待分柜</el-button>
|
||||
<el-button v-if="reviewPanelRef?.isRejected && reviewPanelRef?.canRelease" type="warning" plain :loading="reviewPanelRef?.actionLoading === 'release'" @click="reviewPanelRef?.openReasonDialog('release')">异常放行</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</section>
|
||||
</template>
|
||||
@@ -243,13 +233,9 @@ onBeforeUnmount(() => {
|
||||
.workflow-tabs :deep(.el-tabs__item.is-active) { color: var(--cc-primary); font-weight: 650; }
|
||||
.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; }
|
||||
.inbound-operation-dialog__footer :deep(.el-button) { margin-left: 0; }
|
||||
:global(.inbound-operation-dialog.el-dialog) { display: flex; max-width: calc(100vw - 32px); height: 92vh; max-height: 92vh; margin-bottom: 0; flex-direction: column; overflow: hidden; }
|
||||
: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-review-dialog .review-actions .action-buttons) { display: none; }
|
||||
@media (max-width: 720px) {
|
||||
.workspace-header { align-items: stretch; flex-direction: column; padding: 16px; }
|
||||
.workspace-header :deep(.el-button) { width: 100%; min-height: 44px; }
|
||||
@@ -262,8 +248,6 @@ onBeforeUnmount(() => {
|
||||
:global(.inbound-operation-dialog.el-dialog) { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px); height: 92vh; }
|
||||
:global(.inbound-operation-dialog .el-dialog__header) { padding: 16px; }
|
||||
:global(.inbound-operation-dialog .el-dialog__body) { padding: 14px; }
|
||||
.inbound-operation-dialog__footer { display: grid; grid-template-columns: 1fr; }
|
||||
.inbound-operation-dialog__footer :deep(.el-button) { width: 100%; min-height: 44px; }
|
||||
}
|
||||
@media (max-width: 360px) {
|
||||
:global(.inbound-operation-dialog.el-dialog) { width: calc(100vw - 12px) !important; max-width: calc(100vw - 12px); }
|
||||
|
||||
Reference in New Issue
Block a user