feat(wms): 新增钢卷去向标签和异常信息查看功能
- 新增钢卷去向标签(WhereTag)及相关配置 - 在base.vue中添加钢卷去向选择功能 - 新增异常信息查看弹窗组件(abnormal.vue) - 新增多个仓库视图页面(mini.vue, scrap.vue等) - 在发货单组件中新增Excel导出功能 - 优化标签打印功能,支持多种标签类型 - 修复报表查询时间参数问题
This commit is contained in:
@@ -146,7 +146,17 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="钢卷去向" align="center" prop="nextWarehouseId" v-if="editNext" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.nextWarehouseId" placeholder="钢卷去向" filterable
|
||||
@change="handleNextWarehouseChange(scope.row)">
|
||||
<el-option v-for="item in dict.type.warehouse_sync" :key="item.value" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@@ -274,10 +284,10 @@
|
||||
|
||||
<!-- 标签预览弹窗 -->
|
||||
<el-dialog title="标签预览" :visible.sync="labelRender.visible" append-to-body>
|
||||
<label-render :content="labelRender.data" :labelType="labelRender.type" />
|
||||
<label-render :forceSpecialTag="forceSpecialTag" :content="labelRender.data" :labelType="labelRender.type" />
|
||||
</el-dialog>
|
||||
|
||||
<label-render ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelRender.type" />
|
||||
<label-render :forceSpecialTag="forceSpecialTag" ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelRender.type" />
|
||||
|
||||
<!-- 批量导出标签PDF弹窗 -->
|
||||
<el-dialog title="批量导出标签PDF" :visible.sync="batchPrint.visible" width="520px" append-to-body>
|
||||
@@ -293,10 +303,14 @@
|
||||
<!-- 渲染容器:屏幕隐藏,仅用于截图生成PDF -->
|
||||
<div ref="batchPdfContainer" class="batch-pdf-root" aria-hidden="true">
|
||||
<div v-for="(item, idx) in batchPrint.list" :key="item.coilId || idx" class="batch-pdf-page">
|
||||
<label-render :content="item" :hideActions="true" />
|
||||
<label-render :content="item" :hideActions="true" :forceSpecialTag="forceSpecialTag" />
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="异常信息" :visible.sync="abnormalOpen" width="90%" append-to-body>
|
||||
<abnormal-list :coil-id="currentCoilId"></abnormal-list>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -335,6 +349,7 @@ import MutiSelect from "@/components/MutiSelect";
|
||||
import html2canvas from 'html2canvas';
|
||||
import { PDFDocument } from 'pdf-lib';
|
||||
import { listUser } from "@/api/system/user";
|
||||
import AbnormalList from "./abnormal.vue";
|
||||
|
||||
export default {
|
||||
name: "MaterialCoil",
|
||||
@@ -354,8 +369,9 @@ export default {
|
||||
MemoInput,
|
||||
MutiSelect,
|
||||
OuterTagPreview,
|
||||
AbnormalList,
|
||||
},
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status'],
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer', 'coil_quality_status', 'warehouse_sync'],
|
||||
props: {
|
||||
qrcode: {
|
||||
type: Boolean,
|
||||
@@ -405,6 +421,14 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
editNext: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
forceSpecialTag: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -568,6 +592,8 @@ export default {
|
||||
],
|
||||
title: '详细信息'
|
||||
},
|
||||
abnormalOpen: false,
|
||||
currentCoilId: '',
|
||||
userList: [],
|
||||
};
|
||||
},
|
||||
@@ -598,6 +624,24 @@ export default {
|
||||
this.userList = res.rows || [];
|
||||
});
|
||||
},
|
||||
handleNextWarehouseChange(row) {
|
||||
if (!this.editNext) {
|
||||
return;
|
||||
}
|
||||
updateMaterialCoilSimple(row).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
message: '更新成功',
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: res.msg || '更新失败',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打印标签
|
||||
handlePrintLabel(row) {
|
||||
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
||||
@@ -701,12 +745,14 @@ export default {
|
||||
}
|
||||
},
|
||||
handleAbnormal(row) {
|
||||
this.$router.push({
|
||||
path: '/quality/detail',
|
||||
query: {
|
||||
coilId: row.coilId,
|
||||
}
|
||||
})
|
||||
// this.$router.push({
|
||||
// path: '/quality/detail',
|
||||
// query: {
|
||||
// coilId: row.coilId,
|
||||
// }
|
||||
// })
|
||||
this.currentCoilId = row.coilId;
|
||||
this.abnormalOpen = true;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
||||
Reference in New Issue
Block a user