Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wuhao
wms
Commits
d353e947
Commit
d353e947
authored
Jul 15, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
ba8ec324
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
226 additions
and
240 deletions
+226
-240
global.less
src/global.less
+25
-1
document.ejs
src/pages/document.ejs
+196
-205
store.js
src/pages/system/Store/store.js
+5
-34
No files found.
src/global.less
View file @
d353e947
...
...
@@ -335,3 +335,27 @@ table {
flex:1
}
}
@media all {
.page-break {
display: none;
}
}
@media print {
html,
body {
height: initial !important;
overflow: initial !important;
-webkit-print-color-adjust: exact;
}
}
@media print {
.page-break {
margin-top: 2rem;
display: block;
page-break-after: always;
}
}
src/pages/document.ejs
View file @
d353e947
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"theme-color"
content=
"#1890ff"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"keywords"
content=
"antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, console, homepage, out-of-the-box, middle and back office, solution, component library"
/>
<meta
name=
"description"
content=
"
An out-of-box UI solution for enterprise applications as a React boilerplate."
/>
<meta
name=
"description"
content=
"
Out-of-the-box mid-stage front-end/design solution."
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<meta
name=
"keywords"
content=
"antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, console, homepage, out-of-the-box, middle and back office, solution, component library"
/>
<meta
name=
"description"
content=
"
An out-of-box UI solution for enterprise applications as a React boilerplate."
/>
<meta
name=
"description"
content=
"
Out-of-the-box mid-stage front-end/design solution."
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<title>
Ant Design Pro
</title>
<link
rel=
"icon"
href=
"<%= context.config.publicPath +'favicon.ico'%>"
type=
"image/x-icon"
/>
</head>
<body>
</head>
<body>
<noscript>
<div
class=
"noscript-container"
>
Hi there! Please
...
...
@@ -46,10 +37,12 @@
margin
:
0
;
padding
:
0
;
}
#root
{
background-repeat
:
no-repeat
;
background-size
:
100%
auto
;
}
.noscript-container
{
display
:
flex
;
align-content
:
center
;
...
...
@@ -59,16 +52,19 @@
font-family
:
'Lucida Sans'
,
'Lucida Sans Regular'
,
'Lucida Grande'
,
'Lucida Sans Unicode'
,
Geneva
,
Verdana
,
sans-serif
;
}
.noscript-enableJS
{
padding-right
:
3px
;
padding-left
:
3px
;
}
.page-loading-warp
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
98px
;
}
.ant-spin
{
position
:
absolute
;
display
:
none
;
...
...
@@ -170,7 +166,8 @@
height
:
14px
;
}
@media
all
and
(
-ms-high-contrast
:
none
),
(
-ms-high-contrast
:
active
)
{
@media
all
and
(
-ms-high-contrast
:
none
),
(
-ms-high-contrast
:
active
)
{
.ant-spin-blur
{
background
:
#fff
;
opacity
:
0.5
;
...
...
@@ -203,34 +200,28 @@
}
}
</style>
<div
style=
"
<div
style=
"
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
min-height: 420px;
"
>
"
>
<img
src=
"<%= context.config.publicPath +'pro_icon.svg'%>"
alt=
"logo"
width=
"256"
/>
<div
class=
"page-loading-warp"
>
<div
class=
"ant-spin ant-spin-lg ant-spin-spinning"
>
<span
class=
"ant-spin-dot ant-spin-dot-spin"
><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i
><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i
></span>
<span
class=
"ant-spin-dot ant-spin-dot-spin"
><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i></span>
</div>
</div>
<div
style=
"display: flex; align-items: center; justify-content: center"
>
<img
src=
"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
width=
"32"
style=
"margin-right: 8px"
/>
<img
src=
"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg"
width=
"32"
style=
"margin-right: 8px"
/>
Ant Design
</div>
</div>
</div>
</body>
</body>
</html>
\ No newline at end of file
src/pages/system/Store/store.js
View file @
d353e947
...
...
@@ -10,34 +10,7 @@ import { ProDescriptions } from '@ant-design/pro-components';
import
JsBarcode
from
'jsbarcode'
import
{
useReactToPrint
}
from
'react-to-print'
;
import
PrintProvider
,
{
Print
,
NoPrint
}
from
'react-easy-print'
;
const
pageStyle
=
`
@media all {
.page-break {
display: none;
}
}
@media print {
html, body {
height: initial !important;
overflow: initial !important;
-webkit-print-color-adjust: exact;
}
}
@media print {
.page-break {
margin-top: 2rem;
display: block;
page-break-before: auto;
}
}
@page {
size: auto;
margin: 20mm;
}
`
;
const
initState
=
{
vs
:
false
,
...
...
@@ -203,7 +176,11 @@ const StoreApp = (props) => {
await
dispatch
({
type
:
"only"
});
setTimeout
(
async
()
=>
{
await
Promise
.
all
(
selectedRowKeys
.
map
(
async
(
it
)
=>
{
await
JsBarcode
(
"#s"
+
it
.
id
,
it
.
id
);
await
JsBarcode
(
"#s"
+
it
.
id
,
it
.
id
,
{
lineColor
:
"green"
,
width
:
2
,
height
:
100
,
});
}))
},
600
)
...
...
@@ -272,9 +249,6 @@ const StoreApp = (props) => {
extraparams
=
{{
storeId
:
props
?.
curitem
?.
id
??
"0"
}}
rowSelection
=
{{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
console
.
log
(
'===================================='
);
console
.
log
(
selectedRows
);
console
.
log
(
'===================================='
);
setselectedRowKeys
(
selectedRows
)
},
...
...
@@ -306,9 +280,6 @@ const StoreApp = (props) => {
{
selectedRowKeys
.
map
(
it
=>
{
return
<
div
>
<
style
type
=
"text/css"
media
=
"print"
>
{
pageStyle
}
<
/style
>
<
NoPrint
>
<
span
>
{
it
.
storePositionName
}
<
/span
>
<
/NoPrint
>
...
...
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