在线样例
左侧浏览样例目录,右侧查看版式预览与示例代码;点击运行即可通过 web-print-pdf 驱动本地客户端完成静默打印或 PDF 预览。使用前请先 安装并启动客户端。
客户端
若打印或预览效果与预期不符,请务必先从官网下载并安装最新版 Web打印专家客户端后再试(旧版本可能导致版式偏差)。
版式说明
版式预览与打印输出完全遵循 HTML/CSS 标准样式,没有隐藏的渲染技巧:样式写成什么样,页面就长成什么样。
34 - 商务报价单
商务报价单打印样例。
版式预览
示例代码
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:494px;top:46px;width:252px;height:36px;box-sizing:border-box;overflow:hidden;font-size:26px;font-weight:700;color:#0F172A;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">报价单</div>
<div style="position:absolute;left:48px;top:52px;width:400px;height:28px;box-sizing:border-box;overflow:hidden;font-size:18px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">杭州云印科技有限公司</div>
<div style="position:absolute;left:48px;top:84px;width:440px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">杭州市余杭区文一西路 969 号 · 0571-8888 6666 · www.printdot.cc</div>
<div style="position:absolute;left:494px;top:88px;width:252px;height:16px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#94A3B8;text-align:right;display:flex;align-items:center;justify-content:flex-end;white-space:pre-wrap">QUOTATION</div>
<div style="position:absolute;left:48px;top:122px;width:698px;height:2px;box-sizing:border-box;overflow:hidden;background:#334155"></div>
<div style="position:absolute;left:48px;top:142px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">客户名称</div>
<div style="position:absolute;left:112px;top:142px;width:280px;height:18px;box-sizing:border-box;overflow:hidden;font-size:10px;font-weight:700;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">杭州示例商贸有限公司</div>
<div style="position:absolute;left:430px;top:142px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">报价日期</div>
<div style="position:absolute;left:494px;top:142px;width:252px;height:18px;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-26</div>
<div style="position:absolute;left:48px;top:166px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">联系人</div>
<div style="position:absolute;left:112px;top:166px;width:280px;height:18px;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:430px;top:166px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">有效期至</div>
<div style="position:absolute;left:494px;top:166px;width:252px;height:18px;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-11-25</div>
<div style="position:absolute;left:48px;top:190px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">联系电话</div>
<div style="position:absolute;left:112px;top:190px;width:280px;height:18px;box-sizing:border-box;overflow:hidden;font-size:10px;color:#0F172A;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">137 0013 7000</div>
<div style="position:absolute;left:430px;top:190px;width:60px;height:18px;box-sizing:border-box;overflow:hidden;font-size:9px;color:#64748B;display:flex;align-items:center;justify-content:flex-start;white-space:pre-wrap">报价人</div>
<div style="position:absolute;left:494px;top:190px;width:252px;height:18px;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:232px;width:698px;height:514px;box-sizing:border-box;overflow:hidden;overflow:hidden"><table style="width:100%;max-width:100%;border-collapse:collapse;table-layout:fixed;box-sizing:border-box"><thead><tr><th style="width:7.1633%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:center">序号</th><th style="width:28.6533%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:left">品名</th><th style="width:14.3266%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:left">规格</th><th style="width:7.1633%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:center">单位</th><th style="width:8.5960%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">数量</th><th style="width:12.8940%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;font-weight:600;text-align:right">单价</th><th style="width:21.2034%;box-sizing:border-box;border:1px solid #CBD5E1;padding:0 6px;height:34px;background:#F1F5F9;color:#0F172A;font-size:10px;
// …
运行结果
- 若无法打印或连接客户端失败,请参阅 本地Print succeeded,上线后无法打印?(HTTP 业务系统上线后常见)。
- 客户端内置「运行示例」页(
vueApp/.../examples/index.vue)提供更多可编辑 demo,与本页样例互补。 - 工具类样例(连接检测、打印机列表等)仅返回 JSON,不触发打印。