From eef375cc2adbf765f060cb8756765948541e9acd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E6=98=8A?=
<15984991+wwh2328692301@user.noreply.gitee.com>
Date: Wed, 8 Jul 2026 10:34:10 +0800
Subject: [PATCH 1/3] =?UTF-8?q?feat(wms/move):=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E8=B0=83=E6=8B=A8=E5=8D=95=E8=AE=B0=E5=BF=86=E8=BE=93=E5=85=A5?=
=?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E6=9D=83=E9=99=90=E4=B8=8E=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
1. 新增MemoInput组件的maxSuggestions配置,限制下拉提示条数
2. 为调拨单相关页面替换输入框为带记忆功能的MemoInput
3. 移除冗余的regrade_quality_type字典依赖
4. 给删除按钮增加glc角色权限控制
5. 简化删除操作的Promise链式调用逻辑
6. 新增调拨单号、名称的枚举存储key
---
klp-ui/src/components/MemoInput/index.vue | 8 ++++-
klp-ui/src/utils/enum.js | 2 ++
.../src/views/mes/qc/qualityReview/index.vue | 2 +-
.../src/views/mes/qc/qualityReview/todo.vue | 2 +-
klp-ui/src/views/wms/move/batch.vue | 29 ++++++-------------
5 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/klp-ui/src/components/MemoInput/index.vue b/klp-ui/src/components/MemoInput/index.vue
index 89b24fbe9..790555ac3 100644
--- a/klp-ui/src/components/MemoInput/index.vue
+++ b/klp-ui/src/components/MemoInput/index.vue
@@ -58,6 +58,12 @@ export default {
disabled: {
type: Boolean,
default: false
+ },
+ // 下拉最多展示条数,默认6条
+ maxSuggestions: {
+ type: Number,
+ default: 6,
+ validator: (value) => value > 0
}
},
data() {
@@ -118,7 +124,7 @@ export default {
});
}
- cb(results); // 回调返回匹配结果
+ cb(results.slice(0, this.maxSuggestions)); // 回调返回匹配结果(限制条数)
},
/**
diff --git a/klp-ui/src/utils/enum.js b/klp-ui/src/utils/enum.js
index ea440f4fc..64ffaf902 100644
--- a/klp-ui/src/utils/enum.js
+++ b/klp-ui/src/utils/enum.js
@@ -12,4 +12,6 @@ export const MemoInputStorageKey = {
packagingRequirement: 'packagingRequirement', // 打包要求
coilSpec: 'coilSpec', // 钢卷规格
coatingType: 'coatingType', // 钢卷镀层种类
+ transferNo: 'transferNo', // 调拨单号
+ transferName: 'transferName', // 调拨单名称
}
\ No newline at end of file
diff --git a/klp-ui/src/views/mes/qc/qualityReview/index.vue b/klp-ui/src/views/mes/qc/qualityReview/index.vue
index 3d16e6490..09305fefc 100644
--- a/klp-ui/src/views/mes/qc/qualityReview/index.vue
+++ b/klp-ui/src/views/mes/qc/qualityReview/index.vue
@@ -411,7 +411,7 @@ import { listWarehouse } from '@/api/wms/warehouse'
export default {
name: 'QualityReview',
components: { CoilSelector },
- dicts: ['quality_review_status', 'regrade_quality_type', 'coil_quality_status'],
+ dicts: ['quality_review_status', 'coil_quality_status'],
data() {
return {
// 列表
diff --git a/klp-ui/src/views/mes/qc/qualityReview/todo.vue b/klp-ui/src/views/mes/qc/qualityReview/todo.vue
index fe0b5eb07..98b92aa24 100644
--- a/klp-ui/src/views/mes/qc/qualityReview/todo.vue
+++ b/klp-ui/src/views/mes/qc/qualityReview/todo.vue
@@ -93,7 +93,7 @@ import { listQualityReview, approveQualityReview, rejectQualityReview, getQualit
export default {
name: 'QualityReviewTodo',
- dicts: ['quality_review_status', 'regrade_quality_type', 'coil_quality_status'],
+ dicts: ['quality_review_status', 'coil_quality_status'],
data() {
return {
loading: false,
diff --git a/klp-ui/src/views/wms/move/batch.vue b/klp-ui/src/views/wms/move/batch.vue
index 3d7034c3a..2f90f578b 100644
--- a/klp-ui/src/views/wms/move/batch.vue
+++ b/klp-ui/src/views/wms/move/batch.vue
@@ -2,11 +2,10 @@
-
+
-
+
删除
+ v-hasRole="['glc']" @click="handleDelete">删除
导出
@@ -80,8 +79,8 @@
查看
修改
- 删除
+ 删除
提交
-
+
-
+
{
- this.loading = true;
- return delTransferOrder(orderIds);
- }).then(() => {
- this.loading = false;
+ this.loading = true;
+ delTransferOrder(orderIds).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
- }).catch(() => {
}).finally(() => {
this.loading = false;
});
From d1af1c28a65950670602501923c0e514a0dc6346 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=B1=E6=98=8A=E5=A4=A9?=
<15984976+n2319_0@user.noreply.gitee.com>
Date: Wed, 8 Jul 2026 10:43:27 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=BB=B4=E4=BF=9D?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=97=E6=AE=B5=E5=92=8C=E6=93=8D=E4=BD=9C?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../flow/domain/EqpMaintenancePlanDetail.java | 24 ++
.../domain/bo/EqpMaintenancePlanDetailBo.java | 24 ++
.../domain/vo/EqpMaintenancePlanDetailVo.java | 77 ++--
.../flow/EqpMaintenancePlanDetailMapper.xml | 6 +
klp-ui/src/utils/enum.js | 10 +-
klp-ui/src/views/wms/post/eqp/approval.vue | 27 +-
klp-ui/src/views/wms/post/eqp/execute.vue | 24 +-
klp-ui/src/views/wms/post/eqp/index.vue | 344 ++++++++++++++----
...707_eqp_maintenance_plan_detail_fields.sql | 7 +
9 files changed, 399 insertions(+), 144 deletions(-)
create mode 100644 script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
index 1be5a9ede..94a5f5cbf 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
@@ -55,6 +55,30 @@ public class EqpMaintenancePlanDetail extends BaseEntity {
* 维修内容描述
*/
private String repairContent;
+ /**
+ * 产线执行人员
+ */
+ private String lineExecutor;
+ /**
+ * 设备执行人员
+ */
+ private String equipmentExecutor;
+ /**
+ * 预计完成时间
+ */
+ private String plannedCompleteTime;
+ /**
+ * 实际完成时间
+ */
+ private String actualCompleteTime;
+ /**
+ * 总耗时(h)
+ */
+ private String totalHours;
+ /**
+ * 验收人
+ */
+ private String acceptanceUser;
/**
* 维修负责人
*/
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
index f02ccc350..254c030a9 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
@@ -62,6 +62,30 @@ public class EqpMaintenancePlanDetailBo extends BaseEntity {
* 维修内容描述
*/
private String repairContent;
+ /**
+ * 产线执行人员
+ */
+ private String lineExecutor;
+ /**
+ * 设备执行人员
+ */
+ private String equipmentExecutor;
+ /**
+ * 预计完成时间
+ */
+ private String plannedCompleteTime;
+ /**
+ * 实际完成时间
+ */
+ private String actualCompleteTime;
+ /**
+ * 总耗时(h)
+ */
+ private String totalHours;
+ /**
+ * 验收人
+ */
+ private String acceptanceUser;
/**
* 维修负责人
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
index 61569a24a..1cbd5a1a3 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
@@ -1,8 +1,6 @@
package com.klp.flow.domain.vo;
-import java.math.BigDecimal;
import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.klp.common.annotation.ExcelDictFormat;
@@ -25,7 +23,7 @@ public class EqpMaintenancePlanDetailVo {
/**
* 明细ID
*/
- @ExcelProperty(value = "明细ID")
+ @ExcelProperty(value = "编号")
private Long detailId;
/**
@@ -35,71 +33,66 @@ public class EqpMaintenancePlanDetailVo {
private Long planId;
/**
- * 产线名称
+ * 时间
*/
- @ExcelProperty(value = "产线名称")
- private String productionLine;
-
- /**
- * 设备部件名称
- */
- @ExcelProperty(value = "设备部件名称")
- private String componentName;
-
- /**
- * 单条维修项计划执行日期
- */
- @ExcelProperty(value = "单条维修项计划执行日期")
+ @ExcelProperty(value = "时间")
private Date itemPlanDate;
/**
* 明细类型:0=保养 1=维修
*/
- @ExcelProperty(value = "明细类型:0=保养 1=维修")
+ @ExcelProperty(value = "明细类型", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(readConverterExp = "0=保养,1=维修")
private Long maintenanceCategory;
/**
- * 明细完成状态:0=未开始 1=进行中 2=已完成
+ * 具体工作内容
*/
- @ExcelProperty(value = "明细完成状态:0=未开始 1=进行中 2=已完成")
- private Long detailStatus;
-
- /**
- * 维修内容描述
- */
- @ExcelProperty(value = "维修内容描述")
+ @ExcelProperty(value = "具体工作内容")
private String repairContent;
/**
- * 维修负责人
+ * 产线执行人员
*/
- @ExcelProperty(value = "维修负责人")
- private String repairUser;
+ @ExcelProperty(value = "产线执行人员")
+ private String lineExecutor;
/**
- * 完成时间(打勾时记录)
+ * 设备执行人员
*/
- @ExcelProperty(value = "完成时间", converter = ExcelDictConvert.class)
- @ExcelDictFormat(readConverterExp = "打=勾时记录")
- private Date completeTime;
+ @ExcelProperty(value = "设备执行人员")
+ private String equipmentExecutor;
/**
- * 实际支出金额(元)
+ * 预计完成时间
*/
- @ExcelProperty(value = "实际支出金额(元)")
- private BigDecimal actualCost;
+ @ExcelProperty(value = "预计完成时间")
+ private String plannedCompleteTime;
/**
- * 完成进度百分比(0-100)
+ * 实际完成时间
*/
- @ExcelProperty(value = "完成进度百分比(0-100)")
- private Long progressRate;
+ @ExcelProperty(value = "实际完成时间")
+ private String actualCompleteTime;
/**
- * 目标厂家
+ * 总耗时(h)
*/
- @ExcelProperty(value = "目标厂家")
- private String targetManufacturer;
+ @ExcelProperty(value = "总耗时(h)")
+ private String totalHours;
+
+ /**
+ * 验收人
+ */
+ @ExcelProperty(value = "验收人")
+ private String acceptanceUser;
+
+ /**
+ * 是否完成
+ */
+ @ExcelProperty(value = "是否完成", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(readConverterExp = "0=否,1=否,2=是")
+ private Long detailStatus;
/**
* 备注
diff --git a/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml b/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
index a51a88805..6732e384d 100644
--- a/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
+++ b/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
@@ -13,6 +13,12 @@
+
+
+
+
+
+
diff --git a/klp-ui/src/utils/enum.js b/klp-ui/src/utils/enum.js
index ea440f4fc..fe5fe8652 100644
--- a/klp-ui/src/utils/enum.js
+++ b/klp-ui/src/utils/enum.js
@@ -12,4 +12,12 @@ export const MemoInputStorageKey = {
packagingRequirement: 'packagingRequirement', // 打包要求
coilSpec: 'coilSpec', // 钢卷规格
coatingType: 'coatingType', // 钢卷镀层种类
-}
\ No newline at end of file
+ maintenanceRepairContent: 'maintenanceRepairContent', // 维修明细-具体工作内容
+ maintenanceLineExecutor: 'maintenanceLineExecutor', // 维修明细-产线执行人员
+ maintenanceEquipmentExecutor: 'maintenanceEquipmentExecutor', // 维修明细-设备执行人员
+ maintenancePlannedCompleteTime: 'maintenancePlannedCompleteTime', // 维修明细-预计完成时间
+ maintenanceActualCompleteTime: 'maintenanceActualCompleteTime', // 维修明细-实际完成时间
+ maintenanceTotalHours: 'maintenanceTotalHours', // 维修明细-总耗时
+ maintenanceAcceptanceUser: 'maintenanceAcceptanceUser', // 维修明细-验收人
+ maintenanceRemark: 'maintenanceRemark', // 维修明细-备注
+}
diff --git a/klp-ui/src/views/wms/post/eqp/approval.vue b/klp-ui/src/views/wms/post/eqp/approval.vue
index 5cdfa9ab2..8ec3ac0a6 100644
--- a/klp-ui/src/views/wms/post/eqp/approval.vue
+++ b/klp-ui/src/views/wms/post/eqp/approval.vue
@@ -103,20 +103,23 @@
维修明细 · Maintenance Details
-
-
-
-
- 保养
- 维修
-
+
+ {{ scope.$index + 1 }}
-
-
-
- {{ parseTime(scope.row.itemPlanDate, '{y}-{m}-{d}') }}
+
+ {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') }}
-
+
+
+
+
+
+
+
+
+ {{ scope.row.detailStatus === 2 ? '是' : '否' }}
+
+
暂无维修明细
diff --git a/klp-ui/src/views/wms/post/eqp/execute.vue b/klp-ui/src/views/wms/post/eqp/execute.vue
index ddb6af688..9d7467632 100644
--- a/klp-ui/src/views/wms/post/eqp/execute.vue
+++ b/klp-ui/src/views/wms/post/eqp/execute.vue
@@ -92,16 +92,22 @@
维修明细进度 · Detail Progress
-
-
-
-
- 保养
- 维修
-
+
+ {{ scope.$index + 1 }}
+
+
+ {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') }}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.detailStatus === 2 ? '是' : '否' }}
-
-
diff --git a/klp-ui/src/views/wms/post/eqp/index.vue b/klp-ui/src/views/wms/post/eqp/index.vue
index af62eec42..fe07eb835 100644
--- a/klp-ui/src/views/wms/post/eqp/index.vue
+++ b/klp-ui/src/views/wms/post/eqp/index.vue
@@ -73,7 +73,7 @@
检修记录 · Inspection Records
共 {{ inspectionTotal }} 条
-
@@ -113,25 +113,141 @@
-
-
-
-
+
+
+ {{ scope.$index + 1 }}
+
+
- 保养
- 维修
+
+ {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') || '-' }}
-
-
-
- {{ parseTime(scope.row.itemPlanDate, '{y}-{m}-{d}') }}
-
-
-
+
-
-
+
+ {{ scope.row.repairContent || '-' }}
+
+
+
+
+
+ {{ scope.row.lineExecutor || '-' }}
+
+
+
+
+
+ {{ scope.row.equipmentExecutor || '无' }}
+
+
+
+
+
+ {{ scope.row.plannedCompleteTime || '-' }}
+
+
+
+
+
+ {{ scope.row.actualCompleteTime || '-' }}
+
+
+
+
+
+ {{ scope.row.totalHours || '-' }}
+
+
+
+
+
+ {{ scope.row.acceptanceUser || '-' }}
+
+
+
+
+
+
+
+
+ {{ scope.row.detailStatus === 2 ? '是' : '否' }}
+
+
+
+
+
+ {{ scope.row.remark || '-' }}
+
+
+
+
+
+ 保存
+ 取消
+
+
+ 编辑
+ 删除
+
@@ -196,41 +312,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -273,11 +354,7 @@ export default {
inspectionQueried: false,
selectedInspectionRows: [],
// 维修明细
- detailList: [],
- detailDialogVisible: false,
- detailDialogTitle: "",
- detailForm: {},
- editingDetailId: null
+ detailList: []
};
},
created() {
@@ -324,7 +401,9 @@ export default {
loadDetailList(planId) {
var self = this;
listMaintenancePlanDetail({ planId: planId, pageNum: 1, pageSize: 999 }).then(function(r) {
- self.detailList = r.rows || [];
+ self.detailList = (r.rows || []).map(function(item) {
+ return self.decorateDetailRow(item);
+ });
});
},
// ---- 检修记录查询 ----
@@ -373,9 +452,17 @@ export default {
componentName: rec.partName || '',
productionLine: self.currentRow.productionLine || rec.productionLine || '',
maintenanceCategory: 1,
+ itemPlanDate: rec.inspectTime ? parseTime(rec.inspectTime, '{y}-{m}-{d}') : parseTime(new Date(), '{y}-{m}-{d}'),
repairContent: rec.abnormalDesc || '',
+ lineExecutor: rec.inspector || '',
+ equipmentExecutor: '',
+ plannedCompleteTime: '',
+ actualCompleteTime: '',
+ totalHours: '',
+ acceptanceUser: '',
repairUser: rec.inspector || '',
- detailStatus: 0
+ detailStatus: 0,
+ remark: rec.remark || ''
});
});
Promise.all(promises).then(function() {
@@ -463,45 +550,122 @@ export default {
}).catch(function() { }).finally(function() { self.loading = false; });
},
// ---- 明细管理 ----
- handleAddDetail() {
- this.detailForm = {
- planId: this.currentRow.planId,
+ getDefaultDetailRow() {
+ return {
+ detailId: undefined,
+ planId: this.currentRow ? this.currentRow.planId : undefined,
componentName: '',
- productionLine: this.currentRow.productionLine || '',
+ productionLine: this.currentRow ? (this.currentRow.productionLine || '') : '',
maintenanceCategory: 1,
+ itemPlanDate: parseTime(new Date(), '{y}-{m}-{d}'),
repairContent: '',
+ lineExecutor: '',
+ equipmentExecutor: '',
+ plannedCompleteTime: '',
+ actualCompleteTime: '',
+ totalHours: '',
+ acceptanceUser: '',
repairUser: '',
- itemPlanDate: undefined,
targetManufacturer: '',
- detailStatus: 0
+ detailStatus: 0,
+ remark: ''
};
- this.editingDetailId = null;
- this.detailDialogTitle = "添加维修明细";
- this.detailDialogVisible = true;
+ },
+ decorateDetailRow(row) {
+ const decorated = Object.assign({}, this.getDefaultDetailRow(), row);
+ decorated._editing = false;
+ decorated._isNew = false;
+ decorated._origin = null;
+ decorated._rowKey = row.detailId || `detail-${Date.now()}-${Math.random()}`;
+ return decorated;
+ },
+ getEditingDetailRow() {
+ return this.detailList.find(function(item) { return item._editing; });
+ },
+ beginDetailEdit(row, isNew = false) {
+ if (isNew) {
+ row._isNew = true;
+ }
+ row._origin = JSON.parse(JSON.stringify(row));
+ row._editing = true;
+ },
+ handleAddDetail() {
+ if (!this.currentRow) {
+ this.$modal.msgWarning("请先选择检修单");
+ return;
+ }
+ if (this.getEditingDetailRow()) {
+ this.$modal.msgWarning("请先保存或取消当前正在编辑的维修明细");
+ return;
+ }
+ const row = this.decorateDetailRow(this.getDefaultDetailRow());
+ this.beginDetailEdit(row, true);
+ this.detailList.unshift(row);
},
handleEditDetail(row) {
- this.detailForm = Object.assign({}, row);
- this.editingDetailId = row.detailId;
- this.detailDialogTitle = "编辑维修明细";
- this.detailDialogVisible = true;
+ const editingRow = this.getEditingDetailRow();
+ if (editingRow && editingRow._rowKey !== row._rowKey) {
+ this.$modal.msgWarning("请先保存或取消当前正在编辑的维修明细");
+ return;
+ }
+ if (row._editing) return;
+ this.beginDetailEdit(row);
},
- submitDetailForm() {
- if (!this.detailForm.componentName) {
- this.$modal.msgWarning("请输入设备部件名称");
+ cancelEditDetail(row) {
+ if (row._isNew) {
+ this.detailList = this.detailList.filter(function(item) { return item._rowKey !== row._rowKey; });
+ return;
+ }
+ const restored = Object.assign({}, row._origin || {});
+ Object.keys(row).forEach((key) => {
+ if (key.indexOf('_') === 0) return;
+ this.$set(row, key, restored[key]);
+ });
+ row._editing = false;
+ row._isNew = false;
+ row._origin = null;
+ },
+ buildDetailPayload(row) {
+ return {
+ detailId: row.detailId,
+ planId: this.currentRow.planId,
+ componentName: row.componentName || '',
+ productionLine: row.productionLine || this.currentRow.productionLine || '',
+ maintenanceCategory: row.maintenanceCategory == null ? 1 : row.maintenanceCategory,
+ itemPlanDate: row.itemPlanDate,
+ repairContent: row.repairContent,
+ lineExecutor: row.lineExecutor,
+ equipmentExecutor: row.equipmentExecutor,
+ plannedCompleteTime: row.plannedCompleteTime,
+ actualCompleteTime: row.actualCompleteTime,
+ totalHours: row.totalHours,
+ acceptanceUser: row.acceptanceUser,
+ repairUser: row.lineExecutor || row.repairUser || '',
+ targetManufacturer: row.targetManufacturer || '',
+ detailStatus: row.detailStatus === 2 ? 2 : 0,
+ remark: row.remark
+ };
+ },
+ saveDetailRow(row) {
+ if (!row.repairContent) {
+ this.$modal.msgWarning("请输入具体工作内容");
+ return;
+ }
+ if (!row.itemPlanDate) {
+ this.$modal.msgWarning("请选择时间");
return;
}
var self = this;
+ var payload = this.buildDetailPayload(row);
this.detailButtonLoading = true;
- if (this.editingDetailId) {
- updateMaintenancePlanDetail(this.detailForm).then(function() {
+ if (row.detailId) {
+ updateMaintenancePlanDetail(payload).then(function() {
self.$modal.msgSuccess("修改成功");
- self.detailDialogVisible = false;
self.loadDetailList(self.currentRow.planId);
}).finally(function() { self.detailButtonLoading = false; });
} else {
- addMaintenancePlanDetail(this.detailForm).then(function() {
+ addMaintenancePlanDetail(payload).then(function() {
self.$modal.msgSuccess("添加成功");
- self.detailDialogVisible = false;
self.loadDetailList(self.currentRow.planId);
}).finally(function() { self.detailButtonLoading = false; });
}
@@ -530,6 +694,11 @@ export default {
.search-row { display: flex; align-items: center; gap: 6px; padding: 0 14px 10px; background: #f5f7fa; }
.search-row .el-input { flex: 1; }
.list-body { flex: 1; overflow-y: auto; padding: 0 6px; }
+.list-body { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
+.list-body::-webkit-scrollbar { width: 8px; height: 8px; }
+.list-body::-webkit-scrollbar-track { background: transparent; }
+.list-body::-webkit-scrollbar-thumb { background: rgba(144, 147, 153, 0.35); border-radius: 6px; }
+.list-body::-webkit-scrollbar-thumb:hover { background: rgba(144, 147, 153, 0.55); }
.list-item { display: flex; align-items: center; padding: 10px 12px; margin-bottom: 2px; cursor: pointer; border-radius: 6px; transition: all 0.15s; }
.list-item:hover { background: #ebeef5; }
.list-item.active { background: #d9ecff; }
@@ -546,7 +715,7 @@ export default {
/* ========== 右侧面板 ========== */
.right-panel { height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #faf8f5; }
.empty-tip { display: flex; align-items: center; justify-content: center; height: 100%; color: #909399; font-size: 14px; gap: 8px; }
-.right-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 12px 16px; }
+.right-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 12px 16px; }
/* 基本信息栏 */
.info-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; margin-bottom: 10px; flex-shrink: 0; }
@@ -563,10 +732,25 @@ export default {
.section-count { font-size: 12px; color: #909399; }
.section-actions { display: flex; align-items: center; gap: 6px; }
.inspection-section .el-table { flex: 1; overflow-y: auto; }
+.inspection-section ::v-deep .el-table,
+.detail-section ::v-deep .el-table { display: flex; flex-direction: column; height: 100%; }
+.inspection-section ::v-deep .el-table__body-wrapper,
+.detail-section ::v-deep .el-table__body-wrapper { flex: 1; min-height: 0; }
+.inspection-section .el-table { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
+.detail-section .el-table { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
+.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar,
+.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar { width: 8px; height: 8px; }
+.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track,
+.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track { background: transparent; }
+.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb,
+.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb { background: rgba(144, 147, 153, 0.35); border-radius: 6px; }
+.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover,
+.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(144, 147, 153, 0.55); }
/* 下半部分:维修明细 */
.detail-section { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; }
.detail-section .el-table { flex: 1; overflow-y: auto; }
+.cell-pre-wrap { white-space: pre-wrap; word-break: break-all; line-height: 18px; }
.empty-data { padding: 24px 0; text-align: center; color: #c0c4cc; font-size: 13px; }
diff --git a/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql b/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
new file mode 100644
index 000000000..ae8c0009f
--- /dev/null
+++ b/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
@@ -0,0 +1,7 @@
+ALTER TABLE `eqp_maintenance_plan_detail`
+ ADD COLUMN `line_executor` varchar(255) DEFAULT NULL COMMENT '产线执行人员' AFTER `repair_content`,
+ ADD COLUMN `equipment_executor` varchar(255) DEFAULT NULL COMMENT '设备执行人员' AFTER `line_executor`,
+ ADD COLUMN `planned_complete_time` varchar(255) DEFAULT NULL COMMENT '预计完成时间' AFTER `equipment_executor`,
+ ADD COLUMN `actual_complete_time` varchar(255) DEFAULT NULL COMMENT '实际完成时间' AFTER `planned_complete_time`,
+ ADD COLUMN `total_hours` varchar(100) DEFAULT NULL COMMENT '总耗时(h)' AFTER `actual_complete_time`,
+ ADD COLUMN `acceptance_user` varchar(255) DEFAULT NULL COMMENT '验收人' AFTER `total_hours`;
From 1a3de775c85f5444fca2b11733dead6d56e3be61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9C=B1=E6=98=8A=E5=A4=A9?=
<15984976+n2319_0@user.noreply.gitee.com>
Date: Wed, 8 Jul 2026 10:49:00 +0800
Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"=E8=AE=BE=E5=A4=87=E7=BB=B4?=
=?UTF-8?q?=E4=BF=9D=E8=B0=83=E6=95=B4=E5=AD=97=E6=AE=B5=E5=92=8C=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C=E9=80=BB=E8=BE=91"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit d1af1c28a65950670602501923c0e514a0dc6346.
---
.../flow/domain/EqpMaintenancePlanDetail.java | 24 --
.../domain/bo/EqpMaintenancePlanDetailBo.java | 24 --
.../domain/vo/EqpMaintenancePlanDetailVo.java | 77 ++--
.../flow/EqpMaintenancePlanDetailMapper.xml | 6 -
klp-ui/src/utils/enum.js | 10 +-
klp-ui/src/views/wms/post/eqp/approval.vue | 27 +-
klp-ui/src/views/wms/post/eqp/execute.vue | 24 +-
klp-ui/src/views/wms/post/eqp/index.vue | 352 +++++-------------
...707_eqp_maintenance_plan_detail_fields.sql | 7 -
9 files changed, 148 insertions(+), 403 deletions(-)
delete mode 100644 script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
index 94a5f5cbf..1be5a9ede 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlanDetail.java
@@ -55,30 +55,6 @@ public class EqpMaintenancePlanDetail extends BaseEntity {
* 维修内容描述
*/
private String repairContent;
- /**
- * 产线执行人员
- */
- private String lineExecutor;
- /**
- * 设备执行人员
- */
- private String equipmentExecutor;
- /**
- * 预计完成时间
- */
- private String plannedCompleteTime;
- /**
- * 实际完成时间
- */
- private String actualCompleteTime;
- /**
- * 总耗时(h)
- */
- private String totalHours;
- /**
- * 验收人
- */
- private String acceptanceUser;
/**
* 维修负责人
*/
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
index 254c030a9..f02ccc350 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanDetailBo.java
@@ -62,30 +62,6 @@ public class EqpMaintenancePlanDetailBo extends BaseEntity {
* 维修内容描述
*/
private String repairContent;
- /**
- * 产线执行人员
- */
- private String lineExecutor;
- /**
- * 设备执行人员
- */
- private String equipmentExecutor;
- /**
- * 预计完成时间
- */
- private String plannedCompleteTime;
- /**
- * 实际完成时间
- */
- private String actualCompleteTime;
- /**
- * 总耗时(h)
- */
- private String totalHours;
- /**
- * 验收人
- */
- private String acceptanceUser;
/**
* 维修负责人
diff --git a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
index 1cbd5a1a3..61569a24a 100644
--- a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
+++ b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanDetailVo.java
@@ -1,6 +1,8 @@
package com.klp.flow.domain.vo;
+import java.math.BigDecimal;
import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.klp.common.annotation.ExcelDictFormat;
@@ -23,7 +25,7 @@ public class EqpMaintenancePlanDetailVo {
/**
* 明细ID
*/
- @ExcelProperty(value = "编号")
+ @ExcelProperty(value = "明细ID")
private Long detailId;
/**
@@ -33,66 +35,71 @@ public class EqpMaintenancePlanDetailVo {
private Long planId;
/**
- * 时间
+ * 产线名称
*/
- @ExcelProperty(value = "时间")
+ @ExcelProperty(value = "产线名称")
+ private String productionLine;
+
+ /**
+ * 设备部件名称
+ */
+ @ExcelProperty(value = "设备部件名称")
+ private String componentName;
+
+ /**
+ * 单条维修项计划执行日期
+ */
+ @ExcelProperty(value = "单条维修项计划执行日期")
private Date itemPlanDate;
/**
* 明细类型:0=保养 1=维修
*/
- @ExcelProperty(value = "明细类型", converter = ExcelDictConvert.class)
- @ExcelDictFormat(readConverterExp = "0=保养,1=维修")
+ @ExcelProperty(value = "明细类型:0=保养 1=维修")
private Long maintenanceCategory;
/**
- * 具体工作内容
+ * 明细完成状态:0=未开始 1=进行中 2=已完成
*/
- @ExcelProperty(value = "具体工作内容")
+ @ExcelProperty(value = "明细完成状态:0=未开始 1=进行中 2=已完成")
+ private Long detailStatus;
+
+ /**
+ * 维修内容描述
+ */
+ @ExcelProperty(value = "维修内容描述")
private String repairContent;
/**
- * 产线执行人员
+ * 维修负责人
*/
- @ExcelProperty(value = "产线执行人员")
- private String lineExecutor;
+ @ExcelProperty(value = "维修负责人")
+ private String repairUser;
/**
- * 设备执行人员
+ * 完成时间(打勾时记录)
*/
- @ExcelProperty(value = "设备执行人员")
- private String equipmentExecutor;
+ @ExcelProperty(value = "完成时间", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(readConverterExp = "打=勾时记录")
+ private Date completeTime;
/**
- * 预计完成时间
+ * 实际支出金额(元)
*/
- @ExcelProperty(value = "预计完成时间")
- private String plannedCompleteTime;
+ @ExcelProperty(value = "实际支出金额(元)")
+ private BigDecimal actualCost;
/**
- * 实际完成时间
+ * 完成进度百分比(0-100)
*/
- @ExcelProperty(value = "实际完成时间")
- private String actualCompleteTime;
+ @ExcelProperty(value = "完成进度百分比(0-100)")
+ private Long progressRate;
/**
- * 总耗时(h)
+ * 目标厂家
*/
- @ExcelProperty(value = "总耗时(h)")
- private String totalHours;
-
- /**
- * 验收人
- */
- @ExcelProperty(value = "验收人")
- private String acceptanceUser;
-
- /**
- * 是否完成
- */
- @ExcelProperty(value = "是否完成", converter = ExcelDictConvert.class)
- @ExcelDictFormat(readConverterExp = "0=否,1=否,2=是")
- private Long detailStatus;
+ @ExcelProperty(value = "目标厂家")
+ private String targetManufacturer;
/**
* 备注
diff --git a/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml b/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
index 6732e384d..a51a88805 100644
--- a/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
+++ b/klp-flow/src/main/resources/mapper/flow/EqpMaintenancePlanDetailMapper.xml
@@ -13,12 +13,6 @@
-
-
-
-
-
-
diff --git a/klp-ui/src/utils/enum.js b/klp-ui/src/utils/enum.js
index fe5fe8652..ea440f4fc 100644
--- a/klp-ui/src/utils/enum.js
+++ b/klp-ui/src/utils/enum.js
@@ -12,12 +12,4 @@ export const MemoInputStorageKey = {
packagingRequirement: 'packagingRequirement', // 打包要求
coilSpec: 'coilSpec', // 钢卷规格
coatingType: 'coatingType', // 钢卷镀层种类
- maintenanceRepairContent: 'maintenanceRepairContent', // 维修明细-具体工作内容
- maintenanceLineExecutor: 'maintenanceLineExecutor', // 维修明细-产线执行人员
- maintenanceEquipmentExecutor: 'maintenanceEquipmentExecutor', // 维修明细-设备执行人员
- maintenancePlannedCompleteTime: 'maintenancePlannedCompleteTime', // 维修明细-预计完成时间
- maintenanceActualCompleteTime: 'maintenanceActualCompleteTime', // 维修明细-实际完成时间
- maintenanceTotalHours: 'maintenanceTotalHours', // 维修明细-总耗时
- maintenanceAcceptanceUser: 'maintenanceAcceptanceUser', // 维修明细-验收人
- maintenanceRemark: 'maintenanceRemark', // 维修明细-备注
-}
+}
\ No newline at end of file
diff --git a/klp-ui/src/views/wms/post/eqp/approval.vue b/klp-ui/src/views/wms/post/eqp/approval.vue
index 8ec3ac0a6..5cdfa9ab2 100644
--- a/klp-ui/src/views/wms/post/eqp/approval.vue
+++ b/klp-ui/src/views/wms/post/eqp/approval.vue
@@ -103,23 +103,20 @@
维修明细 · Maintenance Details
-
- {{ scope.$index + 1 }}
+
+
+
+
+ 保养
+ 维修
+
-
- {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') }}
+
+
+
+ {{ parseTime(scope.row.itemPlanDate, '{y}-{m}-{d}') }}
-
-
-
-
-
-
-
-
- {{ scope.row.detailStatus === 2 ? '是' : '否' }}
-
-
+
暂无维修明细
diff --git a/klp-ui/src/views/wms/post/eqp/execute.vue b/klp-ui/src/views/wms/post/eqp/execute.vue
index 9d7467632..ddb6af688 100644
--- a/klp-ui/src/views/wms/post/eqp/execute.vue
+++ b/klp-ui/src/views/wms/post/eqp/execute.vue
@@ -92,22 +92,16 @@
维修明细进度 · Detail Progress
-
- {{ scope.$index + 1 }}
-
-
- {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') }}
-
-
-
-
-
-
-
-
-
- {{ scope.row.detailStatus === 2 ? '是' : '否' }}
+
+
+
+
+ 保养
+ 维修
+
+
+
diff --git a/klp-ui/src/views/wms/post/eqp/index.vue b/klp-ui/src/views/wms/post/eqp/index.vue
index fe07eb835..af62eec42 100644
--- a/klp-ui/src/views/wms/post/eqp/index.vue
+++ b/klp-ui/src/views/wms/post/eqp/index.vue
@@ -73,7 +73,7 @@
检修记录 · Inspection Records
共 {{ inspectionTotal }} 条
-
@@ -113,141 +113,25 @@
-
-
- {{ scope.$index + 1 }}
-
-
+
+
+
+
-
- {{ parseTime(scope.row.itemPlanDate, '{y}/{m}/{d}') || '-' }}
+ 保养
+ 维修
-
-
-
- {{ scope.row.repairContent || '-' }}
-
+
+
+
+ {{ parseTime(scope.row.itemPlanDate, '{y}-{m}-{d}') }}
-
+
+
-
- {{ scope.row.lineExecutor || '-' }}
-
-
-
-
-
- {{ scope.row.equipmentExecutor || '无' }}
-
-
-
-
-
- {{ scope.row.plannedCompleteTime || '-' }}
-
-
-
-
-
- {{ scope.row.actualCompleteTime || '-' }}
-
-
-
-
-
- {{ scope.row.totalHours || '-' }}
-
-
-
-
-
- {{ scope.row.acceptanceUser || '-' }}
-
-
-
-
-
-
-
-
- {{ scope.row.detailStatus === 2 ? '是' : '否' }}
-
-
-
-
-
- {{ scope.row.remark || '-' }}
-
-
-
-
-
- 保存
- 取消
-
-
- 编辑
- 删除
-
+
+
@@ -312,6 +196,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -354,7 +273,11 @@ export default {
inspectionQueried: false,
selectedInspectionRows: [],
// 维修明细
- detailList: []
+ detailList: [],
+ detailDialogVisible: false,
+ detailDialogTitle: "",
+ detailForm: {},
+ editingDetailId: null
};
},
created() {
@@ -401,9 +324,7 @@ export default {
loadDetailList(planId) {
var self = this;
listMaintenancePlanDetail({ planId: planId, pageNum: 1, pageSize: 999 }).then(function(r) {
- self.detailList = (r.rows || []).map(function(item) {
- return self.decorateDetailRow(item);
- });
+ self.detailList = r.rows || [];
});
},
// ---- 检修记录查询 ----
@@ -452,17 +373,9 @@ export default {
componentName: rec.partName || '',
productionLine: self.currentRow.productionLine || rec.productionLine || '',
maintenanceCategory: 1,
- itemPlanDate: rec.inspectTime ? parseTime(rec.inspectTime, '{y}-{m}-{d}') : parseTime(new Date(), '{y}-{m}-{d}'),
repairContent: rec.abnormalDesc || '',
- lineExecutor: rec.inspector || '',
- equipmentExecutor: '',
- plannedCompleteTime: '',
- actualCompleteTime: '',
- totalHours: '',
- acceptanceUser: '',
repairUser: rec.inspector || '',
- detailStatus: 0,
- remark: rec.remark || ''
+ detailStatus: 0
});
});
Promise.all(promises).then(function() {
@@ -550,122 +463,45 @@ export default {
}).catch(function() { }).finally(function() { self.loading = false; });
},
// ---- 明细管理 ----
- getDefaultDetailRow() {
- return {
- detailId: undefined,
- planId: this.currentRow ? this.currentRow.planId : undefined,
- componentName: '',
- productionLine: this.currentRow ? (this.currentRow.productionLine || '') : '',
- maintenanceCategory: 1,
- itemPlanDate: parseTime(new Date(), '{y}-{m}-{d}'),
- repairContent: '',
- lineExecutor: '',
- equipmentExecutor: '',
- plannedCompleteTime: '',
- actualCompleteTime: '',
- totalHours: '',
- acceptanceUser: '',
- repairUser: '',
- targetManufacturer: '',
- detailStatus: 0,
- remark: ''
- };
- },
- decorateDetailRow(row) {
- const decorated = Object.assign({}, this.getDefaultDetailRow(), row);
- decorated._editing = false;
- decorated._isNew = false;
- decorated._origin = null;
- decorated._rowKey = row.detailId || `detail-${Date.now()}-${Math.random()}`;
- return decorated;
- },
- getEditingDetailRow() {
- return this.detailList.find(function(item) { return item._editing; });
- },
- beginDetailEdit(row, isNew = false) {
- if (isNew) {
- row._isNew = true;
- }
- row._origin = JSON.parse(JSON.stringify(row));
- row._editing = true;
- },
handleAddDetail() {
- if (!this.currentRow) {
- this.$modal.msgWarning("请先选择检修单");
- return;
- }
- if (this.getEditingDetailRow()) {
- this.$modal.msgWarning("请先保存或取消当前正在编辑的维修明细");
- return;
- }
- const row = this.decorateDetailRow(this.getDefaultDetailRow());
- this.beginDetailEdit(row, true);
- this.detailList.unshift(row);
+ this.detailForm = {
+ planId: this.currentRow.planId,
+ componentName: '',
+ productionLine: this.currentRow.productionLine || '',
+ maintenanceCategory: 1,
+ repairContent: '',
+ repairUser: '',
+ itemPlanDate: undefined,
+ targetManufacturer: '',
+ detailStatus: 0
+ };
+ this.editingDetailId = null;
+ this.detailDialogTitle = "添加维修明细";
+ this.detailDialogVisible = true;
},
handleEditDetail(row) {
- const editingRow = this.getEditingDetailRow();
- if (editingRow && editingRow._rowKey !== row._rowKey) {
- this.$modal.msgWarning("请先保存或取消当前正在编辑的维修明细");
- return;
- }
- if (row._editing) return;
- this.beginDetailEdit(row);
+ this.detailForm = Object.assign({}, row);
+ this.editingDetailId = row.detailId;
+ this.detailDialogTitle = "编辑维修明细";
+ this.detailDialogVisible = true;
},
- cancelEditDetail(row) {
- if (row._isNew) {
- this.detailList = this.detailList.filter(function(item) { return item._rowKey !== row._rowKey; });
- return;
- }
- const restored = Object.assign({}, row._origin || {});
- Object.keys(row).forEach((key) => {
- if (key.indexOf('_') === 0) return;
- this.$set(row, key, restored[key]);
- });
- row._editing = false;
- row._isNew = false;
- row._origin = null;
- },
- buildDetailPayload(row) {
- return {
- detailId: row.detailId,
- planId: this.currentRow.planId,
- componentName: row.componentName || '',
- productionLine: row.productionLine || this.currentRow.productionLine || '',
- maintenanceCategory: row.maintenanceCategory == null ? 1 : row.maintenanceCategory,
- itemPlanDate: row.itemPlanDate,
- repairContent: row.repairContent,
- lineExecutor: row.lineExecutor,
- equipmentExecutor: row.equipmentExecutor,
- plannedCompleteTime: row.plannedCompleteTime,
- actualCompleteTime: row.actualCompleteTime,
- totalHours: row.totalHours,
- acceptanceUser: row.acceptanceUser,
- repairUser: row.lineExecutor || row.repairUser || '',
- targetManufacturer: row.targetManufacturer || '',
- detailStatus: row.detailStatus === 2 ? 2 : 0,
- remark: row.remark
- };
- },
- saveDetailRow(row) {
- if (!row.repairContent) {
- this.$modal.msgWarning("请输入具体工作内容");
- return;
- }
- if (!row.itemPlanDate) {
- this.$modal.msgWarning("请选择时间");
+ submitDetailForm() {
+ if (!this.detailForm.componentName) {
+ this.$modal.msgWarning("请输入设备部件名称");
return;
}
var self = this;
- var payload = this.buildDetailPayload(row);
this.detailButtonLoading = true;
- if (row.detailId) {
- updateMaintenancePlanDetail(payload).then(function() {
+ if (this.editingDetailId) {
+ updateMaintenancePlanDetail(this.detailForm).then(function() {
self.$modal.msgSuccess("修改成功");
+ self.detailDialogVisible = false;
self.loadDetailList(self.currentRow.planId);
}).finally(function() { self.detailButtonLoading = false; });
} else {
- addMaintenancePlanDetail(payload).then(function() {
+ addMaintenancePlanDetail(this.detailForm).then(function() {
self.$modal.msgSuccess("添加成功");
+ self.detailDialogVisible = false;
self.loadDetailList(self.currentRow.planId);
}).finally(function() { self.detailButtonLoading = false; });
}
@@ -694,11 +530,6 @@ export default {
.search-row { display: flex; align-items: center; gap: 6px; padding: 0 14px 10px; background: #f5f7fa; }
.search-row .el-input { flex: 1; }
.list-body { flex: 1; overflow-y: auto; padding: 0 6px; }
-.list-body { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
-.list-body::-webkit-scrollbar { width: 8px; height: 8px; }
-.list-body::-webkit-scrollbar-track { background: transparent; }
-.list-body::-webkit-scrollbar-thumb { background: rgba(144, 147, 153, 0.35); border-radius: 6px; }
-.list-body::-webkit-scrollbar-thumb:hover { background: rgba(144, 147, 153, 0.55); }
.list-item { display: flex; align-items: center; padding: 10px 12px; margin-bottom: 2px; cursor: pointer; border-radius: 6px; transition: all 0.15s; }
.list-item:hover { background: #ebeef5; }
.list-item.active { background: #d9ecff; }
@@ -715,7 +546,7 @@ export default {
/* ========== 右侧面板 ========== */
.right-panel { height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #faf8f5; }
.empty-tip { display: flex; align-items: center; justify-content: center; height: 100%; color: #909399; font-size: 14px; gap: 8px; }
-.right-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 12px 16px; }
+.right-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 12px 16px; }
/* 基本信息栏 */
.info-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; margin-bottom: 10px; flex-shrink: 0; }
@@ -732,25 +563,10 @@ export default {
.section-count { font-size: 12px; color: #909399; }
.section-actions { display: flex; align-items: center; gap: 6px; }
.inspection-section .el-table { flex: 1; overflow-y: auto; }
-.inspection-section ::v-deep .el-table,
-.detail-section ::v-deep .el-table { display: flex; flex-direction: column; height: 100%; }
-.inspection-section ::v-deep .el-table__body-wrapper,
-.detail-section ::v-deep .el-table__body-wrapper { flex: 1; min-height: 0; }
-.inspection-section .el-table { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
-.detail-section .el-table { scrollbar-width: thin; scrollbar-color: rgba(144, 147, 153, 0.45) transparent; }
-.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar,
-.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar { width: 8px; height: 8px; }
-.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track,
-.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track { background: transparent; }
-.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb,
-.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb { background: rgba(144, 147, 153, 0.35); border-radius: 6px; }
-.inspection-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover,
-.detail-section ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(144, 147, 153, 0.55); }
/* 下半部分:维修明细 */
.detail-section { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; }
.detail-section .el-table { flex: 1; overflow-y: auto; }
-.cell-pre-wrap { white-space: pre-wrap; word-break: break-all; line-height: 18px; }
.empty-data { padding: 24px 0; text-align: center; color: #c0c4cc; font-size: 13px; }
diff --git a/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql b/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
deleted file mode 100644
index ae8c0009f..000000000
--- a/script/sql/mysql/update/update_20260707_eqp_maintenance_plan_detail_fields.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-ALTER TABLE `eqp_maintenance_plan_detail`
- ADD COLUMN `line_executor` varchar(255) DEFAULT NULL COMMENT '产线执行人员' AFTER `repair_content`,
- ADD COLUMN `equipment_executor` varchar(255) DEFAULT NULL COMMENT '设备执行人员' AFTER `line_executor`,
- ADD COLUMN `planned_complete_time` varchar(255) DEFAULT NULL COMMENT '预计完成时间' AFTER `equipment_executor`,
- ADD COLUMN `actual_complete_time` varchar(255) DEFAULT NULL COMMENT '实际完成时间' AFTER `planned_complete_time`,
- ADD COLUMN `total_hours` varchar(100) DEFAULT NULL COMMENT '总耗时(h)' AFTER `actual_complete_time`,
- ADD COLUMN `acceptance_user` varchar(255) DEFAULT NULL COMMENT '验收人' AFTER `total_hours`;