diff --git a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlan.java b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlan.java index f42ee092a..4701e832b 100644 --- a/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlan.java +++ b/klp-flow/src/main/java/com/klp/flow/domain/EqpMaintenancePlan.java @@ -51,6 +51,10 @@ public class EqpMaintenancePlan extends BaseEntity { * 审批状态:0=草稿 1=待审批 2=已审批 3=已驳回 */ private Long approvalStatus; + /** + * 产线 + */ + private String productionLine; /** * 计划开始时间 */ diff --git a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanBo.java b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanBo.java index 426112fc6..ace7918f6 100644 --- a/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanBo.java +++ b/klp-flow/src/main/java/com/klp/flow/domain/bo/EqpMaintenancePlanBo.java @@ -36,6 +36,11 @@ public class EqpMaintenancePlanBo extends BaseEntity { */ private String planName; + /** + * 产线 + */ + private String productionLine; + /** * 维修类型:1=定期保养 2=安全整改 3=专项检修 4=故障维修 */ 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 e30dc53b0..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 @@ -8,6 +8,7 @@ import javax.validation.constraints.*; import java.math.BigDecimal; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; /** * 维修计划明细业务对象 eqp_maintenance_plan_detail @@ -43,6 +44,8 @@ public class EqpMaintenancePlanDetailBo extends BaseEntity { /** * 单条维修项计划执行日期 */ + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") private Date itemPlanDate; /** diff --git a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanVo.java b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanVo.java index b4f0effbb..7a6c58b90 100644 --- a/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanVo.java +++ b/klp-flow/src/main/java/com/klp/flow/domain/vo/EqpMaintenancePlanVo.java @@ -40,6 +40,12 @@ public class EqpMaintenancePlanVo { @ExcelProperty(value = "计划名称") private String planName; + /** + * 产线 + */ + @ExcelProperty(value = "产线") + private String productionLine; + /** * 维修类型:1=定期保养 2=安全整改 3=专项检修 4=故障维修 */ diff --git a/klp-flow/src/main/java/com/klp/flow/service/impl/EqpMaintenancePlanServiceImpl.java b/klp-flow/src/main/java/com/klp/flow/service/impl/EqpMaintenancePlanServiceImpl.java index e9a24578c..8137b7963 100644 --- a/klp-flow/src/main/java/com/klp/flow/service/impl/EqpMaintenancePlanServiceImpl.java +++ b/klp-flow/src/main/java/com/klp/flow/service/impl/EqpMaintenancePlanServiceImpl.java @@ -63,6 +63,7 @@ public class EqpMaintenancePlanServiceImpl implements IEqpMaintenancePlanService LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.eq(StringUtils.isNotBlank(bo.getPlanNo()), EqpMaintenancePlan::getPlanNo, bo.getPlanNo()); lqw.like(StringUtils.isNotBlank(bo.getPlanName()), EqpMaintenancePlan::getPlanName, bo.getPlanName()); + lqw.eq(StringUtils.isNotBlank(bo.getProductionLine()), EqpMaintenancePlan::getProductionLine, bo.getProductionLine()); lqw.eq(bo.getRepairType() != null, EqpMaintenancePlan::getRepairType, bo.getRepairType()); lqw.eq(bo.getPriorityLevel() != null, EqpMaintenancePlan::getPriorityLevel, bo.getPriorityLevel()); lqw.eq(bo.getPlanStatus() != null, EqpMaintenancePlan::getPlanStatus, bo.getPlanStatus()); diff --git a/klp-ui/src/views/system/menu/index.vue b/klp-ui/src/views/system/menu/index.vue index 825f71f4c..92e302b3e 100644 --- a/klp-ui/src/views/system/menu/index.vue +++ b/klp-ui/src/views/system/menu/index.vue @@ -231,15 +231,55 @@ - + - 菜单样式 +
+ +
+
+ 快捷样式: + 浅红 + 浅绿 + 浅橙 + 浅蓝 + 浅紫 + 暖色 + 加粗 + 斜体 + 清除 +
+
+ 校验 + {{ showPreview ? '隐藏预览' : '预览样式' }} +
+
+
+ {{ styleError }} +
+
+
菜单预览效果:
+
+
+ 📁 + {{ form.menuName || '菜单名称' }} +
+
+
+
@@ -311,6 +351,16 @@ export default { name: "Menu", dicts: ['sys_show_hide', 'sys_normal_disable'], components: { Treeselect, IconSelect }, + computed: { + parsedStyle() { + if (!this.form.style) return {}; + try { + return JSON.parse(this.form.style); + } catch (e) { + return {}; + } + } + }, data() { return { // 遮罩层 @@ -334,6 +384,10 @@ export default { menuName: undefined, visible: undefined }, + // 菜单样式预览 + showPreview: false, + // 菜单样式校验错误 + styleError: '', // 表单参数 form: {}, // 表单校验 @@ -358,6 +412,67 @@ export default { selected(name) { this.form.icon = name; }, + /** 应用样式预设 */ + applyStylePreset(type) { + const presets = { + danger: { background: 'linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%)', color: '#c45c5c', borderRadius: '4px', border: '1px solid #ffd4d4' }, + success: { background: 'linear-gradient(135deg, #f0fff4 0%, #dcffe4 100%)', color: '#5c8a6b', borderRadius: '4px', border: '1px solid #c3e6cb' }, + warning: { background: 'linear-gradient(135deg, #fffdf0 0%, #fff3cd 100%)', color: '#b8860b', borderRadius: '4px', border: '1px solid #ffeeba' }, + primary: { background: 'linear-gradient(135deg, #f0f7ff 0%, #d6eaff 100%)', color: '#4a7fb5', borderRadius: '4px', border: '1px solid #b8daff' }, + accent: { background: 'linear-gradient(135deg, #f8f0ff 0%, #e8d5ff 100%)', color: '#8b5cf6', borderRadius: '4px', border: '1px solid #d8b4fe' }, + warm: { background: 'linear-gradient(135deg, #fff8f0 0%, #ffedd5 100%)', color: '#c27832', borderRadius: '4px', border: '1px solid #fed7aa' }, + bold: { fontWeight: '600', color: '#303133' }, + italic: { fontStyle: 'italic', color: '#606266' }, + clear: {} + }; + if (type === 'clear') { + this.form.style = ''; + this.styleError = ''; + } else { + // 合并已有样式 + let currentStyle = {}; + if (this.form.style) { + try { + currentStyle = JSON.parse(this.form.style); + } catch (e) { + currentStyle = {}; + } + } + const mergedStyle = { ...currentStyle, ...presets[type] }; + this.form.style = JSON.stringify(mergedStyle); + this.validateStyle(); + } + }, + /** 校验菜单样式JSON格式 */ + validateStyle() { + this.styleError = ''; + if (!this.form.style) { + this.$modal.msgSuccess('样式为空,无需校验'); + return; + } + try { + const styleObj = JSON.parse(this.form.style); + if (typeof styleObj !== 'object' || styleObj === null) { + this.styleError = '样式必须是JSON对象格式'; + this.$modal.msgError('校验失败:样式必须是JSON对象格式'); + return; + } + // 检查是否包含有效的CSS属性 + const validCssProps = [ + 'backgroundColor', 'background', 'color', 'fontWeight', 'fontSize', 'fontStyle', + 'borderRadius', 'padding', 'margin', 'border', 'textAlign', + 'textDecoration', 'lineHeight', 'letterSpacing', 'opacity', 'boxShadow' + ]; + const invalidProps = Object.keys(styleObj).filter(prop => !validCssProps.includes(prop)); + if (invalidProps.length > 0) { + this.styleError = `可能无效的属性:${invalidProps.join(', ')}`; + } + this.$modal.msgSuccess('校验通过:JSON格式正确'); + } catch (e) { + this.styleError = `JSON格式错误:${e.message}`; + this.$modal.msgError('校验失败:' + e.message); + } + }, /** 查询菜单列表 */ getList() { this.loading = true; @@ -554,3 +669,107 @@ export default { } }; + + diff --git a/klp-ui/src/views/wms/coil/do/warehousing.vue b/klp-ui/src/views/wms/coil/do/warehousing.vue index 124e4521b..010347110 100644 --- a/klp-ui/src/views/wms/coil/do/warehousing.vue +++ b/klp-ui/src/views/wms/coil/do/warehousing.vue @@ -20,7 +20,7 @@ + @click.native="$router.push('/wip/receive/plan')"> diff --git a/klp-ui/src/views/wms/post/eqp/index.vue b/klp-ui/src/views/wms/post/eqp/index.vue index 01702573a..af62eec42 100644 --- a/klp-ui/src/views/wms/post/eqp/index.vue +++ b/klp-ui/src/views/wms/post/eqp/index.vue @@ -6,13 +6,9 @@
- 维修计划 + 检修单
- - - -
@@ -30,10 +26,6 @@ {{ item.planNo }} {{ item.planName }}
-
- 草稿 - 已驳回 -
@@ -41,7 +33,7 @@
- 暂无维修计划数据 + 暂无检修单数据
@@ -56,122 +48,118 @@
- 请在左侧列表中选择一条维修计划查看详情 + 请在左侧列表中选择一条检修单查看详情
-
-
-
-
-
{{ currentRow.planNo }}
-
Maintenance Plan
-
-
- 刷新 - 编辑 - 删除 -
+
+ +
+
+ 产线: + {{ currentRow.productionLine || '未设置' }} + + 时间: + {{ parseTime(currentRow.plannedStartTime, '{y}-{m}-{d}') }} ~ {{ parseTime(currentRow.plannedEndTime, '{y}-{m}-{d}') }}
-
- Approval / 状态: - 草稿 - 待审批 - 已审批 - 已驳回 +
+ 查询检修记录 + 编辑 + 删除
-
- {{ currentRow.planName }} - 定期保养 - 安全整改 - 专项检修 - 故障维修 - 普通 - 重要 - 开始: {{ parseTime(currentRow.plannedStartTime, '{y}-{m}-{d}') }} - 结束: {{ parseTime(currentRow.plannedEndTime, '{y}-{m}-{d}') }} - {{ currentRow.dutyDept }} - {{ currentRow.planOwner }} - 预算: ¥{{ currentRow.budgetAmount }} + +
+
+ 检修记录 · Inspection Records + 共 {{ inspectionTotal }} 条 +
+ + + + + + + + + + + + + + + + +
+ 该产线该时间段内暂无检修记录 +
+
+ 点击"查询检修记录"查看该产线时间段内的巡检数据 +
- - -
- 计划说明 · Description + +
+
+ 维修明细 · Maintenance Details +
+ 新增 + + 从选中记录添加({{ selectedInspectionRows.length }}) + +
+
+ + + + + + + + + + + + + + + + +
暂无维修明细,请手动添加
-
{{ currentRow.planDescription || '无' }}
- - -
- 关联异常记录 · Related Abnormal Records - 选择记录 -
- - - - - - - - - - - - - - -
暂无关联异常记录
- -
- -
- 维修明细 · Maintenance Details - 添加 -
- - - - - - - - - - - - - - - - -
暂无维修明细,请关联异常记录后自动生成或手动添加
- -
- -
- 提交审批 -
- + + + + + + + + + + + + @@ -186,24 +174,18 @@ - - - - - + + - + - - - @@ -214,39 +196,6 @@
- - - - - - - - - - - - - 搜索 - - - - - - - - - - - - - - - - - @@ -288,7 +237,6 @@