Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-finance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-finance
Commits
9e4d2038
提交
9e4d2038
authored
9月 08, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
ae37107d
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
182 行增加
和
63 行删除
+182
-63
base.js
src/api/base.js
+4
-0
api.js
src/modules/payment/api.js
+7
-3
index.js
src/modules/payment/index.js
+6
-4
Deal.vue
src/modules/payment/views/Deal.vue
+9
-9
Detail.vue
src/modules/payment/views/Detail.vue
+83
-12
List.vue
src/modules/payment/views/List.vue
+58
-33
index.js
src/store/index.js
+15
-2
没有找到文件。
src/api/base.js
浏览文件 @
9e4d2038
...
...
@@ -35,3 +35,7 @@ export function getTableColumns(params) {
export
function
updateTableColumns
(
data
)
{
return
httpRequest
.
post
(
'/api/finance/v1/payments/update-title'
,
data
)
}
export
function
getRoles
(
params
)
{
return
httpRequest
.
get
(
'/api/finance/user/get-info'
,
{
params
})
}
src/modules/payment/api.js
浏览文件 @
9e4d2038
...
...
@@ -49,7 +49,11 @@ export function payConfirm(data) {
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
// 获取oss signature
export
function
getSignature
()
{
return
httpRequest
.
get
(
'/api/usercenter/aliyun/get-signature'
)
// 取消足额支付
export
function
confirmPayDetail
(
data
)
{
return
httpRequest
.
post
(
'/api/finance/v1/payments/undo-confirm'
,
data
)
}
// 确认足额支付
export
function
cancelPayDetail
(
data
)
{
return
httpRequest
.
post
(
'/api/finance/v1/payments/undo-confirm'
,
data
)
}
src/modules/payment/index.js
浏览文件 @
9e4d2038
...
...
@@ -17,15 +17,17 @@ const routes = [
},
{
name
:
'deal'
,
path
:
'deal'
,
path
:
'
payment/:id/
deal'
,
component
:
()
=>
import
(
'./views/Deal.vue'
),
meta
:
{
title
:
'支付详情'
}
meta
:
{
title
:
'支付详情'
},
props
:
true
},
{
name
:
'paydetail'
,
path
:
'pay
detail
'
,
path
:
'pay
ment/:id/view
'
,
component
:
()
=>
import
(
'./views/PayDetail.vue'
),
meta
:
{
title
:
'支付详情'
}
meta
:
{
title
:
'支付详情'
},
props
:
true
}
]
}
...
...
src/modules/payment/views/Deal.vue
浏览文件 @
9e4d2038
...
...
@@ -76,7 +76,6 @@
list-type=
"picture-card"
action=
""
multiple
show-file-list
:auto-upload=
"false"
:on-change=
"handleChange"
:on-remove=
"handleChange"
...
...
@@ -129,8 +128,9 @@ export default {
getPayDetail
()
{
payDetail
({
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
project
=
res
.
data
.
list
[
0
]
this
.
confirmDetail
=
res
.
data
.
list
[
0
].
confirmed_details
[
0
]
const
[
first
=
{}]
=
res
.
data
.
list
this
.
project
=
first
this
.
confirmDetail
=
first
.
confirmed_details
[
0
]
}
})
},
...
...
@@ -143,14 +143,14 @@ export default {
params
[
`receiving_voucher_filename[
${
index
}
]`
]
=
file
.
raw
})
delete
params
.
receiving_voucher_filename
payConfirm
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
payConfirm
(
params
)
.
then
(
res
=>
{
this
.
$message
.
success
(
'支付已经到账'
)
history
.
go
(
-
1
)
}
else
{
this
.
$message
.
error
(
'提交失败'
)
}
})
}
)
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
})
}
}
...
...
src/modules/payment/views/Detail.vue
浏览文件 @
9e4d2038
<
template
>
<div>
<el-button
@
click=
"fetchTicketDetail"
type=
"danger"
>
财务确认足额支付
</el-button>
<el-button
@
click=
"fetchTicketDetail"
type=
"primary"
>
刷新状态及金额
</el-button>
<template
v-if=
"dealList.payment_status === '70'"
>
<el-button
@
click=
"fetchConfirmTicketDetail('FINANCE')"
type=
"danger"
v-if=
"isFINANCE && dealList.finance_confirm_status === 0"
>
财务确认足额支付
</el-button
>
<el-button
@
click=
"fetchConfirmTicketDetail('BUSINESS')"
type=
"danger"
v-if=
"isBUSINESS && dealList.bussiness_confirm_status === 0"
>
业务确认足额支付
</el-button
>
</
template
>
<
template
v-if=
"dealList.payment_status === '80'"
>
<el-button
@
click=
"fetchCancelTicketDetail('FINANCE')"
type=
"danger"
v-if=
"isFINANCE && dealList.finance_confirm_status === 1"
>
财务取消足额支付
</el-button
>
<el-button
@
click=
"fetchCancelTicketDetail('BUSINESS')"
type=
"danger"
v-if=
"isBUSINESS && dealList.bussiness_confirm_status === 1"
>
业务取消足额支付
</el-button
>
</
template
>
<app-card
title=
"订单信息"
>
<Order
:dealList=
"dealList"
/>
<Order
:dealList=
"dealList"
/>
</app-card>
<app-card
title=
"学员信息"
>
<Student
:dealList=
"dealList"
/>
<Student
:dealList=
"dealList"
/>
</app-card>
<app-card
title=
"收款信息"
>
<Collection
:dealList=
"dealList"
/>
<Collection
:dealList=
"dealList"
/>
</app-card>
<app-card
title=
"发票信息"
>
<Ticket
:dealList=
"dealList"
/>
<Ticket
:dealList=
"dealList"
/>
</app-card>
<app-card
title=
"渠道信息"
>
<Channel
:dealList=
"dealList"
/>
<Channel
:dealList=
"dealList"
/>
</app-card>
<app-card
title=
"支付待确认记录"
>
<Toconfirm
:dealList=
"dealList"
:id=
"this.id"
/>
<Toconfirm
:dealList=
"dealList"
:id=
"this.id"
/>
</app-card>
<app-card
title=
"支付确认记录"
>
<Confirmed
:dealList=
"dealList"
:id=
"this.id"
/>
<Confirmed
:dealList=
"dealList"
:id=
"this.id"
/>
</app-card>
</div>
</template>
...
...
@@ -36,7 +62,7 @@ import Ticket from '../components/Ticket.vue'
import
Channel
from
'../components/Channel.vue'
import
Toconfirm
from
'../components/Toconfirm.vue'
import
Confirmed
from
'../components/Confirmed.vue'
import
{
payDetail
}
from
'../api'
import
{
payDetail
,
confirmPayDetail
,
cancelPayDetail
}
from
'../api'
export
default
{
components
:
{
AppCard
,
Order
,
Student
,
Collection
,
Ticket
,
Channel
,
Toconfirm
,
Confirmed
},
data
()
{
...
...
@@ -45,19 +71,64 @@ export default {
dealList
:
{}
}
},
created
()
{
computed
:
{
roles
()
{
return
this
.
$store
.
state
.
roles
},
isFINANCE
()
{
return
(
this
.
roles
.
includes
(
'finance_manager'
)
||
this
.
roles
.
includes
(
'finance_director'
)
||
this
.
roles
.
includes
(
'developer'
)
)
},
isBUSINESS
()
{
return
(
this
.
roles
.
includes
(
'admissions_director'
)
||
this
.
roles
.
includes
(
'dean_of_admissions'
)
||
this
.
roles
.
includes
(
'developer'
)
)
}
},
beforeMount
()
{
this
.
id
=
this
.
$route
.
params
.
id
// 详情列表
// 获取发票详情信息
this
.
fetchTicketDetail
()
this
.
$store
.
dispatch
(
'getRoles'
)
},
methods
:
{
fetchTicketDetail
()
{
const
params
=
{
id
:
this
.
id
}
payDetail
(
params
).
then
(
(
res
)
=>
{
payDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
dealList
=
res
.
data
.
list
[
0
]
}
})
},
// 确认
fetchConfirmTicketDetail
(
val
)
{
console
.
log
(
val
)
const
params
=
{
confirm_type
:
val
,
id
:
this
.
id
}
confirmPayDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
fetchTicketDetail
()
}
})
},
// 取消
fetchCancelTicketDetail
(
val
)
{
const
params
=
{
confirm_type
:
val
,
id
:
this
.
id
}
cancelPayDetail
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
fetchTicketDetail
()
}
})
}
}
}
...
...
src/modules/payment/views/List.vue
浏览文件 @
9e4d2038
...
...
@@ -4,7 +4,12 @@
<!-- 申请状态 -->
<template
v-slot:status-select=
"
{ params }">
<el-select
v-model=
"params.status"
placeholder=
"申请状态"
filterable
remote
>
<el-option
v-for=
"(item, index) in conditionList.payment_status"
:value=
"item.key"
:key=
"index"
:label=
"item.value"
>
<el-option
v-for=
"(item, index) in conditionList.payment_status"
:value=
"item.key"
:key=
"index"
:label=
"item.value"
>
<el-checkbox>
{{
item
.
value
}}
</el-checkbox>
</el-option>
</el-select>
...
...
@@ -20,7 +25,12 @@
<!-- 发票状态 -->
<
template
v-slot:invoice-select=
"{ params }"
>
<el-select
v-model=
"params.invoice"
placeholder=
"发票状态"
filterable
remote
>
<el-option
v-for=
"(item, index) in conditionList.invoice_status"
:key=
"index"
:label=
"item.value"
:value=
"item.key"
>
<el-option
v-for=
"(item, index) in conditionList.invoice_status"
:key=
"index"
:label=
"item.value"
:value=
"item.key"
>
<el-checkbox>
{{
item
.
value
}}
</el-checkbox>
</el-option>
</el-select>
...
...
@@ -60,11 +70,15 @@
>
</el-date-picker>
</
template
>
<
template
#
header-aside
>
</
template
>
<
template
#
header-aside
>
</
template
>
<!-- 状态 -->
<
template
v-slot:status=
"{ row }"
>
<el-switch
v-model=
"row.can_add_invoice"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleStatus(row)"
></el-switch>
<el-switch
v-model=
"row.can_add_invoice"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleStatus(row)"
></el-switch>
</
template
>
<!-- 操作 -->
<
template
v-slot:table-x=
"{ row }"
>
...
...
@@ -82,8 +96,8 @@
<el-button
@
click=
"backTicket(row)"
>
退费
</el-button>
</
template
>
<
template
#
footer
>
<span>
已选择
{{
multipleSelection
.
length
}}
条
</span>
<el-button
@
click=
"exportSelect"
style=
"margin-left:40px"
>
导出
</el-button>
<span>
已选择
{{
multipleSelection
.
length
}}
条
</span>
<el-button
@
click=
"exportSelect"
style=
"margin-left:
40px"
>
导出
</el-button>
</
template
>
</app-list>
<!-- 开具发票 -->
...
...
@@ -91,18 +105,7 @@
<TicketForm
:id=
"id"
@
close=
"ticketVisible = false"
@
createTicket=
"handleCreateTicket"
/>
</el-dialog>
<!-- 开票二维码 -->
<ShareQrcode
:visible
.
sync=
"codeVisible"
:value=
"shareUrl"
/>
<!-- 作废弹框 -->
<el-dialog
title=
"提示"
:visible
.
sync=
"disabledTicketVisible"
width=
"30%"
>
<span>
确定要作废此发票吗?作废后不可恢复
</span>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"disabledTicketVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmDisabledTicket"
>
确 定
</el-button>
</span>
</el-dialog>
<ShareQrcode
:visible
.
sync=
"codeVisible"
:value=
"shareUrl"
/>
</app-card>
</template>
<
script
>
...
...
@@ -123,7 +126,8 @@ export default {
return
{
id
:
''
,
shareUrl
:
''
,
conditionList
:
{
// 筛选条件列表
conditionList
:
{
// 筛选条件列表
project_id
:
[],
// 项目
channel_id
:
[],
// 渠道
type
:
[],
// 费用类型
...
...
@@ -270,7 +274,12 @@ export default {
{
label
:
'不含税销售金额'
,
prop
:
'sales_amount_excluding_tax'
,
align
:
'center'
,
minWidth
:
120
},
{
label
:
'渠道代理提基数'
,
prop
:
'channel_agent_fee_base'
,
align
:
'center'
,
minWidth
:
120
},
{
label
:
'代理服务费'
,
prop
:
'agency_service_fee'
,
align
:
'center'
,
minWidth
:
120
},
{
label
:
'代理服务费(不含税金额)'
,
prop
:
'agency_service_fee_excluding_tax'
,
align
:
'center'
,
minWidth
:
300
},
{
label
:
'代理服务费(不含税金额)'
,
prop
:
'agency_service_fee_excluding_tax'
,
align
:
'center'
,
minWidth
:
300
},
{
label
:
'渠道税率'
,
prop
:
'channel_tax_rate'
,
align
:
'center'
,
minWidth
:
80
},
{
label
:
'户名'
,
prop
:
'channel_account_name'
,
align
:
'center'
,
minWidth
:
80
},
{
label
:
'账号'
,
prop
:
'channel_account'
,
align
:
'center'
,
minWidth
:
80
},
...
...
@@ -279,8 +288,8 @@ export default {
{
label
:
'开学时间'
,
prop
:
'bill_customer_class_start_time'
,
align
:
'center'
,
minWidth
:
200
},
{
label
:
'学制期限'
,
prop
:
'bill_customer_class_length_of_schooling'
,
align
:
'center'
,
minWidth
:
80
},
{
label
:
'客户编号'
,
prop
:
'customer_id'
,
align
:
'center'
,
minWidth
:
300
},
// eslint-disable-next-line object-curly-newline
{
label
:
'退费状态'
,
{
label
:
'退费状态'
,
prop
:
'refund_time'
,
align
:
'center'
,
minWidth
:
80
,
...
...
@@ -288,8 +297,8 @@ export default {
return
row
.
refund_time
===
null
?
'未退费'
:
'已退费'
}
},
// eslint-disable-next-line object-curly-newline
{
label
:
'发票状态'
,
{
label
:
'发票状态'
,
prop
:
'invoice_status'
,
align
:
'center'
,
minWidth
:
80
,
...
...
@@ -315,8 +324,21 @@ export default {
},
// 作废发票
disabledTicket
(
row
)
{
this
.
id
=
row
.
id
this
.
disabledTicketVisible
=
true
this
.
$confirm
(
'确定要作废此发票吗?作废后不可恢复'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
fetchDisabled
(
row
)
})
},
// 作废发票
fetchDisabled
(
row
)
{
cancelTicket
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$refs
.
list
.
refetch
()
}
})
},
qrCode
(
row
)
{
this
.
shareUrl
=
`
${
import
.
meta
.
env
.
VITE_SHARE_URL
}
/h5/payment/invoice?id=
${
row
.
id
}
`
...
...
@@ -324,7 +346,7 @@ export default {
},
// 获取过滤条件
fetchCondition
()
{
getCondition
().
then
(
(
res
)
=>
{
getCondition
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
conditionList
=
res
.
data
}
...
...
@@ -340,16 +362,17 @@ export default {
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'开票成功'
)
this
.
ticketVisible
=
false
this
.
getPayList
()
// 刷新订单列表
this
.
$refs
.
list
.
refetch
()
// 刷新订单列表
}
})
},
// 是否允许开具发票
handleStatus
(
row
)
{
const
params
=
{
id
:
row
.
id
,
status
:
row
.
can_add_invoice
}
const
params
=
{
id
:
row
.
id
,
can_add_invoice
:
row
.
can_add_invoice
}
allowCreate
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'更新状态成功'
)
this
.
$refs
.
list
.
refetch
()
// 刷新订单列表
}
else
{
this
.
$message
.
error
(
'更新状态失败'
)
}
...
...
@@ -362,18 +385,20 @@ export default {
if
(
res
.
code
===
0
)
{
this
.
disabledTicketVisible
=
false
this
.
$message
.
success
(
'发票已作废'
)
this
.
getPayList
()
// 更
新订单列表
this
.
$refs
.
list
.
refetch
()
// 刷
新订单列表
}
else
{
this
.
$message
.
error
(
'该发票无作废失败'
)
}
})
},
// 退费
backTicket
(
row
)
{
// 改变退费状态
drawBack
(
row
.
id
).
then
(
res
=>
{
const
params
=
{
id
:
row
.
id
}
drawBack
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
getPayList
()
// 刷新订单列表
this
.
$refs
.
list
.
refetch
()
// 刷新订单列表
this
.
$message
.
success
(
'退费成功'
)
}
else
{
this
.
$message
.
error
(
'退费失败'
)
...
...
src/store/index.js
浏览文件 @
9e4d2038
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
{
getUser
,
logout
}
from
'@/api/base'
import
{
getUser
,
logout
,
getRoles
}
from
'@/api/base'
Vue
.
use
(
Vuex
)
export
default
new
Vuex
.
Store
({
state
:
{
user
:
{}
user
:
{},
roles
:
[]
},
mutations
:
{
setUser
(
state
,
user
)
{
state
.
user
=
user
},
setRoles
(
state
,
roles
)
{
state
.
roles
=
roles
}
},
actions
:
{
...
...
@@ -43,6 +47,15 @@ export default new Vuex.Store({
return
false
})
return
isLogin
},
// 获取角色
getRoles
({
commit
})
{
return
getRoles
().
then
(
response
=>
{
const
{
roles
=
[]
}
=
response
.
data
commit
(
'setRoles'
,
roles
)
console
.
log
(
roles
)
return
response
})
}
}
})
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论