From 2425e0cac1de10c2ed27a373a2c6154583f12c11 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Fri, 7 Aug 2026 18:24:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81OCR=E9=87=8D=E9=87=8F?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E4=BF=AE=E6=94=B9=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weight/components/WeightOcrPanel.test.ts | 7 +- .../weight/components/WeightOcrPanel.vue | 203 ++++++++---------- 2 files changed, 101 insertions(+), 109 deletions(-) diff --git a/src/modules/inbounds/weight/components/WeightOcrPanel.test.ts b/src/modules/inbounds/weight/components/WeightOcrPanel.test.ts index 210e1d88..f1f63590 100644 --- a/src/modules/inbounds/weight/components/WeightOcrPanel.test.ts +++ b/src/modules/inbounds/weight/components/WeightOcrPanel.test.ts @@ -14,7 +14,7 @@ describe('WeightOcrPanel contract', () => { expect(template).not.toContain('租户') }) - it('covers upload, preview, OCR retry, correction, confirmation, and server totals', () => { + it('covers upload, preview, OCR retry, inline correction, confirmation, and server totals', () => { expect(source).toContain('uploadWeightImage') expect(source).toContain('downloadWeightImage') expect(source).toContain('retryWeightRecognition') @@ -23,6 +23,11 @@ describe('WeightOcrPanel contract', () => { expect(source).toContain('实际总毛重(服务端汇总)') expect(source).toContain('称重图片序号 #{{ index + 1 }}') expect(source).toContain('workspace.value?.actualGrossWeightKg') + expect(source).toContain('v-model="weightDrafts[row.id].value"') + expect(source).toContain('识别值已自动填入,可修改后直接确认保存。') + expect(source).toContain("adjustmentReason: '人工核对后修改识别重量'") + expect(source).toContain('version = corrected.version') + expect(source).not.toContain('title="人工修正重量"') }) it('matches backend image limits and preserves missing OCR text honestly', () => { diff --git a/src/modules/inbounds/weight/components/WeightOcrPanel.vue b/src/modules/inbounds/weight/components/WeightOcrPanel.vue index cd9c9eba..816a9f90 100644 --- a/src/modules/inbounds/weight/components/WeightOcrPanel.vue +++ b/src/modules/inbounds/weight/components/WeightOcrPanel.vue @@ -1,12 +1,11 @@