feat 分账同步

This commit is contained in:
xxm1995
2024-04-12 18:01:04 +08:00
parent 09f7597c2c
commit e6895f570c
2 changed files with 24 additions and 4 deletions

View File

@@ -52,6 +52,16 @@ export function detail(id) {
})
}
/**
* 查询分账结果
*/
export function sync(id){
return defHttp.post<Result<AllocationOrder>>({
url: '/order/allocation/sync',
params: { id },
})
}
/**
* 分账订单
*/

View File

@@ -36,7 +36,7 @@
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
<a-divider type="vertical" />
<a-link @click="sync(row)">同步</a-link>
<a-link @click="syncInfo(row)">同步</a-link>
<a-divider type="vertical" />
<a-link @click="showDetail(row)">明细列表</a-link>
</template>
@@ -59,7 +59,7 @@
<script setup lang="ts">
import { computed, onMounted } from 'vue'
import { $ref } from 'vue/macros'
import { page, findChannels } from './AllocationOrder.api'
import { page, findChannels, sync } from './AllocationOrder.api'
import useTablePage from '/@/hooks/bootx/useTablePage'
import { VxeTable, VxeTableInstance, VxeToolbarInstance } from 'vxe-table'
import { useMessage } from '/@/hooks/web/useMessage'
@@ -133,8 +133,18 @@
* 同步分账状态
* @param record
*/
function sync(record) {
createMessage.info('待实现...')
function syncInfo(record) {
createConfirm({
iconType: 'info',
title: '同步分账状态',
content: '确定同步分账状态吗?',
onOk: () => {
sync(record.id).then(() => {
createMessage.success('同步成功')
queryPage()
})
},
})
}
/**