Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8b01419b
authored
Jul 12, 2021
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
表格增加合计
1 parent
94e7a239
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
src/components/d2-table/index.vue
src/views/tao/financialManagement/index.vue
src/components/d2-table/index.vue
View file @
8b01419
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
@
selection-change=
"handleSelect"
@
selection-change=
"handleSelect"
size=
"medium"
size=
"medium"
:show-summary=
"tableParams.showSummary"
:show-summary=
"tableParams.showSummary"
:summary-method=
"tableParams.summaryMethod"
>
>
<el-table-column
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
...
...
src/views/tao/financialManagement/index.vue
View file @
8b01419
...
@@ -158,7 +158,7 @@ export default {
...
@@ -158,7 +158,7 @@ export default {
cardNo
:
'123'
,
cardNo
:
'123'
,
activationCode
:
'恒河猴22'
,
activationCode
:
'恒河猴22'
,
memberName
:
'SS2W'
,
memberName
:
'SS2W'
,
sn
:
'56456456'
,
sn
:
1
,
updatedDate
:
'JKHSJKSH'
,
updatedDate
:
'JKHSJKSH'
,
cardNoSSS
:
'SHJJKHK'
,
cardNoSSS
:
'SHJJKHK'
,
AAA
:
'掉接口'
,
AAA
:
'掉接口'
,
...
@@ -170,7 +170,7 @@ export default {
...
@@ -170,7 +170,7 @@ export default {
cardNo
:
'123'
,
cardNo
:
'123'
,
activationCode
:
'恒河猴22'
,
activationCode
:
'恒河猴22'
,
memberName
:
'SS2W'
,
memberName
:
'SS2W'
,
sn
:
'56456456'
,
sn
:
2
,
updatedDate
:
'JKHSJKSH'
,
updatedDate
:
'JKHSJKSH'
,
cardNoSSS
:
'SHJJKHK'
,
cardNoSSS
:
'SHJJKHK'
,
AAA
:
'掉接口'
,
AAA
:
'掉接口'
,
...
@@ -182,7 +182,7 @@ export default {
...
@@ -182,7 +182,7 @@ export default {
cardNo
:
'123'
,
cardNo
:
'123'
,
activationCode
:
'恒河猴22'
,
activationCode
:
'恒河猴22'
,
memberName
:
'SS2W'
,
memberName
:
'SS2W'
,
sn
:
'56456456'
,
sn
:
3
,
updatedDate
:
'JKHSJKSH'
,
updatedDate
:
'JKHSJKSH'
,
cardNoSSS
:
'SHJJKHK'
,
cardNoSSS
:
'SHJJKHK'
,
AAA
:
'掉接口'
,
AAA
:
'掉接口'
,
...
@@ -194,7 +194,7 @@ export default {
...
@@ -194,7 +194,7 @@ export default {
cardNo
:
'123'
,
cardNo
:
'123'
,
activationCode
:
'恒河猴22'
,
activationCode
:
'恒河猴22'
,
memberName
:
'SS2W'
,
memberName
:
'SS2W'
,
sn
:
'56456456'
,
sn
:
4
,
updatedDate
:
'JKHSJKSH'
,
updatedDate
:
'JKHSJKSH'
,
cardNoSSS
:
'SHJJKHK'
,
cardNoSSS
:
'SHJJKHK'
,
AAA
:
'掉接口'
,
AAA
:
'掉接口'
,
...
@@ -206,6 +206,30 @@ export default {
...
@@ -206,6 +206,30 @@ export default {
tableParams
:
{
tableParams
:
{
// listName: 'list',
// listName: 'list',
showSummary
:
true
,
showSummary
:
true
,
summaryMethod
({
columns
,
data
})
{
let
sums
=
[]
columns
.
forEach
((
column
,
index
)
=>
{
if
(
index
==
0
)
{
sums
[
index
]
=
'合计'
return
}
const
values
=
data
.
map
(
item
=>
Number
(
item
[
column
.
property
]));
if
(
!
values
.
every
(
value
=>
isNaN
(
value
)))
{
sums
[
index
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
)
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
}
else
{
return
prev
}
},
0
);
sums
[
index
]
+=
' 元'
}
else
{
sums
[
index
]
=
''
}
})
return
sums
},
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'订单编号'
,
label
:
'订单编号'
,
...
@@ -221,6 +245,7 @@ export default {
...
@@ -221,6 +245,7 @@ export default {
label
:
'商品形态'
,
label
:
'商品形态'
,
prop
:
'sn'
,
prop
:
'sn'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
},
},
{
{
label
:
'商品名称'
,
label
:
'商品名称'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment