Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.7 #5

Merged
merged 7 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat 分账相关对接调整
  • Loading branch information
xxm1995 committed May 30, 2024
commit 10f6e48b7a1e0b8ef0f1ffe6bbe1f165966f77bc
18 changes: 14 additions & 4 deletions src/views/payment/allocation/order/AllocationOrder.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ export function get(id) {
})
}

/**
* 获取订单详细信息
*/
export function getOrderByAllocNo(allocNo: string) {
return defHttp.get<Result>({
url: '/order/allocation/findByAllocNo',
params: { allocNo },
})
}

/**
* 扩展信息
*/
Expand Down Expand Up @@ -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 },
})
}

Expand Down
13 changes: 10 additions & 3 deletions src/views/payment/allocation/order/AllocationOrderInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/payment/allocation/order/AllocationOrderList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
title: '分账重试',
content: '确定分账重试吗?',
onOk: () => {
retry(record.id).then(() => {
retry(record.bizAllocationNo).then(() => {
createMessage.success('分账重试请求发送成功')
queryPage()
})
Expand All @@ -216,7 +216,7 @@
title: '完结分账',
content: '确定完结分账吗?',
onOk: () => {
finish(record.id).then(() => {
finish(record.allocationNo).then(() => {
createMessage.success('完结请求发送成功')
queryPage()
})
Expand Down
2 changes: 1 addition & 1 deletion src/views/payment/order/refund/RefundOrder.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
})
}
Expand Down