|
@@ -2,30 +2,29 @@
|
|
|
<div class="print">
|
|
|
<!-- <div @click="pringPdf">打印测试</div> -->
|
|
|
<div id="form1">
|
|
|
- <div style="font-size: 24px;font-weight: bold;text-align: center;">#3饿百零售(顾客联)</div>
|
|
|
+ <div style="font-size: 24px;font-weight: bold;text-align: center;">{{title}}</div>
|
|
|
<div style="font-size: 18px;text-align: center;margin:10px 0;">美团测试门店郑州</div>
|
|
|
<div style="font-size: 18px;font-weight: bold;">期望09月15日 18:45送达</div>
|
|
|
- <div>--------------------------------------</div>
|
|
|
- <div style="font-size: 13px;">下单时间:2021-09-15 15:43:37</div>
|
|
|
+ <div>------------------------------------</div>
|
|
|
+ <div style="font-size: 13px;margin-bottom:5px;">下单时间:2021-09-15 15:43:37</div>
|
|
|
<div style="font-size: 13px;">订单编号:211108142923315141</div>
|
|
|
- <div>----------------商品-----------------</div>
|
|
|
- <div style="font-size: 18px;">黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包</div>
|
|
|
- <div style="font-size: 18px;">黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包</div>
|
|
|
- <div style="font-size: 18px;text-align: right;"> x1 0.01</div>
|
|
|
- <div style="margin-top: 5px;">----------------发票----------------</div>
|
|
|
+ <div>----------------商品--------------</div>
|
|
|
+ <div style="font-size: 20px;">黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包黄焖汁辣酱黄焖鸡酱料228g*2瓶黄焖鸡米饭调料家用排骨秘制佐料包</div>
|
|
|
+ <div style="font-size: 20px;text-align: right;"> x1 0.01</div>
|
|
|
+ <div style="margin-top: 5px;">----------------发票--------------</div>
|
|
|
<div style="font-size: 13px;">抬头: 苏州盈点点信息科技有限公司</div>
|
|
|
<div style="font-size: 13px;">税号: 921232543123154132313</div>
|
|
|
- <div>--------------------------------------</div>
|
|
|
- <div style="font-size: 13px;color:#999;"><span>配送费:</span><span>6.2元</span></div>
|
|
|
- <div>--------------------------------------</div>
|
|
|
- <!-- <div>************************************</div> -->
|
|
|
- <div style="font-size: 13px;"><span>原价:</span><span>16.2元</span></div>
|
|
|
- <div style="font-size: 18px;font-weight:bold;"><span>实付:</span><span>22.4元</span></div>
|
|
|
- <div>--------------------------------------</div>
|
|
|
+ <div>------------------------------------</div>
|
|
|
+ <div style="font-size: 13px;display:flex;justify-content: space-between;"><span>配送费:</span><span>6.2元</span></div>
|
|
|
+ <div>------------------------------------</div>
|
|
|
+ <div style="font-size: 13px;display:flex;justify-content: space-between;"><span>原价:</span><span>16.2元</span></div>
|
|
|
+ <div>------------------------------------</div>
|
|
|
+ <div style="font-size: 18px;font-weight:bold;display:flex;justify-content: space-between;"><span>实付:</span><span>22.4元</span></div>
|
|
|
+ <div>------------------------------------</div>
|
|
|
<div style="font-size: 18px;font-weight: bold;">地址: 上地街道彩虹集团公司1号楼11111上地街道彩虹集团公司1号楼11111</div>
|
|
|
<div style="font-size: 13px;">周**</div>
|
|
|
<div style="font-size: 14px;">18502378946,976</div>
|
|
|
- <div>----------------#3完-----------------</div>
|
|
|
+ <div>----------------#3完--------------</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -36,7 +35,9 @@ export default {
|
|
|
name: "UsbAutoPrint",
|
|
|
props: { content: Number },
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ title: "#3饿百零售(顾客联)",
|
|
|
+ };
|
|
|
},
|
|
|
// 监听属性 类似于data概念
|
|
|
computed: {},
|
|
@@ -76,18 +77,20 @@ export default {
|
|
|
//选择操作系统中设为“默认”的打印机,“-1”代表默认打印机
|
|
|
LODOP.SET_PRINTER_INDEX(-1);
|
|
|
//设置打印份数是1份
|
|
|
- LODOP.SET_PRINT_COPIES(1);
|
|
|
+ LODOP.SET_PRINT_COPIES(2);
|
|
|
// 参数含义 http://www.c-lodop.com/demolist/PrintSample5.html
|
|
|
- LODOP.SET_PRINT_PAGESIZE(1, 570, 3000,'');
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(3, 570, 100, "");
|
|
|
LODOP.ADD_PRINT_HTM(
|
|
|
- 20,
|
|
|
+ 40,
|
|
|
0,
|
|
|
- '56mm',
|
|
|
+ "53mm",
|
|
|
"100%",
|
|
|
document.getElementById("form1").innerHTML
|
|
|
);
|
|
|
- // LODOP.PRINT();
|
|
|
- LODOP.PRINT_DESIGN();
|
|
|
+ LODOP.SET_PRINT_STYLE('FontStretch',"ultra-expanded")
|
|
|
+ LODOP.ADD_PRINT_TEXT(50,10,550,40,'这是一个测试文字')//增加纯文本项
|
|
|
+ LODOP.PRINT();
|
|
|
+ // LODOP.PRINT_DESIGN();
|
|
|
// LODOP.PREVIEW();
|
|
|
},
|
|
|
},
|