From c5b21a00f35f1ccee83848f453b7ae1e59205252 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Thu, 27 Aug 2026 13:50:21 +0800
Subject: [PATCH] =?UTF-8?q?2026-08-27=20=E7=89=A9=E6=96=99=E2=80=9C?=
=?UTF-8?q?=E7=BC=96=E7=A0=81=E2=80=9D=E8=B0=83=E6=95=B4=EF=BC=9A=20?=
=?UTF-8?q?=E9=A6=96=E5=AD=97=E6=AF=8D=E4=B8=8D=E6=98=BE=E7=A4=BAF?=
=?UTF-8?q?=E5=92=8CR=EF=BC=9B=20=E4=BF=9D=E5=AD=98=E2=80=9C=E7=BC=96?=
=?UTF-8?q?=E7=A0=81=E2=80=9D=E6=97=B6=EF=BC=8C=E5=90=8C=E6=AD=A5=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=90=8C=E5=AE=B6=E6=97=8F=E2=80=9C=E6=9C=AA=E7=BB=B4?=
=?UTF-8?q?=E6=8A=A4=E7=BC=96=E7=A0=81=E2=80=9D=E7=9A=84=E7=89=A9=E6=96=99?=
=?UTF-8?q?=E7=9A=84=E2=80=9C=E7=BC=96=E7=A0=81=E2=80=9D=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/part/partInformation.vue | 47 +++++++++++++++++--
.../projectInfo/com_project_info_part.vue | 47 +++++++++++++++++--
2 files changed, 88 insertions(+), 6 deletions(-)
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index d9724c5..a40510e 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -112,7 +112,7 @@
-
{{ scope.row[item.columnProp] }}
+
{{ item.columnProp === 'drawingNo' ? formatDrawingNoForDisplay(scope.row[item.columnProp]) : scope.row[item.columnProp] }}
@@ -169,7 +169,12 @@
-
+
+
获取编码
@@ -3542,6 +3547,38 @@
},
methods: {
+ formatDrawingNoForDisplay (drawingNo) {
+ if (drawingNo === null || drawingNo === undefined) {
+ return ''
+ }
+ const drawingNoText = String(drawingNo)
+ if (/^[FR]/i.test(drawingNoText)) {
+ return drawingNoText.substring(1)
+ }
+ return drawingNoText
+ },
+
+ normalizeDrawingNoDisplayInput (displayValue, currentDrawingNo) {
+ if (displayValue === null || displayValue === undefined) {
+ return ''
+ }
+ const drawingNoDisplayText = String(displayValue)
+ if (drawingNoDisplayText === '') {
+ return ''
+ }
+ const currentDrawingNoText = currentDrawingNo === null || currentDrawingNo === undefined
+ ? ''
+ : String(currentDrawingNo)
+ const currentPrefix = currentDrawingNoText.charAt(0)
+ if (/^[FR]$/i.test(currentPrefix) && !/^[FR]/i.test(drawingNoDisplayText)) {
+ return currentPrefix + drawingNoDisplayText
+ }
+ return drawingNoDisplayText
+ },
+
+ handleModalDrawingNoInput (value) {
+ this.modalData.drawingNo = this.normalizeDrawingNoDisplayInput(value, this.modalData.drawingNo)
+ },
// 重置标识
resetFlags () {
@@ -6207,7 +6244,11 @@
await partInformationSearch(this.searchData).then(({data}) => {
this.resultList = data.page.list
})
- return this.resultList
+ const exportList = (this.resultList || []).map(item => ({
+ ...item,
+ drawingNo: this.formatDrawingNoForDisplay(item.drawingNo)
+ }))
+ return exportList
},
startDownload () {
diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue
index 993eb14..57a51d6 100644
--- a/src/views/modules/project/projectInfo/com_project_info_part.vue
+++ b/src/views/modules/project/projectInfo/com_project_info_part.vue
@@ -63,7 +63,7 @@
-
{{ scope.row[item.columnProp] }}
+
{{ item.columnProp === 'drawingNo' ? formatDrawingNoForDisplay(scope.row[item.columnProp]) : scope.row[item.columnProp] }}
@@ -108,7 +108,12 @@
-
+
+
获取编码
@@ -1923,6 +1928,39 @@ import CodeGeneration from "../../code/generation.vue";
},
methods: {
+ formatDrawingNoForDisplay (drawingNo) {
+ if (drawingNo === null || drawingNo === undefined) {
+ return ''
+ }
+ const drawingNoText = String(drawingNo)
+ if (/^[FR]/i.test(drawingNoText)) {
+ return drawingNoText.substring(1)
+ }
+ return drawingNoText
+ },
+
+ normalizeDrawingNoDisplayInput (displayValue, currentDrawingNo) {
+ if (displayValue === null || displayValue === undefined) {
+ return ''
+ }
+ const drawingNoDisplayText = String(displayValue)
+ if (drawingNoDisplayText === '') {
+ return ''
+ }
+ const currentDrawingNoText = currentDrawingNo === null || currentDrawingNo === undefined
+ ? ''
+ : String(currentDrawingNo)
+ const currentPrefix = currentDrawingNoText.charAt(0)
+ if (/^[FR]$/i.test(currentPrefix) && !/^[FR]/i.test(drawingNoDisplayText)) {
+ return currentPrefix + drawingNoDisplayText
+ }
+ return drawingNoDisplayText
+ },
+
+ handleModalDrawingNoInput (value) {
+ this.modalData.drawingNo = this.normalizeDrawingNoDisplayInput(value, this.modalData.drawingNo)
+ },
+
// 重置标识
resetFlags () {
this.mainInfoFlag = false
@@ -3062,7 +3100,10 @@ import CodeGeneration from "../../code/generation.vue";
//导出excel
createExportData() {
- return this.dataList
+ return (this.dataList || []).map(item => ({
+ ...item,
+ drawingNo: this.formatDrawingNoForDisplay(item.drawingNo)
+ }))
},
startDownload() {