Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2a8042bb
authored
2024-07-16 15:36:55 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
票务
1 parent
008175aa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
37 deletions
src/apiPc/booking.js
src/viewsPc/booking/addInvoice.vue
src/viewsPc/booking/invoiceDetail.vue
src/viewsPc/center/myCanKP.vue
src/viewsPc/seat/api/index.js
src/apiPc/booking.js
View file @
2a8042b
...
...
@@ -216,6 +216,14 @@ export function editInvoice(form) {
data
:
form
})
}
export
function
editInvoiceMatch
(
form
)
{
return
request
({
url
:
`/cpt/invoice`
,
method
:
'put'
,
data
:
form
})
}
export
function
editCptInvoice
(
form
)
{
return
request
({
url
:
`/cpt/invoice`
,
...
...
@@ -379,6 +387,13 @@ export function getInvoiceDetail(invoiceId) {
method
:
'get'
})
}
export
function
getInvoiceDetailMatch
(
invoiceId
)
{
return
request
({
url
:
`/cpt/invoice/
${
invoiceId
}
`
,
method
:
'get'
})
}
export
function
getReceipt
(
query
)
{
// type 1是下载 2是发送到邮箱
return
request
({
...
...
src/viewsPc/booking/addInvoice.vue
View file @
2a8042b
...
...
@@ -9,13 +9,13 @@
<el-col
:span=
"24"
>
<!--已选订单-->
<div
class=
"border-info"
v-for=
"b in list"
:key=
"b.id"
>
<label
class=
"blueTag"
v-if=
"
b.
orderType == 0"
>
{{
language
==
0
?
'酒店订单'
:
'HOTEL'
}}
</label>
<label
class=
"blueTag"
v-if=
"orderType == 0"
>
{{
language
==
0
?
'酒店订单'
:
'HOTEL'
}}
</label>
<label
class=
"orangeTag"
v-if=
"b.orderType == 1"
>
{{
language
==
0
?
'车辆订单'
:
'TRANSPORTATION'
}}
</label>
<label
class=
"purpleTag"
v-if=
"b.orderType == 2"
>
{{
language
==
0
?
'餐饮订单'
:
'DINING'
}}
</label>
<label
class=
"pinkTag"
v-if=
"b.orderType == 3"
>
{{
language
==
0
?
'化妆订单'
:
'MakeUp'
}}
</label>
<label
class=
"yellowTag"
v-if=
"b.orderType == 4"
>
{{
language
==
0
?
'拍摄订单'
:
'Shooting'
}}
</label>
<label
class=
"yellowTag"
v-if=
"orderType == 6"
>
{{
language
==
0
?
'票务'
:
'Ticket'
}}
</label>
<label
class=
"bg-primary"
v-if=
"
!b.orderType
"
>
{{
language
==
0
?
'赛事报名'
:
'REGISTRATION'
}}
</label>
<label
class=
"bg-primary"
v-if=
"
orderType==5
"
>
{{
language
==
0
?
'赛事报名'
:
'REGISTRATION'
}}
</label>
<h3
v-if=
"b.name"
>
{{
b
.
name
}}
</h3>
<h3
v-if=
"b.cptName"
>
{{
b
.
cptName
}}
</h3>
...
...
@@ -153,14 +153,15 @@ import dayjs from 'dayjs'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useUserStore
from
"@/store/modules/user"
;
import
{
getCurrentInstance
}
from
"@vue/runtime-core"
;
import
{
submitTitckInvoice
,
i
nvoice
}
from
'@/viewsPc/seat/api/index'
import
{
submitTitckInvoice
,
invoice
,
TitckUpdateI
nvoice
}
from
'@/viewsPc/seat/api/index'
import
{
addressList
,
editInvoice
,
editInvoiceMatch
,
submitInvoice
,
getInvoiceDetailBills
,
getInvoiceDetail
,
submitCptInvoice
,
getBaseInfoByActiveId
,
getLeagueInvoiceDetail
,
getLeagueInvoiceDetailPC
submitCptInvoice
,
getBaseInfoByActiveId
,
getLeagueInvoiceDetail
,
getLeagueInvoiceDetailPC
,
getInvoiceDetailMatch
}
from
"@/apiPc/booking"
;
const
{
proxy
}
=
getCurrentInstance
()
...
...
@@ -212,6 +213,8 @@ const rules = ref({
const
isEdit
=
ref
(
false
)
let
invoiceId
let
cptId
onMounted
(()
=>
{
console
.
log
(
route
.
query
)
orderType
.
value
=
route
.
query
.
orderType
...
...
@@ -271,6 +274,7 @@ function getList() {
getLeagueInvoiceDetailPC
(
invoiceId
).
then
(
res
=>
{
// 订单
list
.
value
=
res
.
data
;
console
.
log
(
list
.
value
)
cptId
=
res
.
rows
[
0
].
activeId
||
res
.
rows
[
0
].
cptId
getRemark
()
for
(
var
bill
of
list
.
value
)
{
...
...
@@ -292,10 +296,20 @@ function getList() {
// 回显
if
(
orderType
.
value
==
6
){
invoice
(
invoiceId
).
then
(
res
=>
{
console
.
log
(
res
)
// form.value = res.data;
// totalMoney.value = form.value.total
// console.log(res)
form
.
value
=
res
.
data
;
form
.
value
.
invoiceForm
=
'1'
totalMoney
.
value
=
form
.
value
.
total
})
}
else
if
(
orderType
.
value
==
5
){
getInvoiceDetailMatch
(
invoiceId
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
// if (form.value.invoiceForm == '1') {
// email.value = form.value.address
// }
// getAddrList()
});
}
else
{
getInvoiceDetail
(
invoiceId
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
...
...
@@ -360,10 +374,23 @@ function submit() {
}
function
update
()
{
editInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
if
(
orderType
.
value
==
6
){
TitckUpdateInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
else
if
(
orderType
.
value
==
5
){
editInvoiceMatch
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
else
{
editInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
}
function
add
()
{
if
(
orderType
.
value
==
6
){
...
...
src/viewsPc/booking/invoiceDetail.vue
View file @
2a8042b
...
...
@@ -61,17 +61,7 @@
<span
v-if=
"form.invoiceForm=='2'"
>
纸质普票
</span>
<span
v-if=
"form.invoiceForm=='3'"
>
纸质专票
</span>
</el-form-item>
<el-form-item
:label=
"`邮箱`"
v-if=
"form.invoiceForm=='1'"
required
prop=
"address"
>
{{
form
.
address
}}
</el-form-item>
<el-form-item
:label=
"`邮寄地址`"
v-else
required
>
<div
class=
"flexCenter"
>
<div>
<div
class=
"bigSize"
>
{{
nowAddress
.
contact
}}
{{
nowAddress
.
phone
}}
</div>
<div
class=
"smallSize"
>
{{
nowAddress
.
addName
}}
</div>
</div>
</div>
</el-form-item>
<el-form-item
:label=
"`发票类型`"
required
prop=
"invoiceType"
>
<span
v-show=
"form.invoiceType=='0'"
>
企业
</span>
<span
v-show=
"form.invoiceType=='1'"
>
个人非企业
</span>
...
...
@@ -82,6 +72,17 @@
<el-form-item
:label=
"`税号`"
required
v-if=
"form.invoiceType=='0'"
prop=
"invoiceTfn"
>
{{
form
.
invoiceTfn
}}
</el-form-item>
<el-form-item
:label=
"`邮箱`"
v-if=
"form.invoiceForm=='1'"
required
prop=
"invoiceEmail"
>
{{
form
.
invoiceEmail
}}
</el-form-item>
<el-form-item
:label=
"`邮寄地址`"
v-else
required
>
<div
class=
"flexCenter"
>
<div>
<div
class=
"bigSize"
>
{{
nowAddress
.
contact
}}
{{
nowAddress
.
phone
}}
</div>
<div
class=
"smallSize"
>
{{
nowAddress
.
addName
}}
</div>
</div>
</div>
</el-form-item>
<div
v-if=
"form.invoiceForm=='3'&&form.invoiceType=='0'"
>
<el-form-item
:label=
"`地址`"
required
prop=
"invoiceAddress"
>
{{
form
.
invoiceAddress
}}
...
...
@@ -119,7 +120,9 @@ import dayjs from 'dayjs'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useUserStore
from
"@/store/modules/user"
;
import
{
getCurrentInstance
}
from
"@vue/runtime-core"
;
import
{
addressList
,
editInvoice
,
submitInvoice
,
getInvoiceDetailBills
,
getInvoiceDetail
}
from
"@/apiPc/booking"
;
import
{
addressList
,
editInvoice
,
submitInvoice
,
getInvoiceDetailBills
,
getInvoiceDetail
,
getInvoiceDetailMatch
}
from
"@/apiPc/booking"
;
import
{
submitTitckInvoice
,
invoice
,
TitckUpdateInvoice
}
from
'@/viewsPc/seat/api/index'
const
{
proxy
}
=
getCurrentInstance
()
const
user
=
useUserStore
().
user
...
...
@@ -130,12 +133,13 @@ const list = ref([])
const
addrList
=
ref
([])
const
nowAddress
=
ref
({})
const
totalMoney
=
ref
(
0
)
const
orderType
=
ref
(
0
)
const
form
=
ref
({})
const
rules
=
ref
({
invoiceType
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请选择发票类型'
:
'Please select invoice type'
,
trigger
:
'change'
}
],
address
:
[
invoiceEmail
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入邮箱'
:
'Please enter email'
,
trigger
:
'blur'
}
],
invoiceForm
:
[
...
...
@@ -166,6 +170,7 @@ onMounted(() => {
if
(
route
.
query
.
activeId
){
form
.
value
.
activeId
=
route
.
query
.
activeId
}
orderType
.
value
=
route
.
query
.
orderType
invoiceId
=
route
.
query
.
invoiceId
getList
()
...
...
@@ -178,14 +183,33 @@ function getList() {
bill
.
messageObj
=
JSON
.
parse
(
bill
.
message
)
}
});
getInvoiceDetail
(
invoiceId
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
if
(
form
.
value
.
invoiceForm
==
'1'
)
{
email
.
value
=
form
.
value
.
address
}
getAddrList
()
});
if
(
orderType
.
value
==
6
){
invoice
(
invoiceId
).
then
(
res
=>
{
// console.log(res)
form
.
value
=
res
.
data
;
form
.
value
.
invoiceForm
=
1
totalMoney
.
value
=
form
.
value
.
total
})
}
else
if
(
orderType
.
value
==
5
){
getInvoiceDetailMatch
(
invoiceId
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
if
(
form
.
value
.
invoiceForm
==
'1'
)
{
email
.
value
=
form
.
value
.
address
}
getAddrList
()
});
}
else
{
getInvoiceDetail
(
invoiceId
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
if
(
form
.
value
.
invoiceForm
==
'1'
)
{
email
.
value
=
form
.
value
.
address
}
getAddrList
()
});
}
}
function
getAddrList
()
{
addressList
(
user
.
userId
).
then
(
res
=>
{
...
...
src/viewsPc/center/myCanKP.vue
View file @
2a8042b
...
...
@@ -248,7 +248,7 @@ onMounted(() => {
const
getList
=
()
=>
{
loading
.
value
=
true
if
(
query
.
value
.
orderType
==
'5'
){
getCanInvoiceBm
().
then
(
res
=>
{
getCanInvoiceBm
(
query
.
value
).
then
(
res
=>
{
list
.
value
=
res
.
rows
loading
.
value
=
false
})
...
...
@@ -294,7 +294,7 @@ const gokp = (item) => {
query
:
{
orders
:
encodeURIComponent
(
JSON
.
stringify
(
item
)),
totalMoney
:
item
.
total
||
item
.
totalPayAmount
||
item
.
payAmount
,
paymentType
:
query
.
value
.
orderType
==
6
?
item
.
payType
:
item
.
paymentType
,
paymentType
:
query
.
value
.
orderType
==
6
||
query
.
value
.
orderType
==
5
?
item
.
payType
:
item
.
paymentType
,
orderType
:
query
.
value
.
orderType
}
})
...
...
@@ -303,11 +303,11 @@ const editkp = (item) => {
router
.
push
({
name
:
'addInvoice'
,
query
:{
invoiceId
:
item
.
invoiceId
,
invoiceId
:
query
.
value
.
orderType
==
6
?
item
.
invoiceIdStr
:
item
.
invoiceId
,
type
:
activeName
.
value
,
isEdit
:
true
,
orderType
:
query
.
value
.
orderType
,
paymentType
:
query
.
value
.
orderType
==
6
?
item
.
payType
:
item
.
paymentType
,
paymentType
:
query
.
value
.
orderType
==
6
||
query
.
value
.
orderType
==
5
?
item
.
payType
:
item
.
paymentType
,
}
})
}
...
...
@@ -315,8 +315,10 @@ const showDetail = (item) => {
router
.
push
({
name
:
'invoiceDetail'
,
query
:{
invoiceId
:
item
.
invoiceId
,
invoiceId
:
query
.
value
.
orderType
==
6
?
item
.
invoiceIdStr
:
item
.
invoiceId
,
type
:
activeName
.
value
,
orderType
:
query
.
value
.
orderType
,
paymentType
:
query
.
value
.
orderType
==
6
?
item
.
payType
:
item
.
paymentType
,
}
})
}
...
...
src/viewsPc/seat/api/index.js
View file @
2a8042b
...
...
@@ -60,3 +60,6 @@ export const submitTitckInvoice = (data) =>
// 重新开票回显
export
const
invoice
=
(
data
)
=>
request
(
"GET"
,
`/api/invoice/
${
data
}
`
);
export
const
TitckUpdateInvoice
=
(
data
)
=>
request
(
"POST"
,
`/api/invoice/updateInvoice`
,
data
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment