diff --git a/antis-ncc-admin/src/components/member-portrait-dialog.vue b/antis-ncc-admin/src/components/member-portrait-dialog.vue index 7e7cc26..4ddf5e6 100644 --- a/antis-ncc-admin/src/components/member-portrait-dialog.vue +++ b/antis-ncc-admin/src/components/member-portrait-dialog.vue @@ -431,12 +431,35 @@ export default { } }, methods: { + /** 重置所有数据,避免二次进入时显示旧数据 */ + resetData() { + this.baseInfo = {} + this.behaviorSummary = {} + this.remainingItems = [] + this.monthlyTrend = [] + this.consumptionAnalysis = null + this.billingList = [] + this.billingPagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.consumeList = [] + this.consumePagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.refundList = [] + this.refundPagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.activeTab = 'overview' + }, async fetchData() { if (!this.memberId) { this.$message.warning('会员ID不能为空') return } + // 切换会员时清空列表数据,避免显示上一次的列表 + this.billingList = [] + this.billingPagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.consumeList = [] + this.consumePagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.refundList = [] + this.refundPagination = { pageIndex: 1, pageSize: 10, total: 0 } + this.loading = true try { const res = await request({ @@ -715,6 +738,7 @@ export default { this.trendChart.dispose() this.trendChart = null } + this.resetData() this.$emit('update:visible', false) this.$emit('closed') } diff --git a/antis-ncc-admin/src/views/lqKhxx/index.vue b/antis-ncc-admin/src/views/lqKhxx/index.vue index 8fbb8cc..2b8cc2f 100644 --- a/antis-ncc-admin/src/views/lqKhxx/index.vue +++ b/antis-ncc-admin/src/views/lqKhxx/index.vue @@ -1,4 +1,4 @@ -