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
a8a815df
authored
2024-07-16 13:55:22 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
票务
1 parent
ce2e4083
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
44 deletions
src/apiPc/booking.js
src/viewsPc/booking/addInvoice.vue
src/viewsPc/center/index.vue
src/viewsPc/center/myCanKP.vue
src/viewsPc/seat/api/index.js
src/apiPc/booking.js
View file @
a8a815d
...
...
@@ -208,6 +208,7 @@ export function submitCptInvoice(form) {
data
:
form
})
}
export
function
editInvoice
(
form
)
{
return
request
({
url
:
`/ota/invoice`
,
...
...
src/viewsPc/booking/addInvoice.vue
View file @
a8a815d
...
...
@@ -14,6 +14,7 @@
<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>
<h3
v-if=
"b.name"
>
{{
b
.
name
}}
</h3>
...
...
@@ -61,7 +62,7 @@
<div
class=
"border-rr mt20 pd20"
>
<el-form
class=
"mw500"
:model=
"form"
:label-width=
"language == 0 ?'100':'150'"
:rules=
"rules"
ref=
"formRef"
>
<el-form-item
:label=
"language == 0 ?'开票金额':'Amount'"
>
<span
class=
"bigprice"
>
¥
{{
totalMoney
}}
</span>
<span
class=
"bigprice"
>
{{
paymentType
==
1
?
'¥'
:
'€'
}}
{{
totalMoney
}}
</span>
</el-form-item>
<el-form-item
:label=
"language == 0 ?`发票形式`:'Invoice Form'"
required
prop=
"invoiceForm"
>
...
...
@@ -71,9 +72,7 @@
<!--
<el-radio
value=
"3"
v-if=
"kpType.indexOf('3')!=-1"
>
{{
language
==
0
?
'纸质专票'
:
'Paper-special-invoice'
}}
</el-radio>
-->
</el-radio-group>
</el-form-item>
<!--
<el-form-item
:label=
"`邮箱`"
v-if=
"form.invoiceForm=='1'"
required
prop=
"address"
>
-->
<!--
<el-input
v-model=
"form.address"
/>
-->
<!--
</el-form-item>
-->
<!--
<el-form-item
:label=
"`邮寄地址`"
v-else
required
>
-->
<!--
<el-button
plain
type=
"primary"
size=
"small"
v-if=
"addrList.length==0"
@
click=
"goEditAddress"
>
-->
<!-- +
{{
language
==
0
?
'添加地址'
:
'Add'
}}
-->
...
...
@@ -100,6 +99,9 @@
<el-form-item
:label=
"language == 0 ?`税号`:'Duty Paragraph'"
required
v-if=
"form.invoiceType=='0'"
prop=
"invoiceTfn"
>
<el-input
v-model=
"form.invoiceTfn"
/>
</el-form-item>
<el-form-item
:label=
"`邮箱`"
v-if=
"form.invoiceForm=='1'"
required
prop=
"invoiceEmail"
>
<el-input
v-model=
"form.invoiceEmail"
/>
</el-form-item>
<div
v-if=
"form.invoiceForm=='3'&&form.invoiceType=='0'"
>
<el-form-item
:label=
"`地址`"
required
prop=
"invoiceAddress"
>
<el-input
v-model=
"form.invoiceAddress"
/>
...
...
@@ -151,6 +153,7 @@ import dayjs from 'dayjs'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useUserStore
from
"@/store/modules/user"
;
import
{
getCurrentInstance
}
from
"@vue/runtime-core"
;
import
{
submitTitckInvoice
,
invoice
}
from
'@/viewsPc/seat/api/index'
import
{
addressList
,
editInvoice
,
...
...
@@ -169,6 +172,8 @@ const form = ref({
invoiceForm
:
'1'
,
invoiceType
:
'0'
})
const
orderType
=
ref
(
1
)
const
paymentType
=
ref
(
1
)
const
list
=
ref
([])
const
addrList
=
ref
([])
const
nowAddress
=
ref
({})
...
...
@@ -179,7 +184,7 @@ 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
:
[
...
...
@@ -208,14 +213,20 @@ const isEdit = ref(false)
let
invoiceId
let
cptId
onMounted
(()
=>
{
console
.
log
(
route
.
query
)
orderType
.
value
=
route
.
query
.
orderType
paymentType
.
value
=
route
.
query
.
paymentType
if
(
route
.
query
.
orders
){
let
obj
=
JSON
.
parse
(
decodeURIComponent
(
route
.
query
.
orders
))
||
{}
if
(
obj
.
cptId
){
cptId
=
obj
.
cptId
}
if
(
obj
.
activeId
){
}
else
if
(
obj
.
activeId
){
cptId
=
obj
.
activeId
}
else
{
cptId
=
'1778253367748993026'
}
console
.
log
(
obj
)
getRemark
()
let
arr
=
[]
list
.
value
.
push
(
obj
)
...
...
@@ -234,6 +245,7 @@ onMounted(() => {
totalMoney
.
value
=
route
.
query
.
totalMoney
form
.
value
.
total
=
totalMoney
.
value
}
// if(route.query.kpType){
// kpType.value = route.query.kpType
// if(kpType.value.indexOf('2')>-1 || kpType.value.indexOf('3')>-1){
...
...
@@ -275,14 +287,24 @@ function getList() {
});
}
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;
// totalMoney.value = form.value.total
})
}
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
goEditAddress
(
id
)
{
...
...
@@ -324,6 +346,7 @@ function submit() {
form
.
value
.
activeId
=
cptId
form
.
value
.
total
=
totalMoney
.
value
form
.
value
.
version
=
2
form
.
value
.
invoicePhone
=
paymentType
.
value
if
(
isEdit
.
value
)
{
update
()
}
else
{
...
...
@@ -341,13 +364,16 @@ function update() {
})
}
function
add
()
{
if
(
list
.
value
[
0
].
orderType
||
list
.
value
[
0
].
orderType
==
0
){
if
(
orderType
.
value
==
6
){
submitTitckInvoice
(
form
.
value
).
then
((
res
)
=>
{
backList
()
})
}
else
if
(
list
.
value
[
0
].
orderType
||
list
.
value
[
0
].
orderType
==
0
){
submitInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
})
}
else
{
console
.
log
(
list
.
value
[
0
].
orderType
,
'2'
)
submitCptInvoice
(
form
.
value
).
then
(
res
=>
{
//返回列表
backList
()
...
...
src/viewsPc/center/index.vue
View file @
a8a815d
...
...
@@ -156,13 +156,13 @@ const menus = ref([
picUrl2
:
'/img/nav_30_dwn.png'
,
isActive
:
false
},
//
{
//
name: language.value==0?'发票申请':'Electronic invoice',
//
routeName: 'myKP',
//
picUrl1: '/img/fp.svg',
//
picUrl2: '/img/fp_dwn.svg',
//
isActive: false
//
}
{
name
:
language
.
value
==
0
?
'发票申请'
:
'Electronic invoice'
,
routeName
:
'myKP'
,
picUrl1
:
'/img/fp.svg'
,
picUrl2
:
'/img/fp_dwn.svg'
,
isActive
:
false
}
])
const
menusEn
=
ref
([
{
...
...
@@ -251,13 +251,13 @@ const menus3 = ref([
picUrl2
:
'/img/c7.png'
,
isActive
:
false
},
//
{
//
name: language.value==0?'发票申请':'Electronic invoice',
//
routeName: 'myKP',
//
picUrl1: '/img/fp.svg',
//
picUrl2: '/img/fp_dwn.svg',
//
isActive: false
//
}
{
name
:
language
.
value
==
0
?
'发票申请'
:
'Electronic invoice'
,
routeName
:
'myKP'
,
picUrl1
:
'/img/fp.svg'
,
picUrl2
:
'/img/fp_dwn.svg'
,
isActive
:
false
}
])
const
menus3En
=
ref
([
{
...
...
@@ -332,13 +332,13 @@ const menusPersonal = ref([
picUrl2
:
'/img/nav_30_dwn.png'
,
isActive
:
false
},
//
{
//
name: language.value==0?'发票申请':'Electronic invoice',
//
routeName: 'myKP',
//
picUrl1: '/img/fp.svg',
//
picUrl2: '/img/fp_dwn.svg',
//
isActive: false
//
}
{
name
:
language
.
value
==
0
?
'发票申请'
:
'Electronic invoice'
,
routeName
:
'myKP'
,
picUrl1
:
'/img/fp.svg'
,
picUrl2
:
'/img/fp_dwn.svg'
,
isActive
:
false
}
])
const
menusPersonalEn
=
ref
([
{
...
...
@@ -386,6 +386,7 @@ const menusPersonalEn = ref([
])
let
currMenu
onMounted
(()
=>
{
console
.
log
(
route
.
query
)
if
(
!
user
.
utype
){
router
.
push
({
name
:
'home'
})
return
...
...
src/viewsPc/center/myCanKP.vue
View file @
a8a815d
...
...
@@ -14,12 +14,31 @@
<el-tab-pane
:label=
"language==0?'餐饮订单':'DINING'"
name=
"2"
></el-tab-pane>
<el-tab-pane
:label=
"language==0?'摄像订单':'Shooting'"
name=
"4"
></el-tab-pane>
</el-tabs>
<div>
<el-form
label-width=
"90"
size=
"small"
>
<el-form-item
label=
"开票状态"
>
<el-select
v-model=
"query.invoiced"
clearable
placeholder=
"选择发票状态"
style=
"width: 200px"
@
change=
"getList"
>
<el-option
label=
"全部"
value=
"0"
/>
<el-option
label=
"未申请发票"
value=
"1"
/>
<el-option
label=
"已申请发票"
value=
"2"
/>
<el-option
label=
"已开发票"
value=
"3"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<el-empty
:image=
"`/img/order_no.png`"
:image-size=
"228"
v-if=
"list?.length == 0"
/>
<div
v-if=
"activeName=='6'"
class=
"pd20"
>
<div
v-for=
"b in list"
class=
"item"
v-loading=
"loading"
>
<div
class=
"title"
>
<label
class=
"orangeTag"
>
{{
language
==
0
?
'票务'
:
'Ticket'
}}
</label>
<span>
{{
b
.
orderSn
}}
</span>
<span
class=
"fr text-warning status"
>
{{
b
.
invoiceStr
}}
</span>
</div>
<el-row
class=
"pd20 mt10"
justify=
"space-between"
align=
"middle"
>
...
...
@@ -213,7 +232,8 @@ const user = useUserStore().user || {}
const
userStore
=
useUserStore
();
const
query
=
ref
({
createById
:
user
.
userId
,
orderType
:
'5'
orderType
:
'5'
,
invoiced
:
'0'
})
const
{
proxy
}
=
getCurrentInstance
()
const
list
=
ref
([])
...
...
@@ -235,7 +255,6 @@ const getList = () => {
}
else
if
(
query
.
value
.
orderType
==
'6'
){
login
()
}
else
{
query
.
value
.
invoiced
=
1
getCanInvoiceBills
(
query
.
value
).
then
(
res
=>
{
list
.
value
=
res
.
rows
for
(
let
b
of
list
.
value
)
{
...
...
@@ -247,6 +266,7 @@ const getList = () => {
}
const
login
=
async
()
=>
{
// 票务
const
userId
=
userStore
.
user
?.
userId
;
const
sign
=
md5
(
`uid=
${
userId
}
lgo1acfkw51jfo`
,
32
);
return
loginFree
({
...
...
@@ -254,16 +274,18 @@ const login = async () => {
sign
,
}).
then
((
res
)
=>
{
setToken
(
res
.
data
.
token
);
getCanInvoiceTicket
().
then
(
res
=>
{
getCanInvoiceTicket
(
query
.
value
).
then
(
res
=>
{
loading
.
value
=
false
list
.
value
=
res
.
data
.
lists
})
})
}
const
handleClick
=
(
e
)
=>
{
console
.
log
(
e
.
paneName
)
query
.
value
.
orderType
=
e
.
paneName
list
.
value
=
[]
query
.
value
.
invoiced
=
'0'
getList
()
}
const
gokp
=
(
item
)
=>
{
...
...
@@ -271,7 +293,9 @@ const gokp = (item) => {
path
:
'/booking/addInvoice'
,
query
:
{
orders
:
encodeURIComponent
(
JSON
.
stringify
(
item
)),
totalMoney
:
item
.
total
||
item
.
totalPayAmount
totalMoney
:
item
.
total
||
item
.
totalPayAmount
||
item
.
payAmount
,
paymentType
:
query
.
value
.
orderType
==
6
?
item
.
payType
:
item
.
paymentType
,
orderType
:
query
.
value
.
orderType
}
})
}
...
...
@@ -281,7 +305,9 @@ const editkp = (item) => {
query
:{
invoiceId
:
item
.
invoiceId
,
type
:
activeName
.
value
,
isEdit
:
true
isEdit
:
true
,
orderType
:
query
.
value
.
orderType
,
paymentType
:
query
.
value
.
orderType
==
6
?
item
.
payType
:
item
.
paymentType
,
}
})
}
...
...
src/viewsPc/seat/api/index.js
View file @
a8a815d
...
...
@@ -54,4 +54,9 @@ export const payCallback = (data) =>
request
(
"POST"
,
`/api/order/palPayTicket/callback/`
,
data
);
export
const
getCanInvoiceTicket
=
(
data
)
=>
request
(
"GET"
,
`/api/order/getOrderInvoiceList`
,
data
);
// 票务
export
const
submitTitckInvoice
=
(
data
)
=>
request
(
"POST"
,
`/api/invoice/makeInvoice`
,
data
);
// 重新开票回显
export
const
invoice
=
(
data
)
=>
request
(
"GET"
,
`/api/invoice/
${
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