This commit is contained in:
2026-09-04 11:35:24 +08:00
parent 7f7c84d404
commit 3cd4f4f7b3
7 changed files with 76 additions and 34 deletions
@@ -9,6 +9,8 @@ const orderListSource = readFileSync(resolve(process.cwd(), 'src/modules/unified
describe('InboundMeasurementDialog', () => {
it('owns the complete measurement workspace behind one centered dialog', () => {
expect(source).toContain("import AppDialog from '@/shared/components/AppDialog.vue'")
expect(source).toContain('<AppDialog')
expect(source).toContain('class="inbound-measurement-workspace-dialog"')
expect(source).toContain('width="min(1240px, calc(100vw - 32px))"')
expect(source).toContain('height: 92vh')
@@ -21,6 +23,12 @@ describe('InboundMeasurementDialog', () => {
expect(source).toContain('measurementPanelRef.value?.updateActualWeights(actualGrossWeightKg, actualNetWeightKg)')
})
it('offers the shared fullscreen control without forcing fullscreen on open', () => {
expect(source).toContain('fullscreenable')
expect(source).not.toContain('default-fullscreen')
expect(source).not.toContain('<el-dialog')
})
it('shows the inbound code once in the dialog title and not as a second body heading', () => {
expect(source).toContain("`测量 · ${props.inboundCode?.trim() || '入仓码待补充'}`")
expect(source).not.toContain('props.inboundCode?.trim() || props.inboundId')
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { ElMessageBox } from 'element-plus'
import AppDialog from '@/shared/components/AppDialog.vue'
import InboundMeasurementPanel from './InboundMeasurementPanel.vue'
import WeightOcrPanel from '../weight/components/WeightOcrPanel.vue'
@@ -59,12 +60,13 @@ function handleSubmitted() {
</script>
<template>
<el-dialog
<AppDialog
:model-value="modelValue"
class="inbound-measurement-workspace-dialog"
:title="title"
width="min(1240px, calc(100vw - 32px))"
top="4vh"
fullscreenable
destroy-on-close
append-to-body
:close-on-click-modal="false"
@@ -111,7 +113,7 @@ function handleSubmitted() {
>提交审核</el-button>
</div>
</template>
</el-dialog>
</AppDialog>
</template>
<style scoped>