Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
0d3b8c07
Commit
0d3b8c07
authored
May 10, 2022
by
季圣华
Browse files
解决单据中改优惠率的时候金额计算bug
parent
860a5ca8
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/mixins/BillModalMixin.js
View file @
0d3b8c07
...
...
@@ -556,10 +556,8 @@ export const BillModalMixin = {
//改变优惠率
onKeyUpDiscount
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
discountMoney
=
this
.
form
.
getFieldValue
(
'
discountMoney
'
)
-
0
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
let
allTaxLastMoney
=
(
discountMoney
+
discountLastMoney
).
toFixed
(
2
)
-
0
let
allTaxLastMoney
=
this
.
$refs
.
materialDataTable
.
statisticsColumns
.
taxLastMoney
-
0
let
discountMoneyNew
=
(
allTaxLastMoney
*
value
*
0.01
).
toFixed
(
2
)
-
0
let
discountLastMoneyNew
=
(
allTaxLastMoney
-
discountMoneyNew
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoneyNew
+
otherMoney
).
toFixed
(
2
)
-
0
...
...
@@ -571,19 +569,15 @@ export const BillModalMixin = {
//改变付款优惠
onKeyUpDiscountMoney
(
e
)
{
const
value
=
e
.
target
.
value
-
0
let
discount
=
this
.
form
.
getFieldValue
(
'
discount
'
)
-
0
let
discountLastMoney
=
this
.
form
.
getFieldValue
(
'
discountLastMoney
'
)
-
0
let
otherMoney
=
this
.
form
.
getFieldValue
(
'
otherMoney
'
)
-
0
if
(
discount
!==
100
)
{
let
allTaxLastMoney
=
(
discountLastMoney
/
(
1
-
discount
/
100
)).
toFixed
(
2
)
-
0
let
discountNew
=
(
value
/
allTaxLastMoney
*
100
).
toFixed
(
2
)
-
0
let
discountLastMoneyNew
=
(
allTaxLastMoney
-
value
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoneyNew
+
otherMoney
).
toFixed
(
2
)
-
0
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discount
'
:
discountNew
,
'
discountLastMoney
'
:
discountLastMoneyNew
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
}
let
allTaxLastMoney
=
this
.
$refs
.
materialDataTable
.
statisticsColumns
.
taxLastMoney
-
0
let
discountNew
=
(
value
/
allTaxLastMoney
*
100
).
toFixed
(
2
)
-
0
let
discountLastMoneyNew
=
(
allTaxLastMoney
-
value
).
toFixed
(
2
)
-
0
let
changeAmountNew
=
(
discountLastMoneyNew
+
otherMoney
).
toFixed
(
2
)
-
0
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
'
discount
'
:
discountNew
,
'
discountLastMoney
'
:
discountLastMoneyNew
,
'
changeAmount
'
:
changeAmountNew
,
'
debt
'
:
0
})
});
},
//其它费用
onKeyUpOtherMoney
(
e
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment