From 0b54503bb26e9564d2e66db273cfcc15441e7a68 Mon Sep 17 00:00:00 2001 From: bootx Date: Sun, 7 Apr 2024 23:14:55 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=88=86=E8=B4=A6=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../allocation/group/AllocationGroup.api.ts | 1 - .../group/AllocationGroupConfig.vue | 29 ++-- .../order/allocation/AllocationOrder.api.ts | 103 +++++++++++++ .../allocation/AllocationOrderDetailInfo.vue | 11 ++ .../allocation/AllocationOrderDetailList.vue | 11 ++ .../order/allocation/AllocationOrderInfo.vue | 11 ++ .../order/allocation/AllocationOrderList.vue | 136 ++++++++++++++++++ 7 files changed, 284 insertions(+), 18 deletions(-) create mode 100644 src/views/payment/order/allocation/AllocationOrder.api.ts create mode 100644 src/views/payment/order/allocation/AllocationOrderDetailInfo.vue create mode 100644 src/views/payment/order/allocation/AllocationOrderDetailList.vue create mode 100644 src/views/payment/order/allocation/AllocationOrderInfo.vue create mode 100644 src/views/payment/order/allocation/AllocationOrderList.vue diff --git a/src/views/payment/allocation/group/AllocationGroup.api.ts b/src/views/payment/allocation/group/AllocationGroup.api.ts index a4a127c4c..27be747dc 100644 --- a/src/views/payment/allocation/group/AllocationGroup.api.ts +++ b/src/views/payment/allocation/group/AllocationGroup.api.ts @@ -1,7 +1,6 @@ import { defHttp } from '/@/utils/http/axios' import { PageResult, Result } from '/#/axios' import { BaseEntity } from '/#/web' -import { LabeledValue } from 'ant-design-vue/lib/select' /** * 分页查询 diff --git a/src/views/payment/allocation/group/AllocationGroupConfig.vue b/src/views/payment/allocation/group/AllocationGroupConfig.vue index f10c29c91..94f859c71 100644 --- a/src/views/payment/allocation/group/AllocationGroupConfig.vue +++ b/src/views/payment/allocation/group/AllocationGroupConfig.vue @@ -52,14 +52,7 @@ import { useMessage } from '/@/hooks/web/useMessage' import BasicDrawer from '/@/components/Drawer/src/BasicDrawer.vue' import { useDict } from '/@/hooks/bootx/useDict' - import { - AllocationGroup, - AllocationGroupReceiver, - bindReceivers, - getReceivers, - unbindReceiver, - updateRate - } from "./AllocationGroup.api"; + import { AllocationGroup, AllocationGroupReceiver, bindReceivers, getReceivers, unbindReceiver, updateRate } from './AllocationGroup.api' import AllocationGroupSelect from '/@/views/payment/allocation/group/AllocationGroupSelect.vue' // 使用hooks @@ -120,7 +113,7 @@ groupId: group.id, receivers, } - console.log() + createMessage.success('添加中...') bindReceivers(param).then(() => { createMessage.success('添加成功') queryPage() @@ -147,7 +140,7 @@ * 实时修改触发, */ function editActivatedEvent({ row }) { - row.rate =row.rate / 100 + row.rate = row.rate / 100 } /** @@ -156,17 +149,19 @@ function editClosedEvent({ row, column }) { row.rate = Math.round(row.rate * 100) // 判断单元格值是否被修改 - if (xTable?.isUpdateByRow(row, column.field)){ + if (xTable?.isUpdateByRow(row, column.field)) { createConfirm({ iconType: 'warning', title: '确定修改该分账比例吗?', onOk: () => { - updateRate(row.id, row.rate ).then(() => { - createMessage.success('修改成功') - xTable.reloadRow(row, null, column.field) - }).catch(() => { - xTable?.revertData(row) - }) + updateRate(row.id, row.rate) + .then(() => { + createMessage.success('修改成功') + xTable.reloadRow(row, null, column.field) + }) + .catch(() => { + xTable?.revertData(row) + }) }, onCancel: () => { xTable?.revertData(row) diff --git a/src/views/payment/order/allocation/AllocationOrder.api.ts b/src/views/payment/order/allocation/AllocationOrder.api.ts new file mode 100644 index 000000000..dd1e730e3 --- /dev/null +++ b/src/views/payment/order/allocation/AllocationOrder.api.ts @@ -0,0 +1,103 @@ +import { defHttp } from '/@/utils/http/axios' +import { PageResult, Result } from '/#/axios' +import { BaseEntity } from '/#/web' +import { LabeledValue } from 'ant-design-vue/lib/select' + +/** + * 获取可以分账的通道 + */ +export function findChannels() { + return defHttp.get>({ + url: '/allocation/order/findChannels', + }) +} + +/** + * 分页 + */ +export function page(params) { + return defHttp.get>>({ + url: '/allocation/order/page', + params, + }) +} + +/** + * 查询详情 + */ +export function get(id: string) { + return defHttp.get>({ + url: '/allocation/order/findById', + params: { id }, + }) +} + +/** + * 明细列表 + */ +export function detailList(orderId: string) { + return defHttp.get>({ + url: '/allocation/order/detail/findAll', + params: { orderId }, + }) +} + +/** + * 明细详情 + */ +export function detail(id: string) { + return defHttp.get>({ + url: '/allocation/order/detail/findById', + params: { id }, + }) +} + +/** + * 分账订单 + */ +export interface AllocationOrder extends BaseEntity { + // 支付订单ID + paymentId?: string + // 支付标题 + title?: string + // 网关支付订单号 + gatewayPayOrderNo?: string + // 网关分账单号 + gatewayAllocationNo?: string + // 分账单号 + allocationNo?: string + // 外部请求号 + outReqNo?: string + // 所属通道 + channel?: string + // 总分账金额 + amount?: number + // 分账描述 + description?: string + // 状态 + status?: string + // 错误原因 + errorMsg?: string + // 完成时间 + finishTime?: string +} + +/** + * 分账订单明细 + */ +export interface AllocationOrderDetail extends BaseEntity { + // 分账订单ID + orderId?: string + // 分账明细单号 + receiverId?: string + // 分账明细状态 + rate?: number + // 分账明细状态 + amount?: number + // 分账接收方类型 + receiverType?: string + // 接收方账号 + receiverAccount?: string + // 接收方姓名 + receiverName?: string +} diff --git a/src/views/payment/order/allocation/AllocationOrderDetailInfo.vue b/src/views/payment/order/allocation/AllocationOrderDetailInfo.vue new file mode 100644 index 000000000..0a8d203dd --- /dev/null +++ b/src/views/payment/order/allocation/AllocationOrderDetailInfo.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/views/payment/order/allocation/AllocationOrderDetailList.vue b/src/views/payment/order/allocation/AllocationOrderDetailList.vue new file mode 100644 index 000000000..5df35b2ed --- /dev/null +++ b/src/views/payment/order/allocation/AllocationOrderDetailList.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/views/payment/order/allocation/AllocationOrderInfo.vue b/src/views/payment/order/allocation/AllocationOrderInfo.vue new file mode 100644 index 000000000..5df35b2ed --- /dev/null +++ b/src/views/payment/order/allocation/AllocationOrderInfo.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/views/payment/order/allocation/AllocationOrderList.vue b/src/views/payment/order/allocation/AllocationOrderList.vue new file mode 100644 index 000000000..018c098ae --- /dev/null +++ b/src/views/payment/order/allocation/AllocationOrderList.vue @@ -0,0 +1,136 @@ + + + + +