Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
罗超
bigwood
Commits
c3fac924
Commit
c3fac924
authored
Jan 16, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
428294bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
11 deletions
+75
-11
App.vue
src/App.vue
+6
-7
vehicle.ts
src/api/vehicle.ts
+17
-0
index.vue
src/pages/vehicle/index.vue
+52
-4
No files found.
src/App.vue
View file @
c3fac924
...
...
@@ -4,18 +4,17 @@
<
script
lang=
"ts"
>
import
{
defineComponent
,
onBeforeUnmount
}
from
'vue'
;
import
{
useQuasar
,
QSpinnerFacebook
}
from
'quasar'
import
{
useQuasar
,
QSpinnerFacebook
}
from
'quasar'
import
{
useI18n
}
from
'vue-i18n'
import
axios
from
'axios'
;
import
{
DirtionmaryHelper
}
from
'./config/dictionary'
;
export
default
defineComponent
({
name
:
'App'
,
setup
(
props
,
context
)
{
const
{
t
}
=
useI18n
()
const
$q
=
useQuasar
()
let
timer
=
null
as
any
if
(
localStorage
.
vuex
)
{
if
(
localStorage
.
vuex
)
{
localStorage
.
clear
()
}
onBeforeUnmount
(()
=>
{
...
...
@@ -25,7 +24,7 @@ export default defineComponent({
}
})
const
methods
=
{
showLoading
()
{
showLoading
()
{
$q
.
loading
.
show
({
spinner
:
QSpinnerFacebook
,
spinnerColor
:
'yellow'
,
...
...
@@ -41,8 +40,8 @@ export default defineComponent({
},
500
)
},
getIp
()
{
if
(
localStorage
.
getItem
(
DirtionmaryHelper
.
USER_IN_COUNTRY
))
return
localStorage
.
setItem
(
DirtionmaryHelper
.
USER_IN_COUNTRY
,
$q
.
lang
.
getLocale
()
==
'zh-CN'
?
'CN'
:
'WG'
)
if
(
localStorage
.
getItem
(
DirtionmaryHelper
.
USER_IN_COUNTRY
))
return
localStorage
.
setItem
(
DirtionmaryHelper
.
USER_IN_COUNTRY
,
$q
.
lang
.
getLocale
()
==
'zh-CN'
?
'CN'
:
'WG'
)
// axios.get('https://ipv4.icanhazip.com/').then(async res => {
// let ip = res.data
// if (ip) {
...
...
@@ -58,7 +57,7 @@ export default defineComponent({
// })
}
}
if
(
window
.
performance
.
navigation
.
type
!=
1
)
{
if
(
window
.
performance
.
navigation
.
type
!=
1
)
{
methods
.
showLoading
()
}
methods
.
getIp
()
...
...
src/api/vehicle.ts
View file @
c3fac924
...
...
@@ -51,5 +51,22 @@ class HotelService {
static
async
cancellation
(
Id
:
number
,
CancelRemark
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'tripbus_CancelBusTrip'
,
{
Id
,
CancelRemark
})
}
/**
* 申请报价
* @param param
* @returns
*/
static
async
applyBusPricelation
(
Id
:
number
):
Promise
<
HttpResponse
>
{
return
request
(
'tripbus_ApplyTripBusOffer'
,
{
Id
})
}
/**
* 确认报价
* @param param
* @returns
*/
static
async
sureBusPricelation
(
Id
:
number
):
Promise
<
HttpResponse
>
{
return
request
(
'tripbus_SureBusTripOffer'
,
{
Id
})
}
}
export
default
HotelService
\ No newline at end of file
src/pages/vehicle/index.vue
View file @
c3fac924
...
...
@@ -30,14 +30,29 @@
row-key=
"Id"
bordered
:columns=
"cols"
class=
"sticky-rightrowspan-column-table light-border col no-shadow"
>
<template
v-slot:body-cell-Id=
"props"
>
<q-td
:prop=
"props"
v-if=
"props.row.Status == 0"
>
<span
@
click=
"mask(props.row.Id)"
>
<!--未提交报价,可以修改-->
<q-td
:prop=
"props"
>
<span
@
click=
"mask(props.row.Id)"
v-if=
"props.row.Status == 0 && props.row.OfferState == 1"
>
<q-btn
class=
"col q-mr-md"
color=
"primary"
unelevated
:label=
"$t('v102.vehicle.list.s5')"
/>
</span>
<span
@
click=
"cancel(props.row.Id)"
>
<q-btn
color=
"red"
unelevated
:label=
"$t('v102.vehicle.add3')"
/>
</span>
<!--申请报价-->
<span
v-if=
"props.row.OfferState == 1 && props.row.Status == 0"
@
click=
"ApplyTripBus(props.row)"
>
<q-btn
color=
"red"
unelevated
label=
"申请报价"
/>
</span>
<!--弹窗显示详细信息-->
<span
v-if=
"props.row.OfferState == 3"
>
<q-btn
color=
"red"
unelevated
label=
"报价详情"
/>
</span>
<!--确认报价-->
<span
v-if=
"props.row.OfferState == 3 && props.row.Status == 0"
@
click=
"sureBusPrice(props.row)"
>
<q-btn
color=
"red"
unelevated
label=
"确认报价"
/>
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -48,15 +63,20 @@
<!-- 移动 -->
<q-table
hide-header
v-else
:rows=
"hotels"
grid
:columns=
"cols"
row-key=
"Id"
card-class=
"no-shadow bg-primary text-white col"
:pagination=
"pages"
:loading=
"loading"
>
<
template
v-slot:body-cell-Id=
"props"
v-if=
"props.row.Status == 0"
>
<
template
v-slot:body-cell-Id=
"props"
>
<q-td
:prop=
"props"
>
<span
@
click=
"mask(props.row.Id)"
>
<span
@
click=
"mask(props.row.Id)"
v-if=
"props.row.Status == 0"
>
<q-btn
class=
"col q-mr-md"
color=
"primary"
unelevated
:label=
"$t('v102.vehicle.list.s5')"
/>
</span>
<span
@
click=
"cancel(props.row.Id)"
>
<q-btn
color=
"red"
unelevated
:label=
"$t('v102.vehicle.add3')"
/>
</span>
<!--申请报价-->
<span
v-if=
"props.row.OfferState == 1 && props.row.Status == 0"
@
click=
"ApplyTripBus(props.row)"
>
<q-btn
color=
"red"
unelevated
label=
"申请报价"
/>
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -143,6 +163,8 @@ export default defineComponent({
{
name
:
'UseName'
,
label
:
t
(
'v102.vehicle.title10'
),
field
:
(
row
:
any
)
=>
row
.
GuideInfo
,
align
:
'left'
},
{
name
:
'TeamName'
,
label
:
t
(
'v102.vehicle.title11'
),
field
:
(
row
:
any
)
=>
row
.
TeamName
,
align
:
'left'
},
{
name
:
'CreateDate'
,
label
:
t
(
'v102.vehicle.title12'
),
field
:
(
row
:
any
)
=>
row
.
CreateDate
,
align
:
'left'
},
{
name
:
'OfferStateName'
,
label
:
'状态'
,
field
:
(
row
:
any
)
=>
row
.
OfferStateName
,
align
:
'left'
},
{
name
:
'IsSure'
,
label
:
'是否确认'
,
field
:
(
row
:
any
)
=>
row
.
IsSure
,
align
:
'left'
},
{
name
:
'Id'
,
label
:
t
(
'hotel.addRoomBtn'
),
field
:
(
row
:
any
)
=>
row
.
Id
,
align
:
'left'
},
]
as
any
,
...
...
@@ -154,6 +176,32 @@ export default defineComponent({
// data.pages.EndTime = data.dateRange.to
// data.pageTitle = inject(DirtionmaryHelper.PAGE_TITLE_KEY)
const
methods
=
{
//申请报价
ApplyTripBus
(
item
:
any
)
{
HotelService
.
applyBusPricelation
(
item
.
Id
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
methods
.
refresh
()
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
})
.
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
},
//确认报价
sureBusPrice
(
item
:
any
)
{
HotelService
.
sureBusPricelation
(
item
.
Id
).
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
methods
.
refresh
()
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
}).
catch
(
e
=>
{
message
.
errorMsg
(
e
.
message
)
})
},
cancel
(
item
:
any
)
{
data
.
cancelshow
=
true
data
.
Id
=
item
...
...
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