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
Litemall
Commits
c33b33cd
Commit
c33b33cd
authored
Apr 17, 2023
by
linlinjava
Browse files
Merge branch 'master' of
https://github.com/linlinjava/litemall
parents
2b87976a
ce310d9c
Changes
2
Show whitespace changes
Inline
Side-by-side
litemall-admin/src/api/order.js
View file @
c33b33cd
...
...
@@ -6,8 +6,8 @@ export function listOrder(query) {
url
:
'
/order/list
'
,
method
:
'
get
'
,
params
:
query
,
paramsSerializer
:
function
(
params
)
{
return
Qs
.
stringify
(
params
,
{
arrayFormat
:
'
repeat
'
})
paramsSerializer
:
{
serialize
:
(
params
)
=>
Qs
.
stringify
(
params
,
{
arrayFormat
:
'
repeat
'
})
}
})
}
...
...
litemall-admin/src/vendor/Export2Excel.js
View file @
c33b33cd
/* eslint-disable */
import
{
saveAs
}
from
'
file-saver
'
import
XLSX
from
'
xlsx
'
import
{
utils
,
SSF
,
write
}
from
'
xlsx
'
function
generateArray
(
table
)
{
var
out
=
[];
...
...
@@ -18,7 +18,7 @@ function generateArray(table) {
if
(
cellValue
!==
""
&&
cellValue
==
+
cellValue
)
cellValue
=
+
cellValue
;
//Skip ranges
ranges
.
forEach
(
function
(
range
)
{
ranges
.
forEach
(
function
(
range
)
{
if
(
R
>=
range
.
s
.
r
&&
R
<=
range
.
e
.
r
&&
outRow
.
length
>=
range
.
s
.
c
&&
outRow
.
length
<=
range
.
e
.
c
)
{
for
(
var
i
=
0
;
i
<=
range
.
e
.
c
-
range
.
s
.
c
;
++
i
)
outRow
.
push
(
null
);
}
...
...
@@ -80,7 +80,7 @@ function sheet_from_array_of_arrays(data, opts) {
v
:
data
[
R
][
C
]
};
if
(
cell
.
v
==
null
)
continue
;
var
cell_ref
=
XLSX
.
utils
.
encode_cell
({
var
cell_ref
=
utils
.
encode_cell
({
c
:
C
,
r
:
R
});
...
...
@@ -89,14 +89,14 @@ function sheet_from_array_of_arrays(data, opts) {
else
if
(
typeof
cell
.
v
===
'
boolean
'
)
cell
.
t
=
'
b
'
;
else
if
(
cell
.
v
instanceof
Date
)
{
cell
.
t
=
'
n
'
;
cell
.
z
=
XLSX
.
SSF
.
_table
[
14
];
cell
.
z
=
SSF
.
_table
[
14
];
cell
.
v
=
datenum
(
cell
.
v
);
}
else
cell
.
t
=
'
s
'
;
ws
[
cell_ref
]
=
cell
;
}
}
if
(
range
.
s
.
c
<
10000000
)
ws
[
'
!ref
'
]
=
XLSX
.
utils
.
encode_range
(
range
);
if
(
range
.
s
.
c
<
10000000
)
ws
[
'
!ref
'
]
=
utils
.
encode_range
(
range
);
return
ws
;
}
...
...
@@ -133,7 +133,7 @@ export function export_table_to_excel(id) {
wb
.
SheetNames
.
push
(
ws_name
);
wb
.
Sheets
[
ws_name
]
=
ws
;
var
wbout
=
XLSX
.
write
(
wb
,
{
var
wbout
=
write
(
wb
,
{
bookType
:
'
xlsx
'
,
bookSST
:
false
,
type
:
'
binary
'
...
...
@@ -169,7 +169,7 @@ export function export_json_to_excel({
if
(
merges
.
length
>
0
)
{
if
(
!
ws
[
'
!merges
'
])
ws
[
'
!merges
'
]
=
[];
merges
.
forEach
(
item
=>
{
ws
[
'
!merges
'
].
push
(
XLSX
.
utils
.
decode_range
(
item
))
ws
[
'
!merges
'
].
push
(
utils
.
decode_range
(
item
))
})
}
...
...
@@ -209,7 +209,7 @@ export function export_json_to_excel({
wb
.
SheetNames
.
push
(
ws_name
);
wb
.
Sheets
[
ws_name
]
=
ws
;
var
wbout
=
XLSX
.
write
(
wb
,
{
var
wbout
=
write
(
wb
,
{
bookType
:
bookType
,
bookSST
:
false
,
type
:
'
binary
'
...
...
@@ -227,5 +227,5 @@ function formatJson(jsonSource, jsonFillter) {
export
function
export_json_to_excel2
(
th
,
jsonSource
,
jsonFillter
,
name
)
{
const
data
=
formatJson
(
jsonSource
,
jsonFillter
)
export_json_to_excel
({
header
:
th
,
data
,
filename
:
name
})
export_json_to_excel
({
header
:
th
,
data
,
filename
:
name
})
}
\ No newline at end of file
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