Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
c1485ac5
Commit
c1485ac5
authored
Sep 19, 2024
by
袁玲利
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消费报告日期格式优化
parent
95271cd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/pages/SchoolReport/SchoolReport.vue
src/pages/SchoolReport/SchoolReport.vue
+4
-4
No files found.
src/pages/SchoolReport/SchoolReport.vue
View file @
c1485ac5
...
@@ -1867,11 +1867,11 @@ export default {
...
@@ -1867,11 +1867,11 @@ export default {
let
arr
=
this
.
cateringAbnormalGroupList
;
let
arr
=
this
.
cateringAbnormalGroupList
;
// arr = arr.sort((a,b) => Date.parse(b.statisticalDate) - Date.parse(a.statisticalDate))
// arr = arr.sort((a,b) => Date.parse(b.statisticalDate) - Date.parse(a.statisticalDate))
if
(
arr
.
length
){
if
(
arr
.
length
){
// arr = arr.map(x => (x.date = moment(x.date).format('MM
-
DD')))
// arr = arr.map(x => (x.date = moment(x.date).format('MM
/
DD')))
arr
.
sort
((
a
,
b
)
=>
a
.
statisticalDate
.
localeCompare
(
b
.
statisticalDate
));
arr
.
sort
((
a
,
b
)
=>
a
.
statisticalDate
.
localeCompare
(
b
.
statisticalDate
));
let
str
=
""
;
let
str
=
""
;
arr
.
forEach
((
x
)
=>
{
arr
.
forEach
((
x
)
=>
{
let date = moment(x.
d
ate).format("M.D");
let
date
=
moment
(
x
.
statisticalD
ate
).
format
(
"
M.D
"
);
str
=
str
+
date
+
"
,
"
;
str
=
str
+
date
+
"
,
"
;
});
});
str
=
str
.
substring
(
0
,
str
.
length
-
1
);
str
=
str
.
substring
(
0
,
str
.
length
-
1
);
...
@@ -1936,7 +1936,7 @@ export default {
...
@@ -1936,7 +1936,7 @@ export default {
);
);
let
arr
=
this
.
cateringAbnormalGroupList
;
let
arr
=
this
.
cateringAbnormalGroupList
;
if
(
arr
.
length
){
if
(
arr
.
length
){
// arr = arr.map(x => (x.date = moment(x.date).format('MM
-
DD')))
// arr = arr.map(x => (x.date = moment(x.date).format('MM
/
DD')))
arr
.
sort
((
a
,
b
)
=>
a
.
statisticalDate
.
localeCompare
(
b
.
statisticalDate
));
arr
.
sort
((
a
,
b
)
=>
a
.
statisticalDate
.
localeCompare
(
b
.
statisticalDate
));
this
.
cateringAbnormalGroupList_
=
arr
.
filter
(
this
.
cateringAbnormalGroupList_
=
arr
.
filter
(
(
x
)
=>
(
x
)
=>
...
@@ -1945,7 +1945,7 @@ export default {
...
@@ -1945,7 +1945,7 @@ export default {
);
);
let
str
=
""
;
let
str
=
""
;
arr
.
forEach
((
x
)
=>
{
arr
.
forEach
((
x
)
=>
{
let date = moment(x.
d
ate).format("M.D");
let
date
=
moment
(
x
.
statisticalD
ate
).
format
(
"
M.D
"
);
str
=
str
+
date
+
"
,
"
;
str
=
str
+
date
+
"
,
"
;
});
});
str
=
str
.
substring
(
0
,
str
.
length
-
1
);
str
=
str
.
substring
(
0
,
str
.
length
-
1
);
...
...
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