【功能新增】商城:售后分页查询,支持 userId 过滤

pull/498/MERGE
YunaiV 2024-08-18 13:02:21 +08:00
parent 3d56931268
commit 254d1e0322
2 changed files with 14 additions and 7 deletions

View File

@ -135,7 +135,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" label="订单金额" prop="refundPrice">
<el-table-column align="center" label="订单金额" prop="refundPrice" min-width="120">
<template #default="scope">
<span>{{ fenToYuan(scope.row.refundPrice) }} </span>
</template>
@ -206,6 +206,7 @@ const queryParams = reactive({
way: null,
type: null
})
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -216,23 +217,26 @@ const getList = async () => {
delete data.status
}
//
const res = (await AfterSaleApi.getAfterSalePage(data)) as AfterSaleApi.TradeAfterSaleVO[]
list.value = res.list
const res = await AfterSaleApi.getAfterSalePage(data)
list.value = res.list as AfterSaleApi.TradeAfterSaleVO[]
total.value = res.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = async () => {
queryParams.pageNo = 1
await getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields()
handleQuery()
}
/** tab 切换 */
const tabClick = async (tab: TabsPaneContext) => {
queryParams.status = tab.paneName

View File

@ -133,12 +133,11 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" label="订单金额" prop="refundPrice">
<el-table-column align="center" label="订单金额" prop="refundPrice" min-width="120">
<template #default="scope">
<span>{{ fenToYuan(scope.row.refundPrice) }} </span>
</template>
</el-table-column>
<el-table-column align="center" label="买家" prop="user.nickname" />
<el-table-column align="center" label="申请时间" prop="createTime" width="180">
<template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span>
@ -207,6 +206,7 @@ const queryParams = ref({
way: null,
type: null
})
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -218,24 +218,27 @@ const getList = async () => {
}
//
// TODO @userId
const res = (await AfterSaleApi.getAfterSalePage(data)) as AfterSaleApi.TradeAfterSaleVO[]
list.value = res.list
const res = await AfterSaleApi.getAfterSalePage(data)
list.value = res.list as AfterSaleApi.TradeAfterSaleVO[]
total.value = res.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = async () => {
queryParams.value.pageNo = 1
await getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields()
queryParams.value.userId = userId
handleQuery()
}
/** tab 切换 */
const tabClick = async (tab: TabsPaneContext) => {
queryParams.value.status = tab.paneName