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
16a4628c
Commit
16a4628c
authored
Dec 04, 2023
by
李翰林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打印模板
parent
ccceb91a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
index.jsx
src/pages/Printer/index.jsx
+36
-36
No files found.
src/pages/Printer/index.jsx
View file @
16a4628c
...
...
@@ -237,43 +237,43 @@ const Station = (props) => {
});
};
const [data, setdata] = useState({});
//
const [data, setdata] = useState({});
useEffect(() => {
let el = document.getElementById("mydemo");
el.innerHTML = `
<
div
>
<
div
style=
"display:flex; width:100% ;height:100%; flex-direction: column;justify-self: space-between; font-family:'宋体'"
>
<
div
style=
"display:flex; flex-direction: row;flex:2;"
>
<
div
style=
"display:flex;flex-direction: column;flex:2"
>
<
div
style=
"flex:1"
>
卷料名称:$
{
data
?.
materieName
??
"--"
}
</
div
>
<
div
style=
"flex:1"
>
卷料编码:$
{
data
?.
materieCode
??
"--"
}
</
div
>
</
div
>
</
div
>
<
div
style=
"display:flex; flex-direction: row;flex:1;"
>
<
div
style=
"flex:3;display:flex;flex-direction: row;"
>
<
div
style=
"flex:1"
>
批次:$
{
data
?.
materieControlNo
??
"--"
}
</
div
>
<
div
style=
"flex:1"
>
厚度:$
{
data
?.
unilateralThickness
??
"--"
}
mm
</
div
>
</
div
>
<
div
style=
"flex:1"
>
<
img
src=
$
{
data
?.
qrCodeUrl
}
style=
"width:100%"
/>
</
div
>
</
div
>
<
div
style=
"display:flex; flex-direction: row;flex:1;"
>
<
div
style=
"flex:2"
>
铁损:$
{
data
?.
ironLoss
??
"--"
}
w/kg
</
div
>
<
div
style=
"flex:3"
>
牌号:$
{
data
?.
shopSign
??
"--"
}
片
</
div
>
</
div
>
<
div
style=
"display:flex; flex-direction: row;flex:1;"
>
<
div
style=
"flex:2"
>
宽度:$
{
data
?.
width
??
"--"
}
mm
</
div
>
<
div
style=
"flex:3"
>
片厚:$
{
data
?.
sheetThickness
??
"--"
}
mm
</
div
>
</
div
>
<
div
style=
"display:flex; flex-direction: row;flex:1;"
>
<
div
style=
"flex:2"
>
重量:$
{
data
?.
weight
??
"--"
}
KG
</
div
>
<
div
style=
"flex:3"
>
米数:$
{
data
?.
length
??
"--"
}
M
</
div
>
</
div
>
//
useEffect(() => {
//
let el = document.getElementById("mydemo");
//
el.innerHTML = `
<
div
>
//
<div style="display:flex; width:100% ;height:100%; flex-direction: column;justify-self: space-between; font-family:'宋体'">
//
<div style="display:flex; flex-direction: row;flex:2;">
//
<div style="display:flex;flex-direction: column;flex:2">
//
<div style="flex:1">卷料名称:${data?.materieName ?? "--"}</div>
//
<div style="flex:1">卷料编码:${data?.materieCode ?? "--"}</div>
//
</div>
//
</div>
//
<div style="display:flex; flex-direction: row;flex:1;">
//
<div style="flex:3;display:flex;flex-direction: row;">
//
<div style="flex:1">批次:${data?.materieControlNo ?? "--"}</div>
//
<div style="flex:1">厚度:${data?.unilateralThickness ?? "--"}mm</div>
//
</div>
//
<div style="flex:1">
//
<img src=${data?.qrCodeUrl} style="width:100%"/>
//
</div>
//
</div>
//
<div style="display:flex; flex-direction: row;flex:1;">
//
<div style="flex:2">铁损:${data?.ironLoss ?? "--"}w/kg</div>
//
<div style="flex:3">牌号:${data?.shopSign ?? "--"}片</div>
//
</div>
//
<div style="display:flex; flex-direction: row;flex:1;">
//
<div style="flex:2">宽度:${data?.width ?? "--"}mm</div>
//
<div style="flex:3">片厚:${data?.sheetThickness ?? "--"}mm</div>
//
</div>
//
<div style="display:flex; flex-direction: row;flex:1;">
//
<div style="flex:2">重量:${data?.weight ?? "--"}KG</div>
//
<div style="flex:3">米数:${data?.length ?? "--"}M</div>
//
</div>
</
div
>
<
/
div
>
`;
}, []);
//
</div>
//
</div>`;
//
}, []);
const
OptionsBtn
=
()
=>
{
return
(
...
...
@@ -325,7 +325,7 @@ const Station = (props) => {
...
rowSelection
,
}
}
></
AutoTable
>
<
div
id=
"mydemo"
style=
{
{
width
:
500
,
height
:
250
,
border
:
'1px solid #000'
,
backgroundColor
:
'#fff'
}
}
></
div
>
{
/* <div id="mydemo" style={{width:500,height:250,border:'1px solid #000',backgroundColor:'#fff'}}></div> */
}
<
Drawer
title=
{
drawer
?.
title
}
open=
{
drawer
?.
visible
}
...
...
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