feat: 采购到货单、库区标签打印、EBOM表格优化
- 采购到货单: 新建 arrivalnotice API,重构 Checkin 页面对齐到货通知功能 - 库区标签打印: 新增 LocationLabelPrint 组件,支持单个/批量打印(4列排版) - EBOM: 表格表头和内容不换行,过长截断显示 Made-with: Cursor
This commit is contained in:
@@ -48,6 +48,17 @@
|
||||
v-hasPermi="['mes:wm:location:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleBatchPrint"
|
||||
v-hasPermi="['mes:wm:location:print']"
|
||||
>批量打印</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
@@ -107,6 +118,13 @@
|
||||
@click="handleHiPrint(scope.row)"
|
||||
v-hasPermi="['mes:wm:location:print']"
|
||||
>标签打印</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="handleSimplePrint(scope.row)"
|
||||
v-hasPermi="['mes:wm:location:print']"
|
||||
>简易打印</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -240,6 +258,12 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 简易标签打印(不依赖MinIO) -->
|
||||
<LocationLabelPrint
|
||||
:visible.sync="printDialogVisible"
|
||||
:locations="printLocations"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -247,6 +271,7 @@
|
||||
import { listLocation, getLocation, delLocation, addLocation, updateLocation, changeFrozenState, setProductMixing, setBatchMixing } from "@/api/mes/wm/location";
|
||||
import {genCode} from "@/api/system/autocode/rule"
|
||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
||||
import LocationLabelPrint from "@/components/print/LocationLabelPrint.vue"
|
||||
import { getBarcodeUrl } from '@/api/mes/wm/barcode';
|
||||
import {print} from "../../../../utils/print"
|
||||
import {getByTemplateType} from "@/api/print/template";
|
||||
@@ -255,7 +280,7 @@ export default {
|
||||
name: "Location",
|
||||
dicts: ['sys_yes_no'],
|
||||
mixins: [hiprintMixin],
|
||||
components: { BarcodeImg } ,
|
||||
components: { BarcodeImg, LocationLabelPrint },
|
||||
data() {
|
||||
return {
|
||||
//自动生成编码
|
||||
@@ -266,6 +291,7 @@ export default {
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
selectedRows: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
@@ -280,6 +306,9 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 简易打印弹窗
|
||||
printDialogVisible: false,
|
||||
printLocations: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@@ -314,6 +343,16 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 简易打印(不依赖MinIO,纯前端二维码+window.print)
|
||||
handleSimplePrint(row) {
|
||||
this.printLocations = [row]
|
||||
this.printDialogVisible = true
|
||||
},
|
||||
// 批量打印
|
||||
handleBatchPrint() {
|
||||
this.printLocations = this.selectedRows || this.locationList.filter(l => this.ids.includes(l.locationId))
|
||||
this.printDialogVisible = true
|
||||
},
|
||||
// 使用HiPrint打印
|
||||
async handleHiPrint(row) {
|
||||
let printData = row
|
||||
@@ -393,6 +432,7 @@ export default {
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.locationId)
|
||||
this.selectedRows = selection
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user