Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
876bf8de
authored
May 10, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:【PAY 支付】转账单,支持导出功能
parent
048ecd72
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
52 deletions
+93
-52
src/api/pay/transfer/index.ts
+6
-13
src/views/pay/notify/NotifyDetail.vue
+9
-3
src/views/pay/notify/index.vue
+33
-7
src/views/pay/transfer/TransferDetail.vue
+7
-7
src/views/pay/transfer/index.vue
+38
-22
No files found.
src/api/pay/transfer/index.ts
View file @
876bf8de
import
request
from
'@/config/axios'
// TODO @芋艿:调整字段
export
interface
TransferVO
{
appId
:
number
channelCode
:
string
merchantTransferId
:
string
type
:
number
price
:
number
subject
:
string
userName
:
string
alipayLogonId
:
string
openid
:
string
}
// 查询转账单列表
export
const
getTransferPage
=
async
(
params
:
PageParam
)
=>
{
return
await
request
.
get
({
url
:
`/pay/transfer/page`
,
params
})
}
// 查询转账单详情
export
const
getTransfer
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
'/pay/transfer/get?id='
+
id
})
}
// 导出转账单
export
const
exportTransfer
=
async
(
params
:
PageParam
)
=>
{
return
await
request
.
download
({
url
:
'/pay/transfer/export-excel'
,
params
})
}
src/views/pay/notify/NotifyDetail.vue
View file @
876bf8de
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"通知详情"
width=
"50%"
>
<el-descriptions
:column=
"2"
>
<el-descriptions-item
label=
"商户订单编号"
>
<el-descriptions-item
label=
"通知状态"
:span=
"2"
>
<dict-tag
:type=
"DICT_TYPE.PAY_NOTIFY_STATUS"
:value=
"detailData.status"
/>
</el-descriptions-item>
<el-descriptions-item
label=
"商户订单编号"
:span=
"2"
>
<el-tag>
{{
detailData
.
merchantOrderId
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item
label=
"通知状态"
>
<dict-tag
:type=
"DICT_TYPE.PAY_NOTIFY_STATUS"
:value=
"detailData.status"
/>
<el-descriptions-item
label=
"商户退款编号"
:span=
"2"
v-if=
"detailData.merchantRefundId"
>
<el-tag>
{{
detailData
.
merchantRefundId
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item
label=
"商户转账编号"
:span=
"2"
v-if=
"detailData.merchantTransferId"
>
<el-tag>
{{
detailData
.
merchantTransferId
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item
label=
"应用编号"
>
{{
detailData
.
appId
}}
</el-descriptions-item>
...
...
src/views/pay/notify/index.vue
View file @
876bf8de
...
...
@@ -69,6 +69,24 @@
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"商户退款编号"
prop=
"merchantRefundId"
>
<el-input
v-model=
"queryParams.merchantRefundId"
placeholder=
"请输入商户退款编号"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"商户转账编号"
prop=
"merchantTransferId"
>
<el-input
v-model=
"queryParams.merchantTransferId"
placeholder=
"请输入商户转账编号"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
<el-date-picker
v-model=
"queryParams.createTime"
...
...
@@ -94,7 +112,19 @@
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"任务编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"应用编号"
align=
"center"
prop=
"appName"
/>
<el-table-column
label=
"商户订单编号"
align=
"center"
prop=
"merchantOrderId"
/>
<el-table-column
label=
"商户单信息"
align=
"center"
prop=
"merchant"
>
<template
#
default=
"scope"
>
<div
v-if=
"scope.row.merchantOrderId"
>
<div>
商户订单编号:
{{
scope
.
row
.
merchantOrderId
}}
</div>
</div>
<div
v-if=
"scope.row.merchantRefundId"
>
<div>
商户退款编号:
{{
scope
.
row
.
merchantRefundId
}}
</div>
</div>
<div
v-if=
"scope.row.merchantTransferId"
>
<div>
商户转账编号:
{{
scope
.
row
.
merchantTransferId
}}
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"通知类型"
align=
"center"
prop=
"type"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.PAY_NOTIFY_TYPE"
:value=
"scope.row.type"
/>
...
...
@@ -173,16 +203,12 @@ const queryParams = ref({
dataId
:
null
,
status
:
null
,
merchantOrderId
:
null
,
merchantRefundId
:
null
,
merchantTransferId
:
null
,
createTime
:
[]
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
appList
=
ref
([])
// 支付应用列表集合
// 是否显示弹出层
const
open
=
ref
(
false
)
// 通知详情
const
notifyDetail
=
ref
<
any
>
({
logs
:
[]
})
/** 搜索按钮操作 */
const
handleQuery
=
()
=>
{
...
...
src/views/pay/transfer/TransferDetail.vue
View file @
876bf8de
...
...
@@ -25,12 +25,7 @@
<el-divider
/>
<el-descriptions
:column=
"2"
label-class-name=
"desc-label"
>
<el-descriptions-item
label=
"收款人姓名"
>
{{
detailData
.
userName
}}
</el-descriptions-item>
<el-descriptions-item
label=
"支付宝登录账号"
v-if=
"detailData.type === 1"
>
{{
detailData
.
alipayLogonId
}}
</el-descriptions-item>
<el-descriptions-item
label=
"微信 openid"
v-if=
"detailData.type === 2"
>
{{
detailData
.
openid
}}
</el-descriptions-item>
<el-descriptions-item
label=
"收款人账号"
>
{{
detailData
.
userAccount
}}
</el-descriptions-item>
<el-descriptions-item
label=
"支付渠道"
>
<dict-tag
:type=
"DICT_TYPE.PAY_CHANNEL_CODE"
:value=
"detailData.channelCode"
/>
</el-descriptions-item>
...
...
@@ -45,7 +40,9 @@
<el-divider
/>
<el-descriptions
:column=
"1"
label-class-name=
"desc-label"
direction=
"vertical"
border
>
<el-descriptions-item
label=
"转账渠道通知内容"
>
<el-text>
{{
detailData
.
channelNotifyData
}}
</el-text>
<el-text
style=
"white-space: pre-wrap; word-break: break-word"
>
{{
detailData
.
channelNotifyData
}}
</el-text>
</el-descriptions-item>
</el-descriptions>
<el-divider
/>
...
...
@@ -59,10 +56,13 @@
import
{
DICT_TYPE
}
from
'@/utils/dict'
import
*
as
TransferApi
from
'@/api/pay/transfer'
import
{
formatDate
}
from
'@/utils/formatTime'
defineOptions
({
name
:
'PayTransferDetail'
})
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
detailLoading
=
ref
(
false
)
// 表单的加载中
const
detailData
=
ref
({})
/** 打开弹窗 */
const
open
=
async
(
id
:
number
)
=>
{
dialogVisible
.
value
=
true
...
...
src/views/pay/transfer/index.vue
View file @
876bf8de
...
...
@@ -66,7 +66,6 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"收款人姓名"
prop=
"userName"
>
<el-input
v-model=
"queryParams.userName"
...
...
@@ -76,6 +75,15 @@
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"收款人账号"
prop=
"accountNo"
>
<el-input
v-model=
"queryParams.accountNo"
placeholder=
"请输入收款人账号"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"渠道单号"
prop=
"channelTransferNo"
>
<el-input
v-model=
"queryParams.channelTransferNo"
...
...
@@ -99,6 +107,15 @@
<el-form-item>
<el-button
@
click=
"handleQuery"
><Icon
icon=
"ep:search"
class=
"mr-5px"
/>
搜索
</el-button>
<el-button
@
click=
"resetQuery"
><Icon
icon=
"ep:refresh"
class=
"mr-5px"
/>
重置
</el-button>
<el-button
type=
"success"
plain
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['pay:transfer:export']"
>
<Icon
icon=
"ep:download"
class=
"mr-5px"
/>
导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
...
...
@@ -114,12 +131,7 @@
:formatter=
"dateFormatter"
width=
"180px"
/>
<el-table-column
label=
"应用编号"
align=
"center"
prop=
"appId"
/>
<el-table-column
label=
"类型"
align=
"center"
prop=
"type"
width=
"120"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.PAY_TRANSFER_TYPE"
:value=
"scope.row.type"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"支付应用"
align=
"center"
prop=
"appName"
min-width=
"100"
/>
<el-table-column
label=
"转账金额"
align=
"center"
prop=
"price"
>
<template
#
default=
"scope"
>
<span>
¥
{{
(
scope
.
row
.
price
/
100.0
).
toFixed
(
2
)
}}
</span>
...
...
@@ -147,18 +159,7 @@
</
template
>
</el-table-column>
<el-table-column
label=
"收款人姓名"
align=
"center"
prop=
"userName"
width=
"120"
/>
<el-table-column
label=
"收款账号"
align=
"left"
width=
"200"
>
<
template
#
default=
"scope"
>
<p
class=
"transfer-font"
v-if=
"scope.row.alipayLogonId"
>
<el-tag
size=
"small"
>
支付宝登录号
</el-tag>
{{
scope
.
row
.
alipayLogonId
}}
</p>
<p
class=
"transfer-font"
v-if=
"scope.row.openid"
>
<el-tag
size=
"small"
>
微信 openId
</el-tag>
{{
scope
.
row
.
openid
}}
</p>
</
template
>
</el-table-column>
<el-table-column
label=
"收款账号"
align=
"left"
prop=
"userAccount"
width=
"200"
/>
<el-table-column
label=
"转账标题"
align=
"center"
prop=
"subject"
width=
"120"
/>
<el-table-column
label=
"转账渠道"
align=
"center"
prop=
"channelCode"
>
<
template
#
default=
"scope"
>
...
...
@@ -194,10 +195,11 @@ import { dateFormatter } from '@/utils/formatTime'
import
*
as
TransferApi
from
'@/api/pay/transfer'
import
{
DICT_TYPE
,
getStrDictOptions
}
from
'@/utils/dict'
import
TransferDetail
from
'./TransferDetail.vue'
import
download
from
'@/utils/download'
defineOptions
({
name
:
'PayTransfer'
})
const
message
=
useMessage
()
// 消息弹窗
const
{
t
}
=
useI18n
()
// 国际化
const
loading
=
ref
(
true
)
// 列表的加载中
const
total
=
ref
(
0
)
// 列表的总页数
...
...
@@ -216,8 +218,7 @@ const queryParams = reactive({
price
:
null
,
subject
:
null
,
userName
:
null
,
alipayLogonId
:
null
,
openid
:
null
,
userAccount
:
null
,
createTime
:
[]
})
const
queryFormRef
=
ref
()
// 搜索的表单
...
...
@@ -247,6 +248,21 @@ const resetQuery = () => {
handleQuery
()
}
/** 导出按钮操作 */
const
handleExport
=
async
()
=>
{
try
{
// 导出的二次确认
await
message
.
exportConfirm
()
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
TransferApi
.
exportTransfer
(
queryParams
)
download
.
excel
(
data
,
'转账单.xls'
)
}
catch
{
}
finally
{
exportLoading
.
value
=
false
}
}
/** 添加/修改操作 */
const
detailRef
=
ref
()
const
openDetail
=
(
id
:
number
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment