mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-03 19:07:02 +00:00
feat 流水详情表
This commit is contained in:
@@ -27,13 +27,13 @@ export function get(id) {
|
||||
*/
|
||||
export interface CashRecord extends BaseEntity {
|
||||
// 类型
|
||||
type: string
|
||||
type?: string
|
||||
// 金额
|
||||
amount: string
|
||||
amount?: string
|
||||
// 交易订单号
|
||||
orderId: string
|
||||
orderId?: string
|
||||
// 地址
|
||||
ip: string
|
||||
ip?: string
|
||||
// 备注
|
||||
remark: string
|
||||
remark?: string
|
||||
}
|
||||
|
84
src/views/payment/channel/cash/record/CashRecordInfo.vue
Normal file
84
src/views/payment/channel/cash/record/CashRecordInfo.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<basic-modal
|
||||
title="查看"
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
:width="modalWidth"
|
||||
:visible="visible"
|
||||
:mask-closable="showable"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-descriptions bordered title="" :column="{ md: 1, sm: 1, xs: 1 }">
|
||||
<a-descriptions-item label="金额(分)">
|
||||
{{ cashRecord.amount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易订单号">
|
||||
{{ cashRecord.orderId }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="业务类型">
|
||||
<a-tag>{{ dictConvert('CashRecordType', cashRecord.type) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="备注">
|
||||
{{ cashRecord.remark }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易时间">
|
||||
{{ cashRecord.createTime }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
</template>
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { get, CashRecord } from './CashRecord.api'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
|
||||
const {
|
||||
initFormEditType,
|
||||
handleCancel,
|
||||
search,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
modalWidth,
|
||||
title,
|
||||
confirmLoading,
|
||||
visible,
|
||||
editable,
|
||||
showable,
|
||||
formEditType,
|
||||
} = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let loading = $ref(false)
|
||||
let cashRecord = $ref<CashRecord>({})
|
||||
|
||||
/**
|
||||
* 入口
|
||||
*/
|
||||
function init(record: CashRecord) {
|
||||
visible.value = true
|
||||
cashRecord = record
|
||||
initData(record.id as string)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
async function initData(cashId) {
|
||||
loading = true
|
||||
const { data } = await get(cashId)
|
||||
loading = false
|
||||
cashRecord = data
|
||||
}
|
||||
|
||||
defineExpose({ init })
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
@@ -16,20 +16,20 @@
|
||||
<vxe-column type="seq" title="序号" width="60" />
|
||||
<vxe-column field="orderId" title="本地订单ID" width="170" />
|
||||
<vxe-column field="amount" title="金额" width="170" />
|
||||
<vxe-column field="type" title="回调类型">
|
||||
<vxe-column field="type" title="业务类型">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('CashRecordType', row.type) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="remark" title="备注" />
|
||||
<vxe-column field="createTime" title="创建时间" sortable />
|
||||
<!-- <vxe-column fixed="right" width="60" :showOverflow="false" title="操作">-->
|
||||
<!-- <template #default="{ row }">-->
|
||||
<!-- <span>-->
|
||||
<!-- <a-link @click="show(row)">查看</a-link>-->
|
||||
<!-- </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </vxe-column>-->
|
||||
<vxe-column fixed="right" width="60" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<span>
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<vxe-pager
|
||||
size="medium"
|
||||
@@ -40,6 +40,7 @@
|
||||
@page-change="handleTableChange"
|
||||
/>
|
||||
</div>
|
||||
<cash-record-info ref="cashRecordInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -53,6 +54,7 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage'
|
||||
import { QueryField, STRING } from '/@/components/Bootx/Query/Query'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
import CashRecordInfo from './CashRecordInfo.vue'
|
||||
|
||||
// 使用hooks
|
||||
const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, sortChange, sortParam, pages, model, loading } =
|
||||
@@ -67,6 +69,7 @@
|
||||
|
||||
const xTable = $ref<VxeTableInstance>()
|
||||
const xToolbar = $ref<VxeToolbarInstance>()
|
||||
const cashRecordInfo = $ref<any>()
|
||||
|
||||
onMounted(() => {
|
||||
vxeBind()
|
||||
@@ -94,6 +97,7 @@
|
||||
* 查看
|
||||
*/
|
||||
function show(record) {
|
||||
cashRecordInfo.init(record)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<basic-modal
|
||||
title="查看"
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
:width="modalWidth"
|
||||
:visible="visible"
|
||||
:mask-closable="showable"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-descriptions bordered title="" :column="{ md: 1, sm: 1, xs: 1 }">
|
||||
<a-descriptions-item label="金额(分)">
|
||||
{{ voucherRecord.amount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="变动前金额(分)">
|
||||
{{ voucherRecord.oldAmount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="变动后金额(分)">
|
||||
{{ voucherRecord.newAmount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易订单号">
|
||||
{{ voucherRecord.orderId }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="业务类型">
|
||||
<a-tag>{{ dictConvert('VoucherRecordType', voucherRecord.type) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="备注">
|
||||
{{ voucherRecord.remark }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="导入时间">
|
||||
{{ voucherRecord.createTime }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
</template>
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { get, VoucherRecord } from './VoucherRecord.api'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
|
||||
const {
|
||||
initFormEditType,
|
||||
handleCancel,
|
||||
search,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
modalWidth,
|
||||
title,
|
||||
confirmLoading,
|
||||
visible,
|
||||
editable,
|
||||
showable,
|
||||
formEditType,
|
||||
} = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let loading = $ref(false)
|
||||
let voucherRecord = $ref<VoucherRecord>({})
|
||||
|
||||
/**
|
||||
* 入口
|
||||
*/
|
||||
function init(record: VoucherRecord) {
|
||||
visible.value = true
|
||||
voucherRecord = record
|
||||
initData(record.id as string)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
async function initData(voucherId) {
|
||||
loading = true
|
||||
const { data } = await get(voucherId)
|
||||
loading = false
|
||||
voucherRecord = data
|
||||
}
|
||||
|
||||
defineExpose({ init })
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
@@ -12,15 +12,18 @@
|
||||
<vxe-column type="seq" title="序号" width="60" />
|
||||
<vxe-column field="type" title="本地订单ID" min-width="170">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('WalletRecordType', row.type) }}</a-tag>
|
||||
<a-tag>{{ dictConvert('VoucherRecordType', row.type) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="amount" title="金额" />
|
||||
<vxe-column field="oldAmount" title="变动之前的金额" />
|
||||
<vxe-column field="newAmount" title="变动之后的金额" />
|
||||
<vxe-column field="createTime" title="记录时间" sortable />
|
||||
<vxe-column field="orderId" title="订单号" />
|
||||
<vxe-column field="remark" title="备注" />
|
||||
<vxe-column field="createTime" title="创建时间" sortable />
|
||||
<vxe-column fixed="right" width="50" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<vxe-pager
|
||||
size="medium"
|
||||
@@ -30,6 +33,7 @@
|
||||
:total="pagination.total"
|
||||
@page-change="handleTableChange"
|
||||
/>
|
||||
<voucher-record-info ref="voucherRecordInfo" />
|
||||
</basic-drawer>
|
||||
</template>
|
||||
|
||||
@@ -43,6 +47,8 @@
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue'
|
||||
import { Voucher } from '../manager/Voucher.api'
|
||||
import ALink from '/@/components/Link/Link.vue'
|
||||
import VoucherRecordInfo from './VoucherRecordInfo.vue'
|
||||
|
||||
// 使用hooks
|
||||
const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, sortChange, sortParam, pages, model, loading } =
|
||||
@@ -52,6 +58,7 @@
|
||||
|
||||
let visible = $ref<boolean>(false)
|
||||
let voucher = $ref<Voucher>({})
|
||||
let voucherRecordInfo = $ref<any>()
|
||||
|
||||
const xTable = $ref<VxeTableInstance>()
|
||||
const xToolbar = $ref<VxeToolbarInstance>()
|
||||
@@ -91,6 +98,14 @@
|
||||
})
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
*/
|
||||
function show(record) {
|
||||
voucherRecordInfo.init(record)
|
||||
}
|
||||
|
||||
defineExpose({ init })
|
||||
</script>
|
||||
|
||||
|
90
src/views/payment/channel/wallet/record/WalletRecordInfo.vue
Normal file
90
src/views/payment/channel/wallet/record/WalletRecordInfo.vue
Normal file
@@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<basic-modal
|
||||
title="查看"
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
:width="modalWidth"
|
||||
:visible="visible"
|
||||
:mask-closable="showable"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-descriptions bordered title="" :column="{ md: 1, sm: 1, xs: 1 }">
|
||||
<a-descriptions-item label="金额(分)">
|
||||
{{ walletRecord.amount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="变动前金额(分)">
|
||||
{{ walletRecord.oldAmount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="变动后金额(分)">
|
||||
{{ walletRecord.newAmount }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易订单号">
|
||||
{{ walletRecord.orderId }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="业务类型">
|
||||
<a-tag>{{ dictConvert('WalletRecordType', walletRecord.type) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="备注">
|
||||
{{ walletRecord.remark }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="记录时间">
|
||||
{{ walletRecord.createTime }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
</template>
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { get, WalletRecord } from './WalletRecord.api'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
|
||||
const {
|
||||
initFormEditType,
|
||||
handleCancel,
|
||||
search,
|
||||
labelCol,
|
||||
wrapperCol,
|
||||
modalWidth,
|
||||
title,
|
||||
confirmLoading,
|
||||
visible,
|
||||
editable,
|
||||
showable,
|
||||
formEditType,
|
||||
} = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let loading = $ref(false)
|
||||
let walletRecord = $ref<WalletRecord>({})
|
||||
|
||||
/**
|
||||
* 入口
|
||||
*/
|
||||
function init(record: WalletRecord) {
|
||||
visible.value = true
|
||||
walletRecord = record
|
||||
initData(record.id as string)
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
async function initData(walletId) {
|
||||
loading = true
|
||||
const { data } = await get(walletId)
|
||||
loading = false
|
||||
walletRecord = data
|
||||
}
|
||||
|
||||
defineExpose({ init })
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
@@ -19,6 +19,11 @@
|
||||
<vxe-column field="amount" title="金额" />
|
||||
<vxe-column field="remark" title="备注" />
|
||||
<vxe-column field="createTime" title="记录时间" sortable />
|
||||
<vxe-column fixed="right" width="50" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<vxe-pager
|
||||
size="medium"
|
||||
@@ -28,6 +33,7 @@
|
||||
:total="pagination.total"
|
||||
@page-change="handleTableChange"
|
||||
/>
|
||||
<wallet-record-info ref="walletRecordInfo" />
|
||||
</basic-drawer>
|
||||
</template>
|
||||
|
||||
@@ -41,6 +47,8 @@
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
import { Wallet } from '/@/views/payment/channel/wallet/manager/Wallet.api'
|
||||
import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue'
|
||||
import WalletRecordInfo from './WalletRecordInfo.vue'
|
||||
import ALink from "/@/components/Link/Link.vue";
|
||||
|
||||
// 使用hooks
|
||||
const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, sortChange, sortParam, pages, model, loading } =
|
||||
@@ -50,6 +58,7 @@
|
||||
|
||||
let visible = $ref<boolean>(false)
|
||||
let wallet = $ref<Wallet>({})
|
||||
let walletRecordInfo = $ref<any>()
|
||||
|
||||
const xTable = $ref<VxeTableInstance>()
|
||||
const xToolbar = $ref<VxeToolbarInstance>()
|
||||
@@ -74,6 +83,13 @@
|
||||
queryPage()
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
function show(record) {
|
||||
walletRecordInfo.init(record)
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
|
Reference in New Issue
Block a user