Commit d353e947 authored by wuhao's avatar wuhao 🎯

asder

parent ba8ec324
...@@ -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;
}
}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="UTF-8" /> <head>
<meta name="theme-color" content="#1890ff" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="theme-color" content="#1890ff" />
<meta <meta http-equiv="X-UA-Compatible" content="IE=edge" />
name="keywords" <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" 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="
<meta An out-of-box UI solution for enterprise applications as a React boilerplate." />
name="description" <meta name="description" content="
content=" Out-of-the-box mid-stage front-end/design solution." />
An out-of-box UI solution for enterprise applications as a React boilerplate." <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
/> <title>Ant Design Pro</title>
<meta <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
name="description" </head>
content="
Out-of-the-box mid-stage front-end/design solution." <body>
/> <noscript>
<meta <div class="noscript-container">
name="viewport" Hi there! Please
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" <div class="noscript-enableJS">
/> <a href="https://www.enablejavascript.io/en" target="_blank" rel="noopener noreferrer">
<title>Ant Design Pro</title> <b>enable Javascript</b>
<link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" /> </a>
</head>
<body>
<noscript>
<div class="noscript-container">
Hi there! Please
<div class="noscript-enableJS">
<a href="https://www.enablejavascript.io/en" target="_blank" rel="noopener noreferrer">
<b>enable Javascript</b>
</a>
</div>
in your browser to use Ant Design, Out-of-the-box mid-stage front/design solution!
</div> </div>
</noscript> in your browser to use Ant Design, Out-of-the-box mid-stage front/design solution!
<div id="root"> </div>
<style> </noscript>
html, <div id="root">
body, <style>
#root { html,
height: 100%; body,
margin: 0; #root {
padding: 0; height: 100%;
} margin: 0;
#root { padding: 0;
background-repeat: no-repeat; }
background-size: 100% auto;
}
.noscript-container {
display: flex;
align-content: center;
justify-content: center;
margin-top: 90px;
font-size: 20px;
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;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
color: #1890ff;
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
text-align: center;
list-style: none;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
}
.ant-spin-spinning { #root {
position: static; background-repeat: no-repeat;
display: inline-block; background-size: 100% auto;
opacity: 1; }
}
.ant-spin-dot { .noscript-container {
position: relative; display: flex;
display: inline-block; align-content: center;
width: 20px; justify-content: center;
height: 20px; margin-top: 90px;
font-size: 20px; font-size: 20px;
} font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode',
Geneva, Verdana, sans-serif;
}
.ant-spin-dot-item { .noscript-enableJS {
position: absolute; padding-right: 3px;
display: block; padding-left: 3px;
width: 9px; }
height: 9px;
background-color: #1890ff;
border-radius: 100%;
-webkit-transform: scale(0.75);
-ms-transform: scale(0.75);
transform: scale(0.75);
-webkit-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
opacity: 0.3;
-webkit-animation: antspinmove 1s infinite linear alternate;
animation: antSpinMove 1s infinite linear alternate;
}
.ant-spin-dot-item:nth-child(1) { .page-loading-warp {
top: 0; display: flex;
left: 0; align-items: center;
} justify-content: center;
padding: 98px;
}
.ant-spin-dot-item:nth-child(2) { .ant-spin {
top: 0; position: absolute;
right: 0; display: none;
-webkit-animation-delay: 0.4s; -webkit-box-sizing: border-box;
animation-delay: 0.4s; box-sizing: border-box;
} margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
color: #1890ff;
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
text-align: center;
list-style: none;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
}
.ant-spin-dot-item:nth-child(3) { .ant-spin-spinning {
right: 0; position: static;
bottom: 0; display: inline-block;
-webkit-animation-delay: 0.8s; opacity: 1;
animation-delay: 0.8s; }
}
.ant-spin-dot-item:nth-child(4) { .ant-spin-dot {
bottom: 0; position: relative;
left: 0; display: inline-block;
-webkit-animation-delay: 1.2s; width: 20px;
animation-delay: 1.2s; height: 20px;
} font-size: 20px;
}
.ant-spin-dot-spin { .ant-spin-dot-item {
-webkit-transform: rotate(45deg); position: absolute;
-ms-transform: rotate(45deg); display: block;
transform: rotate(45deg); width: 9px;
-webkit-animation: antrotate 1.2s infinite linear; height: 9px;
animation: antRotate 1.2s infinite linear; background-color: #1890ff;
} border-radius: 100%;
-webkit-transform: scale(0.75);
-ms-transform: scale(0.75);
transform: scale(0.75);
-webkit-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
opacity: 0.3;
-webkit-animation: antspinmove 1s infinite linear alternate;
animation: antSpinMove 1s infinite linear alternate;
}
.ant-spin-lg .ant-spin-dot { .ant-spin-dot-item:nth-child(1) {
width: 32px; top: 0;
height: 32px; left: 0;
font-size: 32px; }
}
.ant-spin-lg .ant-spin-dot i { .ant-spin-dot-item:nth-child(2) {
width: 14px; top: 0;
height: 14px; right: 0;
} -webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .ant-spin-dot-item:nth-child(3) {
.ant-spin-blur { right: 0;
background: #fff; bottom: 0;
opacity: 0.5; -webkit-animation-delay: 0.8s;
} animation-delay: 0.8s;
} }
.ant-spin-dot-item:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@-webkit-keyframes antSpinMove { .ant-spin-dot-spin {
to { -webkit-transform: rotate(45deg);
opacity: 1; -ms-transform: rotate(45deg);
} transform: rotate(45deg);
-webkit-animation: antrotate 1.2s infinite linear;
animation: antRotate 1.2s infinite linear;
}
.ant-spin-lg .ant-spin-dot {
width: 32px;
height: 32px;
font-size: 32px;
}
.ant-spin-lg .ant-spin-dot i {
width: 14px;
height: 14px;
}
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
.ant-spin-blur {
background: #fff;
opacity: 0.5;
} }
}
@keyframes antSpinMove { @-webkit-keyframes antSpinMove {
to { to {
opacity: 1; opacity: 1;
}
} }
}
@-webkit-keyframes antRotate { @keyframes antSpinMove {
to { to {
-webkit-transform: rotate(405deg); opacity: 1;
transform: rotate(405deg);
}
} }
}
@keyframes antRotate { @-webkit-keyframes antRotate {
to { to {
-webkit-transform: rotate(405deg); -webkit-transform: rotate(405deg);
transform: rotate(405deg); transform: rotate(405deg);
}
} }
</style> }
<div
style=" @keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
</style>
<div style="
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100%; height: 100%;
min-height: 420px; min-height: 420px;
" ">
> <img src="<%= context.config.publicPath +'pro_icon.svg'%>" alt="logo" width="256" />
<img src="<%= context.config.publicPath +'pro_icon.svg'%>" alt="logo" width="256" /> <div class="page-loading-warp">
<div class="page-loading-warp"> <div class="ant-spin ant-spin-lg ant-spin-spinning">
<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
<span class="ant-spin-dot ant-spin-dot-spin" class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span>
><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"
/>
Ant Design
</div> </div>
</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" />
Ant Design
</div>
</div> </div>
</body> </div>
</html> </body>
</html>
\ No newline at end of file
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment