|
|
|
@ -85,7 +85,7 @@
|
|
|
|
|
<el-table-column label="货位" prop="invSpaceName" width="220"></el-table-column>
|
|
|
|
|
<el-table-column label="盘点类型" prop="countType" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ countTypeMap[scope.row.countType]}}</span>
|
|
|
|
|
<span>{{ countTypeMap[scope.row.countType] }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
|
|
|
|
@ -99,6 +99,13 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="180" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="printOrder(scope.row)"
|
|
|
|
|
>打印
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -154,7 +161,13 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import store from "../../store";
|
|
|
|
|
import {getCountOrderList, deleteCountOrder, submitAudit} from "@/api/inventory/invCountOrder";
|
|
|
|
|
import {
|
|
|
|
|
getCountOrderList,
|
|
|
|
|
deleteCountOrder,
|
|
|
|
|
submitAudit,
|
|
|
|
|
verifyTemplateFile,
|
|
|
|
|
printOrder
|
|
|
|
|
} from "@/api/inventory/invCountOrder";
|
|
|
|
|
import {filterUplLocInv} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {userInfo} from "@/api/auth/login";
|
|
|
|
@ -350,6 +363,35 @@ export default {
|
|
|
|
|
this.formName = "编辑部分盘点单";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
printOrder(row) {
|
|
|
|
|
let query = {moduleId: 6};
|
|
|
|
|
this.loading = true;
|
|
|
|
|
verifyTemplateFile(query).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
let printParams = {
|
|
|
|
|
templateId: res.data,
|
|
|
|
|
orderId: row.orderId
|
|
|
|
|
};
|
|
|
|
|
printOrder(printParams).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。
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
addCountOrder
|
|
|
|
|