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
35ec29a0
Commit
35ec29a0
authored
Oct 24, 2021
by
季圣华
Browse files
报表的合计优化
parent
921b268d
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/mixins/JeecgListMixin.js
View file @
35ec29a0
...
...
@@ -386,22 +386,23 @@ export const JeecgListMixin = {
let
numKey
=
'
rowIndex
'
let
totalRow
=
{
[
numKey
]:
'
合计
'
}
//移除不需要合计的列
let
removeCols
=
'
action,mBarCode,barCode,name,standard,model,categoryName,unitName,serialNo,unitPrice,purchaseDecimal,operTime,oTime
'
let
parseCols
=
'
initialStock,currentStock,currentStockPrice,initialAmount,thisMonthAmount,currentAmount,inSum,inSumPrice,
'
+
'
outSum,outSumPrice,outInSumPrice,operNumber,allPrice,numSum,priceSum,prevSum,thisSum,thisAllPrice,billMoney,changeAmount,
'
+
'
allPrice,safetystock,currentNumber,linjieNumber
'
columns
.
forEach
(
column
=>
{
let
{
key
,
dataIndex
}
=
column
if
(
!
[
key
,
dataIndex
].
includes
(
numKey
))
{
let
total
=
0
dataSource
.
forEach
(
data
=>
{
total
+=
Number
.
parseFloat
(
data
[
dataIndex
])
if
(
parseCols
.
indexOf
(
dataIndex
)
>-
1
)
{
total
+=
Number
.
parseFloat
(
data
[
dataIndex
])
}
else
{
total
=
'
-
'
}
})
if
(
Number
.
isNaN
(
total
))
{
total
=
'
-
'
}
else
{
if
(
total
!==
'
-
'
)
{
total
=
total
.
toFixed
(
2
)
}
if
(
removeCols
.
indexOf
(
dataIndex
)
>-
1
)
{
total
=
'
-
'
}
totalRow
[
dataIndex
]
=
total
}
})
...
...
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