191 lines
3.3 KiB
YAML
191 lines
3.3 KiB
YAML
# 精致小票模板(铁板烧风格)
|
|
|
|
name: "精致账单"
|
|
id: "fancy-receipt"
|
|
width: 80mm
|
|
description: "带有 Logo 和详细商品信息的精致账单"
|
|
|
|
defaults:
|
|
fontSize: normal
|
|
lineHeight: 1.0
|
|
marginBottom: 0
|
|
|
|
page:
|
|
marginTop: 2
|
|
marginBottom: 3
|
|
|
|
blocks:
|
|
# Logo 图片
|
|
- type: image
|
|
src: "{{logoUrl}}"
|
|
align: center
|
|
maxWidth: 150
|
|
marginBottom: 0
|
|
|
|
# 英文标语
|
|
- type: text
|
|
content: "{{taglineEn}}"
|
|
align: center
|
|
fontSize: small
|
|
marginBottom: 0
|
|
|
|
# 中文店名
|
|
- type: text
|
|
content: "{{shopName}}"
|
|
align: center
|
|
fontSize: large
|
|
bold: true
|
|
marginBottom: 1
|
|
|
|
# 装饰分隔线
|
|
- type: divider
|
|
char: "="
|
|
marginBottom: 1
|
|
|
|
# 菜单标题
|
|
- type: text
|
|
content: "{{menuTitle}}"
|
|
align: center
|
|
fontSize: normal
|
|
bold: true
|
|
marginBottom: 0
|
|
|
|
# 时间
|
|
- type: text
|
|
content: "{{datetime}}"
|
|
align: center
|
|
fontSize: small
|
|
marginBottom: 1
|
|
|
|
# 表头
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "商品名称"
|
|
align: left
|
|
bold: true
|
|
width: 50%
|
|
- content: "数量"
|
|
align: center
|
|
bold: true
|
|
width: 25%
|
|
- content: "金额"
|
|
align: right
|
|
bold: true
|
|
width: 25%
|
|
|
|
# 分隔线
|
|
- type: divider
|
|
char: "="
|
|
marginBottom: 0
|
|
|
|
# 商品表格
|
|
- type: table
|
|
data: "{{items}}"
|
|
columns:
|
|
- align: left
|
|
width: 50%
|
|
- align: center
|
|
width: 25%
|
|
- align: right
|
|
width: 25%
|
|
|
|
# 分隔线
|
|
- type: divider
|
|
char: "="
|
|
marginBottom: 0
|
|
|
|
# 汇总行
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "小计"
|
|
align: left
|
|
width: 50%
|
|
- content: "{{totalQuantity}}"
|
|
align: center
|
|
width: 25%
|
|
- content: "¥{{subtotal}}"
|
|
align: right
|
|
width: 25%
|
|
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "税收({{taxRate}})"
|
|
align: left
|
|
width: 50%
|
|
- content: ""
|
|
align: center
|
|
width: 25%
|
|
- content: "¥{{tax}}"
|
|
align: right
|
|
width: 25%
|
|
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "账单总额"
|
|
align: left
|
|
bold: true
|
|
width: 50%
|
|
- content: ""
|
|
align: center
|
|
width: 25%
|
|
- content: "¥{{total}}"
|
|
align: right
|
|
bold: true
|
|
width: 25%
|
|
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "折扣"
|
|
align: left
|
|
width: 50%
|
|
- content: ""
|
|
align: center
|
|
width: 25%
|
|
- content: "{{discount}}"
|
|
align: right
|
|
width: 25%
|
|
|
|
# 分隔线
|
|
- type: divider
|
|
char: "="
|
|
marginBottom: 1
|
|
|
|
# 签名区
|
|
- type: text
|
|
content: "签名"
|
|
align: left
|
|
marginBottom: 1
|
|
|
|
# 装饰
|
|
- type: text
|
|
content: "{{signature}}"
|
|
align: center
|
|
fontSize: large
|
|
italic: true
|
|
marginBottom: 1
|
|
|
|
# 底部分隔线
|
|
- type: divider
|
|
char: "="
|
|
marginBottom: 0
|
|
|
|
# 版权信息
|
|
- type: row
|
|
marginBottom: 0
|
|
columns:
|
|
- content: "★"
|
|
align: left
|
|
width: 10%
|
|
- content: "{{copyright}}"
|
|
align: center
|
|
fontSize: small
|
|
width: 80%
|
|
- content: "★"
|
|
align: right
|
|
width: 10%
|