From 924e6e39ef0540acb9796fdcea223b9d4a62b070 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 4 Dec 2025 13:36:28 +0800 Subject: [PATCH] =?UTF-8?q?2025-12-04=20=E5=88=80=E5=85=B7=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=AE=B0=E5=BD=95=E4=B8=AD=E6=98=BE=E7=A4=BA=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=98=8E=E7=BB=86=E9=A6=96=E6=9D=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E5=85=B7=E7=BC=96=E7=A0=81=E5=92=8C=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/tooling/searchToolApply.vue | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue index f7d4703..5339caf 100644 --- a/src/views/modules/tooling/searchToolApply.vue +++ b/src/views/modules/tooling/searchToolApply.vue @@ -1374,6 +1374,42 @@ export default { fixed: '', columnWidth: 120 }, + { + userId: this.$store.state.user.name, + functionId: 106002, + serialNumber: '106002Table1FirstToolId', + tableId: "106002Table1", + tableName: "刀具申请主表", + columnProp: "firstToolId", + headerAlign: "center", + align: "left", + columnLabel: "工具编码", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 106002, + serialNumber: '106002Table1FirstToolDesc', + tableId: "106002Table1", + tableName: "刀具申请主表", + columnProp: "firstToolDesc", + headerAlign: "center", + align: "left", + columnLabel: "工具描述", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150 + }, { userId: this.$store.state.user.name, functionId: 106002, @@ -2314,6 +2350,8 @@ export default { this.dataForm.sp = '' } this.operatorFlag = this.superAdmin || (this.dataForm.sp!=='' && this.dataForm.sp.split(';').includes(this.sp)) + // 加载每条记录的首条工具明细信息 + this.loadToolDetailInfo() if (this.dataList1.length > 0) { this.$refs.mainTable.setCurrentRow(this.dataList1[0]); this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0])); @@ -2326,6 +2364,30 @@ export default { }) this.isFilterSearch = false }, + // 加载每条申请记录的首条工具明细信息 + loadToolDetailInfo() { + this.dataList1.forEach(item => { + searchProjectToolApplyDetail({ + site: item.site, + applyNo: item.applyNo + }).then(({data}) => { + if (data && data.code === 0 && data.rows && data.rows.length > 0) { + const firstDetail = data.rows[0] + // 使用$set确保响应式更新 + this.$set(item, 'firstToolId', firstDetail.toolId) + this.$set(item, 'firstToolDesc', firstDetail.toolDesc) + } else { + // 如果没有明细数据,清空这两个字段 + this.$set(item, 'firstToolId', '') + this.$set(item, 'firstToolDesc', '') + } + }).catch(() => { + // 忽略错误,只是显示为空 + this.$set(item, 'firstToolId', '') + this.$set(item, 'firstToolDesc', '') + }) + }) + }, //单击切换订单 changeData(row) { this.dataForm.status = row.status @@ -2945,6 +3007,8 @@ export default { if (data && data.code === 0){ this.dataList1 = data.page.list this.totalPage = data.page.totalCount + // 加载每条记录的首条工具明细信息 + this.loadToolDetailInfo() }else { this.$message.warning(data.msg) }