fix(wms): 完善单据状态保护与金额精度处理

- 后端补充商品、往来企业唯一性校验
- 单据更新改为按草稿状态条件更新,避免覆盖已完成单据
- 补充 WMS 金额、规格精度迁移 SQL 与测试表结构
- 前端统一明细金额兜底计算,优化完成/作废取消处理
pull/878/head
YunaiV 2026-05-15 19:59:45 +08:00
parent b3bb1114ba
commit a18c81511c
1 changed files with 3 additions and 6 deletions

View File

@ -99,7 +99,8 @@ import {
formatPrice,
formatQuantity,
formatSumPrice,
formatSumQuantity
formatSumQuantity,
multiplyPrice
} from '@/views/wms/utils/format'
import Barcode from '@/views/mes/wm/barcode/components/Barcode.vue'
import { BarcodeFormatEnum } from '@/views/mes/utils/constants'
@ -125,11 +126,7 @@ interface PrintRow extends MovementOrderDetailVO {
const printRows = computed<PrintRow[]>(() =>
(printData.value.details || []).map((detail) => ({
...detail,
totalPrice:
detail.totalPrice ??
(detail.price != null && detail.quantity
? Number((Number(detail.price) * Number(detail.quantity)).toFixed(2))
: undefined)
totalPrice: detail.totalPrice ?? multiplyPrice(detail.quantity, detail.price)
}))
)