var data ={
"appoint_print": false,
"detail_content": 1,
"goods_list": [203, 190, 3003],
"head": "网吧管家小票",
"id": "{6759EFA0-DA54-45b6-B1D5-F69A88B24B54}",
"is_note": true,
"printer_name": "厨房",
"receipt_type": 4,
"tail": "",
"cashier_name": "无",
"opts": {
"att_names": [],
"changes": "5.30",
"amount": "5.30",
"remark": "",
"pay_by": 1,
"type": 210,
"saler_id": 0,
"commodity_list": [{
"count": 1,
"comdt_name": "水溶C100西柚味",
"price": "5.30",
"comdt_id": 3008,
"att_ids": [],
"att_names": []
}],
"display_sn": "XS201811290007",
"pay_txt": "现金",
"datetime": "2018-11-29 10:18",
"saler_name": "无",
"list": [{
"count": 1,
"comdt_name": "水溶C100西柚味",
"price": "5.30",
"comdt_id": 3008,
"att_ids": [],
"att_names": []
}],
"total": 1,
"pnum": 1
}
}
var header = ['head', 'opts.reprint', 'opts.display_sn', 'opts.datetime','cashier_name', 'opts.saler_name']
var params = {
"header": [
{
"fontSize":10, //字体大小 范围[6,30]
"align":"right", //居左:left 居中 center 居右right
"padding":"", //行间距
"text":"", //打印数据
}
],
"content":[
{
"fontSize":10, //字体大小 范围[6,30]
"align":"right", //居左:left 居中 center 居右right
"padding":"", //行间距
"text":"", //打印数据
"percent":"60,20"//多列,传入各列所占比例
}
],
"footer": [
{
"fontSize":10, //字体大小 范围[6,30]
"align":"right", //居左:left 居中 center 居右right
"padding":"", //行间距
"text":"", //打印数据
}
]
}
console