diff --git a/src/api/itextpdf/itextpdf.js b/src/api/itextpdf/itextpdf.js
index c45faa3a..d7e09b78 100644
--- a/src/api/itextpdf/itextpdf.js
+++ b/src/api/itextpdf/itextpdf.js
@@ -71,6 +71,24 @@ export function stockQRCodeTextPDFFromTemplateFile(query) {
responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf
});
}
+
+//---------打印码
+export function inspectionStockQRCodeTextPDFFromTemplateStatementFile(query) {
+ return axios({
+ url: "/udiwms/pdf/template/inspection/stock/qrcode/text/statement/file",
+ method: "post",
+ data: query,
+ });
+}
+export function stockQRCodeTextPDFFromTemplateStatementFile(query) {
+ return axios({
+ url: "/udiwms/pdf/template/stock/qrcode/text/statement/file",
+ method: "post",
+ data: query,
+ headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
+ responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf
+ });
+}
export function stockQRCodeTextPDFFromTemplateFileMax(query) {
return axios({
url: "/udiwms/pdf/template/stock/qrcode/text/maxfile",
diff --git a/src/views/basic/business/stockOrderQRCodeDetail.vue b/src/views/basic/business/stockOrderQRCodeDetail.vue
index 4cd5601a..979b4400 100644
--- a/src/views/basic/business/stockOrderQRCodeDetail.vue
+++ b/src/views/basic/business/stockOrderQRCodeDetail.vue
@@ -76,6 +76,13 @@
>标签打印
+ 报表打印
+
@@ -158,7 +165,11 @@ import {
filterTemp,
inspectionOrderDetailPDFFromTemplateFile,
inspectionStockQRCodeTextPDFFromTemplateFile,
- orderDetailPDFFromTemplateFile, stockQRCodeTextPDFFromTemplateFile, stockQRCodeTextPDFFromTemplateFileMax
+ inspectionStockQRCodeTextPDFFromTemplateStatementFile,
+ orderDetailPDFFromTemplateFile,
+ stockQRCodeTextPDFFromTemplateFile,
+ stockQRCodeTextPDFFromTemplateFileMax,
+ stockQRCodeTextPDFFromTemplateStatementFile
} from "@/api/itextpdf/itextpdf";
import {generateInCodeQRCodeText, generateInnerQRCodeText} from "@/api/inout/innerOrderQRCode";
@@ -392,6 +403,69 @@ export default {
this.loading = false;
});
},
+ printStockOrderDetailStatementPDF(row) {
+ let tQuery = {
+ queryId: null,
+ orderId: null,
+ countList: [],
+ labelId: 5
+ };
+ if (row == null) {
+ tQuery.orderId = this.query.orderIdFk;
+ } else {
+ if (row.reCount <= 0) {
+ return this.$message.error('数量错误');
+ }
+ tQuery.queryId = row.id;
+ }
+ this.loading = true;
+ inspectionStockQRCodeTextPDFFromTemplateStatementFile(tQuery).then((response) => {
+ if (response.code === 20000) {
+ if (row != null) {
+ tQuery.id = row.id;
+ tQuery.rowCount = row.reCount;
+ let data = {
+ queryId: row.id,
+ rowCount: row.count
+ }
+ tQuery.countList.push(data);
+ } else {
+ for (let i = 0; i < this.codeArray.length; i++) {
+ let data = {
+ queryId: this.codeArray[i].id,
+ rowCount: this.codeArray[i].count
+ }
+ tQuery.countList.push(data);
+ }
+ }
+ let count = 0;
+ for (let i = 0; i < tQuery.countList.length; i++) {
+
+ count = count + tQuery.countList[i].rowCount;
+ console.log(count);
+ }
+ stockQRCodeTextPDFFromTemplateStatementFile(tQuery).then((response) => {
+ //将pdf文件转换为url。
+ const binaryData = [];
+ binaryData.push(response);
+ //获取blob链接。
+ let url = window.URL.createObjectURL(
+ new Blob(binaryData, {type: "application/pdf"})
+ );
+ this.loading = false;
+ window.open(url);//打开新标签页,预览pdf。
+ this.getOrderQRCodeTextList();
+ }).catch(() => {
+ this.loading = false;
+ });
+ } else {
+ this.loading = false;
+ this.$message.error(response.message);
+ }
+ }).catch(() => {
+ this.loading = false;
+ });
+ },
getBusType() {
let query = {
enabled: true,
diff --git a/src/views/inventory/inner/innerCodeDetail.vue b/src/views/inventory/inner/innerCodeDetail.vue
index c8e28584..3d92bcf0 100644
--- a/src/views/inventory/inner/innerCodeDetail.vue
+++ b/src/views/inventory/inner/innerCodeDetail.vue
@@ -87,6 +87,13 @@
>标签打印
+ 报表打印
+
@@ -164,8 +171,8 @@
import {stockQRCodeText, filterPrint, generateInnerQRCodeText} from "@/api/inout/innerOrderQRCode";
import draggable from "vuedraggable";
import {
- filterTemp, inspectionStockQRCodeTextPDFFromTemplateFile,
- stockQRCodeTextPDFFromTemplateFile, stockQRCodeTextPDFFromTemplateFileMax
+ filterTemp, inspectionStockQRCodeTextPDFFromTemplateFile, inspectionStockQRCodeTextPDFFromTemplateStatementFile,
+ stockQRCodeTextPDFFromTemplateFile, stockQRCodeTextPDFFromTemplateFileMax, stockQRCodeTextPDFFromTemplateStatementFile
} from "@/api/itextpdf/itextpdf";
@@ -273,7 +280,7 @@ export default {
getOrderQRCodeTextList() {
this.loading = true;
- filterPrint({sOrderId :this.query.sOrderId}) //查找该单号下的所有条码
+ filterPrint({sOrderId: this.query.sOrderId}) //查找该单号下的所有条码
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
@@ -291,7 +298,7 @@ export default {
queryId: null,
orderId: null,
countList: [],
- labelId:1
+ labelId: 1
};
if (row == null) {
tQuery.orderId = this.query.orderIdFk;
@@ -371,6 +378,70 @@ export default {
});
},
+ printStockOrderDetailStatementPDF(row) {
+ let tQuery = {
+ queryId: null,
+ orderId: null,
+ countList: [],
+ labelId: 5
+ };
+ if (row == null) {
+ tQuery.orderId = this.query.orderIdFk;
+ } else {
+ if (row.reCount <= 0) {
+ return this.$message.error('数量错误');
+ }
+ tQuery.queryId = row.id;
+ }
+ this.loading = true;
+ inspectionStockQRCodeTextPDFFromTemplateStatementFile(tQuery).then((response) => {
+ if (response.code === 20000) {
+ if (row != null) {
+ tQuery.id = row.id;
+ tQuery.rowCount = row.reCount;
+ let data = {
+ queryId: row.id,
+ rowCount: row.count
+ }
+ tQuery.countList.push(data);
+ } else {
+ for (let i = 0; i < this.codeArray.length; i++) {
+ let data = {
+ queryId: this.codeArray[i].id,
+ rowCount: this.codeArray[i].count
+ }
+ tQuery.countList.push(data);
+ }
+ }
+ let count = 0;
+ for (let i = 0; i < tQuery.countList.length; i++) {
+
+ count = count + tQuery.countList[i].rowCount;
+ console.log(count);
+ }
+ stockQRCodeTextPDFFromTemplateStatementFile(tQuery).then((response) => {
+ //将pdf文件转换为url。
+ const binaryData = [];
+ binaryData.push(response);
+ //获取blob链接。
+ let url = window.URL.createObjectURL(
+ new Blob(binaryData, {type: "application/pdf"})
+ );
+ this.loading = false;
+ window.open(url);//打开新标签页,预览pdf。
+ this.getOrderQRCodeTextList();
+ }).catch(() => {
+ this.loading = false;
+ });
+ } else {
+ this.loading = false;
+ this.$message.error(response.message);
+ }
+ }).catch(() => {
+ this.loading = false;
+ });
+ },
+
generateQRCodeText() {
this.$confirm("确定生成内部码?", "提示", {
confirmButtonText: "确定",