feat: 支持OCR重量直接修改确认

This commit is contained in:
2026-08-07 18:24:05 +08:00
parent 3c69e67e75
commit 2425e0cac1
2 changed files with 101 additions and 109 deletions
@@ -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', () => {