|
|
|
@ -177,15 +177,15 @@ export default {
|
|
|
|
|
if (this.orderSelection == null || this.orderSelection.length <= 0) {
|
|
|
|
|
return this.$message.error("请选择打印的明细!");
|
|
|
|
|
}
|
|
|
|
|
let query = {id: 6};
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
// let query = {id: 5};
|
|
|
|
|
// verifyTemplateFile(query).then((res) => {
|
|
|
|
|
// if (res.code === 20000) {
|
|
|
|
|
let printParams = {
|
|
|
|
|
deptCode :this.query.deptCode,
|
|
|
|
|
deviceCode: this.query.deviceCode,
|
|
|
|
|
productName: this.query.productName,
|
|
|
|
|
status: this.query.status,
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
templateId: 4,
|
|
|
|
|
list: this.orderSelection
|
|
|
|
|
};
|
|
|
|
|
printDev(printParams).then((response) => {
|
|
|
|
@ -199,16 +199,15 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
window.open(url);//打开新标签页,预览pdf。
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
return this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
// } else {
|
|
|
|
|
// return this.$message.error(res.message);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
// })
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
@ -220,11 +219,11 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
|
|
let query = {id: 6};
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
// let query = {id: 5};
|
|
|
|
|
// verifyTemplateFile(query).then((res) => {
|
|
|
|
|
// if (res.code === 20000) {
|
|
|
|
|
let printParams = {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
templateId: 4,
|
|
|
|
|
deptCode :this.query.deptCode,
|
|
|
|
|
deviceCode: this.query.deviceCode,
|
|
|
|
|
productName: this.query.productName,
|
|
|
|
@ -242,18 +241,18 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
window.open(url);//打开新标签页,预览pdf。
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error(res.message);
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// this.$message.error(error.message);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
// })
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
// });
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|