234 次浏览【转载需注明来源】
快码FOF代码:
<!文档类型 网页类型>
<网页 语言代码="中文">
<网页头部>
<网页信息 文档编码="UTF8" />
<网页信息 名称="页面视图" 关联数据="视图宽度=填充视图宽度,初始缩放值=1,最大缩放值=1,用户缩放状态=假" />
<网页信息 关联HTTP="兼容模式" 关联数据="最高IE版本" />
<网页标题>Document</网页标题>
</网页头部>
<网页主体>
<按钮 点击回调="执行打印()">点击我执行打印</按钮>
<脚本>
//这里执行相关的JS代码
报表打印类.初始化打印();
定义函数 执行打印() {
报表打印类.预览打印页面({
"预览标题": "测试小票",
"打印地址": "@文件_17069503230038827.js",
"加载模式": 1,
"自定义打印": {
"静默打印": 真,
"打印机名称": "XP-58",
/*
"打印DPI": {
"horizontal": 130,
"vertical": 130
},
*/
//上面的打印DPI,在不设置的情况下小票的整体样式会很小;如果想要大一点则可以接触上面的代码屏蔽,然后根据自己的打印机自己设置
"打印边距": {
"类型": "none" //无边距模式
}
},
"直接打印": 真,
"是否Windows原生打印": 真
});
}
</脚本>
</网页主体>
</网页>
整个项目文件下载:打印展示效果项目源码.zip
上述项目源码打印效果:
如需设计器源码请复制下面的文本,然后加载到报表设计器中
{
"version": "1.0.0",
"formName": "表单示例",
"Author": "快码编程UI设计器",
"formId": "formPreviewForm",
"generateId": 18,
"data": [
{
"id": "textBox_1",
"index": 0,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": 299.15,
"height": 30,
"margin": "0 0 0 0 ",
"padding": "",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 1,
"TextValue": "永辉超市",
"TextSize": "20",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "center",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 107.6875,
"top2": 28,
"上边距": "0"
},
{
"id": "textBox_2",
"index": 1,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 2,
"TextValue": "1003 NO.020240111120503",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 70.1875,
"top2": 186,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_3",
"index": 2,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": "0",
"top": 0,
"zIndex": 3,
"TextValue": "2024/02/03 18:01:41",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "当前时间",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 149.1875,
"top2": 216,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "HorizontalLines_6",
"index": 3,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "0 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "0",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "reportFormsTable_7",
"index": 4,
"tag": "reportFormsTable",
"tagIcon": "layui-icon layui-icon-picture",
"title": "打印表格",
"width": "290.359",
"height": 215,
"margin": "0 0 0 5 ",
"padding": "",
"left": 0,
"top": 0,
"zIndex": 5,
"reportFormsSqlType": "普通数据模式",
"reportFormsDataType": "不跟随数据库变动",
"reportFormsTableType": false,
"reportFormsTableRowsSize": "小尺寸",
"reportFormsTableLine": "nob",
"reportFormsTableHead": "[{\"数据\":[{\"内容\":\"货号/品名\",\"宽度\":100},{\"内容\":\"单价\"},{\"内容\":\"数量\"},{\"内容\":\"小计\"}]}]",
"reportFormsTableHeadToolJson": {
"宽度": 100,
"高度": 100,
"内容": "",
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"元素ID": "",
"允许输入": true,
"合并行": 0,
"合并列": 0,
"垂直对齐-居中": "居中对齐",
"垂直对齐-顶部": "顶部对齐",
"垂直对齐-底部": "底部对齐",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"边框粗细": 1,
"上边框颜色": "#000",
"上边框粗细": 1,
"右边框颜色": "#000",
"右边框粗细": 1,
"下边框颜色": "#000",
"下边框粗细": 1,
"左边框颜色": "#000",
"左边框粗细": 1,
"自定义CSS": ""
},
"reportFormsTableData": "[{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]}]",
"reportFormsTableDataToolJson": {
"宽度": 100,
"高度": 100,
"内容": "",
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"元素ID": "",
"允许输入": true,
"合并行": 0,
"合并列": 0,
"垂直对齐-居中": "居中对齐",
"垂直对齐-顶部": "顶部对齐",
"垂直对齐-底部": "底部对齐",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"边框粗细": 1,
"上边框颜色": "#000",
"上边框粗细": 1,
"右边框颜色": "#000",
"右边框粗细": 1,
"下边框颜色": "#000",
"下边框粗细": 1,
"左边框颜色": "#000",
"左边框粗细": 1,
"自定义CSS": ""
},
"reportFormsSqlCode_NoBut": "",
"reportFormsSqlDataName": "[]",
"reportFormsCode_NoBut": "",
"grid": true,
"left2": 0,
"top2": 154,
"上边距": "0",
"左边距": "5",
"reportFormsColumn": 1,
"reportFormsRow": false,
"reportFormsColumnMargin": 5,
"reportFormsStyle": "{\"边框颜色\": \"#eee\"}",
"reportFormsStyleToolJson": {
"宽度": 100,
"高度": 100,
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"上边框颜色": "#000",
"右边框颜色": "#000",
"下边框颜色": "#000",
"左边框颜色": "#000",
"自定义CSS": "",
"上级组件ID": "",
"上级组件ID间隔": "10",
"上级组件加载时间": "100"
}
},
{
"id": "HorizontalLines_8",
"index": 5,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "0 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "0",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_9",
"index": 6,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "00 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "累计件数:4 原价合计:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_10",
"index": 7,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "00 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "应付金额:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_11",
"index": 8,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "实付金额:10.00元 找零:2.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "HorizontalLines_12",
"index": 9,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "00 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_13",
"index": 10,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "现金:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0",
"左内边距": "10"
},
{
"id": "HorizontalLines_14",
"index": 11,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "00 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_15",
"index": 12,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "收款员:0008 收款机:0005",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_16",
"index": 13,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "NO.000500085870",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_17",
"index": 14,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "电话:086-1234-1234",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_18",
"index": 15,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "地址:xxxxxxxxx-xxxxxx",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
}
],
"optionsArray": [
{
"id": "textBox_1",
"index": 0,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": 299.15,
"height": 30,
"margin": "0 0 0 0 ",
"padding": "",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 1,
"TextValue": "永辉超市",
"TextSize": "20",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "center",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 107.6875,
"top2": 28,
"上边距": "0"
},
{
"id": "textBox_2",
"index": 1,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 2,
"TextValue": "1003 NO.020240111120503",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 70.1875,
"top2": 186,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_3",
"index": 2,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": "0",
"top": 0,
"zIndex": 3,
"TextValue": "2024/02/03 18:01:41",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "当前时间",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 149.1875,
"top2": 216,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "HorizontalLines_6",
"index": 3,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "0 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "0",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "reportFormsTable_7",
"index": 4,
"tag": "reportFormsTable",
"tagIcon": "layui-icon layui-icon-picture",
"title": "打印表格",
"width": "290.359",
"height": 215,
"margin": "0 0 0 5 ",
"padding": "",
"left": 0,
"top": 0,
"zIndex": 5,
"reportFormsSqlType": "普通数据模式",
"reportFormsDataType": "不跟随数据库变动",
"reportFormsTableType": false,
"reportFormsTableRowsSize": "小尺寸",
"reportFormsTableLine": "nob",
"reportFormsTableHead": "[{\"数据\":[{\"内容\":\"货号/品名\",\"宽度\":100},{\"内容\":\"单价\"},{\"内容\":\"数量\"},{\"内容\":\"小计\"}]}]",
"reportFormsTableHeadToolJson": {
"宽度": 100,
"高度": 100,
"内容": "",
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"元素ID": "",
"允许输入": true,
"合并行": 0,
"合并列": 0,
"垂直对齐-居中": "居中对齐",
"垂直对齐-顶部": "顶部对齐",
"垂直对齐-底部": "底部对齐",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"边框粗细": 1,
"上边框颜色": "#000",
"上边框粗细": 1,
"右边框颜色": "#000",
"右边框粗细": 1,
"下边框颜色": "#000",
"下边框粗细": 1,
"左边框颜色": "#000",
"左边框粗细": 1,
"自定义CSS": ""
},
"reportFormsTableData": "[{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]},{\"数据\":[{\"内容\":\"6924985199143/25g 加碘低钠盐\",\"合并列\":4}]},{\"数据\":[{\"内容\":\" \"},{\"内容\":\"2.00\"},{\"内容\":\"1.00\"},{\"内容\":\"2.00\"}]}]",
"reportFormsTableDataToolJson": {
"宽度": 100,
"高度": 100,
"内容": "",
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"元素ID": "",
"允许输入": true,
"合并行": 0,
"合并列": 0,
"垂直对齐-居中": "居中对齐",
"垂直对齐-顶部": "顶部对齐",
"垂直对齐-底部": "底部对齐",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"边框粗细": 1,
"上边框颜色": "#000",
"上边框粗细": 1,
"右边框颜色": "#000",
"右边框粗细": 1,
"下边框颜色": "#000",
"下边框粗细": 1,
"左边框颜色": "#000",
"左边框粗细": 1,
"自定义CSS": ""
},
"reportFormsSqlCode_NoBut": "",
"reportFormsSqlDataName": "[]",
"reportFormsCode_NoBut": "",
"grid": true,
"left2": 0,
"top2": 154,
"上边距": "0",
"左边距": "5",
"reportFormsColumn": 1,
"reportFormsRow": false,
"reportFormsColumnMargin": 5,
"reportFormsStyle": "{\"边框颜色\": \"#eee\"}",
"reportFormsStyleToolJson": {
"宽度": 100,
"高度": 100,
"字体": "微软雅黑",
"字体尺寸": 14,
"背景色": "#FFFFFF",
"文本色": "#000000",
"水平对齐-居中": "居中对齐",
"水平对齐-左侧": "左侧对齐",
"水平对齐-右侧": "右侧对齐",
"字体类型-加粗": "粗体",
"字体类型-正常": "正常",
"边框颜色": "#000",
"上边框颜色": "#000",
"右边框颜色": "#000",
"下边框颜色": "#000",
"左边框颜色": "#000",
"自定义CSS": "",
"上级组件ID": "",
"上级组件ID间隔": "10",
"上级组件加载时间": "100"
}
},
{
"id": "HorizontalLines_8",
"index": 5,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "0 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "0",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_9",
"index": 6,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "00 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "累计件数:4 原价合计:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_10",
"index": 7,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "00 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "应付金额:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_11",
"index": 8,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "实付金额:10.00元 找零:2.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "HorizontalLines_12",
"index": 9,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "00 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_13",
"index": 10,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "现金:8.00元",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0",
"左内边距": "10"
},
{
"id": "HorizontalLines_14",
"index": 11,
"tag": "HorizontalLines",
"tagIcon": "layui-icon layui-icon-picture",
"title": "分割线",
"width": "278.359",
"height": 1,
"margin": "00 0 0 0 ",
"padding": "10",
"transformRotate": "0",
"left": 0,
"top": 0,
"zIndex": 4,
"HorizontalLinesType": "",
"BackgroundValue": "#000",
"grid": true,
"left2": 4.1875,
"top2": 88,
"上边距": "00",
"右边距": "0",
"下边距": "0",
"左边距": "0",
"BorderLineStyle2": "solid"
},
{
"id": "textBox_15",
"index": 12,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "收款员:0008 收款机:0005",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_16",
"index": 13,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "NO.000500085870",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_17",
"index": 14,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "电话:086-1234-1234",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
},
{
"id": "textBox_18",
"index": 15,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": "-0",
"height": "20",
"margin": "0 0 0 0 ",
"padding": "0 0 0 10 ",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 7,
"TextValue": "地址:xxxxxxxxx-xxxxxx",
"TextSize": "12",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "left",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 28.1875,
"top2": 456,
"上边距": "0",
"左内边距": "10",
"上内边距": "0",
"右内边距": "0",
"下内边距": "0"
}
],
"dataSource": {},
"formData": {},
"globalDisable": false,
"viewOrDesign": true,
"formDefaultButton": true,
"formProperty": {},
"selectItems": [],
"model": "80mm",
"page": {
"id": ""
},
"elem": {
"0": {
"sizzle1704969664740": {
"undefined": {
"parentNode": [
50,
26,
false
]
}
},
"sizzle1704969664763": {
"undefined": {
"parentNode": [
10207,
50,
true
]
}
}
},
"length": 1
},
"id": "formdesigner",
"size": [
"80mm",
"100%"
],
"selectItem": {
"id": "textBox_1",
"index": 0,
"tag": "textBox",
"tagIcon": "layui-icon layui-icon-picture",
"title": "文本框",
"width": 299.15,
"height": 30,
"margin": "0 0 0 0 ",
"padding": "",
"transformRotate": "0",
"writingMode": "",
"left": 0,
"top": 0,
"zIndex": 1,
"TextValue": "永辉超市",
"TextSize": "20",
"fontFamily": "微软雅黑",
"textBoxDataType": "普通文本框",
"HorizontalAlignment": "center",
"VerticalAlignment": "center",
"BorderLineStyle": "",
"BorderLineSize": "1",
"BorderLineColor": "#000000",
"BackgroundValue": "",
"ColorValue": "#000",
"grid": true,
"left2": 107.6875,
"top2": 28,
"上边距": "0"
},
"selectItemsAttr": false
}
也可以直接下载文件手动复制代码到布局导入中:超市小票.zip
测试账号
快码FOF编程 Time: 2024-01-13 19:48:33
评论ID
源码来了
快码FOF编程 Time: 2024-02-03 18:30:38
评论ID
小票打印机案例再升级