fix(wms): 完善单据状态保护与金额精度处理
- 后端补充商品、往来企业唯一性校验 - 单据更新改为按草稿状态条件更新,避免覆盖已完成单据 - 补充 WMS 金额、规格精度迁移 SQL 与测试表结构 - 前端统一明细金额兜底计算,优化完成/作废取消处理pull/878/head
parent
b3bb1114ba
commit
a18c81511c
|
|
@ -99,7 +99,8 @@ import {
|
||||||
formatPrice,
|
formatPrice,
|
||||||
formatQuantity,
|
formatQuantity,
|
||||||
formatSumPrice,
|
formatSumPrice,
|
||||||
formatSumQuantity
|
formatSumQuantity,
|
||||||
|
multiplyPrice
|
||||||
} from '@/views/wms/utils/format'
|
} from '@/views/wms/utils/format'
|
||||||
import Barcode from '@/views/mes/wm/barcode/components/Barcode.vue'
|
import Barcode from '@/views/mes/wm/barcode/components/Barcode.vue'
|
||||||
import { BarcodeFormatEnum } from '@/views/mes/utils/constants'
|
import { BarcodeFormatEnum } from '@/views/mes/utils/constants'
|
||||||
|
|
@ -125,11 +126,7 @@ interface PrintRow extends MovementOrderDetailVO {
|
||||||
const printRows = computed<PrintRow[]>(() =>
|
const printRows = computed<PrintRow[]>(() =>
|
||||||
(printData.value.details || []).map((detail) => ({
|
(printData.value.details || []).map((detail) => ({
|
||||||
...detail,
|
...detail,
|
||||||
totalPrice:
|
totalPrice: detail.totalPrice ?? multiplyPrice(detail.quantity, detail.price)
|
||||||
detail.totalPrice ??
|
|
||||||
(detail.price != null && detail.quantity
|
|
||||||
? Number((Number(detail.price) * Number(detail.quantity)).toFixed(2))
|
|
||||||
: undefined)
|
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue