Commit 253d3b5c authored by 李翰林's avatar 李翰林

修改打印模板

parent 16a4628c
......@@ -43,7 +43,7 @@ export function str(data) {
// </tr>
// </table>`;
return ` <div style="display:flex; width:100% ;height:100%; flex-direction: column;justify-self: space-between; font-family:'宋体'">
return ` <div style="display:flex; width:100% ;height:95%; flex-direction: column;justify-self: space-between; font-family:'宋体'">
<div style="display:flex; flex-direction: row;flex:2;">
<div style="flex:3;display:flex;flex-direction: column;">
......@@ -67,9 +67,9 @@ export function str(data) {
<div style="flex:3">牌号:${data?.shopSign ?? "--"}</div>
</div>
<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 style="display:flex;flex-direction: row;flex:1">
<div style="flex:1">名称:${data?.materieName ?? "--"}</div>
<div style="flex:1">编码:${data?.materieCode ?? "--"}</div>
</div>
</div>
</div>`;
......
......@@ -22,10 +22,9 @@ export async function start(url, params) {
const data = JSON.parse(JSON.stringify(res?.data?.dataList));
for (let i = 0; i < data.length; i++) {
const template = str(data[i]);
console.log(template);
let LODOP = getLodop();
LODOP.PRINT_INIT("task1");
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", template);
LODOP.ADD_PRINT_HTM("8%", 0, "100%", "100%", template);
LODOP.SET_PRINT_PAGESIZE(0, 1000, 500, "");
// LODOP.PREVIEW();
LODOP.PRINT();
......
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