mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-12 15:35:39 +08:00
ref 各类型订单扩展合并到订单对象中
This commit is contained in:
@@ -132,18 +132,8 @@ export interface AllocationOrder extends BaseEntity {
|
||||
status?: string
|
||||
// 处理结果
|
||||
result?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误原因
|
||||
errorMsg?: string
|
||||
// 完成时间
|
||||
finishTime?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账扩展订单信息
|
||||
*/
|
||||
export interface AllocationOrderExtra {
|
||||
// 异步通知地址
|
||||
notifyUrl?: string
|
||||
// 商户扩展参数
|
||||
@@ -154,6 +144,10 @@ export interface AllocationOrderExtra {
|
||||
reqTime?: string
|
||||
// 支付终端ip
|
||||
clientIp?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误原因
|
||||
errorMsg?: string
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
{{ order.finishTime }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="商户扩展参数" :span="2">
|
||||
{{ orderExtra.attach }}
|
||||
{{ order.attach }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="终端IP" :span="2">
|
||||
{{ orderExtra.clientIp || '空' }}
|
||||
{{ order.clientIp || '空' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="通知地址" :span="4">
|
||||
{{ orderExtra.notifyUrl }}
|
||||
{{ order.notifyUrl }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item v-if="order.errorCode" label="错误编码" :span="2">
|
||||
{{ order.errorMsg }}
|
||||
@@ -80,14 +80,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { $ref } from 'vue/macros'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import { AllocationOrder, getOrderByAllocNo, AllocationOrderExtra } from './AllocationOrder.api'
|
||||
import { AllocationOrder, getOrderByAllocNo } from './AllocationOrder.api'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
const { handleCancel, confirmLoading, visible, showable } = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let order = $ref<AllocationOrder>({})
|
||||
let orderExtra = $ref<AllocationOrderExtra>({})
|
||||
/**
|
||||
* 入口
|
||||
*/
|
||||
@@ -95,8 +94,7 @@
|
||||
visible.value = true
|
||||
confirmLoading.value = true
|
||||
await getOrderByAllocNo(allocNo).then(({ data }) => {
|
||||
order = data.order
|
||||
orderExtra = data.extra
|
||||
order = data
|
||||
})
|
||||
confirmLoading.value = false
|
||||
}
|
||||
|
||||
@@ -110,18 +110,6 @@ export interface PayOrder extends BaseEntity {
|
||||
expiredTime?: string
|
||||
// 关闭时间
|
||||
closeTime?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误信息
|
||||
errorMsg?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付扩展信息
|
||||
*/
|
||||
export interface PayOrderExtra {
|
||||
// 是否不需要异步通知
|
||||
notNotify?: string
|
||||
// 异步通知地址
|
||||
notifyUrl?: string
|
||||
// 商户扩展参数
|
||||
@@ -132,4 +120,8 @@ export interface PayOrderExtra {
|
||||
reqTime?: string
|
||||
// 支付终端ip
|
||||
clientIp?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误信息
|
||||
errorMsg?: string
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
{{ dictConvert('PayOrderRefundStatus', order.refundStatus) || '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="通知地址" :span="2">
|
||||
{{ orderExtra.notifyUrl || '无' }}
|
||||
{{ order.notifyUrl || '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="自动分账" :span="1">
|
||||
{{ order.autoAllocation || '无' }}
|
||||
@@ -56,13 +56,13 @@
|
||||
{{ order.description }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="客户IP">
|
||||
{{ orderExtra.clientIp }}
|
||||
{{ order.clientIp }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="商户扩展参数" :span="2">
|
||||
{{ orderExtra.attach || '无' }}
|
||||
{{ order.attach || '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="请求时间">
|
||||
{{ orderExtra.reqTime || '无' }}
|
||||
{{ order.reqTime || '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="支付时间">
|
||||
{{ order.payTime || '无' }}
|
||||
@@ -89,21 +89,19 @@
|
||||
<script lang="ts" setup>
|
||||
import { $ref } from 'vue/macros'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import { PayOrder, PayOrderExtra, getOrderByOrderNo } from './PayOrder.api'
|
||||
import { PayOrder, getOrderByOrderNo } from './PayOrder.api'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
const { handleCancel, confirmLoading, visible, showable } = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
let order = $ref<PayOrder>({})
|
||||
let orderExtra = $ref<PayOrderExtra>({})
|
||||
// 入口
|
||||
async function init(orderNo: string) {
|
||||
visible.value = true
|
||||
confirmLoading.value = true
|
||||
await getOrderByOrderNo(orderNo).then(({ data }) => {
|
||||
order = data.payOrder
|
||||
orderExtra = data.payOrderExtra
|
||||
order = data
|
||||
})
|
||||
confirmLoading.value = false
|
||||
}
|
||||
|
||||
@@ -32,16 +32,6 @@ export function getByRefundNo(refundNo) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单扩展信息
|
||||
*/
|
||||
export function getOrderExtra(id) {
|
||||
return defHttp.get<Result<RefundOrderExtra>>({
|
||||
url: '/order/refund/findExtraById',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起退款
|
||||
*/
|
||||
@@ -112,18 +102,6 @@ export interface RefundOrder extends BaseEntity {
|
||||
finishTime?: string
|
||||
// 退款原因
|
||||
reason?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误信息
|
||||
errorMsg?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款钉钉扩展信息
|
||||
*/
|
||||
export interface RefundOrderExtra {
|
||||
// 是否不需要异步通知
|
||||
notNotify?: string
|
||||
// 异步通知地址
|
||||
notifyUrl?: string
|
||||
// 商户扩展参数
|
||||
@@ -134,4 +112,8 @@ export interface RefundOrderExtra {
|
||||
reqTime?: string
|
||||
// 支付终端ip
|
||||
clientIp?: string
|
||||
// 错误码
|
||||
errorCode?: string
|
||||
// 错误信息
|
||||
errorMsg?: string
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<a-tag>{{ dictConvert('RefundStatus', order.status) }}</a-tag>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="退款终端ip">
|
||||
{{ orderExtra.clientIp }}
|
||||
{{ order.clientIp }}
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<template #footer>
|
||||
@@ -56,14 +56,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { $ref } from 'vue/macros'
|
||||
import useFormEdit from '/@/hooks/bootx/useFormEdit'
|
||||
import {get, getByRefundNo, getOrderExtra, RefundOrder, RefundOrderExtra} from './RefundOrder.api'
|
||||
import { getByRefundNo, RefundOrder } from './RefundOrder.api'
|
||||
import { BasicModal } from '/@/components/Modal'
|
||||
import { useDict } from '/@/hooks/bootx/useDict'
|
||||
const { handleCancel, confirmLoading, visible, showable } = useFormEdit()
|
||||
const { dictConvert } = useDict()
|
||||
// 表单
|
||||
let order = $ref<RefundOrder>({})
|
||||
let orderExtra = $ref<RefundOrderExtra>({})
|
||||
|
||||
// 事件
|
||||
const emits = defineEmits(['ok'])
|
||||
@@ -72,8 +71,7 @@
|
||||
visible.value = true
|
||||
confirmLoading.value = true
|
||||
getByRefundNo(refundNo).then(({ data }) => {
|
||||
order = data.refundOrder
|
||||
orderExtra = data.refundOrderExtra
|
||||
order = data
|
||||
confirmLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user