标识卡打印2

yangwl
zhaoxiaolin 4 months ago
parent 957d7968e7
commit 7fe067ed37

@ -1987,10 +1987,17 @@ export default {
/**打印标识卡弹出框**/
printIdCard() {
this.$refs.printID.init("20021221552");
this.$refs.printID.showPrint();
this.$refs.printID.printDialogVisible = true;
//var statusesArray = this.statuses;
//for (var i = 0; i < statusesArray.length; i++) {
// if (statusesArray[i] != 'w0') {//
// this.$modal.msgError("");
// return
// }
//}
this.$refs.printID.init(this.selectWork.workorderCode);
this.$refs.printID.printDialogVisible = true;
},
//
printIdFunc(obj) {

@ -16,11 +16,11 @@
<el-row class="my-print-foot">
<el-col :offset="1" :span="10">
<div>产品名称: {{ printData.factory }}</div><br />
<div>批次号: {{ printData.factory }}</div><br />
<div>生产日期: {{ printData.factory }}</div><br />
<div>板次: {{ printData.factory }}</div><br />
<div>数量: {{ printData.factory }}</div>
<div>产品名称: {{ item.productName }}</div><br />
<div>批次号: {{ item.batchCode }}</div><br />
<div>生产日期: {{ item.productDateStr }}</div><br />
<div>板次: {{ item.PalletNo }}</div><br />
<div>数量: {{ item.batchQuantity }}</div>
</el-col>
<el-col :offset="1" :span="10">
<canvas :id="'qrcode-' + index" class="qrcode"></canvas>
@ -89,12 +89,13 @@ export default {
created() {
},
mounted() {
//this.showPrint();
},
methods: {
init(workorderCode){
this.workorderCode = workorderCode;
this.showPrint();
},
// -
@ -115,13 +116,12 @@ export default {
},
// -
async showPrint() {
console.log('执行了打印预览');
let response = await getIdCardList(this.workorderCode,this.idCardNum);
this.printData.idCardList = response.idCards;
let response = await getIdCardList(this.workorderCode);
this.printData.idCardList = response;
this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => {
const canvas = document.getElementById('qrcode-' + index);
QRCode.toCanvas(canvas, item, { width: 350,margin:1 }, function (error) {
QRCode.toCanvas(canvas, item.palletCode, { width: 350,margin:1 }, function (error) {
if (error) console.error(error);
console.log('success!');
});

@ -384,6 +384,11 @@
style="width: 320px"
/>
</el-form-item>
<el-form-item label="标准模板" prop="mvgr5">
<el-input v-model="form.mvgr5" placeholder="请输入建议标准模板" />
</el-form-item>
<el-form-item label="是否启用" prop="activeFlag">
<el-select
v-model="form.activeFlag"
@ -448,22 +453,15 @@
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!--
<el-form-item label="标准效率" prop="iei">
<el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-input-number
v-model="form.iei"
v-model="form.warehouseCycle"
style="width: 320px"
/>
</el-form-item>
<el-form-item label="标准用人" prop="manStandar">
<el-form-item label="每托盘最大箱数" prop="palletNum">
<el-input-number
v-model="form.manStandar"
style="width: 320px"
/>
</el-form-item>-->
<el-form-item label="仓库检验周期" prop="warehouseCycle">
<el-input-number
v-model="form.warehouseCycle"
v-model="form.palletNum"
style="width: 320px"
/>
</el-form-item>

Loading…
Cancel
Save