Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-account-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-account-show
Commits
05a283bd
提交
05a283bd
authored
9月 10, 2021
作者:
pengxiaohui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 开具发票测试交互优化
上级
e5efc260
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
18 行增加
和
15 行删除
+18
-15
AppList.vue
src/components/base/AppList.vue
+1
-1
InvoiceForm.vue
src/modules/payment/components/InvoiceForm.vue
+3
-3
Invoice.vue
src/modules/payment/views/h5/Invoice.vue
+3
-2
List.vue
src/modules/payment/views/h5/List.vue
+1
-1
List.vue
src/modules/payment/views/pc/List.vue
+7
-3
axios.js
src/utils/axios.js
+3
-5
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
05a283bd
...
@@ -164,7 +164,7 @@ export default {
...
@@ -164,7 +164,7 @@ export default {
this
.
fetchList
()
this
.
fetchList
()
},
},
// 刷新
// 刷新
refetch
(
isForce
)
{
c
(
isForce
)
{
isForce
?
this
.
reset
()
:
this
.
fetchList
()
isForce
?
this
.
reset
()
:
this
.
fetchList
()
},
},
// 页数改变
// 页数改变
...
...
src/modules/payment/components/InvoiceForm.vue
浏览文件 @
05a283bd
...
@@ -44,8 +44,8 @@
...
@@ -44,8 +44,8 @@
<el-input
v-model=
"form.taxpayer_bank_account"
size=
"small"
placeholder=
"请输入银行账号"
/>
<el-input
v-model=
"form.taxpayer_bank_account"
size=
"small"
placeholder=
"请输入银行账号"
/>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<el-form-item
label=
"备注"
prop=
"
remarks
"
style=
"margin-bottom:0;"
>
<el-form-item
label=
"备注"
prop=
"
invoice_remark
"
style=
"margin-bottom:0;"
>
<el-input
v-model=
"form.
remarks"
size=
"small"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"form.
invoice_remark"
size=
"small"
placeholder=
"请输入备注"
disabled
/>
</el-form-item>
</el-form-item>
<h5>
收票信息
</h5>
<h5>
收票信息
</h5>
<el-form-item
v-if=
"form.invoice_type === '2'"
label=
"邮箱地址"
prop=
"recipient_email"
>
<el-form-item
v-if=
"form.invoice_type === '2'"
label=
"邮箱地址"
prop=
"recipient_email"
>
...
@@ -77,7 +77,7 @@ const defaultForm = {
...
@@ -77,7 +77,7 @@ const defaultForm = {
invoice_type
:
''
,
invoice_type
:
''
,
taxpayer_name
:
''
,
taxpayer_name
:
''
,
taxpayer_identifier
:
''
,
taxpayer_identifier
:
''
,
remarks
:
''
,
invoice_remark
:
''
,
recipient_email
:
''
,
recipient_email
:
''
,
recipient_address
:
''
,
recipient_address
:
''
,
recipient_name
:
''
,
recipient_name
:
''
,
...
...
src/modules/payment/views/h5/Invoice.vue
浏览文件 @
05a283bd
...
@@ -138,11 +138,12 @@ export default {
...
@@ -138,11 +138,12 @@ export default {
},
},
fetchCreateInvoice
()
{
fetchCreateInvoice
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
id
=
this
.
id
params
.
payment_
id
=
this
.
id
createInvoice
(
params
).
then
(
res
=>
{
createInvoice
(
params
).
then
(
res
=>
{
Toast
.
success
(
'开具发票成功'
)
Toast
.
success
(
'开具发票成功'
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
Toast
.
fail
(
err
.
message
||
'开具发票失败'
)
console
.
log
(
err
)
Toast
.
fail
((
err
.
data
&&
err
.
data
.
message
)
||
'开具发票失败'
)
})
})
}
}
}
}
...
...
src/modules/payment/views/h5/List.vue
浏览文件 @
05a283bd
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"right"
>
<div
class=
"right"
>
<p><span>
¥
</span>
{{
item
.
amount_received
}}
</p>
<p><span>
¥
</span>
{{
item
.
amount_received
}}
</p>
</div>
</div>
<van-button
v-if=
"['2', '6'].includes(item.invoice_status)"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
开具发票
</van-button>
<van-button
v-if=
"['2', '
5', '
6'].includes(item.invoice_status)"
class=
"invoice-btn"
plain
round
type=
"primary"
size=
"mini"
color=
"#C01540"
@
click
.
stop=
"handleInvoice(item)"
>
开具发票
</van-button>
</div>
</div>
<template
slot=
"finished"
>
{{
list
.
length
>
8
?
'没有更多了'
:
''
}}
</
template
>
<template
slot=
"finished"
>
{{
list
.
length
>
8
?
'没有更多了'
:
''
}}
</
template
>
</van-list>
</van-list>
...
...
src/modules/payment/views/pc/List.vue
浏览文件 @
05a283bd
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</
template
>
</
template
>
<!-- 操作 -->
<!-- 操作 -->
<
template
v-slot:table-operate=
"{ row }"
>
<
template
v-slot:table-operate=
"{ row }"
>
<el-button
v-if=
"['
1', '2
', '6'].includes(row.invoice_status)"
type=
"text"
@
click=
"handleInvoice(row)"
size=
"mini"
>
开具发票
</el-button>
<el-button
v-if=
"['
2', '5
', '6'].includes(row.invoice_status)"
type=
"text"
@
click=
"handleInvoice(row)"
size=
"mini"
>
开具发票
</el-button>
<el-button
type=
"text"
@
click=
"handleInvoiceQR(row)"
size=
"mini"
>
开票二维码
</el-button>
<el-button
type=
"text"
@
click=
"handleInvoiceQR(row)"
size=
"mini"
>
开票二维码
</el-button>
</
template
>
</
template
>
</app-list>
</app-list>
...
@@ -80,6 +80,7 @@ export default {
...
@@ -80,6 +80,7 @@ export default {
handleInvoice
(
row
)
{
handleInvoice
(
row
)
{
this
.
drawerVisible
=
true
this
.
drawerVisible
=
true
this
.
payment_id
=
row
.
id
this
.
payment_id
=
row
.
id
if
(
row
.
invoice_remark
)
this
.
history
.
invoice_remark
=
row
.
invoice_remark
},
},
handleInvoiceQR
(
row
)
{
handleInvoiceQR
(
row
)
{
this
.
shareUrl
=
`
${
import
.
meta
.
env
.
VITE_SHARE_URL
}
/h5/payment/invoice?id=
${
row
.
id
}
`
this
.
shareUrl
=
`
${
import
.
meta
.
env
.
VITE_SHARE_URL
}
/h5/payment/invoice?id=
${
row
.
id
}
`
...
@@ -98,8 +99,10 @@ export default {
...
@@ -98,8 +99,10 @@ export default {
val
.
payment_id
=
this
.
payment_id
val
.
payment_id
=
this
.
payment_id
createInvoice
(
val
).
then
(
res
=>
{
createInvoice
(
val
).
then
(
res
=>
{
this
.
$message
.
success
(
'开具发票成功'
)
this
.
$message
.
success
(
'开具发票成功'
)
}).
catch
((
err
)
=>
{
this
.
$refs
.
appList
.
refetch
()
this
.
$message
.
error
(
err
.
message
||
'开具发票失败'
)
this
.
drawerVisible
=
false
}).
catch
(
err
=>
{
this
.
$message
.
error
((
err
.
data
&&
err
.
data
.
message
)
||
'开具发票失败'
)
})
})
}
}
}
}
...
@@ -111,6 +114,7 @@ export default {
...
@@ -111,6 +114,7 @@ export default {
padding
:
14px
;
padding
:
14px
;
background
:
#f7f7f7
;
background
:
#f7f7f7
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
calc
(
100vh
-
64px
);
}
}
.table-list
{
.table-list
{
background
:
#fff
;
background
:
#fff
;
...
...
src/utils/axios.js
浏览文件 @
05a283bd
import
axios
from
'axios'
import
axios
from
'axios'
import
queryString
from
'query-string'
import
queryString
from
'query-string'
import
{
Message
}
from
'element-ui'
//
import { Message } from 'element-ui'
const
httpRequest
=
axios
.
create
({
const
httpRequest
=
axios
.
create
({
timeout
:
60000
,
timeout
:
60000
,
...
@@ -39,16 +39,14 @@ httpRequest.interceptors.response.use(
...
@@ -39,16 +39,14 @@ httpRequest.interceptors.response.use(
},
},
function
(
error
)
{
function
(
error
)
{
if
(
error
.
response
)
{
if
(
error
.
response
)
{
const
{
status
,
message
}
=
error
.
response
.
data
const
{
status
}
=
error
.
response
.
data
// 未登录
// 未登录
if
(
status
===
403
)
{
if
(
status
===
403
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
}
else
{
}
else
{
Message
.
error
(
message
||
error
.
response
.
data
)
//
Message.error(message || error.response.data)
}
}
return
Promise
.
reject
(
error
.
response
)
return
Promise
.
reject
(
error
.
response
)
}
else
{
console
.
log
(
error
)
}
}
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论