diff --git a/klp-mes/src/main/java/com/klp/mes/roll/domain/MesRollGrind.java b/klp-mes/src/main/java/com/klp/mes/roll/domain/MesRollGrind.java index 208ec779..d2881259 100644 --- a/klp-mes/src/main/java/com/klp/mes/roll/domain/MesRollGrind.java +++ b/klp-mes/src/main/java/com/klp/mes/roll/domain/MesRollGrind.java @@ -82,6 +82,9 @@ public class MesRollGrind extends BaseEntity { /** 操作者 */ private String operator; + /** 备注 */ + private String remark; + @TableLogic private Integer delFlag; } diff --git a/klp-mes/src/main/java/com/klp/mes/roll/domain/bo/MesRollGrindBo.java b/klp-mes/src/main/java/com/klp/mes/roll/domain/bo/MesRollGrindBo.java index d4fad19e..2f23e941 100644 --- a/klp-mes/src/main/java/com/klp/mes/roll/domain/bo/MesRollGrindBo.java +++ b/klp-mes/src/main/java/com/klp/mes/roll/domain/bo/MesRollGrindBo.java @@ -37,4 +37,5 @@ public class MesRollGrindBo extends BaseEntity { private String flawResult; private BigDecimal hardness; private String operator; + private String remark; } diff --git a/klp-ui/src/views/mes/roll/grind/index.vue b/klp-ui/src/views/mes/roll/grind/index.vue index 179a738b..3e66b1db 100644 --- a/klp-ui/src/views/mes/roll/grind/index.vue +++ b/klp-ui/src/views/mes/roll/grind/index.vue @@ -2,7 +2,7 @@
- +
{{ l.lineName }}
- -
- -
- 轧辊列表 + +
+ + + + +
+ +
+ +
+ 轧辊列表 + {{ filteredRolls.length }} +
+
+
+
{{ r.rollNo }}
+
+ {{ r.rollType }} + {{ statusLabel(r.status) }} + φ{{ r.currentDia != null ? r.currentDia : r.initialDia }} +
+
{{ r.manufacturer }}
+
{{ r.lineName }}
+
+
暂无数据
+
+
- -
- - - - 全部 - WR - BR - CR - + +
+ + +
- -
-
-
{{ r.rollNo }}
-
- {{ r.rollType }} - {{ statusLabel(r.status) }} - φ{{ r.currentDia != null ? r.currentDia : r.initialDia }} -
-
{{ r.manufacturer }}
-
{{ r.lineName }}
-
-
暂无数据
-
- -
- - -
- - - +
@@ -251,14 +344,13 @@ import rollLineMixin from '../rollLineMixin' export default { name: 'GrindRoom', mixins: [rollLineMixin], + dicts: ['mes_roll_operator'], data() { return { - // 产线列表 productionLines: [], filterLineId: null, - lineTabOrder: [], // 本地记录的点击顺序(最近点过的在前) + lineTabOrder: [], - // 左侧辊列表 rollLoading: false, allRolls: [], filteredRolls: [], @@ -266,32 +358,25 @@ export default { filterType: '', filterManufacturer: '', - // 右侧选中辊 selectedRollId: null, selectedRoll: null, - // 磨削记录 grindLoading: false, grindList: [], - // 月度汇总 currentYear: new Date().getFullYear(), monthlyList: [], - // 行内编辑:editRow 不为 null 时表示当前正在编辑/新增的行数据 - // __isNew: true → 新增行;存在 grindId → 修改行 editRow: null, grindSaving: false } }, computed: { - // 当前登录用户名(RuoYi Plus 的 store 路径) currentUserName() { return this.$store.state.user.name || this.$store.getters.name || '' }, - // 产线 tab 按本地点击顺序排序 sortedProductionLines() { const order = this.lineTabOrder return [...this.productionLines].sort((a, b) => { @@ -304,11 +389,15 @@ export default { }) }, - // 有效当前辊径:优先取 currentDia,无则取最新磨削记录的磨后径 + manufacturerOptions() { + const set = new Set() + this.allRolls.forEach(r => { + if (r.manufacturer) set.add(r.manufacturer) + }) + return [...set].sort() + }, + effectiveCurrentDia() { - // if (this.selectedRoll && this.selectedRoll.currentDia != null) { - // return parseFloat(this.selectedRoll.currentDia) - // } if (this.grindList.length > 0) { const latest = [...this.grindList].sort((a, b) => { const ta = a.grindTime ? new Date(a.grindTime).getTime() : 0 @@ -316,13 +405,10 @@ export default { return tb - ta })[0] if (latest && latest.diaAfter != null) return parseFloat(latest.diaAfter) - } else { - return null } return null }, - // 表格数据:新增时在顶部插入一个编辑行占位 tableData() { if (this.editRow && this.editRow.__isNew) { return [this.editRow, ...this.grindList] @@ -331,20 +417,17 @@ export default { } }, - created() {}, - methods: { onLineResolved() { this.filterLineId = this.lineId const uid = this.$store.state.user?.userId || 0 - try { this.lineTabOrder = JSON.parse(localStorage.getItem(`grind_line_order_${uid}`) || '[]') } catch {} + try { this.lineTabOrder = JSON.parse(localStorage.getItem(`grind_line_order_${uid}`) || '[]') } catch { /* ignore */ } listProductionLine({ pageNum: 1, pageSize: 100 }).then(res => { this.productionLines = res.rows || [] }) this.loadRolls() }, - // ── 轧辊列表 ────────────────────────────────────── loadRolls() { this.rollLoading = true listRollInfo({ pageNum: 1, pageSize: 500, lineId: this.filterLineId }).then(res => { @@ -368,9 +451,9 @@ export default { }, filterRolls() { this.filteredRolls = this.allRolls.filter(r => { - const matchNo = !this.filterNo || r.rollNo.includes(this.filterNo) + const matchNo = !this.filterNo || r.rollNo.includes(this.filterNo) const matchType = !this.filterType || r.rollType === this.filterType - const matchMfr = !this.filterManufacturer || (r.manufacturer || '').toLowerCase().includes(this.filterManufacturer.toLowerCase()) + const matchMfr = !this.filterManufacturer || r.manufacturer === this.filterManufacturer return matchNo && matchType && matchMfr }) }, @@ -385,7 +468,6 @@ export default { this.loadGrindList(r.rollId) }, - // ── 磨削记录 ────────────────────────────────────── loadGrindList(rollId) { this.grindLoading = true listRollGrind(rollId).then(res => { @@ -408,7 +490,6 @@ export default { this.loadMonthlyStats() }, - // ── 行内编辑 ────────────────────────────────────── isEditing(row) { if (!this.editRow) return false if (row.__isNew && this.editRow.__isNew) return true @@ -421,20 +502,20 @@ export default { startAdd() { const now = new Date() const pad = n => String(n).padStart(2, '0') - const grindTime = `${now.getFullYear()}-${pad(now.getMonth()+1)}-${pad(now.getDate())} ` + + const grindTime = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ` + `${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}` this.editRow = { - __isNew: true, - rollId: this.selectedRollId, + __isNew: true, + rollId: this.selectedRollId, grindTime, - team: undefined, - diaBefore: this.effectiveCurrentDia != null ? this.effectiveCurrentDia : undefined, - diaAfter: undefined, - rollShape: '平', + team: undefined, + diaBefore: this.effectiveCurrentDia != null ? this.effectiveCurrentDia : undefined, + diaAfter: undefined, + rollShape: '平', flawResult: '合格', - hardness: undefined, - operator: this.currentUserName, - remark: undefined + hardness: undefined, + operator: this.currentUserName, + remark: undefined } }, startEdit(row) { @@ -448,10 +529,7 @@ export default { const r = this.editRow if (!r.grindTime) { this.$modal.msgWarning('请填写磨削时间'); return } if (r.diaBefore == null) { this.$modal.msgWarning('请填写磨前直径'); return } - if (r.diaAfter == null) { this.$modal.msgWarning('请填写磨后直径'); return } - - // 自动带入操作人 - r.operator = this.currentUserName + if (r.diaAfter == null) { this.$modal.msgWarning('请填写磨后直径'); return } this.grindSaving = true const isNew = !!r.__isNew @@ -480,7 +558,6 @@ export default { }) }, - // ── 计算磨削量 ────────────────────────────────────── grindAmountOf(row) { const b = parseFloat(row.diaBefore) const a = parseFloat(row.diaAfter) @@ -488,7 +565,6 @@ export default { return '—' }, - // 辅助 statusLabel(s) { return { Online: '在线', Standby: '备用', Offline: '离线', Scrapped: '报废' }[s] || s } @@ -500,7 +576,7 @@ export default { .grind-page { background: #f4f5f7; height: 100%; } .grind-layout { display: flex; gap: 12px; height: 100%; } -/* 产线 Tab 列 */ +/* ── 左侧产线 Tab ── */ .line-tabs { width: 64px; flex-shrink: 0; @@ -530,31 +606,87 @@ export default { font-weight: 600; } -/* 轧辊列表 */ -.grind-left { width: 220px; flex-shrink: 0; } -.grind-right { flex: 1; min-width: 0; } +/* ── 右侧主体 ── */ +.grind-main { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + gap: 10px; +} -.grind-card { border: 1px solid #dcdee0; border-radius: 4px; } -.h-full { height: calc(100vh - 120px); display: flex; flex-direction: column; } +/* 顶部检索栏 */ +.search-bar { + display: flex; + align-items: center; + gap: 20px; + padding: 10px 14px; + background: #fff; + border: 1px solid #dcdee0; + border-radius: 4px; + flex-shrink: 0; +} + +/* 下方内容区:左右分栏 */ +.content-area { + flex: 1; + min-height: 0; + display: flex; + gap: 10px; +} + +/* 左侧轧辊列表面板 */ +.roll-list-panel { + width: 220px; + flex-shrink: 0; + height: calc(100vh - 140px); + overflow-y: auto; +} + +/* 右侧明细面板 */ +.detail-panel { + flex: 1; + min-width: 0; + overflow-y: auto; +} + +/* 明细卡片 */ +.detail-card { + border: 1px solid #dcdee0; + border-radius: 4px; +} +.detail-card ::v-deep .el-card__body { + overflow: auto; +} + +/* 通用卡片 */ +.panel-card { + border: 1px solid #dcdee0; + border-radius: 4px; + height: 100%; + display: flex; + flex-direction: column; +} +.panel-card ::v-deep .el-card__body { + flex: 1; + min-height: 0; + overflow-y: auto; +} .card-header { display: flex; align-items: center; gap: 8px; } .card-title { font-size: 13px; font-weight: 600; color: #3d4b5c; } +.card-count { font-size: 11px; color: #9aa0a6; background: #f0f2f5; padding: 1px 8px; border-radius: 10px; margin-left: auto; } -/* 辊列表 */ -.roll-filter { padding: 0 0 4px; } -::v-deep .el-card .el-card__body { - overflow-y: scroll; - overflow-x: hidden; -} -.roll-list { overflow-y: auto; flex: 1; min-height: 0; padding: 0; } +/* 轧辊列表 */ +.roll-list { padding: 0; } .roll-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f2f5; } .roll-item:hover { background: #f5f7fa; } .roll-item--active { background: #e8f4ff !important; border-left: 3px solid #409eff; } -.ri-no { font-family: 'Consolas', monospace; font-size: 13px; font-weight: 600; color: #1f2329; } -.ri-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; } -.ri-dia { font-size: 11px; color: #9aa0a6; } +.ri-no { font-family: 'Consolas', monospace; font-size: 13px; font-weight: 600; color: #1f2329; } +.ri-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; } +.ri-dia { font-size: 11px; color: #9aa0a6; } .ri-manufacturer { font-size: 10px; color: #909399; margin-top: 2px; } -.ri-line { font-size: 10px; color: #b0b3bb; margin-top: 2px; } +.ri-line { font-size: 10px; color: #b0b3bb; margin-top: 2px; } .ri-status { font-size: 11px; } .roll-empty { text-align: center; color: #c0c4cc; padding: 20px 0; font-size: 12px; } @@ -582,17 +714,18 @@ export default { /* 行内编辑 */ .computed-val { color: #409eff; font-weight: 600; font-size: 13px; } -.auto-operator { color: #0a7c42; font-size: 12px; } .remark-text { font-size: 12px; color: #5f6368; } -/* 去掉 number input 的默认上下箭头,保持表格整洁 */ .el-table :deep(input[type=number]::-webkit-inner-spin-button), .el-table :deep(input[type=number]::-webkit-outer-spin-button) { -webkit-appearance: none; } .el-table :deep(input[type=number]) { -moz-appearance: textfield; } - diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue index 862c3b84..669b1932 100644 --- a/klp-ui/src/views/wms/delivery/waybill/index.vue +++ b/klp-ui/src/views/wms/delivery/waybill/index.vue @@ -56,11 +56,6 @@ - - - - 搜索 重置