|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="label-container">
|
|
|
|
|
|
|
+ <div class="label-container" id="printSection">
|
|
|
<div class="ju_ren_one_level">
|
|
<div class="ju_ren_one_level">
|
|
|
<span>{{ productName ? productName : ' ' }}</span>
|
|
<span>{{ productName ? productName : ' ' }}</span>
|
|
|
<span class="ju_ren_one_level_two">{{ '' }}</span>
|
|
<span class="ju_ren_one_level_two">{{ '' }}</span>
|
|
@@ -90,6 +90,8 @@
|
|
|
weightUnit,
|
|
weightUnit,
|
|
|
workOrderId
|
|
workOrderId
|
|
|
} = this.$route.query;
|
|
} = this.$route.query;
|
|
|
|
|
+ console.log('123');
|
|
|
|
|
+
|
|
|
this.productName = productName ? productName : '';
|
|
this.productName = productName ? productName : '';
|
|
|
this.batchNo = batchNo ? batchNo : '';
|
|
this.batchNo = batchNo ? batchNo : '';
|
|
|
this.createDate = createDate ? createDate : '';
|
|
this.createDate = createDate ? createDate : '';
|
|
@@ -129,6 +131,8 @@
|
|
|
this.generateQRCodes();
|
|
this.generateQRCodes();
|
|
|
// window.print();
|
|
// window.print();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ // this.print();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -146,6 +150,24 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // print() {
|
|
|
|
|
+ // const printSection = document.getElementById('printSection');
|
|
|
|
|
+ // // 创建打印任务
|
|
|
|
|
+ // const printWindow = window.open('', '_blank');
|
|
|
|
|
+ // printWindow.document.open();
|
|
|
|
|
+ // printWindow.document.write('<html><head><title>打印预览</title>');
|
|
|
|
|
+ // printWindow.document.write(
|
|
|
|
|
+ // '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
|
|
|
|
|
+ // );
|
|
|
|
|
+ // printWindow.document.write('</head><body>');
|
|
|
|
|
+ // printWindow.document.write(printSection.innerHTML);
|
|
|
|
|
+ // printWindow.document.write('</body></html>');
|
|
|
|
|
+ // printWindow.document.close();
|
|
|
|
|
+ // // printWindow.onload = function () {
|
|
|
|
|
+ // // printWindow.print();
|
|
|
|
|
+ // // };
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|