mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-02 02:24:29 +00:00
feat 退款重试
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
<a-descriptions-item label="错误信息">
|
||||
{{ form.errorMsg }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="创建时间">
|
||||
{{ form.createTime }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
|
@@ -40,6 +40,7 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="errorMsg" title="错误信息" />
|
||||
<vxe-column field="createTime" title="创建时间" />
|
||||
<vxe-column fixed="right" width="120" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
|
@@ -62,6 +62,16 @@ export function syncById(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款重试
|
||||
*/
|
||||
export function resetRefund(id){
|
||||
return defHttp.post<Result<void>>({
|
||||
url: '/order/refund/resetRefund',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款记录
|
||||
*/
|
||||
|
@@ -46,14 +46,17 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="reason" title="原因" />
|
||||
<vxe-column fixed="right" width="180" :showOverflow="false" title="操作">
|
||||
<vxe-column fixed="right" width="220" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<a-link @click="showChannel(row)">通道订单</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<!-- 只有退款中的异步订单才可以同步 -->
|
||||
<a-divider type="vertical" />
|
||||
<a-link :disabled="!(row.asyncPay && row.status === 'progress')" @click="sync(row)">同步</a-link>
|
||||
<!-- 只有退款失败的异步订单才可以重新退款 -->
|
||||
<a-link :disabled="!(row.asyncPay && row.status === 'fail')" @click="reset(row)">重试</a-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
@@ -75,7 +78,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { page, syncById } from './RefundOrder.api'
|
||||
import { page, resetRefund, syncById } from "./RefundOrder.api";
|
||||
import useTablePage from '/@/hooks/bootx/useTablePage'
|
||||
import RefundOrderInfo from './RefundOrderInfo.vue'
|
||||
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
|
||||
@@ -172,6 +175,24 @@
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款重试
|
||||
*/
|
||||
function reset(record) {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '警告',
|
||||
content: '是否同步退款信息',
|
||||
onOk: () => {
|
||||
loading.value = true
|
||||
resetRefund(record.id).then(() => {
|
||||
createMessage.success('提交成功')
|
||||
queryPage()
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
|
Reference in New Issue
Block a user