This commit is contained in:
2026-08-14 14:50:44 +08:00
parent a81af4a664
commit 1c1c48f8d3
11 changed files with 116 additions and 23 deletions
@@ -8,7 +8,7 @@ describe('WeightOcrPanel contract', () => {
it('uses customer language at the page boundary while retaining a compatibility input', () => {
expect(source).toContain("defineProps<{ customerId?: string; tenantId?: string; inboundId: string }>()")
expect(source).toContain("const customerId = computed(() => props.customerId || props.tenantId || '')")
expect(source).toContain("defineEmits<{ changed: [] }>()")
expect(source).toContain('summaryChanged: [actualGrossWeightKg: number | null]')
expect(source).toContain("defineExpose({ reload: loadWorkspace })")
const template = source.match(/<template>([\s\S]*?)<\/template>/)?.[1] || ''
expect(template).not.toContain('租户')
@@ -26,6 +26,8 @@ describe('WeightOcrPanel contract', () => {
expect(source).toContain('识别重量')
expect(source).toContain('payload.adjustedWeightValue = Number(draft.value)')
expect(source).toContain('payload.adjustmentReason = buildAdjustmentReason(row)')
expect(source).toContain('已确认总毛重')
expect(source).toContain("emit('summaryChanged', workspace.value?.actualGrossWeightKg ?? null)")
})
it('matches backend image limits and keeps technical OCR data out of the list', () => {