feat: 添加空置库选项和打印标签功能
- 在WarehouseTree组件中添加showEmpty属性以显示空置库选项 - 在DrillDownTable和search组件中传递showEmpty属性 - 在base面板中添加打印标签功能 - 在correct页面添加创建人选择功能 - 在receive报表页面添加收货计划筛选功能
This commit is contained in:
@@ -160,7 +160,7 @@ export default {
|
||||
};
|
||||
|
||||
// 调用API获取数据
|
||||
listMaterialCoil({ ...params, dataType: 1 }).then(res => {
|
||||
listMaterialCoil({ ...params, dataType: 1, status: 0 }).then(res => {
|
||||
this.list = res.rows || [];
|
||||
this.total = res.total || 0;
|
||||
this.loading = false;
|
||||
|
||||
@@ -134,7 +134,10 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePreviewLabel(scope.row)">
|
||||
导出标签
|
||||
预览标签
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-printer" @click="handlePrintLabel(scope.row)">
|
||||
打印标签
|
||||
</el-button>
|
||||
<el-button size="mini" v-if="showStatus" type="text" icon="el-icon-upload"
|
||||
@click="handleExportCoil(scope.row)">
|
||||
@@ -259,6 +262,8 @@
|
||||
<label-render :content="labelRender.data" :labelType="labelType" />
|
||||
</el-dialog>
|
||||
|
||||
<label-render ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelType" />
|
||||
|
||||
<!-- 批量导出标签PDF弹窗 -->
|
||||
<el-dialog title="批量导出标签PDF" :visible.sync="batchPrint.visible" width="520px" append-to-body>
|
||||
<div style="line-height: 22px; font-size: 12px; color: #909399; margin-bottom: 10px;">
|
||||
@@ -519,6 +524,21 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 打印标签
|
||||
handlePrintLabel(row) {
|
||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
||||
|
||||
this.labelRender.data = {
|
||||
...row,
|
||||
itemName: itemName,
|
||||
updateTime: row.updateTime?.split(' ')[0] || '',
|
||||
};
|
||||
this.$refs.labelRender.printLabel();
|
||||
// this.labelRender.visible = true;
|
||||
// this.labelRender.data = row;
|
||||
// this.labelRender.type = '2';
|
||||
},
|
||||
// 处理材料类型变化
|
||||
handleMaterialTypeChange(value) {
|
||||
// 清空物品选择
|
||||
|
||||
Reference in New Issue
Block a user