feat: 仓库简易打印、工作站标签打印、生产订单打印工序修复

- 仓库管理(mom-frontend-vue2): 新增简易标签打印,不依赖MinIO,使用前端qrcode+window.print
- 工作站(erp-frontend-vue): 新增WorkstationLabelPrint组件,支持批量打印工作站标签
- 生产订单: handlePrint改用getProcessTasksByWorkorder,从工艺路线获取工序数据,解决无pro_task时打印无数据问题

Made-with: Cursor
This commit is contained in:
panchengyong
2026-03-14 12:53:47 +08:00
parent 0961b9e407
commit e73ba25a8f
9 changed files with 507 additions and 10 deletions

View File

@@ -91,7 +91,7 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" width="260px" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@@ -123,6 +123,13 @@
@click="handleHiPrint(scope.row)"
v-hasPermi="['mes:wm:warehouse:print']"
>标签打印</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleSimplePrint(scope.row)"
v-hasPermi="['mes:wm:warehouse:print']"
>简易打印</el-button>
</template>
</el-table-column>
</el-table>
@@ -207,6 +214,12 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 简易标签打印不依赖MinIO -->
<WarehouseLabelPrint
:visible.sync="printDialogVisible"
:warehouses="printWarehouses"
/>
</div>
</template>
@@ -215,13 +228,14 @@ import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehous
import UserSingleSelect from "@/components/userSelect/single.vue"
import {genCode} from "@/api/system/autocode/rule"
import BarcodeImg from "@/components/barcodeImg/index.vue"
import WarehouseLabelPrint from "@/components/print/WarehouseLabelPrint.vue"
import { getBarcodeUrl } from '@/api/mes/wm/barcode';
import {print} from "../../../../utils/print"
import {getByTemplateType} from "@/api/print/template";
import { hiprintMixin } from "../../../../mixins/hiprintMixin";
export default {
name: "Warehouse",
components: { BarcodeImg ,UserSingleSelect} ,
components: { BarcodeImg, UserSingleSelect, WarehouseLabelPrint },
mixins: [hiprintMixin],
data() {
return {
@@ -246,6 +260,9 @@ export default {
title: "",
// 是否显示弹出层
open: false,
// 简易打印弹窗
printDialogVisible: false,
printWarehouses: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -297,6 +314,11 @@ export default {
this.getList();
},
methods: {
// 简易打印不依赖MinIO纯前端二维码+window.print
handleSimplePrint(row) {
this.printWarehouses = [row]
this.printDialogVisible = true
},
// 使用HiPrint打印
async handleHiPrint(row) {
let printData = row