feat 分账相关对接调整

This commit is contained in:
DaxPay
2024-05-30 20:59:43 +08:00
parent 19e2529a17
commit 10f6e48b7a
4 changed files with 27 additions and 10 deletions

View File

@@ -32,6 +32,16 @@ export function get(id) {
})
}
/**
* 获取订单详细信息
*/
export function getOrderByAllocNo(allocNo: string) {
return defHttp.get<Result>({
url: '/order/allocation/findByAllocNo',
params: { allocNo },
})
}
/**
* 扩展信息
*/
@@ -65,20 +75,20 @@ export function detail(id) {
/**
* 分账完结
*/
export function finish(id) {
export function finish(allocationNo) {
return defHttp.post<Result<AllocationOrder>>({
url: '/order/allocation/finish',
params: { id },
params: { allocationNo },
})
}
/**
* 分账完结
*/
export function retry(id) {
export function retry(bizAllocationNo) {
return defHttp.post<Result<AllocationOrder>>({
url: '/order/allocation/retry',
params: { id },
params: { bizAllocationNo },
})
}

View File

@@ -71,7 +71,12 @@
<script lang="ts" setup>
import { $ref } from 'vue/macros'
import useFormEdit from '/@/hooks/bootx/useFormEdit'
import { get, AllocationOrder } from './AllocationOrder.api'
import {
get,
AllocationOrder,
getOrderByAllocNo,
AllocationOrderExtra
} from './AllocationOrder.api'
import { BasicModal } from '/@/components/Modal'
import { useDict } from '/@/hooks/bootx/useDict'
const {
@@ -83,13 +88,15 @@
const { dictConvert } = useDict()
let order = $ref<AllocationOrder>({})
let orderExtra = $ref<AllocationOrderExtra>({})
// 入口
async function init(record: AllocationOrder) {
visible.value = true
order = record
confirmLoading.value = true
await get(record.id).then(({ data }) => {
order = data
await getOrderByAllocNo(record.allocationNo as string).then(({ data }) => {
order = data.order
orderExtra = data.orderExtra
})
confirmLoading.value = false
}

View File

@@ -199,7 +199,7 @@
title: '分账重试',
content: '确定分账重试吗?',
onOk: () => {
retry(record.id).then(() => {
retry(record.bizAllocationNo).then(() => {
createMessage.success('分账重试请求发送成功')
queryPage()
})
@@ -216,7 +216,7 @@
title: '完结分账',
content: '确定完结分账吗?',
onOk: () => {
finish(record.id).then(() => {
finish(record.allocationNo).then(() => {
createMessage.success('完结请求发送成功')
queryPage()
})

View File

@@ -27,7 +27,7 @@ export function get(id) {
*/
export function getByRefundNo(refundNo) {
return defHttp.get<Result<any>>({
url: '/order/refund/findByOrderNo',
url: '/order/refund/findByRefundNo',
params: { refundNo },
})
}