mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-05-13 01:46:01 +08:00
refactor(daxpay): 分账页面联调
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
import { VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
|
||||
import BasicDrawer from '@/components/Drawer/src/BasicDrawer.vue'
|
||||
import { useDict } from '@/hooks/bootx/useDict'
|
||||
import { AllocOrder, AllocDetail, detailList } from './Allocation.api'
|
||||
import { AllocOrder, AllocDetail, detailList } from './AllocationOrder.api'
|
||||
// 使用hooks
|
||||
const { loading } = useTablePage(queryPage)
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
@@ -1,11 +1,73 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<basic-modal
|
||||
title="查看分账单信息"
|
||||
v-bind="$attrs"
|
||||
:loading="confirmLoading"
|
||||
:width="1000"
|
||||
:open="visible"
|
||||
:mask-closable="showable"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-descriptions title="" bordered :column="{ md: 2, sm: 1, xs: 1 }">
|
||||
<a-descriptions-item label="接收方编号">
|
||||
{{ order.receiverNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="接收方姓名">
|
||||
{{ order.receiverName }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="分账接收方类型">
|
||||
<a-tag>{{ dictConvert('allocation_status', order.receiverType) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="分账比例"> {{ order.rate }}% </a-descriptions-item>
|
||||
<a-descriptions-item label="分账金额(元)"> {{ order.amount }} </a-descriptions-item>
|
||||
<a-descriptions-item label="分账结果">
|
||||
<a-tag>{{ dictConvert('allocation_result', order.result) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="完成时间">
|
||||
{{ order.finishTime }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="错误代码" v-if="order.errorCode">
|
||||
{{ order.errorCode }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="错误原因" v-if="order.errorMsg">
|
||||
{{ order.errorMsg }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-spin>
|
||||
<template #footer>
|
||||
<a-space>
|
||||
<a-button key="cancel" @click="handleCancel">取消</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</basic-modal>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
<script lang="ts" setup>
|
||||
import useFormEdit from '@/hooks/bootx/useFormEdit'
|
||||
import { AllocDetail, get } from './AllocationOrder.api'
|
||||
import { BasicModal } from '@/components/Modal'
|
||||
import { useDict } from '@/hooks/bootx/useDict'
|
||||
import { ref } from 'vue'
|
||||
|
||||
</style>
|
||||
const { handleCancel, confirmLoading, visible, showable } = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let order = ref<AllocDetail>({})
|
||||
// 入口
|
||||
async function init(record: AllocDetail) {
|
||||
visible.value = true
|
||||
order.value = record
|
||||
confirmLoading.value = true
|
||||
await get(record.id).then(({ data }) => {
|
||||
order.value = data
|
||||
})
|
||||
confirmLoading.value = false
|
||||
}
|
||||
// 获取信息
|
||||
defineExpose({
|
||||
init,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
@@ -101,12 +101,13 @@
|
||||
/>
|
||||
</div>
|
||||
<AllocDetailList ref="allocDetailList" />
|
||||
<AllocOrderInfo ref="allocOrderInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { page, sync, finish, retry } from './Allocation.api'
|
||||
import { page, sync, finish, retry } from './AllocationOrder.api'
|
||||
import useTablePage from '@/hooks/bootx/useTablePage'
|
||||
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
@@ -118,6 +119,7 @@
|
||||
import { FormEditType } from '@/enums/formTypeEnum'
|
||||
import AllocDetailList from './AllocDetailList.vue'
|
||||
import { Icon } from '@/components/Icon'
|
||||
import AllocOrderInfo from "./AllocOrderInfo.vue";
|
||||
|
||||
// 使用hooks
|
||||
const {
|
||||
@@ -137,7 +139,7 @@
|
||||
const xTable = ref<VxeTableInstance>()
|
||||
const xToolbar = ref<VxeToolbarInstance>()
|
||||
const allocDetailList = ref<any>()
|
||||
const allocationOrderInfo = ref<any>()
|
||||
const allocOrderInfo = ref<any>()
|
||||
|
||||
let channelList = ref<LabeledValue[]>([])
|
||||
const payOrderInfo = ref<any>()
|
||||
@@ -181,7 +183,7 @@
|
||||
* 查看
|
||||
*/
|
||||
function show(record) {
|
||||
allocationOrderInfo.value.init(record.allocNo, FormEditType.Show)
|
||||
allocOrderInfo.value.init(record)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -149,9 +149,9 @@ export interface AllocDetail extends MchEntity {
|
||||
// 分账明细单号
|
||||
receiverId?: string
|
||||
// 比例
|
||||
rate: number
|
||||
rate?: number
|
||||
// 金额
|
||||
amount: number
|
||||
amount?: number
|
||||
// 分账接收方类型
|
||||
receiverType?: string
|
||||
// 接收方账号
|
||||
Reference in New Issue
Block a user