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
4b2817af
authored
2024-08-09 15:16:36 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开票
1 parent
5fa7bc6d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
954 additions
and
0 deletions
src/routerPc/en.js
src/viewsPc/booking/ticket/addInvoice.vue
src/viewsPc/booking/ticket/invoiceDetail.vue
src/viewsPc/center/myCanKP.vue
src/routerPc/en.js
View file @
4b2817a
...
...
@@ -362,6 +362,18 @@ export const constantRoutes = [
meta
:
{
title
:
'peopleManage'
}
},
{
path
:
'ticket/addInvoice'
,
component
:
()
=>
import
(
'@/viewsPc/booking/ticket/addInvoice.vue'
),
name
:
'ticketAddInvoice'
,
meta
:
{
title
:
'ticketAddInvoice'
}
},
{
path
:
'ticket/invoiceDetail'
,
component
:
()
=>
import
(
'@/viewsPc/booking/ticket/invoiceDetail.vue'
),
name
:
'ticketInvoiceDetail'
,
meta
:
{
title
:
'ticketInvoiceDetail'
}
},
{
path
:
'hotel/:cptId'
,
component
:
()
=>
import
(
'@/viewsPc/booking/hotel'
),
name
:
'hotel'
,
...
...
src/viewsPc/booking/ticket/addInvoice.vue
0 → 100644
View file @
4b2817a
<
template
>
<div>
<div
class=
"box"
>
<el-card
:body-style=
"
{ padding: '0px' }" class="mt20">
<div
slot=
"header"
>
<div
class=
"bg-lineg"
>
<div
class=
"pl-back"
@
click=
"goBack"
>
<el-icon>
<ArrowLeftBold/>
</el-icon>
返回
</div>
{{
paymentType
!=
3
?
'发票开具'
:
'Invoice application'
}}
</div>
</div>
<el-row
:gutter=
"20"
class=
"pd20"
>
<el-col
:span=
"24"
>
<!--已选订单-->
<div
class=
"border-info"
>
<label
class=
"blueTag"
>
{{
paymentType
!=
3
?
'票务订单'
:
'Ticket'
}}
</label>
<h3>
{{
matchForm
.
name
}}
</h3>
<div>
<p>
地址:
{{
matchForm
.
address
}}
</p>
<p>
票档:
{{
ticketForm
.
extJson
?.
ticketType
?.
name
}}
</p>
<p>
时间:
{{
ticketForm
.
extJson
?.
ticketDate
.
name
}}
</p>
<p>
通票:
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
extJson
?.
ticketDate
.
price
}}
/1张
</p>
<p>
优惠票:
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
extJson
?.
ticketDate
.
rebatePrice
}}
/1张
</p>
<p
class=
"poPrice"
>
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
total
}}
</p>
</div>
<div>
<el-row
v-for=
"v in message"
style=
"width: 100%"
>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
v
.
name
}}
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
v
.
discount
?
'通票'
:
'优惠票'
}}
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
{{
v
.
discount
?
ticketForm
.
extJson
?.
ticketDate
.
price
:
ticketForm
.
extJson
?.
ticketDate
.
rebatePrice
}}
{{
paymentType
!=
3
?
'¥'
:
'€'
}}
/张
</el-col>
</el-row>
<el-row
style=
"width: 100%"
>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
paymentType
!=
3
?
'购票数量'
:
'Number of tickets purchased'
}}
:
{{
ticketForm
.
num
}}{{
paymentType
!=
3
?
'张'
:
'Tickets'
}}
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
{{
paymentType
!=
3
?
'联系方式'
:
'Contact Information'
}}
:
{{
ticketForm
.
phone
}}
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
共计:
{{
Number
(
ticketForm
.
total
).
toFixed
(
2
)
}}{{
paymentType
!=
3
?
'¥'
:
'€'
}}
</el-col>
</el-row>
</div>
</div>
<div
class=
"leftboderTT"
>
{{
paymentType
!=
3
?
'开票信息'
:
'Invoice information'
}}
</div>
<div
class=
"border-rr mt20 pd20"
>
<el-form
ref=
"formRef"
:label-width=
"paymentType != 3 ?'100':'150'"
:model=
"form"
:rules=
"rules"
class=
"mw500"
>
<el-form-item
:label=
"paymentType != 3 ?'开票金额':'Amount'"
>
<span
v-if=
"orderType==5||orderType==6"
class=
"bigprice"
>
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
totalMoney
}}
</span>
<span
v-else
class=
"bigprice"
>
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
totalMoney
}}
</span>
</el-form-item>
<el-form-item
:label=
"paymentType != 3 ?`发票形式`:'Invoice Form'"
prop=
"invoiceForm"
required
>
<el-radio-group
v-model=
"form.invoiceForm"
>
<el-radio
value=
"1"
>
{{
paymentType
!=
3
?
'电子发票'
:
'E-invoice'
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"paymentType != 3 ?`发票类型`:'Invoice Type'"
prop=
"invoiceType"
required
>
<el-radio-group
v-model=
"form.invoiceType"
>
<el-radio
value=
"0"
>
{{
paymentType
!=
3
?
'企业'
:
'Company'
}}
</el-radio>
<el-radio
value=
"1"
>
{{
paymentType
!=
3
?
'个人非企业'
:
'Individual'
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if=
"form.invoiceType=='0'"
:label=
"paymentType != 3 ?`发票抬头`:'Invoice Title'"
prop=
"invoiceTitle"
required
>
<el-input
v-model=
"form.invoiceTitle"
/>
</el-form-item>
<el-form-item
v-if=
"form.invoiceType=='0'"
:label=
"paymentType != 3 ?`税号`:'Duty Paragraph'"
prop=
"invoiceTfn"
required
>
<el-input
v-model=
"form.invoiceTfn"
/>
</el-form-item>
<el-form-item
v-if=
"form.invoiceForm=='1'"
:label=
"`邮箱`"
prop=
"invoiceEmail"
required
>
<el-input
v-model=
"form.invoiceEmail"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
type=
"textarea"
/>
</el-form-item>
<div
v-if=
"form.invoiceForm=='3'&&form.invoiceType=='0'"
>
<el-form-item
:label=
"`地址`"
prop=
"invoiceAddress"
required
>
<el-input
v-model=
"form.invoiceAddress"
/>
</el-form-item>
<el-form-item
:label=
"`电话`"
prop=
"invoicePhone"
required
>
<el-input
v-model=
"form.invoicePhone"
/>
</el-form-item>
<el-form-item
:label=
"`开户行`"
prop=
"invoiceBank"
required
>
<el-input
v-model=
"form.invoiceBank"
/>
</el-form-item>
<el-form-item
:label=
"`账户`"
prop=
"invoiceAccount"
required
>
<el-input
v-model=
"form.invoiceAccount"
/>
</el-form-item>
</div>
</el-form>
<div
v-if=
"remark"
class=
"tip"
>
<label>
{{
paymentType
!=
3
?
'开票须知'
:
'Invoice Notice'
}}
:
</label>
<div
v-html=
"remark"
/>
</div>
</div>
</el-col>
</el-row>
<el-row
align=
"middle"
class=
"pd20"
justify=
"center"
>
<el-col
:span=
"12"
class=
"text-center"
>
<el-button
class=
"btn-lineG w200px"
round
size=
"large"
type=
"primary"
@
click=
"submit"
>
{{
paymentType
!=
3
?
'提交'
:
'Submit'
}}
</el-button>
</el-col>
</el-row>
</el-card>
<div
style=
"height: 60px;"
></div>
</div>
</div>
<address-list-dialog
ref=
"dialogAddressListRef"
@
submit=
"getAddress"
/>
<!-- 开票须知 -->
</
template
>
<
script
setup
>
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
useStorage
}
from
"@vueuse/core/index"
;
import
AddressListDialog
from
"@/viewsPc/booking/component/addressList"
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
,
getInvoiceDetail
,
getBaseInfoByActiveId
,
getTicketOrderInfo
,
getTicketInfoByActivityId
,
submitInvoice
,
}
from
"@/apiPc/booking"
;
const
{
proxy
}
=
getCurrentInstance
()
const
user
=
useUserStore
().
user
const
language
=
useStorage
(
'language'
,
0
)
const
router
=
useRouter
()
const
route
=
useRoute
()
const
form
=
ref
({
invoiceForm
:
'1'
,
invoiceType
:
'0'
})
const
orderType
=
ref
(
1
)
const
paymentType
=
ref
(
1
)
const
list
=
ref
([])
const
addrList
=
ref
([])
const
nowAddress
=
ref
({})
const
totalMoney
=
ref
(
0
)
const
remark
=
ref
(
''
)
const
rules
=
ref
({
invoiceType
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请选择发票类型'
:
'Please select invoice type'
,
trigger
:
'change'
}
],
invoiceEmail
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入邮箱'
:
'Please enter email'
,
trigger
:
'blur'
}
],
invoiceForm
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请选择发票形式'
:
'Please select invoice form'
,
trigger
:
'change'
}
],
invoiceTitle
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入发票抬头'
:
'Please enter invoice title'
,
trigger
:
'blur'
}
],
invoiceTfn
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入税号'
:
'Please enter TFN'
,
trigger
:
'blur'
}
],
invoiceAddress
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入地址'
:
'Please enter address'
,
trigger
:
'blur'
}
],
invoicePhone
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入电话'
:
'Please enter phone'
,
trigger
:
'blur'
}
],
invoiceBank
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入开户行'
:
'Please enter bank'
,
trigger
:
'blur'
}
],
invoiceAccount
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入账户'
:
'Please enter account'
,
trigger
:
'blur'
}
],
})
const
isEdit
=
ref
(
false
)
const
ticketForm
=
ref
({})
const
matchForm
=
ref
({})
const
message
=
ref
([])
const
invoiceId
=
ref
()
let
cptId
onMounted
(()
=>
{
if
(
language
.
value
!=
0
)
{
router
.
push
(
'/center/myInfo'
)
}
orderType
.
value
=
route
.
query
.
orderType
if
(
route
.
query
.
invoiceId
)
{
invoiceId
.
value
=
route
.
query
.
invoiceId
isEdit
.
value
=
true
getList
()
}
// 获取票务订单信息
getTickInfo
()
})
// 票务订单详情
async
function
getTickInfo
()
{
const
res
=
await
getTicketOrderInfo
({
orderId
:
route
.
query
.
orderId
})
ticketForm
.
value
=
res
.
data
try
{
ticketForm
.
value
.
extJson
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
)
ticketForm
.
value
.
extJson
.
ticketDate
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
ticketDate
)
ticketForm
.
value
.
extJson
.
ticketType
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
ticketType
)
cptId
=
ticketForm
.
value
.
extJson
.
ticketDate
.
activityId
totalMoney
.
val
=
ticketForm
.
value
.
extJson
.
total
message
.
value
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
message
)
totalMoney
.
value
=
ticketForm
.
value
.
total
paymentType
.
value
=
ticketForm
.
value
.
paymentType
await
getDetail
(
ticketForm
.
value
.
extJson
.
ticketDate
.
activityId
)
console
.
log
(
ticketForm
.
value
)
}
catch
(
e
)
{
console
.
log
(
e
)
}
finally
{
}
}
async
function
getDetail
(
activeId
)
{
const
res
=
await
getTicketInfoByActivityId
({
activityId
:
activeId
})
matchForm
.
value
=
res
.
data
console
.
log
(
matchForm
.
value
)
}
function
getList
()
{
getInvoiceDetail
(
invoiceId
.
value
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
})
}
function
getAddrList
()
{
addressList
(
user
.
userId
).
then
(
res
=>
{
addrList
.
value
=
res
.
rows
if
(
addrList
.
value
.
length
>
0
)
{
nowAddress
.
value
=
addrList
.
value
[
0
]
}
})
}
function
getAddress
(
obj
)
{
getAddrList
()
nowAddress
.
value
=
obj
}
function
submit
()
{
proxy
.
$refs
[
'formRef'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// 提交确认
ElMessageBox
.
confirm
(
language
.
value
==
0
?
'确认提交吗?'
:
'Confirm to submit ?'
,
{
confirmButtonText
:
language
.
value
==
0
?
'确定'
:
'Confirm'
,
cancelButtonText
:
language
.
value
==
0
?
'取消'
:
'Cancel'
,
type
:
'warning'
}).
then
(()
=>
{
form
.
value
.
activeId
=
cptId
form
.
value
.
total
=
totalMoney
.
value
form
.
value
.
version
=
2
form
.
value
.
invoicePhone
=
paymentType
.
value
form
.
value
.
orders
=
route
.
query
.
orderId
if
(
isEdit
.
value
)
{
update
()
}
else
{
add
()
}
})
}
})
}
function
update
()
{
editInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
function
add
()
{
submitInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
function
backList
()
{
router
.
push
({
name
:
'myKP'
})
}
function
goBack
()
{
router
.
go
(
-
1
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pl-back
{
position
:
absolute
;
padding
:
0
15px
;
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
}
.bigMoney
{
font-size
:
36px
!important
;
font-family
:
'DIN Alternate'
;
font-weight
:
bold
;
}
.btn-lineG
{
font-size
:
16px
}
.bg-lineg
{
height
:
40px
;
line-height
:
40px
;
font-size
:
18px
;
text-align
:
center
;
}
.border-info
{
position
:
relative
;
&
>
label
{
position
:
absolute
;
right
:
0
;
top
:
0
;
margin
:
0
;
border-radius
:
0
0
0px
15px
;
padding
:
5px
15px
;
font-size
:
14px
;
}
.poPrice
{
position
:
absolute
;
bottom
:
0px
;
right
:
10px
;
font-size
:
24px
;
line-height
:
1
;
font-family
:
"DIN Alternate"
}
}
.blueTag
{
color
:
#fff
;
background-color
:
#1EC886
;
}
.purpleTag
{
color
:
#fff
;
background-color
:
#717bef
;
}
.orangeTag
{
color
:
#fff
;
background-color
:
#ff8124
;
}
.pinkTag
{
color
:
#fff
;
background-color
:
#f55497
;
}
.yellowTag
{
color
:
#fff
;
background-color
:
#bad814
;
}
.leftboderTT
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#453DEA
;
}
.border-rr
{
border-radius
:
5px
;
border
:
1px
solid
#DCDFE6
;
}
.room
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#929AA0
;
}
.ccitemBox
{
overflow
:
auto
;
label
{
margin
:
10px
0
;
display
:
block
;
min-height
:
30px
;
span
{
color
:
#FF8124
;
font-family
:
DIN
Alternate
;
font-size
:
24px
;
}
}
}
.ccitem
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
15px
;
color
:
#666
;
margin
:
5px
0
10px
;
label
{
font-size
:
16px
;
color
:
#000
;
}
span
{
font-size
:
13px
;
}
}
.red
{
color
:
#FF8124
;
}
.tip
{
font-size
:
14px
;
color
:
#666
;
padding
:
0
10px
;
}
.mw500
{
max-width
:
500px
;
margin
:
auto
}
.bigSize
{
font-size
:
16px
;
margin-bottom
:
5px
;
}
.smallSize
{
font-size
:
14px
;
color
:
#999
;
}
.flexCenter
{
display
:
flex
;
width
:
100%
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#f4f4f4
;
padding
:
10px
;
box-sizing
:
border-box
;
}
.bigprice
{
font-size
:
26px
;
line-height
:
1
;
font-family
:
"DIN Alternate"
;
}
</
style
>
src/viewsPc/booking/ticket/invoiceDetail.vue
0 → 100644
View file @
4b2817a
<
template
>
<div>
<div
class=
"box"
>
<el-card
:body-style=
"
{ padding: '0px' }" class="mt20">
<div
slot=
"header"
>
<div
class=
"bg-lineg"
>
<div
class=
"pl-back"
@
click=
"goBack"
>
<el-icon>
<ArrowLeftBold/>
</el-icon>
返回
</div>
{{
language
==
0
?
'发票开具'
:
'Invoice application'
}}
</div>
</div>
<el-row
:gutter=
"20"
class=
"pd20"
>
<el-col
:span=
"24"
>
<!--已选订单-->
<div
class=
"border-info"
>
<label
class=
"blueTag"
>
票务订单
</label>
<h3>
{{
matchForm
.
name
}}
</h3>
<div>
<p>
地址:
{{
matchForm
.
address
}}
</p>
<p>
票档:
{{
ticketForm
.
extJson
?.
ticketType
?.
name
}}
</p>
<p>
时间:
{{
ticketForm
.
extJson
?.
ticketDate
.
name
}}
</p>
<p>
通票:
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
extJson
?.
ticketDate
.
price
}}
/1张
</p>
<p>
优惠票:
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
extJson
?.
ticketDate
.
rebatePrice
}}
/1张
</p>
<p
class=
"poPrice"
>
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
ticketForm
.
total
}}
</p>
</div>
<div>
<el-row
v-for=
"v in message"
style=
"width: 100%"
>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
v
.
name
}}
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
v
.
discount
?
'通票'
:
'优惠票'
}}
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
{{
v
.
discount
?
ticketForm
.
extJson
?.
ticketDate
.
price
:
ticketForm
.
extJson
?.
ticketDate
.
rebatePrice
}}
{{
paymentType
!=
3
?
'¥'
:
'€'
}}
/张
</el-col>
</el-row>
<el-row
style=
"width: 100%"
>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
<div>
{{
language
==
0
?
'购票数量'
:
'Number of tickets purchased'
}}
:
{{
ticketForm
.
num
}}
张
</div>
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
{{
language
==
0
?
'联系方式'
:
'Contact Information'
}}
:
{{
ticketForm
.
phone
}}
</el-col>
<el-col
:lg=
"8"
:md=
"12"
:sm=
"12"
:xs=
"24"
>
共计:
{{
Number
(
ticketForm
.
total
).
toFixed
(
2
)
}}{{
paymentType
!=
3
?
'¥'
:
'€'
}}
</el-col>
</el-row>
</div>
</div>
<div
class=
"leftboderTT"
>
{{
language
==
0
?
'开票信息'
:
'Invoice information'
}}
</div>
<div
class=
"border-rr mt20 pd20"
>
<el-form
ref=
"formRef"
:label-width=
"language == 0 ?'100':'150'"
:model=
"form"
:rules=
"rules"
class=
"mw500"
>
<el-form-item
:label=
"'开票金额'"
>
<span
class=
"bigprice"
>
{{
paymentType
!=
3
?
'¥'
:
'€'
}}{{
totalMoney
}}
</span>
</el-form-item>
<el-form-item
:label=
"`发票形式`"
prop=
"invoiceForm"
required
>
<span
v-if=
"form.invoiceForm=='1'"
>
电子发票
</span>
<span
v-if=
"form.invoiceForm=='2'"
>
纸质普票
</span>
<span
v-if=
"form.invoiceForm=='3'"
>
纸质专票
</span>
</el-form-item>
<el-form-item
:label=
"`发票类型`"
prop=
"invoiceType"
required
>
<span
v-show=
"form.invoiceType=='0'"
>
企业
</span>
<span
v-show=
"form.invoiceType=='1'"
>
个人非企业
</span>
</el-form-item>
<el-form-item
:label=
"`发票抬头`"
prop=
"invoiceTitle"
required
>
{{
form
.
invoiceTitle
}}
</el-form-item>
<el-form-item
v-if=
"form.invoiceType=='0'"
:label=
"`税号`"
prop=
"invoiceTfn"
required
>
{{
form
.
invoiceTfn
}}
</el-form-item>
<el-form-item
v-if=
"form.invoiceForm=='1'"
:label=
"`邮箱`"
prop=
"invoiceEmail"
required
>
{{
form
.
invoiceEmail
}}
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remarks"
>
{{
form
.
remarks
}}
</el-form-item>
<div
v-if=
"form.invoiceForm=='3'&&form.invoiceType=='0'"
>
<el-form-item
:label=
"`地址`"
prop=
"invoiceAddress"
required
>
{{
form
.
invoiceAddress
}}
</el-form-item>
<el-form-item
:label=
"`电话`"
prop=
"invoicePhone"
required
>
{{
form
.
invoicePhone
}}
</el-form-item>
<el-form-item
:label=
"`开户行`"
prop=
"invoiceBank"
required
>
{{
form
.
invoiceBank
}}
</el-form-item>
<el-form-item
:label=
"`账户`"
prop=
"invoiceAccount"
required
>
{{
form
.
invoiceAccount
}}
</el-form-item>
</div>
</el-form>
</div>
</el-col>
</el-row>
<div
class=
"text-center mb20"
>
<el-button
plain
round
type=
"primary"
@
click=
"backList"
>
返回
</el-button>
</div>
</el-card>
<div
style=
"height: 60px;"
></div>
</div>
</div>
</
template
>
<
script
setup
>
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
useStorage
}
from
"@vueuse/core/index"
;
import
dayjs
from
'dayjs'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useUserStore
from
"@/store/modules/user"
;
import
{
getCurrentInstance
}
from
"@vue/runtime-core"
;
import
{
getInvoiceDetail
,
getTicketOrderInfo
,
getTicketInfoByActivityId
}
from
"@/apiPc/booking"
;
import
{
getOrderDetail
}
from
"@/viewsPc/seat/api/index"
;
const
{
proxy
}
=
getCurrentInstance
()
const
user
=
useUserStore
().
user
const
language
=
useStorage
(
'language'
,
0
)
const
paymentType
=
ref
(
1
)
const
router
=
useRouter
()
const
route
=
useRoute
()
const
list
=
ref
([])
const
totalMoney
=
ref
(
0
)
const
orderType
=
ref
(
0
)
const
form
=
ref
({})
const
formDate
=
ref
({})
const
ticketForm
=
ref
({})
const
message
=
ref
({})
const
matchForm
=
ref
({})
let
cptId
=
null
const
invoiceId
=
ref
()
const
rules
=
ref
({
invoiceType
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请选择发票类型'
:
'Please select invoice type'
,
trigger
:
'change'
}
],
invoiceEmail
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入邮箱'
:
'Please enter email'
,
trigger
:
'blur'
}
],
invoiceForm
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请选择发票形式'
:
'Please select invoice form'
,
trigger
:
'change'
}
],
invoiceTitle
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入发票抬头'
:
'Please enter invoice title'
,
trigger
:
'blur'
}
],
invoiceTfn
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入税号'
:
'Please enter TFN'
,
trigger
:
'blur'
}
],
invoiceAddress
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入地址'
:
'Please enter address'
,
trigger
:
'blur'
}
],
invoicePhone
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入电话'
:
'Please enter phone'
,
trigger
:
'blur'
}
],
invoiceBank
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入开户行'
:
'Please enter bank'
,
trigger
:
'blur'
}
],
invoiceAccount
:
[
{
required
:
true
,
message
:
language
.
value
==
0
?
'请输入账户'
:
'Please enter account'
,
trigger
:
'blur'
}
],
})
onMounted
(()
=>
{
if
(
route
.
query
.
invoiceId
)
{
invoiceId
.
value
=
route
.
query
.
invoiceId
getList
()
}
// 获取票务订单信息
getTickInfo
()
})
// 票务订单详情
async
function
getTickInfo
()
{
const
res
=
await
getTicketOrderInfo
({
orderId
:
route
.
query
.
orderId
})
ticketForm
.
value
=
res
.
data
try
{
ticketForm
.
value
.
extJson
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
)
ticketForm
.
value
.
extJson
.
ticketDate
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
ticketDate
)
ticketForm
.
value
.
extJson
.
ticketType
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
ticketType
)
cptId
=
ticketForm
.
value
.
extJson
.
ticketDate
.
activityId
totalMoney
.
val
=
ticketForm
.
value
.
extJson
.
total
message
.
value
=
JSON
.
parse
(
ticketForm
.
value
.
extJson
.
message
)
totalMoney
.
value
=
ticketForm
.
value
.
total
await
getDetail
(
ticketForm
.
value
.
extJson
.
ticketDate
.
activityId
)
console
.
log
(
ticketForm
.
value
)
}
catch
(
e
)
{
console
.
log
(
e
)
}
finally
{
}
}
async
function
getDetail
(
activeId
)
{
const
res
=
await
getTicketInfoByActivityId
({
activityId
:
activeId
})
matchForm
.
value
=
res
.
data
console
.
log
(
matchForm
.
value
)
}
async
function
getDataInfo
()
{
const
res
=
await
getOrderDetail
({
orderSn
:
route
.
query
.
orderSn
})
formDate
.
value
=
res
.
data
}
function
getList
()
{
getInvoiceDetail
(
invoiceId
.
value
).
then
(
res
=>
{
form
.
value
=
res
.
data
;
totalMoney
.
value
=
form
.
value
.
total
})
}
function
backList
()
{
router
.
push
({
name
:
'myKP'
})
}
function
goBack
()
{
router
.
go
(
-
1
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pl-back
{
position
:
absolute
;
padding
:
0
15px
;
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
}
.bigMoney
{
font-size
:
36px
!important
;
font-family
:
'DIN Alternate'
;
font-weight
:
bold
;
}
.btn-lineG
{
font-size
:
16px
}
.bg-lineg
{
height
:
40px
;
line-height
:
40px
;
font-size
:
18px
;
text-align
:
center
;
}
.border-info
{
position
:
relative
;
&
>
label
{
position
:
absolute
;
right
:
0
;
top
:
0
;
margin
:
0
;
border-radius
:
0
0
0px
15px
;
padding
:
5px
15px
;
font-size
:
14px
;
}
.poPrice
{
position
:
absolute
;
bottom
:
0px
;
right
:
10px
;
font-size
:
24px
;
line-height
:
1
;
font-family
:
"DIN Alternate"
}
}
.blueTag
{
color
:
#fff
;
background-color
:
#1EC886
;
}
.purpleTag
{
color
:
#fff
;
background-color
:
#717bef
;
}
.orangeTag
{
color
:
#fff
;
background-color
:
#ff8124
;
}
.pinkTag
{
color
:
#fff
;
background-color
:
#f55497
;
}
.yellowTag
{
color
:
#fff
;
background-color
:
#bad814
;
}
.leftboderTT
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#453DEA
;
}
.border-rr
{
border-radius
:
5px
;
border
:
1px
solid
#DCDFE6
;
}
.room
{
font-weight
:
400
;
font-size
:
14px
;
color
:
#929AA0
;
}
.ccitemBox
{
overflow
:
auto
;
label
{
margin
:
10px
0
;
display
:
block
;
min-height
:
30px
;
span
{
color
:
#FF8124
;
font-family
:
DIN
Alternate
;
font-size
:
24px
;
}
}
}
.ccitem
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
15px
;
color
:
#666
;
margin
:
5px
0
10px
;
label
{
font-size
:
16px
;
color
:
#000
;
}
span
{
font-size
:
13px
;
}
}
.red
{
color
:
#FF8124
;
}
.tip
{
font-size
:
14px
;
color
:
#666
;
padding
:
0
10px
;
}
.mw500
{
max-width
:
500px
;
margin
:
auto
}
.bigSize
{
font-size
:
16px
;
margin-bottom
:
5px
;
}
.smallSize
{
font-size
:
14px
;
color
:
#999
;
}
.flexCenter
{
display
:
flex
;
width
:
100%
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#f4f4f4
;
padding
:
10px
;
box-sizing
:
border-box
;
}
.bigprice
{
font-size
:
26px
;
line-height
:
1
;
font-family
:
"DIN Alternate"
;
}
</
style
>
src/viewsPc/center/myCanKP.vue
View file @
4b2817a
...
...
@@ -326,6 +326,18 @@ const handleClick = (e) => {
}
const
gokp
=
(
item
)
=>
{
if
(
query
.
value
.
orderType
)
{
router
.
push
({
name
:
'ticketAddInvoice'
,
query
:
{
orders
:
encodeURIComponent
(
JSON
.
stringify
(
item
)),
totalMoney
:
item
.
totalStr
||
item
.
totalPayAmount
||
item
.
payAmount
||
item
.
totalAmount
,
orderId
:
item
.
id
,
paymentType
:
item
.
paymentType
,
orderType
:
query
.
value
.
orderType
,
}
})
}
else
{
router
.
push
({
path
:
'/booking/addInvoice'
,
query
:
{
...
...
@@ -337,8 +349,20 @@ const gokp = (item) => {
orderSn
:
query
.
value
.
orderType
==
6
?
item
.
orderSn
:
null
}
})
}
}
const
editkp
=
(
item
)
=>
{
if
(
query
.
value
.
orderType
==
6
)
{
router
.
push
({
name
:
'ticketAddInvoice'
,
query
:
{
invoiceId
:
item
.
invoiceId
,
orderId
:
item
.
id
,
isEdit
:
true
,
}
})
}
else
{
router
.
push
({
name
:
'addInvoice'
,
query
:
{
...
...
@@ -351,8 +375,20 @@ const editkp = (item) => {
// orderSn: query.value.orderType == 6 ? item.orderSn : null
}
})
}
}
const
showDetail
=
(
item
)
=>
{
if
(
query
.
value
.
orderType
==
6
)
{
router
.
push
({
name
:
'ticketInvoiceDetail'
,
query
:
{
invoiceId
:
item
.
invoiceId
,
orderId
:
item
.
id
,
}
})
}
else
{
router
.
push
({
name
:
'invoiceDetail'
,
query
:
{
...
...
@@ -363,6 +399,8 @@ const showDetail = (item) => {
// orderSn: query.value.orderType == 6 ? item.orderSn : null
}
})
}
}
let
nowSj
=
{}
const
goSj
=
(
item
)
=>
{
...
...
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