Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
6bea671b
Commit
6bea671b
authored
Dec 10, 2024
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 对账单统计优化
parent
03f3f495
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
26 deletions
+29
-26
src/views/AccountStatementNote.vue
+29
-26
No files found.
src/views/AccountStatementNote.vue
View file @
6bea671b
...
...
@@ -211,9 +211,7 @@
min
-
width
=
"340"
>
<
template
#
default
=
"scope"
>
{{
scope
.
row
.
start_time
}}
-
{{
scope
.
row
.
end_time
}}
{{
scope
.
row
.
start_time
}}
-
{{
scope
.
row
.
end_time
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
...
...
@@ -385,7 +383,7 @@
header
-
align
=
"center"
align
=
"center"
><
/ElTableColumn> --
>
<
ElTableColumn
label
=
"创建时间"
show
-
overflow
-
tooltip
...
...
@@ -669,7 +667,6 @@ const treeRef = ref<InstanceType<typeof ElTree>>()
const
{
currentPage
,
pageSize
,
totalData
,
total
,
data
:
tableData
,
refresh
:
search
,
...
...
@@ -759,28 +756,34 @@ const tabsClick = async () => {
const
handleSelectionChange
=
(
v
:
AccountStatementNote
[])
=>
{
selections
.
value
=
v
}
const
getSummaries
=
(
data
:
SummaryMethodProps
)
=>
{
const
columns
=
data
.
columns
const
getSummaries
=
(
param
:
SummaryMethodProps
)
=>
{
const
{
columns
,
data
}
=
param
const
sums
:
string
[]
=
[]
columns
.
forEach
((
column
,
index
)
=>
{
console
.
log
(
column
)
if
(
index
===
0
)
{
sums
[
index
]
=
'统计'
}
if
(
index
===
5
)
{
sums
[
index
]
=
String
(
totalData
.
value
[
'sumNotPassNum'
])
}
if
(
index
===
6
)
{
sums
[
index
]
=
String
(
totalData
.
value
[
'sumShipmentNum'
])
}
if
(
index
===
7
)
{
sums
[
index
]
=
String
(
totalData
.
value
[
'sumPassNum'
])
}
if
(
index
===
8
)
{
sums
[
index
]
=
String
(
totalData
.
value
[
'sumTotalPrice'
])
}
}
)
columns
.
forEach
(
(
column
:
TableColumnCtx
<
AccountStatementNote
>
,
index
:
number
)
=>
{
if
(
index
===
0
)
{
sums
[
index
]
=
'合计'
return
}
const
values
=
data
.
map
((
item
:
AccountStatementNote
)
=>
{
return
Number
(
item
[
column
.
property
as
keyof
AccountStatementNote
])
}
)
if
(
!
values
.
every
((
value
:
number
)
=>
!
isNaN
(
value
)))
{
return
}
sums
[
index
]
=
values
.
reduce
((
prev
:
number
,
curr
:
number
)
=>
{
const
value
=
Number
(
curr
)
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
}
else
{
return
prev
}
}
,
0
)
.
toString
()
}
,
)
return
sums
}
const
auditOrder
=
(
key
:
string
)
=>
{
...
...
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