|
|
|
@ -1,6 +1,15 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-dialog title="" :visible.sync="printDialogVisible" width="990px">
|
|
|
|
|
<div>
|
|
|
|
|
<el-form inline>
|
|
|
|
|
<el-form-item label="补打版次" prop="factory">
|
|
|
|
|
<el-input v-model="idCardsNum" placeholder="请输入补打版次" style="width:100px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-check" circle @click="showPrint()"/>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div id="printFrom" class="my-print-box">
|
|
|
|
|
<div v-for="(item, index) in printData.idCardList" :key="index">
|
|
|
|
|
<el-form class="print-card">
|
|
|
|
@ -51,7 +60,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
idCardsNum: 1,
|
|
|
|
|
idCardsNum: null,
|
|
|
|
|
optType: undefined,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
@ -116,7 +125,13 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 打印预览-点击打印预览按钮
|
|
|
|
|
async showPrint() {
|
|
|
|
|
let response = await getIdCardList(this.workorderCode);
|
|
|
|
|
console.log('执行了打印预览');
|
|
|
|
|
let params = {
|
|
|
|
|
};
|
|
|
|
|
if(this.idCardsNum!=null){
|
|
|
|
|
params.palletNo=this.idCardsNum;
|
|
|
|
|
}
|
|
|
|
|
let response = await getIdCardList({workorderCode:this.workorderCode,...params});
|
|
|
|
|
this.printData.idCardList = response;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.printData.idCardList.forEach((item, index) => {
|
|
|
|
|