From e9205dbc39ba060f2adfd27d1efdc49aa780a1ae Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 10 Apr 2026 16:26:14 +0800
Subject: [PATCH] =?UTF-8?q?2026-04-10=20=E6=96=B0=E5=A2=9E=E3=80=90Routing?=
=?UTF-8?q?=20Operations=E3=80=91=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/part/manufacturingStructures.vue | 19 +++-----
src/views/modules/part/routingOperations.vue | 44 ++++++-------------
2 files changed, 20 insertions(+), 43 deletions(-)
diff --git a/src/views/modules/part/manufacturingStructures.vue b/src/views/modules/part/manufacturingStructures.vue
index c064daa..2aa6e44 100644
--- a/src/views/modules/part/manufacturingStructures.vue
+++ b/src/views/modules/part/manufacturingStructures.vue
@@ -55,7 +55,6 @@
:data="dataList"
border
v-loading="dataListLoading"
- :cell-class-name="tableCellClassName"
:row-style="rowStyle"
@row-click="onRowClick"
@cell-click="onTableCellClick"
@@ -78,7 +77,7 @@
v-model="scope.row[item.columnProp]"
size="mini"
@blur="onComponentPartBlur(scope.row)"
- :class="['ms-cell-editor', { 'ms-modified': isCellDirty(scope.row, item.columnProp) }]" />
+ :class="['ms-cell-editor', { 'ms-modified': isCellDirty(scope.row, item.columnProp), 'ms-input-highlight': findHighlightRowIndex === scope.$index && findHighlightColumnProp === item.columnProp }]" />
@@ -283,12 +282,6 @@ export default {
onRowClick (row) {
this.currentRow = row
},
- tableCellClassName ({ row, column, rowIndex }) {
- if (rowIndex === this.findHighlightRowIndex && column.property === this.findHighlightColumnProp) {
- return 'ms-find-highlight'
- }
- return ''
- },
onTableCellClick (row, column) {
const p = column.property
if (!this.isEditableProp(p)) return
@@ -469,7 +462,7 @@ export default {
formatNumber (value) {
if (value === null || value === undefined || value === '') return value
let numStr = String(value)
- if (numStr.includes('e') || numStr.includes('E')) {
+ if ((numStr.includes('e') || numStr.includes('E')) && !isNaN(Number(value))) {
return Number(value).toLocaleString('fullwide', { useGrouping: false, maximumFractionDigits: 20 })
}
return value
@@ -666,13 +659,13 @@ export default {
diff --git a/src/views/modules/part/routingOperations.vue b/src/views/modules/part/routingOperations.vue
index 1f7ab9a..d2a99a1 100644
--- a/src/views/modules/part/routingOperations.vue
+++ b/src/views/modules/part/routingOperations.vue
@@ -46,7 +46,6 @@
:data="dataList"
border
v-loading="dataListLoading"
- :cell-class-name="tableCellClassName"
:row-style="rowStyle"
@row-click="onRowClick"
@cell-click="onTableCellClick"
@@ -69,7 +68,7 @@
v-model="scope.row[item.columnProp]"
size="mini"
@blur="onStringPropBlur(scope.row, item.columnProp)"
- :class="['ms-cell-editor', { 'ms-modified': isCellDirty(scope.row, item.columnProp) }]" />
+ :class="['ms-cell-editor', { 'ms-modified': isCellDirty(scope.row, item.columnProp), 'ms-input-highlight': findHighlightRowIndex === scope.$index && findHighlightColumnProp === item.columnProp }]" />
@@ -199,7 +198,6 @@ export default {
limit: 50
},
columnList: [
- { columnProp: 'site', columnLabel: '工厂', headerAlign: 'center', align: 'center', columnSortable: false, columnHidden: false, showOverflowTooltip: true, fixed: '', columnWidth: 80 },
{ columnProp: 'partNo', columnLabel: '物料编码', headerAlign: 'center', align: 'left', columnSortable: false, columnHidden: false, showOverflowTooltip: true, fixed: '', columnWidth: 120 },
{ columnProp: 'partDesc', columnLabel: '物料名称', headerAlign: 'center', align: 'left', columnSortable: false, columnHidden: false, showOverflowTooltip: true, fixed: '', columnWidth: 180 },
{ columnProp: 'routingType', columnLabel: '工艺类型', headerAlign: 'center', align: 'center', columnSortable: false, columnHidden: false, showOverflowTooltip: true, fixed: '', columnWidth: 120 },
@@ -285,30 +283,14 @@ export default {
onRowClick (row) {
this.currentRow = row
},
- setHighlight (rowIndex, colProp) {
- if (this.findHighlightRowIndex >= 0 && this.findHighlightRowIndex < this.dataList.length) {
- this.$set(this.dataList[this.findHighlightRowIndex], '_highlightCol', '')
- }
- this.findHighlightRowIndex = rowIndex
- this.findHighlightColumnProp = colProp
- if (rowIndex >= 0 && rowIndex < this.dataList.length) {
- this.$set(this.dataList[rowIndex], '_highlightCol', colProp)
- }
- },
- tableCellClassName ({ row, column }) {
- let p = column.property
- if (row._highlightCol === p) {
- return 'ms-find-highlight'
- }
- return ''
- },
onTableCellClick (row, column) {
let p = column.property
if (!this.isEditableProp(p)) return
this.activeFindColumn = p
const idx = this.dataList.indexOf(row)
this.lastFindRowIndex = idx
- this.setHighlight(idx, p)
+ this.findHighlightRowIndex = idx
+ this.findHighlightColumnProp = p
},
normalizeRowFromServer (raw) {
const row = { ...raw }
@@ -408,7 +390,8 @@ export default {
const val = this.dataList[i][col]
if (this.cellMatchesFind(val, needle)) {
this.lastFindRowIndex = i
- this.setHighlight(i, col)
+ this.findHighlightRowIndex = i
+ this.findHighlightColumnProp = col
this.$nextTick(() => this.scrollToRow(i))
return
}
@@ -497,7 +480,7 @@ export default {
row[prop] = String(row[prop]).trim().toUpperCase()
}
}
-
+
// Update descriptions
this.updateDescIfNeeded(row, prop)
},
@@ -529,7 +512,7 @@ export default {
formatNumber (value) {
if (value === null || value === undefined || value === '') return value
let numStr = String(value)
- if (numStr.includes('e') || numStr.includes('E')) {
+ if ((numStr.includes('e') || numStr.includes('E')) && !isNaN(Number(value))) {
return Number(value).toLocaleString('fullwide', { useGrouping: false, maximumFractionDigits: 20 })
}
return value
@@ -557,6 +540,7 @@ export default {
this.searchData.page = this.pageIndex
this.queryLoading = true
this.dataListLoading = true
+
routingOperationsSearch(this.searchData)
.then(({ data }) => {
if (data.code === 0) {
@@ -693,13 +677,13 @@ export default {