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
Expand all
Hide 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
...
@@ -334,4 +334,28 @@ table {
...
@@ -334,4 +334,28 @@ table {
>span:last-child{
>span:last-child{
flex:1
flex:1
}
}
}
}
\ No newline at end of file
@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
This diff is collapsed.
Click to expand it.
src/pages/system/Store/store.js
View file @
d353e947
...
@@ -10,34 +10,7 @@ import { ProDescriptions } from '@ant-design/pro-components';
...
@@ -10,34 +10,7 @@ import { ProDescriptions } from '@ant-design/pro-components';
import
JsBarcode
from
'jsbarcode'
import
JsBarcode
from
'jsbarcode'
import
{
useReactToPrint
}
from
'react-to-print'
;
import
{
useReactToPrint
}
from
'react-to-print'
;
import
PrintProvider
,
{
Print
,
NoPrint
}
from
'react-easy-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
=
{
const
initState
=
{
vs
:
false
,
vs
:
false
,
...
@@ -203,7 +176,11 @@ const StoreApp = (props) => {
...
@@ -203,7 +176,11 @@ const StoreApp = (props) => {
await
dispatch
({
type
:
"only"
});
await
dispatch
({
type
:
"only"
});
setTimeout
(
async
()
=>
{
setTimeout
(
async
()
=>
{
await
Promise
.
all
(
selectedRowKeys
.
map
(
async
(
it
)
=>
{
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
)
},
600
)
...
@@ -272,9 +249,6 @@ const StoreApp = (props) => {
...
@@ -272,9 +249,6 @@ const StoreApp = (props) => {
extraparams
=
{{
storeId
:
props
?.
curitem
?.
id
??
"0"
}}
extraparams
=
{{
storeId
:
props
?.
curitem
?.
id
??
"0"
}}
rowSelection
=
{{
rowSelection
=
{{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
console
.
log
(
'===================================='
);
console
.
log
(
selectedRows
);
console
.
log
(
'===================================='
);
setselectedRowKeys
(
selectedRows
)
setselectedRowKeys
(
selectedRows
)
},
},
...
@@ -306,9 +280,6 @@ const StoreApp = (props) => {
...
@@ -306,9 +280,6 @@ const StoreApp = (props) => {
{
{
selectedRowKeys
.
map
(
it
=>
{
selectedRowKeys
.
map
(
it
=>
{
return
<
div
>
return
<
div
>
<
style
type
=
"text/css"
media
=
"print"
>
{
pageStyle
}
<
/style
>
<
NoPrint
>
<
NoPrint
>
<
span
>
{
it
.
storePositionName
}
<
/span
>
<
span
>
{
it
.
storePositionName
}
<
/span
>
<
/NoPrint
>
<
/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