Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
薪
薪瑞通-前端
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
许珑标
薪瑞通-前端
Commits
c21f1419
Commit
c21f1419
authored
Apr 29, 2025
by
许珑标
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一键开票
parent
548efe1b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
18 deletions
+179
-18
src/api/business/invoiceApply.js
src/api/business/invoiceApply.js
+31
-1
src/views/business/invoiceApply/index.vue
src/views/business/invoiceApply/index.vue
+136
-5
src/views/business/taxUser/index.vue
src/views/business/taxUser/index.vue
+12
-12
No files found.
src/api/business/invoiceApply.js
View file @
c21f1419
...
@@ -84,7 +84,6 @@ export function updateInvoiceStatus(data) {
...
@@ -84,7 +84,6 @@ export function updateInvoiceStatus(data) {
})
})
}
}
// 通过外部付款卡号获取销售方开票信息
// 通过外部付款卡号获取销售方开票信息
export
function
getSellerInvoiceInfo
(
cardNo
)
{
export
function
getSellerInvoiceInfo
(
cardNo
)
{
return
request
({
return
request
({
...
@@ -92,3 +91,34 @@ export function getSellerInvoiceInfo(cardNo) {
...
@@ -92,3 +91,34 @@ export function getSellerInvoiceInfo(cardNo) {
method
:
'
get
'
,
method
:
'
get
'
,
})
})
}
}
// 一键开票
export
function
onlineInvoicing
(
data
)
{
return
request
({
url
:
'
/business/invoiceApply/onlineGen
'
,
method
:
'
post
'
,
data
:
data
})
}
//获取人脸登录二维码
export
function
getFaceLoginCode
(
query
)
{
console
.
log
(
'
获取人脸登录二维码:
'
,
query
)
return
request
({
url
:
'
/business/invoiceApply/getFaceLoginQrCode
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获取人脸识别登录结果
export
function
getFaceLoginStatus
(
query
)
{
console
.
log
(
'
获取人脸识别登录结果:
'
,
query
)
return
request
({
url
:
'
/business/invoiceApply/getFaceLoginStatus
'
,
method
:
'
get
'
,
params
:
query
})
}
src/views/business/invoiceApply/index.vue
View file @
c21f1419
...
@@ -434,17 +434,46 @@
...
@@ -434,17 +434,46 @@
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 一键发票对话框 -->
<!-- 一键发票对话框 -->
<el-dialog
title=
"
上传发
票"
:visible.sync=
"onlineInvoiceForm.panel"
>
<el-dialog
title=
"
自助开
票"
:visible.sync=
"onlineInvoiceForm.panel"
>
<el-form
:model=
"onlineInvoiceForm"
ref=
"onlineInvoiceForm"
size=
"small"
label-width=
"100px"
>
<el-form
:model=
"onlineInvoiceForm"
ref=
"onlineInvoiceForm"
size=
"small"
label-width=
"100px"
>
<el-select
v-model=
"onlineInvoiceForm.taxpayerId"
placeholder=
"请选择开票员"
clearable
>
<el-select
v-model=
"onlineInvoiceForm.taxpayerId"
placeholder=
"请选择开票员"
clearable
>
<el-option
v-for=
"item in taxpayerList"
:key=
"item.loginUserIdCard"
:label=
"item.loginName"
:value=
"item.id"
/>
<el-option
v-for=
"item in taxpayerList"
:key=
"item.loginUserIdCard"
:label=
"item.loginName"
:value=
"item.id"
/>
</el-select>
</el-select>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"
uploadInvoiceFile
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
onlineGen
"
>
确 定
</el-button>
<el-button
@
click=
"onlineInvoiceForm.panel = false"
>
取 消
</el-button>
<el-button
@
click=
"onlineInvoiceForm.panel = false"
>
取 消
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<el-dialog
title=
"人脸识别二维码"
:visible.sync=
"faceCodeForm.panel"
width=
"30%"
>
<el-tabs
value=
"first"
@
tab-click=
"codeCheckClick"
>
<el-tab-pane
label=
"个人所得税App"
name=
"first"
>
<el-span>
请打开个人所得税App扫码进行人脸验证,验证完成后请点按下方按钮。
</el-span>
<el-image
style=
"width:100%"
:src=
"faceCodeForm.faceQRCode"
fit=
"fill"
/>
<el-row>
<el-col
:span=
"14"
style=
"text-align: right;"
>
<el-button
type=
"success"
round
@
click=
"refreshThisPage()"
>
我已完成
</el-button>
</el-col>
<el-col
:span=
"10"
style=
"text-align: right;"
>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"getFaceLoginCode()"
circle
></el-button>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
label=
"当地电子税局App"
name=
"second"
>
<el-span>
请打开当地电子税局App扫码进行人脸验证,验证完成后请点按下方按钮。
</el-span>
<el-image
style=
"width:100%"
:src=
"faceCodeForm.faceQRCode"
fit=
"fill"
/>
<el-row>
<el-col
:span=
"14"
style=
"text-align: right;"
>
<el-button
type=
"success"
round
@
click=
"refreshThisPage()"
>
我已完成
</el-button>
</el-col>
<el-col
:span=
"10"
style=
"text-align: right;"
>
<el-button
type=
"primary"
icon=
"el-icon-refresh-right"
@
click=
"getFaceLoginCode()"
circle
></el-button>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -455,7 +484,7 @@ import {
...
@@ -455,7 +484,7 @@ import {
delInvoiceApply
,
delInvoiceApply
,
addInvoiceApply
,
addInvoiceApply
,
updateInvoiceApply
,
updateInvoiceApply
,
uploadInvoiceFile
,
updateInvoiceStatus
,
getInvoiceApplyDetail
uploadInvoiceFile
,
updateInvoiceStatus
,
getInvoiceApplyDetail
,
onlineInvoicing
,
getFaceLoginCode
,
getFaceLoginStatus
}
from
'
@/api/business/invoiceApply
'
}
from
'
@/api/business/invoiceApply
'
import
{
listCompanyInfo
}
from
'
@/api/business/companyInfo
'
import
{
listCompanyInfo
}
from
'
@/api/business/companyInfo
'
import
fa
from
'
element-ui/src/locale/lang/fa
'
import
fa
from
'
element-ui/src/locale/lang/fa
'
...
@@ -472,11 +501,20 @@ export default {
...
@@ -472,11 +501,20 @@ export default {
dicts
:
[
'
invoice_status
'
,
'
tax_invoice_type
'
],
dicts
:
[
'
invoice_status
'
,
'
tax_invoice_type
'
],
data
()
{
data
()
{
return
{
return
{
// 人脸识别弹窗表单
faceCodeForm
:
{
panel
:
false
,
faceQRCode
:
null
,
},
// 一键开票
// 一键开票
onlineInvoiceForm
:
{
onlineInvoiceForm
:
{
panel
:
false
,
panel
:
false
,
taxpayerId
:
''
taxpayerId
:
null
,
invoiceApplyId
:
null
,
smsCode
:
null
,
verifyAppType
:
null
},
},
verifyAppType
:
2
,
//上传发票
//上传发票
applyInvoiceId
:
null
,
applyInvoiceId
:
null
,
viewInvoiceFileOpen
:
false
,
viewInvoiceFileOpen
:
false
,
...
@@ -851,7 +889,100 @@ export default {
...
@@ -851,7 +889,100 @@ export default {
this
.
taxpayerList
=
resp
.
data
this
.
taxpayerList
=
resp
.
data
}
}
})
})
this
.
onlineInvoiceForm
.
panel
=
true
this
.
onlineInvoiceForm
=
{
panel
:
true
,
taxpayerId
:
null
,
invoiceApplyId
:
row
.
id
,
smsCode
:
null
,
verifyAppType
:
null
}
},
onlineGen
()
{
this
.
$prompt
(
'
请输入返回值
'
,
'
操作提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
}).
then
(({
value
})
=>
{
let
testData
=
{
code
:
value
}
this
.
invoicingAfter
(
testData
)
})
// onlineInvoicing(this.onlineInvoiceForm).then(resp => {
// if (200 === resp.code) {
// this.invoicingAfter(resp.data)
// }
// })
},
invoicingAfter
(
data
)
{
let
code
=
data
.
code
if
(
code
==
200
)
{
this
.
$modal
.
msgSuccess
(
'
开具成功
'
)
this
.
getList
()
}
else
if
(
code
==
202
)
{
this
.
$modal
.
msgWarning
(
'
本次开票需要进行人脸识别验证。
'
)
this
.
faceCodeForm
=
{
faceQRCode
:
data
.
base64
,
panel
:
true
}
}
else
if
(
code
==
201
)
{
this
.
$modal
.
msgWarning
(
'
本次开票需要短信验证
'
)
this
.
$prompt
(
'
请输入短信验证码
'
,
'
操作提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
}).
then
(({
value
})
=>
{
// todo 重新发起
this
.
onlineInvoiceForm
.
smsCode
=
value
// this.onlineGen()
this
.
$message
({
type
:
'
success
'
,
message
:
'
你输入的短信验证码是:
'
+
value
});
console
.
log
(
'
一键开票请求参数:
'
,
this
.
onlineInvoiceForm
)
})
}
else
if
(
code
==
500
)
{
this
.
$modal
.
msgError
(
data
.
msg
)
}
},
// 获取新的扫脸二维码
getFaceLoginCode
(
fn
)
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
正在获取中请稍等...
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
})
let
params
=
{
verifyAppType
:
this
.
verifyAppType
,
taxpayerId
:
this
.
onlineInvoiceForm
.
taxpayerId
}
getFaceLoginCode
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
fn
&&
typeof
fn
===
'
function
'
)
{
fn
()
}
this
.
faceCodeForm
.
faceQRCode
=
res
.
data
;
}
}).
finally
(()
=>
{
loading
.
close
()
})
},
// 查询人脸识别状态
refreshThisPage
()
{
getFaceLoginStatus
({
taxpayerId
:
this
.
onlineInvoiceForm
.
taxpayerId
}).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
faceCodeForm
.
panel
=
false
;
this
.
$modal
.
msgSuccess
(
'
验证成功
'
)
}
else
{
this
.
$alert
(
'
查询人脸识别结果为失败,请刷新二维码后重新操作
'
,
'
操作提示
'
,
{
});
}
})
},
codeCheckClick
(
tab
)
{
this
.
verifyAppType
=
tab
.
name
===
"
second
"
?
1
:
2
//1:电子税局 App(当地使用的) 2:个人所得税 App
this
.
getFaceLoginCode
();
},
},
},
},
};
};
...
...
src/views/business/taxUser/index.vue
View file @
c21f1419
...
@@ -70,11 +70,11 @@
...
@@ -70,11 +70,11 @@
<el-table-column
label=
"登录账号"
align=
"center"
prop=
"loginAccount"
/>
<el-table-column
label=
"登录账号"
align=
"center"
prop=
"loginAccount"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"loginUserIdCard"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"loginUserIdCard"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"loginUserMobile"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"loginUserMobile"
/>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
>
<!-- <el-table-column label="状态" align="center" prop="status">--
>
<
template
slot-scope=
"scope"
>
<!-- <template slot-scope="scope">--
>
<dict-tag
:options=
"dict.type.taxpayer_status"
:value=
"scope.row.status"
/
>
<!-- <dict-tag :options="dict.type.taxpayer_status" :value="scope.row.status" />--
>
</
template
>
<!-- </template>--
>
</el-table-column
>
<!-- </el-table-column>--
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
...
@@ -83,13 +83,13 @@
...
@@ -83,13 +83,13 @@
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button>
>
修改
</el-button>
<el-button
<!--
<el-button-->
size=
"mini"
<!-- size="mini"-->
type=
"text"
<!-- type="text"-->
icon=
"el-icon-s-check"
<!-- icon="el-icon-s-check"-->
@
click=
"doAuth(scope.row)"
<!-- @click="doAuth(scope.row)"-->
v-if=
"scope.row.status === 'saved'"
<!-- v-if="scope.row.status === 'saved'"-->
>
认证
</el-button
>
<!-- >认证
</el-button>
--
>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
...
...
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