Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-account-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-account-show
Commits
92520c61
提交
92520c61
authored
8月 03, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 新增提示语
上级
9523e61d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
176 行增加
和
99 行删除
+176
-99
List.vue
src/modules/payment/views/h5/List.vue
+105
-65
List.vue
src/modules/payment/views/pc/List.vue
+71
-34
没有找到文件。
src/modules/payment/views/h5/List.vue
浏览文件 @
92520c61
<
template
>
<div
class=
"h5-pay-list"
>
<p
class=
"h5-pay-list__tips"
>
<i
class=
"el-icon-info"
></i>
可开具三个月之内的发票,如已超过三个月,请联系招生办公室。
</p>
<van-pull-refresh
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<van-list
v-model=
"loading"
class=
"pay-list"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"fetchList"
>
<van-list
v-model=
"loading"
class=
"pay-list"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"fetchList"
>
<div
class=
"pay-item"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"handleDetials(item)"
>
<div
class=
"left"
>
<h5
class=
"project"
>
{{
item
.
project_name
}}
</h5>
<p
class=
"status"
>
{{
item
|
statusFilter
}}
</p>
<p
class=
"status"
>
{{
item
.
final_payment_time
}}
</p>
<h5
class=
"project"
>
{{
item
.
project_name
}}
</h5>
<p
class=
"status"
>
{{
item
|
statusFilter
}}
</p>
<p
class=
"status"
>
{{
item
.
final_payment_time
}}
</p>
</div>
<div
class=
"right"
>
<p><span>
¥
</span>
{{
parseFloat
(
item
.
amount_received
)
+
parseFloat
(
item
.
service_charge
)
|
toFixed
}}
</p>
<p><span>
¥
</span>
{{
(
parseFloat
(
item
.
amount_received
)
+
parseFloat
(
item
.
service_charge
))
|
toFixed
}}
</p>
</div>
<template
v-if=
"item.project_id == '5005' && item.type == '60'"
>
<van-button
v-if=
"item.real_invoice_status === 1"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
{{
item
.
invoice_status
==
6
?
'重开发票'
:
'开具发票'
}}
</van-button>
<van-button
v-if=
"item.invoice_status == 4"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleDeleteInvoice(item)"
>
作废发票
</van-button>
<van-button
v-if=
"item.real_invoice_status === 1"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
{{
item
.
invoice_status
==
6
?
'重开发票'
:
'开具发票'
}}
</van-button
>
<van-button
v-if=
"item.invoice_status == 4"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleDeleteInvoice(item)"
>
作废发票
</van-button
>
</
template
>
<
template
v-else
>
<van-button
v-if=
"item.real_invoice_status === 1"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
开具发票
</van-button>
<van-button
v-if=
"item.real_invoice_status === 1"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
开具发票
</van-button
>
</
template
>
</div>
<
template
slot=
"finished"
>
{{
list
.
length
>
8
?
'没有更多了'
:
''
}}
</
template
>
<
template
slot=
"finished"
>
{{
list
.
length
>
8
?
'没有更多了'
:
''
}}
</
template
>
</van-list>
</van-pull-refresh>
<van-empty
v-if=
"list.length === 0"
description=
"暂无记录"
/>
...
...
@@ -97,10 +124,18 @@ export default {
},
handleInvoice
(
val
)
{
const
query
=
{
id
:
val
.
id
,
name
:
val
.
sales_rep_user_id_name
,
remark
:
val
.
payer_name
,
project_id
:
val
.
project_id
,
type
:
val
.
type
}
const
query
=
{
id
:
val
.
id
,
name
:
val
.
sales_rep_user_id_name
,
remark
:
val
.
payer_name
,
project_id
:
val
.
project_id
,
type
:
val
.
type
}
if
(
val
.
project_id
===
'5005'
&&
val
.
type
===
'60'
)
{
if
(
val
.
invoices
.
length
)
{
const
item
=
val
.
invoices
.
find
(
item
=>
parseInt
(
item
.
invoice_status
)
===
4
||
parseInt
(
item
.
invoice_status
)
===
6
)
const
item
=
val
.
invoices
.
find
(
item
=>
parseInt
(
item
.
invoice_status
)
===
4
||
parseInt
(
item
.
invoice_status
)
===
6
)
if
(
item
)
{
query
.
taxpayer_info
=
JSON
.
stringify
({
taxpayer_address
:
item
.
taxpayer_address
||
''
,
...
...
@@ -144,73 +179,78 @@ export default {
page_size
:
this
.
page_size
,
page
:
this
.
page
}
getPayList
(
params
).
then
(
res
=>
{
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
finished
=
false
this
.
refreshing
=
false
}
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
list
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
list
)
this
.
total
=
res
.
data
.
total
if
(
this
.
page
*
this
.
page_size
>=
this
.
total
)
{
this
.
finished
=
true
getPayList
(
params
)
.
then
(
res
=>
{
if
(
this
.
refreshing
)
{
this
.
list
=
[]
this
.
finished
=
false
this
.
refreshing
=
false
}
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
list
)
{
this
.
list
=
this
.
list
.
concat
(
res
.
data
.
list
)
this
.
total
=
res
.
data
.
total
if
(
this
.
page
*
this
.
page_size
>=
this
.
total
)
{
this
.
finished
=
true
}
else
{
this
.
page
++
}
}
else
{
this
.
page
++
this
.
list
=
[]
this
.
finished
=
true
}
}
else
{
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
list
=
[]
this
.
finished
=
true
}
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
list
=
[]
this
.
finished
=
true
this
.
loading
=
false
})
this
.
loading
=
false
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.pay-item
{
background
:
#fff
;
border-bottom
:
1px
solid
#f0f0f0
;
display
:flex
;
position
:relative
;
padding
:
0
12px
;
.left
{
width
:
65%
;
.project
{
font-size
:
16px
;
line-height
:
32px
;
.h5-pay-list__tips
{
padding
:
10px
;
}
.pay-item
{
background
:
#fff
;
border-bottom
:
1px
solid
#f0f0f0
;
display
:
flex
;
position
:
relative
;
padding
:
0
12px
;
.left
{
width
:
65%
;
.project
{
font-size
:
16px
;
line-height
:
32px
;
color
:
#464646
;
font-weight
:
400
;
font-weight
:
400
;
}
p
{
font-size
:
13px
;
line-height
:
26px
;
color
:
#999
;
p
{
font-size
:
13px
;
line-height
:
26px
;
color
:
#999
;
}
}
.right
{
width
:
35%
;
p
{
font-size
:
18px
;
line-height
:
36px
;
.right
{
width
:
35%
;
p
{
font-size
:
18px
;
line-height
:
36px
;
text-align
:
right
;
span
{
font-size
:
14px
;
color
:
#C
01540
;
span
{
font-size
:
14px
;
color
:
#c
01540
;
}
}
}
.invoice-btn
{
position
:absolute
;
right
:
12px
;
.invoice-btn
{
position
:
absolute
;
right
:
12px
;
bottom
:
5px
;
padding
:
0
15px
;
padding
:
0
15px
;
}
}
</
style
>
src/modules/payment/views/pc/List.vue
浏览文件 @
92520c61
<
template
>
<div
class=
"pc-pay-list"
>
<app-list
v-bind=
"tableOptions"
ref=
"appList"
@
selection-change=
"handleSelectionChange"
>
<template
#
footer
>
<div
class=
"selection_bar"
></div>
</
template
>
<!-- 操作 -->
<
template
v-slot:table-operate=
"{ row }"
>
<template
v-if=
"row.real_invoice_status === 1"
>
<el-button
type=
"text"
@
click=
"handleInvoice(row)"
size=
"mini"
>
开具发票
</el-button>
<el-button
type=
"text"
@
click=
"handleInvoiceQR(row)"
size=
"mini"
>
开票二维码
</el-button>
<p
class=
"pc-pay-list__tips"
>
<i
class=
"el-icon-info"
></i>
可开具三个月之内的发票,如已超过三个月,请联系招生办公室。
</p>
<div
class=
"pc-pay-list__table"
>
<app-list
v-bind=
"tableOptions"
ref=
"appList"
@
selection-change=
"handleSelectionChange"
>
<template
#
footer
>
<div
class=
"selection_bar"
></div>
</
template
>
</template>
</app-list>
<el-drawer
title=
"开具发票"
:visible
.
sync=
"drawerVisible"
:close-on-click-modal=
"false"
:destroy-on-close=
"true"
size=
"600px"
top=
"15px"
@
close=
"handleClose"
>
<invoice-form
:history=
"history"
:initData=
"initData"
@
history=
"handleHistory"
@
dialogClose=
"drawerVisible = false"
@
submit=
"fetchCreateInvoice"
/>
<el-dialog
title=
"选择历史开票信息"
:visible
.
sync=
"dialogVisible"
width=
"460px"
top=
"15px"
append-to-body
:destroy-on-close=
"true"
center
>
<history-invoice-list
v-if=
"dialogVisible"
:hasSearch=
"true"
@
select=
"handleSelect"
/>
<!-- 操作 -->
<
template
v-slot:table-operate=
"{ row }"
>
<template
v-if=
"row.real_invoice_status === 1"
>
<el-button
type=
"text"
@
click=
"handleInvoice(row)"
size=
"mini"
>
开具发票
</el-button>
<el-button
type=
"text"
@
click=
"handleInvoiceQR(row)"
size=
"mini"
>
开票二维码
</el-button>
</
template
>
</template>
</app-list>
</div>
<el-drawer
title=
"开具发票"
:visible
.
sync=
"drawerVisible"
:close-on-click-modal=
"false"
:destroy-on-close=
"true"
size=
"600px"
top=
"15px"
@
close=
"handleClose"
>
<invoice-form
:history=
"history"
:initData=
"initData"
@
history=
"handleHistory"
@
dialogClose=
"drawerVisible = false"
@
submit=
"fetchCreateInvoice"
/>
<el-dialog
title=
"选择历史开票信息"
:visible
.
sync=
"dialogVisible"
width=
"460px"
top=
"15px"
append-to-body
:destroy-on-close=
"true"
center
>
<history-invoice-list
v-if=
"dialogVisible"
:hasSearch=
"true"
@
select=
"handleSelect"
/>
</el-dialog>
</el-drawer>
<share-qrcode
:visible
.
sync=
"shareDialogVisible"
:value=
"shareUrl"
/>
...
...
@@ -114,32 +141,42 @@ export default {
},
fetchCreateInvoice
(
val
)
{
val
.
payment_id
=
this
.
payment_id
createInvoice
(
val
).
then
(
res
=>
{
this
.
$message
.
success
(
'开具发票成功'
)
// this.$refs.appList.refetch()
this
.
$refs
.
appList
.
refetch
()
this
.
drawerVisible
=
false
}).
catch
(
err
=>
{
console
.
log
(
err
)
this
.
$message
.
error
((
err
.
data
&&
err
.
data
.
message
)
||
'开具发票失败'
)
})
createInvoice
(
val
)
.
then
(
res
=>
{
this
.
$message
.
success
(
'开具发票成功'
)
// this.$refs.appList.refetch()
this
.
$refs
.
appList
.
refetch
()
this
.
drawerVisible
=
false
})
.
catch
(
err
=>
{
console
.
log
(
err
)
this
.
$message
.
error
((
err
.
data
&&
err
.
data
.
message
)
||
'开具发票失败'
)
})
}
}
}
</
script
>
<
style
scoped
>
.pc-pay-list
{
padding
:
14px
;
background
:
#f7f7f7
;
box-sizing
:
border-box
;
height
:
calc
(
100vh
-
64px
);
.pc-pay-list
{
display
:
flex
;
flex-direction
:
column
;
padding
:
14px
;
background
:
#f7f7f7
;
box-sizing
:
border-box
;
height
:
calc
(
100vh
-
64px
);
}
.pc-pay-list__tips
{
padding
:
10px
0
;
}
.pc-pay-list__table
{
flex
:
1
;
}
.table-list
{
background
:
#fff
;
border-radius
:
6px
;
.table-list
{
background
:
#fff
;
border-radius
:
6px
;
}
.el-dialog__wrapper
::v-deep
.el-dialog__body
{
padding
:
10px
0
;
.el-dialog__wrapper
::v-deep
.el-dialog__body
{
padding
:
10px
0
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论