预估退税 添加 自定义输入 重新计算利润
This commit is contained in:
@@ -1385,6 +1385,21 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
// 当用户手动输入预估退税额时,重新计算利润
|
||||
watch(
|
||||
() => items.value.map((item: any) => item.tax_refund),
|
||||
() => {
|
||||
if (isPopulating.value) return
|
||||
items.value.forEach((it: any, index: number) => {
|
||||
if (!items.value[index]) return
|
||||
const profit = calcProfit(it)
|
||||
items.value[index].profit = isNaN(profit) ? 0 : Number(profit.toFixed(2))
|
||||
;(items.value[index] as any).profit_currency = (it as any).profit_currency || 'CNY'
|
||||
})
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
// 处理用户编辑状态的方法
|
||||
const handleUserEdit = (index: number) => {
|
||||
// 标记用户正在编辑这一行
|
||||
|
||||
Reference in New Issue
Block a user