From 99e0370ba864ac8c985862b33f0f98a6c71ab109 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 3 Jul 2026 13:47:13 +0800 Subject: [PATCH] =?UTF-8?q?2026-07-03=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/part/partCatalogInformation.vue | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue index 3a414a0..c76d0fe 100644 --- a/src/views/modules/part/partCatalogInformation.vue +++ b/src/views/modules/part/partCatalogInformation.vue @@ -1403,9 +1403,21 @@ } }, + // 清空下方物料属性页签数据 + clearPartItemData () { + this.partItemList = [] + this.copyAttributeList = [] + this.updatePartItemList = [] + this.attributeDialog = true + }, + // ======== 列表数据刷新方法 ======== // 查询物料属性 getMasterPartItem () { + if (!this.partCurrentRow.partNo) { + this.clearPartItemData() + return + } let tempData = { site: this.$store.state.user.site, partNo: this.partCurrentRow.partNo, @@ -1417,7 +1429,7 @@ if (data && data.code === 0) { this.partItemList = data.rows } else { - this.partItemList = [] + this.clearPartItemData() } }) }, @@ -1441,6 +1453,7 @@ this.partClickRow(this.dataList[0]) } else { this.partCurrentRow = {} + this.clearPartItemData() } } }) @@ -1800,6 +1813,15 @@ if (data && data.code === 0){ this.dataList = data.page.list this.totalPage = data.page.totalCount + this.$refs.selectDiv.setLengthAll(this.dataList.length) + if (this.dataList.length > 0) { + this.$refs.partTable.setCurrentRow(this.dataList[0]) + this.partClickRow(this.dataList[0]) + this.refreshCurrentTabTable() + } else { + this.partCurrentRow = {} + this.clearPartItemData() + } }else { this.$message.warning(data.msg) }