添加租户参数,抢单时
This commit is contained in:
@@ -4,7 +4,8 @@ export function getLbBuyerShoppingList(params) {
|
||||
return request({
|
||||
url: '/lbBuyerShopping/list',
|
||||
method: 'get',
|
||||
params
|
||||
params,
|
||||
tenantId: params.tenantId
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<div class="app-container">
|
||||
<el-card class="filter-container" shadow="never">
|
||||
<el-form :model="queryParams" :inline="true" label-width="100px">
|
||||
<el-form-item label="租户ID">
|
||||
<el-select v-model="queryParams.tenantId" clearable placeholder="请选择租户" style="width: 140px">
|
||||
<el-option v-for="item in tenantOptions" :key="item.id" :label="item.tenantName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="卖家ID">
|
||||
<el-input v-model="queryParams.sellerId" clearable placeholder="卖家ID" style="width: 140px" />
|
||||
</el-form-item>
|
||||
@@ -116,6 +121,7 @@
|
||||
|
||||
<el-card class="table-container" shadow="never">
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column label="租户id" prop="tenantId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="买家ID" prop="buyerId" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="买家昵称" prop="buyerNickname" min-width="110" show-overflow-tooltip />
|
||||
<el-table-column label="买家手机" prop="buyerMobile" min-width="120" show-overflow-tooltip />
|
||||
@@ -351,6 +357,7 @@ import {
|
||||
updateLbBuyerShopping
|
||||
} from '@/api/lb-buyer-shopping'
|
||||
import { getBusinessHeaders } from '@/utils/business-headers'
|
||||
import { getAllTenantList } from '@/api/tenant'
|
||||
|
||||
function parseOptionalLong(value) {
|
||||
if (value === undefined || value === null || value === '') return undefined
|
||||
@@ -403,6 +410,7 @@ export default {
|
||||
},
|
||||
list: [],
|
||||
total: 0,
|
||||
tenantOptions: [],
|
||||
createdAtRange: [],
|
||||
buyTimeRange: [],
|
||||
confirmTimeRange: [],
|
||||
@@ -412,6 +420,7 @@ export default {
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
tenantId: '',
|
||||
sellerId: '',
|
||||
merchandiseId: '',
|
||||
buyerId: '',
|
||||
@@ -435,6 +444,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchTenantOptions()
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
@@ -443,6 +453,18 @@ export default {
|
||||
const value = headers && headers['X-Tenant-Id']
|
||||
return value ? String(value).trim() : ''
|
||||
},
|
||||
fetchTenantOptions() {
|
||||
getAllTenantList().then((res) => {
|
||||
if (res && (res.code === 20000 || res.code === 200 || res.success === true)) {
|
||||
const data = res.data || []
|
||||
this.tenantOptions = Array.isArray(data) ? data : (data.records || [])
|
||||
} else {
|
||||
this.tenantOptions = []
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tenantOptions = []
|
||||
})
|
||||
},
|
||||
openPullOrderDialog() {
|
||||
this.pullDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -570,6 +592,7 @@ export default {
|
||||
const params = {
|
||||
current: this.queryParams.current,
|
||||
size: this.queryParams.size,
|
||||
tenantId: parseOptionalLong(this.queryParams.tenantId),
|
||||
sellerId: parseOptionalLong(this.queryParams.sellerId),
|
||||
merchandiseId: parseOptionalLong(this.queryParams.merchandiseId),
|
||||
buyerId: parseOptionalLong(this.queryParams.buyerId),
|
||||
@@ -603,6 +626,7 @@ export default {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
tenantId: '',
|
||||
sellerId: '',
|
||||
merchandiseId: '',
|
||||
buyerId: '',
|
||||
|
||||
Reference in New Issue
Block a user