Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-account-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-account-show
Commits
30bedfe5
提交
30bedfe5
authored
4月 27, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
4e5e2692
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
10 行删除
+46
-10
InvoiceForm.vue
src/modules/payment/components/InvoiceForm.vue
+1
-1
Invoice.vue
src/modules/payment/views/h5/Invoice.vue
+12
-7
List.vue
src/modules/payment/views/h5/List.vue
+32
-1
beforeEnter.js
src/utils/beforeEnter.js
+1
-1
没有找到文件。
src/modules/payment/components/InvoiceForm.vue
浏览文件 @
30bedfe5
...
...
@@ -135,7 +135,7 @@ export default {
// { required: true, message: '请输入纳税人识别号', trigger: 'blur' },
// { validator: checkInvoice, trigger: 'blur' }
// ],
taxpayer_mobile
:
[{
required
:
true
,
message
:
'请输入电话'
,
trigger
:
'blur'
}
,
{
validator
:
checkMobile
,
trigger
:
'blur'
}
],
taxpayer_mobile
:
[{
required
:
true
,
message
:
'请输入电话'
,
trigger
:
'blur'
}],
recipient_email
:
[{
required
:
true
,
message
:
'请输入邮箱地址'
,
trigger
:
'blur'
},
{
validator
:
checkEmail
,
trigger
:
'blur'
}],
recipient_name
:
{
required
:
true
,
message
:
'请输入收件人名称'
,
trigger
:
'blur'
},
recipient_address
:
{
required
:
true
,
message
:
'请输入邮寄地址'
,
trigger
:
'blur'
},
...
...
src/modules/payment/views/h5/Invoice.vue
浏览文件 @
30bedfe5
...
...
@@ -235,8 +235,8 @@ export default {
invoiceTypeList
()
{
const
list
=
[
// { label: '普通发票(纸质)', value: '1' },
{
label
:
'
专用发票(纸质)'
,
value
:
'3
'
},
{
label
:
'
普通发票(电子)'
,
value
:
'2
'
}
{
label
:
'
普通发票(电子)'
,
value
:
'2
'
},
{
label
:
'
专用发票(纸质)'
,
value
:
'3
'
}
]
if
(
this
.
form
.
taxpayer_type
!==
'2'
)
{
list
.
splice
(
1
,
1
)
...
...
@@ -253,9 +253,14 @@ export default {
created
()
{
defaultForm
.
invoice_remark
=
this
.
query
.
remark
||
''
defaultForm
.
sales_rep_user_id_name
=
this
.
query
.
name
||
''
// defaultForm.invoice_type = this.isProject ? '2' : ''
// this.invoice_type_label = this.isProject ? '普通发票(电子)' : ''
this
.
form
=
Object
.
assign
({
taxpayer_type
:
''
},
defaultForm
)
if
(
this
.
$route
.
query
.
taxpayer_info
)
{
console
.
log
(
'111'
)
this
.
form
=
Object
.
assign
(
defaultForm
,
JSON
.
parse
(
this
.
$route
.
query
.
taxpayer_info
))
this
.
invoice_type_label
=
this
.
form
.
invoice_type
===
'2'
?
'普通发票(电子)'
:
'专用发票(纸质)'
console
.
log
(
this
.
form
)
}
else
{
this
.
form
=
Object
.
assign
({
taxpayer_type
:
''
},
defaultForm
)
}
},
methods
:
{
selectEnterprise
(
item
)
{
...
...
@@ -311,9 +316,9 @@ export default {
setInvoiceType
(
val
)
{
const
item
=
this
.
invoiceTypeList
.
find
(
item
=>
item
.
value
===
val
)
if
(
item
)
{
// this.invoice_type_label = this.isProject ? '普通发票(电子)' :
item.label
this
.
invoice_type_label
=
item
.
label
}
else
{
// this.invoice_type_label = this.isProject ? '普通发票(电子)' :
''
this
.
invoice_type_label
=
''
window
.
setTimeout
(()
=>
{
this
.
$refs
.
vanForm
.
resetValidation
()
},
1
)
...
...
src/modules/payment/views/h5/List.vue
浏览文件 @
30bedfe5
...
...
@@ -33,6 +33,7 @@
</template>
<
script
>
import
{
Toast
}
from
'vant'
import
{
getPayList
,
handleDeleteInvoice
}
from
'../../api'
const
statusMap
=
{
1
:
'不可开具'
,
...
...
@@ -66,14 +67,44 @@ export default {
},
methods
:
{
handleDeleteInvoice
(
row
)
{
console
.
log
(
row
,
'row'
)
// item.project_id == '5005' && item.type == '60'
if
(
row
.
invoices
.
length
)
{
const
item
=
row
.
invoices
.
find
(
item
=>
parseInt
(
item
.
invoice_status
)
===
4
)
if
(
parseInt
(
item
.
invoice_type
)
===
3
)
{
Toast
(
'纸质发票作废请联系管理员'
)
return
false
}
}
handleDeleteInvoice
({
payment_id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$router
.
go
(
0
)
}
})
},
handleInvoice
(
val
)
{
this
.
$router
.
push
({
path
:
'/h5/payment/invoice'
,
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
)
query
.
taxpayer_info
=
JSON
.
stringify
({
taxpayer_address
:
item
.
taxpayer_address
,
taxpayer_bank_account
:
item
.
taxpayer_bank_account
,
taxpayer_bank_name
:
item
.
taxpayer_bank_name
,
taxpayer_identifier
:
item
.
taxpayer_identifier
,
taxpayer_mobile
:
item
.
taxpayer_mobile
,
taxpayer_name
:
item
.
taxpayer_name
,
taxpayer_type
:
item
.
taxpayer_type
,
invoice_type
:
item
.
invoice_type
,
recipient_address
:
item
.
recipient_address
,
recipient_email
:
item
.
recipient_email
,
recipient_mobile
:
item
.
recipient_mobile
,
recipient_name
:
item
.
recipient_name
})
}
}
this
.
$router
.
push
({
path
:
'/h5/payment/invoice'
,
query
:
query
})
},
handleDetials
(
val
)
{
window
.
localStorage
.
setItem
(
'invoiceDetails'
,
JSON
.
stringify
(
val
))
...
...
src/utils/beforeEnter.js
浏览文件 @
30bedfe5
...
...
@@ -3,7 +3,7 @@ import store from '@/store'
export
default
async
function
(
to
,
from
,
next
)
{
const
isLogin
=
store
.
state
.
user
.
id
||
(
await
store
.
dispatch
(
'checkLogin'
))
if
(
!
isLogin
)
{
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)}`
}
next
()
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论