Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
SuperMan
Commits
2151f2e3
Commit
2151f2e3
authored
Jan 14, 2026
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改汇率组件, 制单页汇率 计算金额保留两位小数,四舍五入
parent
27427b12
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
46 deletions
+50
-46
addFinancialDocuments.vue
src/components/FinancialModule/addFinancialDocuments.vue
+4
-4
addReceivablesDocuments.vue
src/components/FinancialModule/addReceivablesDocuments.vue
+3
-3
BillModule.vue
src/components/FinancialModule/components/BillModule.vue
+36
-34
ReceivablesModule.vue
...mponents/FinancialModule/components/ReceivablesModule.vue
+7
-5
No files found.
src/components/FinancialModule/addFinancialDocuments.vue
View file @
2151f2e3
...
@@ -2409,7 +2409,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
...
@@ -2409,7 +2409,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
if
(
!
isNaN
(
rate
))
{
if
(
!
isNaN
(
rate
))
{
let
num
=
(
numberC
*
price
)
*
rate
;
let
num
=
(
numberC
*
price
)
*
rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPrice
=
num
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPrice
=
num
.
toFixed
(
2
)
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
this
.
msg
.
detailList
[
i
-
1
].
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
}
}
}
}
...
@@ -2434,7 +2434,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
...
@@ -2434,7 +2434,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
if
(
!
isNaN
(
rate
))
{
if
(
!
isNaN
(
rate
))
{
let
num
=
(
numberC
*
price
)
*
rate
;
let
num
=
(
numberC
*
price
)
*
rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
this
.
detailList
.
bTotalPrice
=
num
;
this
.
detailList
.
bTotalPrice
=
num
.
toFixed
(
2
)
;
this
.
detailList
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
this
.
detailList
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
}
}
}
}
...
@@ -2697,7 +2697,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
...
@@ -2697,7 +2697,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
if
(
!
isNaN
(
rate
))
{
if
(
!
isNaN
(
rate
))
{
let
num
=
(
numberC
*
price
)
*
rate
;
let
num
=
(
numberC
*
price
)
*
rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
item
.
bTotalPrice
=
num
;
item
.
bTotalPrice
=
num
.
toFixed
(
2
)
;
item
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
item
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
)
}
}
}
}
...
@@ -2821,7 +2821,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
...
@@ -2821,7 +2821,7 @@ import SpecialList from '../SalesModule/SpecialList.vue';
x
.
rate
=
x
.
Rate
;
x
.
rate
=
x
.
Rate
;
let
num
=
(
x
.
Number
*
x
.
UnitPrice
)
*
x
.
Rate
;
let
num
=
(
x
.
Number
*
x
.
UnitPrice
)
*
x
.
Rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
x
.
bTotalPrice
=
num
;
x
.
bTotalPrice
=
num
.
toFixed
(
2
)
;
x
.
Money
=
Math
.
round
(
x
.
Money
*
100
)
/
100
;
x
.
Money
=
Math
.
round
(
x
.
Money
*
100
)
/
100
;
x
.
yTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
yTotalPrice
*
100
)
/
100
);
x
.
yTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
yTotalPrice
*
100
)
/
100
);
...
...
src/components/FinancialModule/addReceivablesDocuments.vue
View file @
2151f2e3
...
@@ -2114,7 +2114,7 @@
...
@@ -2114,7 +2114,7 @@
if
(
!
isNaN
(
rate
))
{
if
(
!
isNaN
(
rate
))
{
let
num
=
(
numberC
*
price
)
*
rate
;
let
num
=
(
numberC
*
price
)
*
rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPrice
=
num
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPrice
=
num
.
toFixed
(
2
)
;
this
.
msg
.
detailList
[
i
-
1
].
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
this
.
msg
.
detailList
[
i
-
1
].
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
};
};
}
}
...
@@ -2161,7 +2161,7 @@
...
@@ -2161,7 +2161,7 @@
if
(
!
isNaN
(
rate
))
{
if
(
!
isNaN
(
rate
))
{
let
num
=
(
numberC
*
price
)
*
rate
;
let
num
=
(
numberC
*
price
)
*
rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
this
.
detailList
.
bTotalPrice
=
num
;
this
.
detailList
.
bTotalPrice
=
num
.
toFixed
(
2
)
;
this
.
detailList
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
this
.
detailList
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
};
};
}
}
...
@@ -2279,7 +2279,7 @@
...
@@ -2279,7 +2279,7 @@
x
.
yTotalPrice
=
x
.
Number
*
x
.
UnitPrice
;
x
.
yTotalPrice
=
x
.
Number
*
x
.
UnitPrice
;
let
num
=
(
x
.
Number
*
x
.
UnitPrice
)
*
x
.
Rate
;
let
num
=
(
x
.
Number
*
x
.
UnitPrice
)
*
x
.
Rate
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
num
=
Math
.
round
(
num
*
100
)
/
100
;
x
.
bTotalPrice
=
num
;
x
.
bTotalPrice
=
num
.
toFixed
(
2
)
;
x
.
Money
=
Math
.
round
(
x
.
Money
*
100
)
/
100
;
x
.
Money
=
Math
.
round
(
x
.
Money
*
100
)
/
100
;
x
.
yTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
yTotalPrice
*
100
)
/
100
);
x
.
yTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
Math
.
round
(
x
.
yTotalPrice
*
100
)
/
100
);
x
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
x
.
bTotalPriceTo
=
this
.
$commonUtils
.
addCommas
(
num
);
...
...
src/components/FinancialModule/components/BillModule.vue
View file @
2151f2e3
...
@@ -182,9 +182,9 @@ export default {
...
@@ -182,9 +182,9 @@ export default {
// x.Money = Math.round(x.Money * 100) / 100
// x.Money = Math.round(x.Money * 100) / 100
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
4
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(4))
}
else
{
}
else
{
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
3
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(3))
}
}
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
this
.
currentMoney
+=
parseFloat
(
x
.
OriginalMoney
);
this
.
currentMoney
+=
parseFloat
(
x
.
OriginalMoney
);
...
@@ -202,9 +202,9 @@ export default {
...
@@ -202,9 +202,9 @@ export default {
x
.
Money
=
x
.
Rate
*
x
.
OriginalMoney
x
.
Money
=
x
.
Rate
*
x
.
OriginalMoney
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
4
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(4))
}
else
{
}
else
{
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
3
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(3))
}
}
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
...
@@ -249,7 +249,9 @@ export default {
...
@@ -249,7 +249,9 @@ export default {
let
TCID
=
data
.
TCIDList
.
length
>
0
?
data
.
TCIDList
[
0
]
:
0
let
TCID
=
data
.
TCIDList
.
length
>
0
?
data
.
TCIDList
[
0
]
:
0
this
.
financeinfo_post_GetList
(
TCID
);
this
.
financeinfo_post_GetList
(
TCID
);
}
}
setTimeout
(()
=>
{
this
.
calculation
()
this
.
calculation
()
},
300
)
}
}
},
err
=>
{})
},
err
=>
{})
},
},
...
...
src/components/FinancialModule/components/ReceivablesModule.vue
View file @
2151f2e3
...
@@ -148,9 +148,9 @@ export default {
...
@@ -148,9 +148,9 @@ export default {
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
4
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(4))
}
else
{
}
else
{
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
3
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(3))
}
}
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
...
@@ -170,9 +170,9 @@ export default {
...
@@ -170,9 +170,9 @@ export default {
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
let
FractionalPart
=
String
(
x
.
Money
).
split
(
'.'
)
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
if
(
FractionalPart
.
length
>
1
&&
FractionalPart
[
1
].
length
>
3
&&
FractionalPart
[
1
].
slice
(
3
,
4
)
>
5
){
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
4
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(4))
}
else
{
}
else
{
x
.
Money
=
this
.
RoundItUp
(
parseFloat
(
x
.
Money
).
toFixed
(
3
))
x
.
Money
=
(
x
.
Money
).
toFixed
(
2
)
//
this.RoundItUp(parseFloat(x.Money).toFixed(3))
}
}
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
x
.
OriginalMoney
=
Math
.
round
(
x
.
OriginalMoney
*
100
)
/
100
...
@@ -210,7 +210,9 @@ export default {
...
@@ -210,7 +210,9 @@ export default {
this
.
benMoney2
=
0
this
.
benMoney2
=
0
this
.
loading
=
false
this
.
loading
=
false
this
.
$set
(
this
.
$data
,
"GetDetail"
,
data
);
this
.
$set
(
this
.
$data
,
"GetDetail"
,
data
);
setTimeout
(()
=>
{
this
.
calculation
()
this
.
calculation
()
},
300
)
}
}
},
err
=>
{})
},
err
=>
{})
},
},
...
...
Write
Preview
Markdown
is supported
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