diff --git a/src/pages/revert/index.vue b/src/pages/revert/index.vue index be1918d..c34ea84 100644 --- a/src/pages/revert/index.vue +++ b/src/pages/revert/index.vue @@ -459,7 +459,8 @@ const salesChange = async () => { await nextTick() const val = form?.items || [] const sales = val.reduce((a, b) => { - if(b.operator=='-') return sub(a, b?.sales ?? 0) + // if(b.operator=='-' || b.operator=='+') return sub(a, b?.sales ?? 0) + if(b.operator=='-' || b.operator=='+') return a return add(a, b?.sales ?? 0) }, 0) @@ -470,7 +471,8 @@ const expenditureChange = async () => { await nextTick() const val = form?.items || [] const expenditure = val.reduce((a, b) => { - if(b.operator=='-') return sub(a, b?.expenditure ?? 0) + // if(b.operator=='-') return sub(a, b?.expenditure ?? 0) + if(b.operator=='-' || b.operator=='+') return a return add(a, b?.expenditure ?? 0) }, 0) form.expenditure = expenditure || 0