From 01d8c87bc9a9b51e886fe64ab380b02110232df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Thu, 4 Dec 2025 16:22:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E6=96=B0=E5=A2=9E=E9=92=A2?= =?UTF-8?q?=E5=8D=B7=E5=BC=82=E5=B8=B8=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加钢卷异常信息管理模块,包括异常记录、查询和展示功能 - 新增异常信息列表页面和详情页面 - 在钢卷管理页面添加异常数量显示和操作入口 - 实现异常信息的增删改查API接口 - 在领料页面添加异常标记和操作按钮 - 添加相关字典数据用于异常信息分类 --- klp-ui/src/api/wms/coilAbnormal.js | 44 +++ klp-ui/src/views/lines/index.vue | 25 +- klp-ui/src/views/wms/coil/abnormal.vue | 27 ++ klp-ui/src/views/wms/coil/abnormalDetail.vue | 366 +++++++++++++++++++ klp-ui/src/views/wms/coil/do/search.vue | 1 - klp-ui/src/views/wms/coil/panels/base.vue | 14 + klp-ui/src/views/wms/coil/panels/do.vue | 93 ++++- 7 files changed, 558 insertions(+), 12 deletions(-) create mode 100644 klp-ui/src/api/wms/coilAbnormal.js create mode 100644 klp-ui/src/views/wms/coil/abnormal.vue create mode 100644 klp-ui/src/views/wms/coil/abnormalDetail.vue diff --git a/klp-ui/src/api/wms/coilAbnormal.js b/klp-ui/src/api/wms/coilAbnormal.js new file mode 100644 index 00000000..8008468c --- /dev/null +++ b/klp-ui/src/api/wms/coilAbnormal.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询钢卷异常信息列表 +export function listCoilAbnormal(query) { + return request({ + url: '/wms/coilAbnormal/list', + method: 'get', + params: query + }) +} + +// 查询钢卷异常信息详细 +export function getCoilAbnormal(abnormalId) { + return request({ + url: '/wms/coilAbnormal/' + abnormalId, + method: 'get' + }) +} + +// 新增钢卷异常信息 +export function addCoilAbnormal(data) { + return request({ + url: '/wms/coilAbnormal', + method: 'post', + data: data + }) +} + +// 修改钢卷异常信息 +export function updateCoilAbnormal(data) { + return request({ + url: '/wms/coilAbnormal', + method: 'put', + data: data + }) +} + +// 删除钢卷异常信息 +export function delCoilAbnormal(abnormalId) { + return request({ + url: '/wms/coilAbnormal/' + abnormalId, + method: 'delete' + }) +} diff --git a/klp-ui/src/views/lines/index.vue b/klp-ui/src/views/lines/index.vue index 7df42676..fcd16480 100644 --- a/klp-ui/src/views/lines/index.vue +++ b/klp-ui/src/views/lines/index.vue @@ -1,12 +1,12 @@ + @@ -147,6 +148,7 @@ 发货 + 查看异常 修正 删除 追溯 @@ -311,6 +313,10 @@ export default { type: Boolean, default: false, }, + showAbnormal: { + type: Boolean, + default: false, + }, }, data() { return { @@ -509,6 +515,14 @@ export default { this.$message.error('保存图片失败,请稍后重试'); } }, + handleAbnormal (row) { + this.$router.push({ + path: '/quality/detail', + query: { + coilId: row.coilId, + } + }) + }, // 取消按钮 cancel() { this.open = false; diff --git a/klp-ui/src/views/wms/coil/panels/do.vue b/klp-ui/src/views/wms/coil/panels/do.vue index 55bf34e7..e577f731 100644 --- a/klp-ui/src/views/wms/coil/panels/do.vue +++ b/klp-ui/src/views/wms/coil/panels/do.vue @@ -37,7 +37,8 @@

暂无待领物料

-
+
{{ item.currentCoilNo }} @@ -59,7 +60,7 @@ 规格: {{ item.rawMaterial.specification }}
-
+
材质: {{ item.rawMaterial.material }}
@@ -167,6 +168,11 @@
@@ -290,6 +296,40 @@
+ + + + + + {{ + dict.label }} + + + + + + + + {{ + dict.label }} + + + + + {{ + dict.label }} + + + + + + + +
@@ -299,10 +339,11 @@ import { listPendingAction, startProcess, cancelAction, delPendingAction, addPen import { parseTime } from '@/utils/klp' import ProductInfo from '@/components/KLPService/Renderer/ProductInfo' import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo' +import { addCoilAbnormal } from '@/api/wms/coilAbnormal' export default { name: 'DoPage', - dicts: ['action_type'], + dicts: ['action_type', 'coil_abnormal_code', 'coil_abnormal_position', 'coil_abnormal_degree'], props: { label: { type: String, @@ -342,6 +383,16 @@ export default { currentCoilNo: null, actionType: null, // 将在created中设置为酸连轧工序的actionType actionStatus: null + }, + + exceptionDialogVisible: false, + exceptionForm: { + coilId: null, + position: null, + lengthCoord: null, + defectCode: null, + degree: null, + remark: null } } }, @@ -603,6 +654,42 @@ export default { } return '—' }, + handleAddAbnormal(row) { + this.exceptionForm.coilId = row.coilId + this.exceptionDialogVisible = true + }, + confirmException() { + addCoilAbnormal(this.exceptionForm).then(response => { + this.$message.success('异常记录添加成功') + this.cancelException(); + // 重置表单 + this.getMaterialCoil() + }).catch(error => { + console.error('异常记录添加失败:', error) + this.$message.error('异常记录添加失败: ' + (error.message || error)) + }) + + }, + handleAbnormal() { + this.$router.push({ + path: '/quality/detail', + query: { + coilId: this.exceptionForm.coilId, + } + }) + }, + cancelException() { + // 重置表单 + this.exceptionForm = { + coilId: null, + position: null, + lengthCoord: null, + defectCode: null, + degree: null, + remark: null + } + this.exceptionDialogVisible = false + }, } }