【代码优化】分支合并

This commit is contained in:
puhui999
2024-08-19 16:38:15 +08:00
48 changed files with 1316 additions and 462 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="订单金额" min-width="120" prop="refundPrice">
<template #default="scope">
<span>{{ fenToYuan(scope.row.refundPrice) }} </span>
</template>
@ -156,7 +156,7 @@
<dict-tag :type="DICT_TYPE.TRADE_AFTER_SALE_WAY" :value="scope.row.way" />
</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="120">
<el-table-column align="center" fixed="right" label="操作" width="160">
<template #default="{ row }">
<el-button link type="primary" @click="openAfterSaleDetail(row.id)">处理退款</el-button>
</template>
@ -181,9 +181,6 @@ import { cloneDeep } from 'lodash-es'
import { fenToYuan } from '@/utils'
defineOptions({ name: 'TradeAfterSale' })
const props = defineProps<{
userId?: number
}>()
const { push } = useRouter() // 路由跳转
@ -207,9 +204,9 @@ const queryParams = reactive({
spuName: null,
createTime: [],
way: null,
type: null,
userId: null
type: null
})
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -219,27 +216,27 @@ const getList = async () => {
if (data.status === '0') {
delete data.status
}
if (props.userId) {
data.userId = props.userId
}
// 执行查询
const res = await AfterSaleApi.getAfterSalePage(data)
list.value = res.list
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