Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
罗超
confucius
Commits
a3008971
Commit
a3008971
authored
Dec 23, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2d112cab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
erpindex.js
src/utils/erpindex.js
+26
-10
No files found.
src/utils/erpindex.js
View file @
a3008971
...
...
@@ -643,21 +643,37 @@ export default {
})
},
Vue
.
prototype
.
accAdd
=
function
(
arg1
,
arg2
)
{
//加法精密计算
var
r1
,
r2
,
m
;
var
r1
;
var
r2
;
var
m
;
var
c
;
try
{
r1
=
arg1
.
toString
().
split
(
"."
)[
1
].
length
;
}
catch
(
e
)
{
r1
=
arg1
.
toString
().
split
(
'.'
)[
1
].
length
;
}
catch
(
e
)
{
r1
=
0
;
}
try
{
r2
=
arg2
.
toString
().
split
(
"."
)[
1
].
length
;
}
catch
(
e
)
{
r2
=
arg2
.
toString
().
split
(
'.'
)[
1
].
length
;
}
catch
(
e
)
{
r2
=
0
;
}
c
=
Math
.
abs
(
r1
-
r2
);
m
=
Math
.
pow
(
10
,
Math
.
max
(
r1
,
r2
));
return
(
arg1
*
m
+
arg2
*
m
)
/
m
;
if
(
c
>
0
)
{
var
cm
=
Math
.
pow
(
10
,
c
);
if
(
r1
>
r2
)
{
arg1
=
Number
(
arg1
.
toString
().
replace
(
'.'
,
''
));
arg2
=
Number
(
arg2
.
toString
().
replace
(
'.'
,
''
))
*
cm
;
}
else
{
arg1
=
Number
(
arg1
.
toString
().
replace
(
'.'
,
''
))
*
cm
;
arg2
=
Number
(
arg2
.
toString
().
replace
(
'.'
,
''
));
}
}
else
{
arg1
=
Number
(
arg1
.
toString
().
replace
(
'.'
,
''
));
arg2
=
Number
(
arg2
.
toString
().
replace
(
'.'
,
''
));
}
return
(
arg1
+
arg2
)
/
m
;
},
// 减法
...
...
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