feat 分账显示优化

This commit is contained in:
DaxPay
2024-05-31 17:42:10 +08:00
parent 10f6e48b7a
commit 2e0ee31597
4 changed files with 23 additions and 22 deletions

View File

@@ -52,6 +52,15 @@
<a-descriptions-item label="完成时间" :span="2">
{{ order.finishTime }}
</a-descriptions-item>
<a-descriptions-item label="商户扩展参数" :span="2">
{{ orderExtra.attach }}
</a-descriptions-item>
<a-descriptions-item label="终端IP" :span="2">
{{ orderExtra.clientIp || '空' }}
</a-descriptions-item>
<a-descriptions-item label="通知地址" :span="4">
{{ orderExtra.notifyUrl }}
</a-descriptions-item>
<a-descriptions-item v-if="order.errorCode" label="错误编码" :span="2">
{{ order.errorMsg }}
</a-descriptions-item>
@@ -71,32 +80,23 @@
<script lang="ts" setup>
import { $ref } from 'vue/macros'
import useFormEdit from '/@/hooks/bootx/useFormEdit'
import {
get,
AllocationOrder,
getOrderByAllocNo,
AllocationOrderExtra
} from './AllocationOrder.api'
import { AllocationOrder, getOrderByAllocNo, AllocationOrderExtra } from './AllocationOrder.api'
import { BasicModal } from '/@/components/Modal'
import { useDict } from '/@/hooks/bootx/useDict'
const {
handleCancel,
confirmLoading,
visible,
showable,
} = useFormEdit()
const { handleCancel, confirmLoading, visible, showable } = useFormEdit()
const { dictConvert } = useDict()
let order = $ref<AllocationOrder>({})
let orderExtra = $ref<AllocationOrderExtra>({})
// 入口
async function init(record: AllocationOrder) {
/**
* 入口
*/
async function init(allocationNo) {
visible.value = true
order = record
confirmLoading.value = true
await getOrderByAllocNo(record.allocationNo as string).then(({ data }) => {
await getOrderByAllocNo(allocationNo).then(({ data }) => {
order = data.order
orderExtra = data.orderExtra
orderExtra = data.extra
})
confirmLoading.value = false
}

View File

@@ -66,7 +66,7 @@
<a-menu-item>
<a-link @click="syncInfo(row)">同步</a-link>
</a-menu-item>
<a-menu-item v-if="row.status === 'allocation_end'">
<a-menu-item v-if="['allocation_end', 'finish_failed'].includes(row.status)">
<a-link @click="finishInfo(row)">完结</a-link>
</a-menu-item>
</a-menu>
@@ -154,7 +154,7 @@
* 查看
*/
function show(record) {
allocationOrderInfo.init(record, FormEditType.Show)
allocationOrderInfo.init(record.allocationNo, FormEditType.Show)
}
/**

View File

@@ -26,8 +26,8 @@
<a-tag> {{ dictConvert('AsyncPayChannel', form.channel) }}</a-tag>
</a-descriptions-item>
<a-descriptions-item label="同步结果" :span="2">
<a-tag v-if="row.syncType === 'pay'">{{ dictConvert('PaySyncStatus', form.outTradeStatus) }}</a-tag>
<a-tag v-else-if="row.syncType === 'refund'">{{ dictConvert('RefundSyncStatus', form.outTradeStatus) }}</a-tag>
<a-tag v-if="form.syncType === 'pay'">{{ dictConvert('PaySyncStatus', form.outTradeStatus) }}</a-tag>
<a-tag v-else-if="form.syncType === 'refund'">{{ dictConvert('RefundSyncStatus', form.outTradeStatus) }}</a-tag>
<a-tag v-else></a-tag>
</a-descriptions-item>
<a-descriptions-item label="修复单号" :span="2">

View File

@@ -38,7 +38,7 @@
<a-tag v-else>无需修复</a-tag>
</template>
</vxe-column>
<vxe-column field="errorMsg" title="错误消息" :min-width="160"/>
<vxe-column field="errorMsg" title="错误消息" :min-width="160" />
<vxe-column field="createTime" title="同步时间" :min-width="160" />
<vxe-column fixed="right" :min-width="60" :showOverflow="false" title="操作">
<template #default="{ row }">
@@ -81,6 +81,7 @@
import PayRepairRecordInfo from '/@/views/payment/record/repair/PayRepairRecordInfo.vue'
import RefundOrderInfo from '/@/views/payment/order/refund/RefundOrderInfo.vue'
import AllocationOrderInfo from '/@/views/payment/allocation/order/AllocationOrderInfo.vue'
import ALink from '/@/components/Link/Link.vue'
// 使用hooks
const { handleTableChange, pageQueryResHandel, resetQueryParams, pagination, pages, model, loading } = useTablePage(queryPage)