|
|
@@ -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="orderNo">
|
|
|
<el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable size="small" @keyup.enter.native="handleQuery" />
|
|
|
@@ -46,6 +46,7 @@ export default {
|
|
|
return {
|
|
|
loading: false, exportLoading: false, showSearch: true,
|
|
|
list: [], total: 0,
|
|
|
+ tenantSelectorKey: 0,
|
|
|
queryParams: { pageNum: 1, pageSize: 10, orderNo: null, tenantId: null }
|
|
|
}
|
|
|
},
|
|
|
@@ -64,9 +65,28 @@ export default {
|
|
|
this.loading = false
|
|
|
}).catch(() => { this.loading = false })
|
|
|
},
|
|
|
- handleTenantChange(val) { this.queryParams.tenantId = val || null; this.handleQuery() },
|
|
|
- handleQuery() { if (!this.queryParams.tenantId) { this.$message.warning('请先选择租户'); return } this.queryParams.pageNum = 1; this.getList() },
|
|
|
- resetQuery() { this.resetForm('queryForm'); this.queryParams.tenantId = null; this.handleQuery() },
|
|
|
+ handleTenantChange(val) {
|
|
|
+ if (val) {
|
|
|
+ this.queryParams.tenantId = val
|
|
|
+ this.handleQuery()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleQuery() {
|
|
|
+ if (!this.queryParams.tenantId) {
|
|
|
+ this.$message.warning('请先选择租户')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.list = []
|
|
|
+ this.total = 0
|
|
|
+ this.queryParams.tenantId = null
|
|
|
+ this.$store.dispatch('tenant/setTenantId', null)
|
|
|
+ this.tenantSelectorKey++
|
|
|
+ },
|
|
|
handleExport() {
|
|
|
this.exportLoading = true
|
|
|
exportStoreOrder(this.queryParams).then(response => {
|