feat(钢卷管理): 添加钢卷追溯功能并调整次品标签顺序

在correct.vue中添加钢卷追溯功能,包括追溯对话框和API调用
调整scrap.vue中次品标签的位置,使其显示在第一个标签页
在correct.vue中新增逻辑库区查询条件
This commit is contained in:
砂糖
2026-03-13 17:43:24 +08:00
parent 8f1e8c9381
commit 80640b5b39
2 changed files with 43 additions and 8 deletions

View File

@@ -33,6 +33,10 @@
<el-input v-model="materialQueryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
@keyup.enter.native="handleMaterialQuery" style="width: 150px;" />
</el-form-item>
<el-form-item label="逻辑库区" prop="warehouseId">
<warehouse-select v-model="materialQueryParams.warehouseId" placeholder="请选择逻辑库区" clearable
@keyup.enter.native="handleMaterialQuery" style="width: 150px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetMaterialQuery">重置</el-button>
@@ -180,11 +184,13 @@
</div>
</div>
</div>
</div>
</div>
<i slot="reference" class="el-icon-setting param-icon"></i>
</el-popover>
<i class="el-icon-view param-icon" @click="handlePreviewLabel(item)" title="查看标签"></i>
<i class="el-icon-time param-icon" @click="handleTrace(item)" title="追溯"></i>
</div>
</div>
@@ -387,11 +393,16 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 钢卷追溯对话框使用封装的组件 -->
<el-dialog title="钢卷追溯" :visible.sync="traceOpen" width="90%" append-to-body>
<coil-trace-result v-loading="traceLoading" :trace-result="traceResult"></coil-trace-result>
</el-dialog>
</div>
</template>
<script>
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil, restoreMaterialCoil, addMaterialCoil } from '@/api/wms/coil'
import { listMaterialCoil, getMaterialCoilTrace, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil, restoreMaterialCoil, addMaterialCoil } from '@/api/wms/coil'
import { listUser } from '@/api/system/user'
import { listPendingAction, startProcess, cancelAction, delPendingAction } from '@/api/wms/pendingAction'
import { parseTime } from '@/utils/klp'
@@ -403,6 +414,7 @@ import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
import CoilTraceResult from "../panels/CoilTraceResult.vue";
export default {
name: 'DoPage',
@@ -425,9 +437,14 @@ export default {
ActualWarehouseSelect,
ProductSelect,
RawMaterialSelect,
CoilTraceResult,
},
data() {
return {
traceOpen: false,
traceLoading: false,
traceResult: null,
coilType: 'all',
title: '钢卷信息修正',
// 物料列表相关
@@ -441,7 +458,8 @@ export default {
// dataType: 1,
// status: 0,
enterCoilNo: null,
currentCoilNo: null
currentCoilNo: null,
warehouseId: null,
},
labelRender: {
visible: false,
@@ -629,6 +647,23 @@ export default {
this.reset();
this.correctVisible = true;
this.title = "添加钢卷物料";
},
/** 追溯按钮操作 */
handleTrace(row) {
this.traceOpen = true;
this.traceLoading = true;
this.traceResult = null; // 清空历史数据
getMaterialCoilTrace({
coilId: row.coilId,
currentCoilNo: row.currentCoilNo,
}).then(res => {
this.traceResult = res.data; // 将结果传递给组件
}).catch(err => {
console.error('溯源查询失败:', err);
this.$message.error('溯源查询失败,请重试');
}).finally(() => {
this.traceLoading = false;
});
},
// 表单重置
reset() {

View File

@@ -1,5 +1,9 @@
<template>
<el-tabs class="app-container" v-model="activeTab">
<el-tab-pane label="次品" name="third">
<BasePage :qrcode="qrcode" :querys="query3" :labelType="labelType" :hideWarehouseQuery="hideWarehouseQuery"
:hideType="hideType" />
</el-tab-pane>
<el-tab-pane label="待收卷" name="second">
<BasePage :qrcode="qrcode" :querys="querys2" :labelType="labelType" :hideWarehouseQuery="hideWarehouseQuery"
:hideType="hideType" />
@@ -8,10 +12,6 @@
<BasePage :qrcode="qrcode" :querys="querys" :labelType="labelType" :hideWarehouseQuery="hideWarehouseQuery"
:hideType="hideType" />
</el-tab-pane>
<el-tab-pane label="次品" name="third">
<BasePage :qrcode="qrcode" :querys="query3" :labelType="labelType" :hideWarehouseQuery="hideWarehouseQuery"
:hideType="hideType" />
</el-tab-pane>
</el-tabs>
</template>
@@ -25,7 +25,7 @@ export default {
data() {
return {
qrcode: false,
activeTab: 'second',
activeTab: 'third',
querys: {
dataType: 1,
status: 0,