feat: pay refund
parent
0a797760a0
commit
e867d9a81b
|
@ -40,9 +40,8 @@ export function getChannelPage(params: ChannelPageReqVO) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情支付渠道
|
// 查询详情支付渠道
|
||||||
export function getChannel(merchantId: number, appId: string, code: string) {
|
export function getChannel(appId: string, code: string) {
|
||||||
const params = {
|
const params = {
|
||||||
merchantId,
|
|
||||||
appId,
|
appId,
|
||||||
code,
|
code,
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,10 @@ export const PayChannelEnum = {
|
||||||
code: 'wx_app',
|
code: 'wx_app',
|
||||||
name: '微信 APP 支付',
|
name: '微信 APP 支付',
|
||||||
},
|
},
|
||||||
|
WX_BAR: {
|
||||||
|
code: 'wx_bar',
|
||||||
|
name: '微信条码支付',
|
||||||
|
},
|
||||||
ALIPAY_PC: {
|
ALIPAY_PC: {
|
||||||
code: 'alipay_pc',
|
code: 'alipay_pc',
|
||||||
name: '支付宝 PC 网站支付',
|
name: '支付宝 PC 网站支付',
|
||||||
|
@ -117,6 +121,10 @@ export const PayChannelEnum = {
|
||||||
code: 'alipay_bar',
|
code: 'alipay_bar',
|
||||||
name: '支付宝条码支付',
|
name: '支付宝条码支付',
|
||||||
},
|
},
|
||||||
|
MOCK: {
|
||||||
|
code: 'mock',
|
||||||
|
name: '模拟支付',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,6 +151,7 @@ export const PayDisplayModeEnum = {
|
||||||
export const PayType = {
|
export const PayType = {
|
||||||
WECHAT: 'WECHAT',
|
WECHAT: 'WECHAT',
|
||||||
ALIPAY: 'ALIPAY',
|
ALIPAY: 'ALIPAY',
|
||||||
|
MOCK: 'MOCK',
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -117,15 +117,6 @@ export enum DICT_TYPE {
|
||||||
BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type',
|
BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type',
|
||||||
|
|
||||||
// ========== PAY 模块 ==========
|
// ========== PAY 模块 ==========
|
||||||
PAY_CHANNEL_WECHAT_VERSION = 'pay_channel_wechat_version', // 微信渠道版本
|
|
||||||
PAY_CHANNEL_ALIPAY_SIGN_TYPE = 'pay_channel_alipay_sign_type', // 支付渠道支付宝算法类型
|
|
||||||
PAY_CHANNEL_ALIPAY_MODE = 'pay_channel_alipay_mode', // 支付宝公钥类型
|
|
||||||
PAY_CHANNEL_ALIPAY_SERVER_TYPE = 'pay_channel_alipay_server_type', // 支付宝网关地址
|
|
||||||
PAY_CHANNEL_CODE_TYPE = 'pay_channel_code_type', // 支付渠道编码类型
|
|
||||||
PAY_ORDER_NOTIFY_STATUS = 'pay_order_notify_status', // 商户支付订单回调状态
|
|
||||||
PAY_ORDER_REFUND_STATUS = 'pay_order_refund_status', // 商户支付订单退款状态
|
|
||||||
PAY_REFUND_ORDER_STATUS = 'pay_refund_order_status', // 退款订单状态
|
|
||||||
PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type', // 退款订单类别
|
|
||||||
PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型
|
PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型
|
||||||
PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态
|
PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态
|
||||||
PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态
|
PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, unref } from 'vue'
|
import { ref, unref } from 'vue'
|
||||||
import { aliPayFormSchema, weChatFormSchema } from './app.data'
|
import { aliPayFormSchema, mockFormSchema, weChatFormSchema } from './app.data'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
import { BasicForm, useForm } from '@/components/Form'
|
import { BasicForm, useForm } from '@/components/Form'
|
||||||
|
@ -19,7 +19,7 @@ const type = ref(PayType.ALIPAY)
|
||||||
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
const [registerForm, { setFieldsValue, resetFields, validate }] = useForm({
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
baseColProps: { span: 24 },
|
baseColProps: { span: 24 },
|
||||||
schemas: type.value === PayType.ALIPAY ? aliPayFormSchema : weChatFormSchema,
|
schemas: type.value === PayType.ALIPAY ? aliPayFormSchema : (type.value === PayType.WECHAT ? weChatFormSchema : mockFormSchema),
|
||||||
showActionButtonGroup: false,
|
showActionButtonGroup: false,
|
||||||
actionColOptions: { span: 23 },
|
actionColOptions: { span: 23 },
|
||||||
})
|
})
|
||||||
|
@ -30,7 +30,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
||||||
isUpdate.value = !!data?.isUpdate
|
isUpdate.value = !!data?.isUpdate
|
||||||
type.value = data.type
|
type.value = data.type
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
const res = await getChannel(data.record.payMerchant.id, data.record.id, data.payCode)
|
const res = await getChannel(data.record.id, data.payCode)
|
||||||
const config = JSON.parse(res.config)
|
const config = JSON.parse(res.config)
|
||||||
const payConfig: any = {}
|
const payConfig: any = {}
|
||||||
if (type.value === PayType.ALIPAY) {
|
if (type.value === PayType.ALIPAY) {
|
||||||
|
@ -44,7 +44,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
||||||
payConfig.alipayPublicCertContent = config.alipayPublicCertContent
|
payConfig.alipayPublicCertContent = config.alipayPublicCertContent
|
||||||
payConfig.rootCertContent = config.rootCertContent
|
payConfig.rootCertContent = config.rootCertContent
|
||||||
}
|
}
|
||||||
else {
|
else if (type.value === PayType.WECHAT) {
|
||||||
payConfig.appId = config.appId
|
payConfig.appId = config.appId
|
||||||
payConfig.apiVersion = config.apiVersion
|
payConfig.apiVersion = config.apiVersion
|
||||||
payConfig.mchId = config.mchId
|
payConfig.mchId = config.mchId
|
||||||
|
@ -53,6 +53,8 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
||||||
payConfig.privateCertContent = config.privateCertContent
|
payConfig.privateCertContent = config.privateCertContent
|
||||||
payConfig.apiV3Key = config.apiV3Key
|
payConfig.apiV3Key = config.apiV3Key
|
||||||
}
|
}
|
||||||
|
// else if (type.value === PayType.MOCK) {
|
||||||
|
// }
|
||||||
res.payConfig = payConfig
|
res.payConfig = payConfig
|
||||||
delete res.config
|
delete res.config
|
||||||
setFieldsValue({ ...res })
|
setFieldsValue({ ...res })
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Switch } from 'ant-design-vue'
|
import { Switch } from 'ant-design-vue'
|
||||||
import { h } from 'vue'
|
import { h } from 'vue'
|
||||||
import { changeAppStatus } from '@/api/pay/app'
|
import { changeAppStatus } from '@/api/pay/app'
|
||||||
import { getMerchantListByName } from '@/api/pay/merchant'
|
|
||||||
import type { BasicColumn, FormSchema } from '@/components/Table'
|
import type { BasicColumn, FormSchema } from '@/components/Table'
|
||||||
import { useRender } from '@/components/Table'
|
import { useRender } from '@/components/Table'
|
||||||
import { PayChannelEnum } from '@/enums/systemEnum'
|
import { PayChannelEnum } from '@/enums/systemEnum'
|
||||||
|
@ -19,12 +18,6 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '应用名',
|
|
||||||
dataIndex: 'appId',
|
|
||||||
width: 100,
|
|
||||||
ifShow: false,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '开启状态',
|
title: '开启状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
|
@ -57,14 +50,6 @@ export const columns: BasicColumn[] = [
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '商户名称',
|
|
||||||
dataIndex: 'payMerchant.name',
|
|
||||||
width: 100,
|
|
||||||
customRender: ({ record }) => {
|
|
||||||
return record.payMerchant.name || ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '支付宝配置',
|
title: '支付宝配置',
|
||||||
children: [
|
children: [
|
||||||
|
@ -115,6 +100,16 @@ export const columns: BasicColumn[] = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '模拟支付配置',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: PayChannelEnum.MOCK.name,
|
||||||
|
dataIndex: PayChannelEnum.MOCK.code,
|
||||||
|
width: 160,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
|
@ -132,12 +127,6 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '商户名称',
|
|
||||||
field: 'merchantName',
|
|
||||||
component: 'Input',
|
|
||||||
colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '开启状态',
|
label: '开启状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
@ -168,17 +157,6 @@ export const formSchema: FormSchema[] = [
|
||||||
required: true,
|
required: true,
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '所属商户',
|
|
||||||
field: 'shortName',
|
|
||||||
required: true,
|
|
||||||
component: 'ApiSelect',
|
|
||||||
componentProps: {
|
|
||||||
api: () => getMerchantListByName(''),
|
|
||||||
labelField: 'name',
|
|
||||||
valueField: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '开启状态',
|
label: '开启状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
|
@ -189,7 +167,7 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '支付结果的回调地址',
|
label: '支付结果的回调地址',
|
||||||
field: 'payNotifyUrl',
|
field: 'orderNotifyUrl',
|
||||||
required: true,
|
required: true,
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
|
@ -241,7 +219,10 @@ export const aliPayFormSchema: FormSchema[] = [
|
||||||
required: true,
|
required: true,
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_ALIPAY_SERVER_TYPE, 'string'),
|
options: [
|
||||||
|
{ value: 'https://openapi.alipay.com/gateway.do', label: '线上环境' },
|
||||||
|
{ value: 'https://openapi-sandbox.dl.alipaydev.com/gateway.do', label: '沙箱环境' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -250,7 +231,9 @@ export const aliPayFormSchema: FormSchema[] = [
|
||||||
required: true,
|
required: true,
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_ALIPAY_SIGN_TYPE, 'string'),
|
options: [
|
||||||
|
{ value: 'RSA2', label: 'RSA2', key: 'RSA2' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -260,18 +243,21 @@ export const aliPayFormSchema: FormSchema[] = [
|
||||||
defaultValue: null,
|
defaultValue: null,
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_ALIPAY_MODE),
|
options: [
|
||||||
|
{ value: 1, label: '公钥模式', key: '1' },
|
||||||
|
{ value: 2, label: '证书模式', key: '2' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '商户私钥',
|
label: '应用私钥',
|
||||||
field: 'payConfig.privateKey',
|
field: 'payConfig.privateKey',
|
||||||
required: true,
|
required: true,
|
||||||
ifShow: ({ values }) => !!(values['payConfig.mode'] === 1),
|
ifShow: ({ values }) => !!(values['payConfig.mode'] === 1),
|
||||||
component: 'Input',
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '支付宝公钥字符串',
|
label: '支付宝公钥',
|
||||||
field: 'payConfig.alipayPublicKey',
|
field: 'payConfig.alipayPublicKey',
|
||||||
required: true,
|
required: true,
|
||||||
ifShow: ({ values }) => !!(values['payConfig.mode'] === 1),
|
ifShow: ({ values }) => !!(values['payConfig.mode'] === 1),
|
||||||
|
@ -346,7 +332,10 @@ export const weChatFormSchema: FormSchema[] = [
|
||||||
required: true,
|
required: true,
|
||||||
component: 'RadioGroup',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_WECHAT_VERSION, 'string'),
|
options: [
|
||||||
|
{ value: 'v2', label: 'v2' },
|
||||||
|
{ value: 'v3', label: 'v3' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -354,25 +343,34 @@ export const weChatFormSchema: FormSchema[] = [
|
||||||
field: 'payConfig.mchKey',
|
field: 'payConfig.mchKey',
|
||||||
required: true,
|
required: true,
|
||||||
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v2'),
|
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v2'),
|
||||||
component: 'Input',
|
component: 'InputTextArea',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'apiclient_cert.p12 证书',
|
||||||
|
field: 'payConfig.keyContent',
|
||||||
|
required: true,
|
||||||
|
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v2'),
|
||||||
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'API V3密钥',
|
label: 'API V3密钥',
|
||||||
field: 'payConfig.apiV3Key',
|
field: 'payConfig.apiV3Key',
|
||||||
required: true,
|
required: true,
|
||||||
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v3'),
|
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v3'),
|
||||||
component: 'Input',
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'apiclient_key.perm证书',
|
label: 'apiclient_key.perm证书',
|
||||||
field: 'payConfig.privateKeyContent',
|
field: 'payConfig.privateKeyContent',
|
||||||
required: true,
|
required: true,
|
||||||
|
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v3'),
|
||||||
component: 'InputTextArea',
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'apiclient_cert.perm证书',
|
label: 'apiclient_cert.perm证书',
|
||||||
field: 'payConfig.privateCertContent',
|
field: 'payConfig.privateCertContent',
|
||||||
required: true,
|
required: true,
|
||||||
|
ifShow: ({ values }) => !!(values['payConfig.apiVersion'] === 'v3'),
|
||||||
component: 'InputTextArea',
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -381,3 +379,26 @@ export const weChatFormSchema: FormSchema[] = [
|
||||||
component: 'InputTextArea',
|
component: 'InputTextArea',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const mockFormSchema: FormSchema[] = [
|
||||||
|
{
|
||||||
|
label: '编号',
|
||||||
|
field: 'id',
|
||||||
|
show: false,
|
||||||
|
component: 'Input',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '渠道状态',
|
||||||
|
field: 'status',
|
||||||
|
required: true,
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
options: getDictOptions(DICT_TYPE.COMMON_STATUS),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
field: 'remark',
|
||||||
|
component: 'InputTextArea',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
|
@ -229,6 +229,25 @@ function openChannel(record: Recordable, payCode: string, type: string, isUpdate
|
||||||
<Icon icon="ant-design:close-outlined" />
|
<Icon icon="ant-design:close-outlined" />
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === PayChannelEnum.MOCK.code">
|
||||||
|
<a-button
|
||||||
|
v-if="record.channelCodes.indexOf(PayChannelEnum.MOCK.code) !== -1"
|
||||||
|
type="primary"
|
||||||
|
shape="circle"
|
||||||
|
@click="openChannel(record, PayChannelEnum.MOCK.code, PayType.MOCK, true)"
|
||||||
|
>
|
||||||
|
<Icon icon="ant-design:check-outlined" />
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
v-else
|
||||||
|
type="primary"
|
||||||
|
shape="circle"
|
||||||
|
danger
|
||||||
|
@click="openChannel(record, PayChannelEnum.MOCK.code, PayType.MOCK, false)"
|
||||||
|
>
|
||||||
|
<Icon icon="ant-design:close-outlined" />
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
|
|
|
@ -115,7 +115,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
field: 'channelCode',
|
field: 'channelCode',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE),
|
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE),
|
||||||
},
|
},
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { getMerchantListByName } from '@/api/pay/merchant'
|
import { getAppList } from '@/api/pay/app'
|
||||||
import type { DescItem } from '@/components/Description'
|
import type { DescItem } from '@/components/Description'
|
||||||
import type { BasicColumn, FormSchema } from '@/components/Table'
|
import type { BasicColumn, FormSchema } from '@/components/Table'
|
||||||
import { useRender } from '@/components/Table'
|
import { useRender } from '@/components/Table'
|
||||||
|
@ -11,37 +11,38 @@ export const columns: BasicColumn[] = [
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付渠道',
|
title: '支付金额(元)',
|
||||||
|
dataIndex: 'payPrice',
|
||||||
|
width: 120,
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
return `¥${Number.parseFloat(`${text / 100}`).toFixed(2)}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退款金额(元)',
|
||||||
|
dataIndex: 'refundPrice',
|
||||||
|
width: 120,
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
return `¥${Number.parseFloat(`${text / 100}`).toFixed(2)}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退款订单号',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '商户名称',
|
title: '商户',
|
||||||
dataIndex: 'merchantName',
|
dataIndex: 'merchantRefundId',
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '应用名称',
|
|
||||||
dataIndex: 'appName',
|
|
||||||
width: 120,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '渠道名称',
|
|
||||||
dataIndex: 'channelCodeName',
|
|
||||||
width: 160,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '商户订单号',
|
|
||||||
children: [
|
|
||||||
{
|
{
|
||||||
title: '退款',
|
title: '退款',
|
||||||
dataIndex: 'merchantRefundNo',
|
dataIndex: 'no',
|
||||||
width: 200,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '交易',
|
title: '渠道',
|
||||||
dataIndex: 'merchantOrderId',
|
dataIndex: 'channelRefundNo',
|
||||||
width: 100,
|
width: 160,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -49,62 +50,33 @@ export const columns: BasicColumn[] = [
|
||||||
title: '支付订单号',
|
title: '支付订单号',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '交易',
|
title: '商户',
|
||||||
dataIndex: 'tradeNo',
|
dataIndex: 'merchantOrderId',
|
||||||
width: 100,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '渠道',
|
title: '渠道',
|
||||||
dataIndex: 'channelOrderNo',
|
dataIndex: 'channelOrderNo',
|
||||||
width: 200,
|
width: 100,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '支付金额(元)',
|
|
||||||
dataIndex: 'payAmount',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return `¥${Number.parseFloat(text / 100).toFixed(2)}`
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '退款金额(元)',
|
|
||||||
dataIndex: 'refundAmount',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return `¥${Number.parseFloat(text / 100).toFixed(2)}`
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '退款类型',
|
|
||||||
dataIndex: 'type',
|
|
||||||
width: 100,
|
|
||||||
customRender: ({ text }) => {
|
|
||||||
return useRender.renderDict(text, DICT_TYPE.PAY_REFUND_ORDER_TYPE)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '退款状态',
|
title: '退款状态',
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
return useRender.renderDict(text, DICT_TYPE.PAY_REFUND_ORDER_STATUS)
|
return useRender.renderDict(text, DICT_TYPE.PAY_REFUND_STATUS)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '回调状态',
|
title: '退款渠道',
|
||||||
dataIndex: 'notifyStatus',
|
dataIndex: 'channelCode',
|
||||||
width: 100,
|
width: 100,
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
return useRender.renderDict(text, DICT_TYPE.PAY_ORDER_NOTIFY_STATUS)
|
return useRender.renderDict(text, DICT_TYPE.PAY_CHANNEL_CODE)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '退款原因',
|
|
||||||
dataIndex: 'reason',
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
|
@ -121,51 +93,40 @@ export const columns: BasicColumn[] = [
|
||||||
return useRender.renderDate(text)
|
return useRender.renderDate(text)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '支付应用',
|
||||||
|
dataIndex: 'appName',
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
label: '所属商户',
|
label: '应用编号',
|
||||||
field: 'merchantId',
|
field: 'appId',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: () => getMerchantListByName(''),
|
api: () => getAppList(),
|
||||||
|
labelField: 'name',
|
||||||
|
valueField: 'id',
|
||||||
},
|
},
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '应用编号',
|
label: '商户支付单号',
|
||||||
field: 'appId',
|
field: 'merchantOrderId',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '渠道编码',
|
label: '商户退款单号',
|
||||||
field: 'channelCode',
|
field: 'merchantRefundId',
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions(DICT_TYPE.PAY_CHANNEL_CODE_TYPE),
|
|
||||||
},
|
|
||||||
colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '退款类型',
|
|
||||||
field: 'type',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions(DICT_TYPE.PAY_REFUND_ORDER_TYPE),
|
|
||||||
},
|
|
||||||
colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '商户退款订单号',
|
|
||||||
field: 'merchantRefundNo',
|
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '应用编号',
|
label: '渠道支付单号',
|
||||||
field: 'appId',
|
field: 'channelOrderNo',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
@ -174,16 +135,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
field: 'status',
|
field: 'status',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: getDictOptions(DICT_TYPE.PAY_REFUND_ORDER_STATUS),
|
options: getDictOptions(DICT_TYPE.PAY_REFUND_STATUS),
|
||||||
},
|
|
||||||
colProps: { span: 8 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '退款回调状态',
|
|
||||||
field: 'notifyStatus',
|
|
||||||
component: 'Select',
|
|
||||||
componentProps: {
|
|
||||||
options: getDictOptions(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS),
|
|
||||||
},
|
},
|
||||||
colProps: { span: 8 },
|
colProps: { span: 8 },
|
||||||
},
|
},
|
||||||
|
@ -197,54 +149,51 @@ export const searchFormSchema: FormSchema[] = [
|
||||||
|
|
||||||
export const descSchema: DescItem[] = [
|
export const descSchema: DescItem[] = [
|
||||||
{
|
{
|
||||||
label: '商户名称',
|
label: '商户退款单号',
|
||||||
field: 'merchantName',
|
field: 'merchantRefundId',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '渠道退款单号',
|
||||||
|
field: 'channelRefundNo',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '商户支付单号',
|
||||||
|
field: 'merchantOrderId',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '渠道支付单号',
|
||||||
|
field: 'channelOrderNo',
|
||||||
|
render: (curVal) => {
|
||||||
|
return useRender.renderTag(curVal)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用编号',
|
||||||
|
field: 'appId',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '应用名称',
|
label: '应用名称',
|
||||||
field: 'appName',
|
field: 'appName',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '商品名称',
|
|
||||||
field: 'subject',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '商户退款单号',
|
|
||||||
field: 'merchantRefundNo',
|
|
||||||
render: (curVal) => {
|
|
||||||
return useRender.renderTag(curVal)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '商户订单号',
|
|
||||||
field: 'merchantOrderId',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '支付金额',
|
label: '支付金额',
|
||||||
field: 'payAmount',
|
field: 'payPrice',
|
||||||
render: (curVal) => {
|
render: (curVal) => {
|
||||||
return `¥${Number.parseFloat(curVal / 100).toFixed(2)}`
|
return `¥${Number.parseFloat(`${curVal / 100}`).toFixed(2)}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '退款金额',
|
label: '退款金额',
|
||||||
field: 'refundAmount',
|
field: 'refundPrice',
|
||||||
render: (curVal) => {
|
render: (curVal) => {
|
||||||
return `¥${Number.parseFloat(curVal / 100).toFixed(2)}`
|
return `¥${Number.parseFloat(`${curVal / 100}`).toFixed(2)}`
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '退款类型',
|
|
||||||
field: 'type',
|
|
||||||
render: (curVal) => {
|
|
||||||
return useRender.renderDict(curVal, DICT_TYPE.PAY_REFUND_ORDER_TYPE)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '退款状态',
|
label: '退款状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
render: (curVal) => {
|
render: (curVal) => {
|
||||||
return useRender.renderDict(curVal, DICT_TYPE.PAY_REFUND_ORDER_STATUS)
|
return useRender.renderDict(curVal, DICT_TYPE.PAY_REFUND_STATUS)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -261,13 +210,6 @@ export const descSchema: DescItem[] = [
|
||||||
return useRender.renderDate(curVal)
|
return useRender.renderDate(curVal)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '退款失效时间',
|
|
||||||
field: 'expireTime',
|
|
||||||
render: (curVal) => {
|
|
||||||
return useRender.renderDate(curVal)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '更新时间',
|
label: '更新时间',
|
||||||
field: 'updateTime',
|
field: 'updateTime',
|
||||||
|
@ -276,53 +218,34 @@ export const descSchema: DescItem[] = [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '支付渠道',
|
label: '退款渠道',
|
||||||
field: 'channelCodeName',
|
field: 'channelCode',
|
||||||
|
render: (curVal) => {
|
||||||
|
return useRender.renderDict(curVal, DICT_TYPE.PAY_CHANNEL_CODE)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '支付IP',
|
label: '退款原因',
|
||||||
|
field: 'reason',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '退款 IP',
|
||||||
field: 'userIp',
|
field: 'userIp',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '回调地址',
|
label: '退款 URL',
|
||||||
field: 'notifyUrl',
|
field: 'notifyUrl',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '回调状态',
|
|
||||||
field: 'notifyStatus',
|
|
||||||
render: (curVal) => {
|
|
||||||
return useRender.renderDict(curVal, DICT_TYPE.PAY_ORDER_NOTIFY_STATUS)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '回调时间',
|
|
||||||
field: 'notifyTime',
|
|
||||||
render: (curVal) => {
|
|
||||||
return useRender.renderDate(curVal)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '渠道订单号',
|
|
||||||
field: 'channelOrderNo',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '渠道退款单号',
|
|
||||||
field: 'channelRefundNo',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '渠道错误码',
|
label: '渠道错误码',
|
||||||
field: 'channelErrorCode',
|
field: 'channelErrorCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '渠道错误码描述',
|
label: '渠道错误码描述',
|
||||||
field: 'notifchannelErrorMsgyUrl',
|
field: 'channelErrorMsg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '渠道额外参数',
|
label: '支付通道异步回调内容',
|
||||||
field: 'channelExtras',
|
field: 'channelNotifyData',
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '退款原因',
|
|
||||||
field: 'reason',
|
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue