fix(pl): 归档再次打开时按实际数量回填运费运输量。
resetFreightCalc 在产品已加载后会清空运输量且不再触发 watch,导致再次归档误报运输量须大于0。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
e0598ed07b
commit
f41e47601d
2 files changed
+94
-1
No files matched your search
@@ -86,11 +86,13 @@ export function usePlFreightCalc(options: {
|
||||
)
|
||||
|
||||
function resetFreightCalc() {
|
||||
transportQty.value = null
|
||||
transportQtyTouched.value = false
|
||||
freightAmount.value = null
|
||||
freightAmountTouched.value = false
|
||||
freightPrice.value = null
|
||||
// 产品已加载时 watch 不会因 reset 重跑;须立即按当前实际数量回填,
|
||||
// 否则归档弹窗再次打开会误报「运输量须大于0」。
|
||||
transportQty.value = defaultTransportQty.value || null
|
||||
}
|
||||
|
||||
function markTransportQtyTouched() {
|
||||
|
||||
Reference in new issue
Block a user