在线样例
左侧浏览样例目录,右侧查看版式预览与示例代码;点击运行即可通过 web-print-pdf 驱动本地客户端完成静默打印或 PDF 预览。使用前请先 安装并启动客户端。
客户端
若打印或预览效果与预期不符,请务必先从官网下载并安装最新版 Web打印专家客户端后再试(旧版本可能导致版式偏差)。
版式说明
版式预览与打印输出完全遵循 HTML/CSS 标准样式,没有隐藏的渲染技巧:样式写成什么样,页面就长成什么样。
61 - 门诊挂号单
门诊挂号单打印样例。
版式预览
示例代码
const html = `<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>门诊挂号单</title>
<style>
html, body { margin: 0; padding: 0; }
.biz-sheet {
position: relative;
width: 794px;
height: 1123px;
box-sizing: border-box;
background: #fff;
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
color: #0F172A;
overflow: hidden;
}
</style>
</head>
<body>
<div class="biz-sheet">
<div style="position:absolute;left:0px;top:0px;width:794px;height:112px;box-sizing:border-box;overflow:hidden;background:#0F766E"></div>
<div style="position:absolute;left:540px;top:24px;width:206px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#99F6E4;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">就诊序号</div>
<div style="position:absolute;left:48px;top:26px;width:400px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#99F6E4;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">市第一人民医院 · 门诊部</div>
<div style="position:absolute;left:540px;top:40px;width:206px;height:48px;box-sizing:border-box;overflow:hidden;font-size:32px;font-weight:700;color:#FFFFFF;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">A012</div>
<div style="position:absolute;left:48px;top:50px;width:400px;height:36px;box-sizing:border-box;overflow:hidden;font-size:24px;font-weight:700;color:#FFFFFF;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">门诊挂号单</div>
<div style="position:absolute;left:48px;top:88px;width:400px;height:14px;box-sizing:border-box;overflow:hidden;font-size:8px;color:#5EEAD4;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">OUTPATIENT REGISTRATION</div>
<div style="position:absolute;left:100px;top:133px;width:200px;height:20px;box-sizing:border-box;overflow:hidden;font-size:11px;font-weight:600;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">王小明</div>
<div style="position:absolute;left:404px;top:133px;width:80px;height:20px;box-sizing:border-box;overflow:hidden;font-size:11px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">男</div>
<div style="position:absolute;left:580px;top:133px;width:80px;height:20px;box-sizing:border-box;overflow:hidden;font-size:11px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">8 岁</div>
<div style="position:absolute;left:48px;top:136px;width:48px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">姓名</div>
<div style="position:absolute;left:360px;top:136px;width:40px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">性别</div>
<div style="position:absolute;left:536px;top:136px;width:40px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">年龄</div>
<div style="position:absolute;left:100px;top:155px;width:200px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:404px;top:155px;width:80px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:580px;top:155px;width:80px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:112px;top:167px;width:220px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">139 0000 1234</div>
<div style="position:absolute;left:464px;top:167px;width:120px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">2026-10-27 09:12</div>
<div style="position:absolute;left:668px;top:167px;width:78px;height:20px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">医保</div>
<div style="position:absolute;left:48px;top:170px;width:60px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">联系电话</div>
<div style="position:absolute;left:400px;top:170px;width:60px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">挂号时间</div>
<div style="position:absolute;left:624px;top:170px;width:40px;height:16px;box-sizing:border-box;overflow:hidden;font-size:8.5px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">费别</div>
<div style="position:absolute;left:112px;top:189px;width:220px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:464px;top:189px;width:120px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:668px;top:189px;width:78px;height:1px;box-sizing:border-box;overflow:hidden;background:#CBD5E1"></div>
<div style="position:absolute;left:48px;top:214px;width:698px;height:56px;box-sizing:border-box;overflow:hidden;background:#ECFDF5"></div>
<div style="position:absolute;left:136px;top:226px;width:240px;height:30px;box-sizing:border-box;overflow:hidden;font-size:17px;font-weight:700;color:#047857;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">儿科门诊</div>
<div style="position:absolute;left:498px;top:228px;width:110px;height:26px;box-sizing:border-box;overfl
// …
运行结果
- 若无法打印或连接客户端失败,请参阅 本地Print succeeded,上线后无法打印?(HTTP 业务系统上线后常见)。
- 客户端内置「运行示例」页(
vueApp/.../examples/index.vue)提供更多可编辑 demo,与本页样例互补。 - 工具类样例(连接检测、打印机列表等)仅返回 JSON,不触发打印。