This commit is contained in:
2026-08-30 17:43:03 +08:00
parent de1b956d43
commit ae52141952
45 changed files with 404 additions and 82 deletions
@@ -22,7 +22,8 @@ describe('InboundMeasurementDialog', () => {
})
it('shows the inbound code once in the dialog title and not as a second body heading', () => {
expect(source).toContain('`测量 · ${props.inboundCode?.trim() || props.inboundId}`')
expect(source).toContain("`测量 · ${props.inboundCode?.trim() || '入仓码待补充'}`")
expect(source).not.toContain('props.inboundCode?.trim() || props.inboundId')
expect(source).toContain(':title="title"')
expect(panelSource).not.toContain('<span>入仓码</span>')
expect(panelSource).not.toContain('<strong>{{ detail.inboundCode')
@@ -19,7 +19,7 @@ const emit = defineEmits<{
}>()
const measurementPanelRef = ref<InstanceType<typeof InboundMeasurementPanel> | null>(null)
const title = computed(() => `测量 · ${props.inboundCode?.trim() || props.inboundId}`)
const title = computed(() => `测量 · ${props.inboundCode?.trim() || '入仓码待补充'}`)
async function mayClose() {
if (!measurementPanelRef.value?.isDirty) return true
@@ -115,7 +115,7 @@ const sourceLabel = computed(() => ({ THIRD_PARTY: '第三方设备', MANUAL: '
const { captureBaseline } = useUnsavedWorkRegistration({
key: 'p2-inbound-measurement-editor',
label: computed(() => `入库单 ${detail.value?.inboundCode || props.inboundId} 的测量草稿`),
label: computed(() => `入仓码 ${detail.value?.inboundCode || '待补充'} 的测量草稿`),
isOpen: registrationOpen,
model: form,
requiredPermission,