Skip to content

Commit 254d1e0

Browse files
committed
【功能新增】商城:售后分页查询,支持 userId 过滤
1 parent 3d56931 commit 254d1e0

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/views/mall/trade/afterSale/index.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
</div>
136136
</template>
137137
</el-table-column>
138-
<el-table-column align="center" label="订单金额" prop="refundPrice">
138+
<el-table-column align="center" label="订单金额" prop="refundPrice" min-width="120">
139139
<template #default="scope">
140140
<span>{{ fenToYuan(scope.row.refundPrice) }} 元</span>
141141
</template>
@@ -206,6 +206,7 @@ const queryParams = reactive({
206206
way: null,
207207
type: null
208208
})
209+
209210
/** 查询列表 */
210211
const getList = async () => {
211212
loading.value = true
@@ -216,23 +217,26 @@ const getList = async () => {
216217
delete data.status
217218
}
218219
// 执行查询
219-
const res = (await AfterSaleApi.getAfterSalePage(data)) as AfterSaleApi.TradeAfterSaleVO[]
220-
list.value = res.list
220+
const res = await AfterSaleApi.getAfterSalePage(data)
221+
list.value = res.list as AfterSaleApi.TradeAfterSaleVO[]
221222
total.value = res.total
222223
} finally {
223224
loading.value = false
224225
}
225226
}
227+
226228
/** 搜索按钮操作 */
227229
const handleQuery = async () => {
228230
queryParams.pageNo = 1
229231
await getList()
230232
}
233+
231234
/** 重置按钮操作 */
232235
const resetQuery = () => {
233236
queryFormRef.value?.resetFields()
234237
handleQuery()
235238
}
239+
236240
/** tab 切换 */
237241
const tabClick = async (tab: TabsPaneContext) => {
238242
queryParams.status = tab.paneName

src/views/member/user/detail/UserAftersaleList.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,11 @@
133133
</div>
134134
</template>
135135
</el-table-column>
136-
<el-table-column align="center" label="订单金额" prop="refundPrice">
136+
<el-table-column align="center" label="订单金额" prop="refundPrice" min-width="120">
137137
<template #default="scope">
138138
<span>{{ fenToYuan(scope.row.refundPrice) }} 元</span>
139139
</template>
140140
</el-table-column>
141-
<el-table-column align="center" label="买家" prop="user.nickname" />
142141
<el-table-column align="center" label="申请时间" prop="createTime" width="180">
143142
<template #default="scope">
144143
<span>{{ formatDate(scope.row.createTime) }}</span>
@@ -207,6 +206,7 @@ const queryParams = ref({
207206
way: null,
208207
type: null
209208
})
209+
210210
/** 查询列表 */
211211
const getList = async () => {
212212
loading.value = true
@@ -218,24 +218,27 @@ const getList = async () => {
218218
}
219219
// 执行查询
220220
// TODO @芋艿:接口需要通过userId进行筛选返回值
221-
const res = (await AfterSaleApi.getAfterSalePage(data)) as AfterSaleApi.TradeAfterSaleVO[]
222-
list.value = res.list
221+
const res = await AfterSaleApi.getAfterSalePage(data)
222+
list.value = res.list as AfterSaleApi.TradeAfterSaleVO[]
223223
total.value = res.total
224224
} finally {
225225
loading.value = false
226226
}
227227
}
228+
228229
/** 搜索按钮操作 */
229230
const handleQuery = async () => {
230231
queryParams.value.pageNo = 1
231232
await getList()
232233
}
234+
233235
/** 重置按钮操作 */
234236
const resetQuery = () => {
235237
queryFormRef.value?.resetFields()
236238
queryParams.value.userId = userId
237239
handleQuery()
238240
}
241+
239242
/** tab 切换 */
240243
const tabClick = async (tab: TabsPaneContext) => {
241244
queryParams.value.status = tab.paneName

0 commit comments

Comments
 (0)