|
|
@@ -3,7 +3,7 @@
|
|
|
<el-card shadow="never" class="mb16 filter-card">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" size="small" label-width="100px">
|
|
|
<el-form-item label="租户名称" prop="tenantId">
|
|
|
- <inline-tenant-selector @change="handleTenantChange" />
|
|
|
+ <inline-tenant-selector :key="tenantSelectorKey" @change="handleTenantChange" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="商品名称" prop="productName">
|
|
|
<el-input
|
|
|
@@ -253,7 +253,9 @@ export default {
|
|
|
auditRemark: ''
|
|
|
},
|
|
|
// 统计弹窗
|
|
|
- showStatistics: false
|
|
|
+ showStatistics: false,
|
|
|
+ // 租户选择器 key,用于重置时强制重建组件
|
|
|
+ tenantSelectorKey: 0
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -280,6 +282,12 @@ export default {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ handleTenantChange(val) {
|
|
|
+ this.queryParams.tenantId = val || null
|
|
|
+ if (val) {
|
|
|
+ this.handleQuery()
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
if (!this.queryParams.tenantId) {
|
|
|
@@ -291,9 +299,12 @@ export default {
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
+ this.$store.dispatch('tenant/setTenantId', null)
|
|
|
this.resetForm('queryForm')
|
|
|
this.queryParams.tenantId = null
|
|
|
- this.handleQuery()
|
|
|
+ this.productList = []
|
|
|
+ this.total = 0
|
|
|
+ this.tenantSelectorKey++
|
|
|
},
|
|
|
/** 查看详情 */
|
|
|
handleView(row) {
|