wui-print
Version:
前端打印插件,包含打印设计器、打印表单、打印API
595 lines (594 loc) • 16.5 kB
JavaScript
export default {
printConfig: {
templateTitle: "检验申请单",
templateCode: "",
pageSize: "A5",
servePrintType: "pdf",
printer: "",
silent: true,
style: {
paddingTop: "50px",
paddingBottom: "50px",
paddingLeft: "50px",
paddingRight: "50px",
backgroundColor: "#fff",
fontSize: "14px"
}
},
formConfig: {
props: {
labelWidth: "80px",
labelPosition: "left",
size: "small"
}
},
layoutConfig: [
{
id: "bf0741e9-bd9e-40e1-9f2e-c113c676351e",
type: "text",
title: "文本",
style: {
marginBottom: "10px",
paddingTop: "10px",
paddingBottom: "10px",
paddingLeft: "10px",
paddingRight: "10px",
fontSize: "20px",
fontWeight: 700,
textAlign: "center",
borderBottomStyle: "solid",
borderBottomWidth: "2px",
borderBottomColor: "#919191"
},
props: {
defaultContent: "检验申请单"
}
},
{
id: "d565e0e2-a9c1-4977-abe9-2ac52bc9de08",
type: "grid",
title: "栅格布局",
style: {},
children: [
{
id: "eedfec36-5603-4a88-8b38-0c57f1f9c848",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 19
},
style: {},
children: [
{
id: "97abf551-ec0c-47c1-a99e-e9b13c50c597",
type: "barcode",
title: "条形码",
style: {},
props: {
field: "txm",
format: "CODE128",
lineColor: "#000000",
background: "#ffffff",
width: 1,
height: 30,
displayValue: true,
fontSize: 12,
margin: 0,
textAlign: "",
textPosition: ""
}
}
]
},
{
id: "e89f0d2a-50ca-4061-b190-ffa59e87dfa5",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 5
},
style: {},
children: [
{
id: "e1ac1494-d8f9-4f96-8198-49b3c0b1db56",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "0px",
paddingLeft: "10px",
label_textAlign: "right",
text_paddingLeft: "10px",
text_textAlign: "center"
},
props: {
label: "急诊:",
field: "jz"
}
}
]
},
{
id: "fdd4af96-d962-4b08-a89c-99c4a48a2e37",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "41014c42-06d4-41fb-9c2d-330c9823c1ee",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "挂号序号:",
field: "ghxh"
}
}
]
},
{
id: "68cb9739-3be4-46d0-86f4-1cdf406ede4c",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "e41204ec-c9af-401d-8171-67d72bbcf5f3",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "临床诊断:",
field: "lczd"
}
}
]
},
{
id: "74d31fb6-729a-4679-a926-cd031605c3eb",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 8
},
style: {},
children: [
{
id: "116c71a4-c4b3-49fe-8d1e-b2eedf7a8d30",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "病员姓名:",
field: "byxm"
}
}
]
},
{
id: "3cb868c6-c0af-42d3-91a6-2e05bfe21a75",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 8
},
style: {},
children: [
{
id: "9ed15012-1fb1-4007-bf30-44eadfd3bbcc",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "性别:",
field: "xb"
}
}
]
},
{
id: "bfc6534f-40e9-4603-9fbd-9885c28d936d",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 8
},
style: {},
children: [
{
id: "f10f7363-5950-4906-90e5-31563fb34149",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "年龄:",
field: "nl"
}
}
]
},
{
id: "3e84a6a4-c9ee-4ebe-8cea-e8fc5695cdd5",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 24
},
style: {},
children: [
{
id: "d9f22f70-34c1-4eaa-8666-41991594197a",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "联系电话:",
field: "lxdh"
}
},
{
id: "37c931e6-d424-4293-85ff-10c0324d4cc9",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "身份证号:",
field: "sfzh"
}
},
{
id: "b303efa8-737f-45b3-9341-98176d4f3709",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "家庭住址:",
field: "jtzz"
}
}
]
},
{
id: "bd7dcd65-0f31-437c-a5bd-bb9f8ca1363c",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "19c61914-4da8-44b8-8608-1c7587838585",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "申请单号:",
field: "sqdh"
}
}
]
},
{
id: "c0730a26-8635-45d7-aaa6-0f777e3b9bae",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "2d732e89-71d6-4037-84fd-dc3548349a9d",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "申请科室:",
field: "sqks"
}
}
]
},
{
id: "112539bd-94c2-431b-b6a9-77868e3a7559",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "ce509378-05b0-4801-baf8-71c9feda920b",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "申请医生:",
field: "sqys"
}
}
]
},
{
id: "8f2cf241-6f43-418c-9877-1214b5113837",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "f2affe0e-e714-483c-9d50-090ea24a8b46",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "申请时间:",
field: "sqsj"
}
}
]
},
{
id: "42ffcc43-92ff-4a32-96f7-620e882fdd68",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 24
},
style: {},
children: [
{
id: "0072c187-95ba-4ce0-89af-5699e1b0f0d1",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "主诉:",
field: "zs"
}
},
{
id: "c1413a20-b1cf-439f-b707-cac6b4a357d2",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
text_paddingLeft: "10px",
text_textAlign: "left"
},
props: {
label: "现病史:",
field: "xbs"
}
}
]
}
],
props: {}
},
{
id: "1dcf7918-3eeb-403a-9a31-fdd8f6d1b812",
type: "table",
title: "表格",
style: {
marginBottom: "10px",
borderStyle: "none",
borderTopStyle: "none",
borderTopWidth: "1px",
borderTopColor: "#ADADAD",
borderBottomStyle: "none",
borderLeftStyle: "none",
borderLeftWidth: "1px",
borderLeftColor: "#ADADAD",
borderRightStyle: "none",
fontSize: "14px",
textAlign: "left",
header_paddingTop: "5px",
header_paddingBottom: "5px",
header_paddingLeft: "5px",
header_paddingRight: "5px",
header_borderTopStyle: "solid",
header_borderTopWidth: "2px",
header_borderTopColor: "#666666",
header_borderBottomStyle: "solid",
header_borderBottomWidth: "2px",
header_borderBottomColor: "#666666",
header_borderRightStyle: "none",
header_borderRightWidth: "1px",
header_borderRightColor: "#ADADAD",
header_fontWeight: 700,
header_textAlign: "left",
cell_paddingTop: "5px",
cell_paddingBottom: "5px",
cell_paddingLeft: "5px",
cell_paddingRight: "5px",
cell_borderBottomStyle: "solid",
cell_borderBottomWidth: "2px",
cell_borderBottomColor: "#666666",
cell_borderRightStyle: "none",
cell_borderRightWidth: "1px",
cell_borderRightColor: "#ADADAD",
cell_textAlign: "left"
},
columns: [
{
id: "27a794d0-d46c-4066-9ab9-2d790e5c5b1f",
type: "table-column",
title: "列",
props: {
headerTitle: "项目名称",
field: "xmmc"
},
style: {
width: "150px"
}
},
{
id: "0eefa904-4a13-4ff8-a65a-9dc6468e1f68",
type: "table-column",
title: "列",
props: {
headerTitle: "单价",
field: "dj"
},
style: {
width: "100px"
}
},
{
id: "38d8e9c3-87a2-4502-86c9-fbd0c947bb38",
type: "table-column",
title: "列",
props: {
headerTitle: "数量",
field: "sl"
},
style: {
width: "100px"
}
},
{
id: "03b71c81-ffe9-449f-a473-828ca1cd135e",
type: "table-column",
title: "列",
props: {
headerTitle: "执行科室",
field: "zxks"
},
style: {
width: "100px"
}
}
],
props: {
field: "jyxm"
}
},
{
id: "9aa360c7-c88a-4153-af63-9578c4e70ac3",
type: "grid",
title: "栅格布局",
style: {},
children: [
{
id: "0daea1ff-4156-4457-98a4-0266e3d0131e",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "6322f0ef-90eb-42cd-9100-374a2ebfc4d9",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
label_marginBottom: "10px",
label_fontSize: "16px",
text_paddingLeft: "10px",
text_fontSize: "16px",
text_textAlign: "left"
},
props: {
label: "合计金额:",
field: "hjje"
}
}
]
},
{
id: "37b4a594-b833-44b7-a7d6-551720ea7007",
type: "grid-item",
title: "栅格布局格子",
props: {
span: 12
},
style: {},
children: [
{
id: "6a984b22-532f-4145-8235-34de7b25ca24",
type: "dynamicText",
title: "动态文本",
style: {
marginBottom: "10px",
label_marginBottom: "10px",
label_fontSize: "16px",
text_paddingLeft: "10px",
text_fontSize: "16px",
text_textAlign: "left"
},
props: {
label: "医生签名:",
field: "ysqm"
}
}
]
}
],
props: {}
}
]
};