2023-02-11 00:44:00 +08:00
|
|
|
|
<template>
|
|
|
|
|
<ContentWrap>
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<XTable @register="registerTable">
|
|
|
|
|
<template #toolbar_buttons>
|
|
|
|
|
<!-- 操作:导出 -->
|
|
|
|
|
<XButton
|
|
|
|
|
type="warning"
|
|
|
|
|
preIcon="ep:download"
|
|
|
|
|
:title="t('action.export')"
|
|
|
|
|
v-hasPermi="['pay:refund:export']"
|
|
|
|
|
@click="exportList('退款订单.xls')"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #actionbtns_default="{ row }">
|
|
|
|
|
<!-- 操作:详情 -->
|
|
|
|
|
<XTextButton
|
|
|
|
|
preIcon="ep:view"
|
|
|
|
|
:title="t('action.detail')"
|
|
|
|
|
v-hasPermi="['pay:refund:query']"
|
|
|
|
|
@click="handleDetail(row.id)"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</XTable>
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
|
|
|
|
|
<XModal v-model="dialogVisible" :title="t('action.detail')">
|
|
|
|
|
<!-- 对话框(详情) -->
|
|
|
|
|
<Descriptions :schema="allSchemas.detailSchema" :data="detailData" />
|
|
|
|
|
<!-- 操作按钮 -->
|
|
|
|
|
<template #footer>
|
|
|
|
|
<el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</XModal>
|
|
|
|
|
</template>
|
2023-04-08 11:48:37 +08:00
|
|
|
|
<script setup lang="ts" name="PayRefund">
|
2023-02-11 00:44:00 +08:00
|
|
|
|
import { allSchemas } from './refund.data'
|
|
|
|
|
import * as RefundApi from '@/api/pay/refund'
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
|
|
|
// 列表相关的变量
|
|
|
|
|
const [registerTable, { exportList }] = useXTable({
|
|
|
|
|
allSchemas: allSchemas,
|
2023-04-05 20:13:35 +08:00
|
|
|
|
getListApi: RefundApi.getRefundPage,
|
|
|
|
|
exportListApi: RefundApi.exportRefund
|
2023-02-11 00:44:00 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// ========== CRUD 相关 ==========
|
|
|
|
|
const dialogVisible = ref(false) // 是否显示弹出层
|
|
|
|
|
const detailData = ref() // 详情 Ref
|
|
|
|
|
|
|
|
|
|
// 详情操作
|
|
|
|
|
const handleDetail = async (rowId: number) => {
|
|
|
|
|
// 设置数据
|
2023-04-05 20:13:35 +08:00
|
|
|
|
detailData.value = RefundApi.getRefund(rowId)
|
2023-02-11 00:44:00 +08:00
|
|
|
|
dialogVisible.value = true
|
|
|
|
|
}
|
|
|
|
|
</script>
|