|
|
@@ -145,8 +145,12 @@ export default {
|
|
|
this.$msg('请选择打印数量')
|
|
|
return false
|
|
|
}
|
|
|
+ let price = ''
|
|
|
+ if(item.flower == 0){
|
|
|
+ price = parseFloat(item.price)
|
|
|
+ }
|
|
|
let data = []
|
|
|
- let label = that.createLable(item.name,item.sn,currentNum)
|
|
|
+ let label = that.createLable(item.name,item.sn,currentNum,price)
|
|
|
data.push(label)
|
|
|
//说明地址 https://ext.dcloud.net.cn/plugin?id=462
|
|
|
plug.printer({"TSC":data,isArray:true},result=>{
|
|
|
@@ -162,7 +166,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//大条码
|
|
|
- createLable(itemName,itemId,num){
|
|
|
+ createLable(itemName,itemId,num,price){
|
|
|
//制作条码格式,
|
|
|
var data=[]; //定义一个数组
|
|
|
var line={}; //每添加一个,代表一行字
|
|
|
@@ -185,6 +189,17 @@ export default {
|
|
|
line.yscal=2;
|
|
|
data.push(line); //每添加一个,代表一行字
|
|
|
|
|
|
+ if(!this.$util.isEmpty(price)){
|
|
|
+ line={};
|
|
|
+ line.text= price+'元';
|
|
|
+ line.rotation=0;
|
|
|
+ line.x=390;
|
|
|
+ line.y=180;
|
|
|
+ line.xscal=1;
|
|
|
+ line.yscal=1;
|
|
|
+ data.push(line); //每添加一个,代表一行字
|
|
|
+ }
|
|
|
+
|
|
|
//添加条型码
|
|
|
line={};
|
|
|
line.barcode=itemId;
|