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
ae7a9dce
Commit
ae7a9dce
authored
Nov 14, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
37ea3e5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
26 deletions
+65
-26
ListCar.vue
src/components/hotel/list/ListCar.vue
+58
-23
Table-Operation.vue
src/components/hotel/list/Table-Operation.vue
+2
-2
index.ts
src/i18n/zh-TW/index.ts
+5
-1
No files found.
src/components/hotel/list/ListCar.vue
View file @
ae7a9dce
...
...
@@ -7,7 +7,7 @@
<q-icon
class=
"cursor-pointer"
name=
"close"
size=
"18px"
color=
"grey-5"
@
click=
"$emit('close')"
></q-icon>
</div>
<q-separator
color=
"grey-3"
class=
"q-my-sm"
/>
<div
style=
"height:
7
00px;"
>
<div
style=
"height:
6
00px;"
>
<q-scroll-area
v-if=
"HotelCarList.length>0"
:thumb-style=
"scrollStyle.thumbStyle"
:bar-style=
"scrollStyle.barStyle"
class=
"full-height"
>
<q-list>
<q-item
class=
"rounded-borders"
>
...
...
@@ -106,25 +106,35 @@
{{$t('noneData')}}
</div>
</div>
<div
class=
"column q-px-md"
>
<div
class=
"column q-px-md
q-py-lg
"
>
<div
class=
"row wrap justify-between col q-pb-lg"
>
<div
class=
"col-6 q-pb-sm"
>
<n-select
filterable
@
update:value=
"changeOrderType"
style=
"max-width: 200px;"
v-model:value=
"parameters.OrderType"
:placeholder=
"$t('hotel.car.OrderType')"
:options=
"cacheHotels"
max-tag-count=
"responsive"
size=
"large"
value-field=
"ID"
label-field=
"Name"
/>
</div>
<div
v-if=
"parameters.OrderType==2"
class=
"col-6"
>
<q-input
v-model=
"parameters.TCNum"
style=
"max-width: 200px;"
mask=
"#.##"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.TCNum')"
/>
</div>
<q-input
v-if=
"parameters.OrderType==2"
class=
"col-6"
v-model=
"parameters.TCNum"
style=
"max-width: 200px;"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.TCNum')"
ref=
"TCNumRef"
:rules=
"[val => !!val || $t('hotel.car.inputText')+$t('hotel.car.TCNum')]"
/>
<
template
v-if=
"parameters.OrderType==1"
>
<q-input
v-model=
"parameters.TCNum"
style=
"max-width: 200px;"
class=
"col-6 q-mr-md"
mask=
"#.##"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.ContactName')"
/>
<q-input
v-model=
"parameters.TCNum"
style=
"max-width: 200px;"
class=
"col-6 q-mr-md"
mask=
"#.##"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.ContactNumber')"
/>
<q-input
v-model=
"parameters.ContactName"
style=
"max-width: 200px;"
class=
"col-6"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.ContactName')"
ref=
"ContactNameRef"
:rules=
"[val => !!val || $t('hotel.car.inputText')+$t('hotel.car.ContactName')]"
/>
<q-input
v-model=
"parameters.ContactNumber"
style=
"max-width: 200px;"
class=
"col-6 q-mr-md"
reverse-fill-mask
dense
type=
"text"
standout
:label=
"$t('hotel.car.ContactNumber')"
ref=
"ContactNumberRef"
:rules=
"[val => !!val || $t('hotel.car.inputText')+$t('hotel.car.ContactNumber')]"
/>
</
template
>
<q-input
class=
"col-6"
style=
"max-width: 200px;"
v-model=
"parameters.Remark"
reverse-fill-mask
dense
filled
clearable
type=
"text"
:label=
"$t('hotel.car.Remark')"
/>
</div>
<div
class=
"row justify-between"
>
...
...
@@ -154,12 +164,16 @@
import
useScrollModule
from
'../../../module/scrollbar/scrollModule'
import
{
DirtionmaryHelper
}
from
'../../../config/dictionary'
import
message
from
'../../../utils/message'
import
{
ApiResult
}
from
'../../../@types/enumHelper'
import
HotelService
from
'../../../api/hotel'
export
default
defineComponent
({
props
:
{
},
setup
(
props
)
{
// inject(DirtionmaryHelper.HOTEL_CAR_LIST)
setup
(
props
,
context
)
{
const
TCNumRef
=
ref
(
null
)
const
ContactNameRef
=
ref
(
null
)
const
ContactNumberRef
=
ref
(
null
)
const
HotelCarList
=
inject
(
DirtionmaryHelper
.
HOTEL_CAR_LIST
)
as
any
const
{
locale
,
t
}
=
useI18n
();
const
data
=
reactive
({
...
...
@@ -182,8 +196,8 @@
HotelLength
:
0
,
loading
:
false
,
cacheHotels
:
[
{
Name
:
'散客'
,
ID
:
1
},
{
Name
:
'团队'
,
ID
:
2
},
{
Name
:
t
(
'hotel.car.scattered'
)
,
ID
:
1
},
{
Name
:
t
(
'hotel.car.group'
)
,
ID
:
2
},
],
})
data
.
scrollStyle
=
useScrollModule
().
scrollStyle
...
...
@@ -195,7 +209,7 @@
const
methods
=
{
changeOrderType
()
{
setTimeout
(()
=>
{
console
.
log
(
data
.
parameters
.
OrderType
)
//
console.log(data.parameters.OrderType)
},
1000
)
},
getMoney
(){
...
...
@@ -210,6 +224,27 @@
})
},
submit
()
{
// const tc = TCNumRef as any //断言任意类型
// const name = ContactNameRef as any
// const num = ContactNumberRef as any
// tc.value.validate()
// name.value.validate()
// num.value.validate()
if
(
data
.
parameters
.
OrderType
==
1
){
if
(
!
data
.
parameters
.
ContactName
){
message
.
warnMsg
(
`
${
t
(
"hotel.car.inputText"
)}${
t
(
"hotel.car.ContactName"
)}
`
)
return
}
if
(
!
data
.
parameters
.
ContactNumber
){
message
.
warnMsg
(
`
${
t
(
"hotel.car.inputText"
)}${
t
(
"hotel.car.ContactNumber"
)}
`
)
return
}
}
if
(
data
.
parameters
.
OrderType
==
2
&&!
data
.
parameters
.
TCNum
){
message
.
warnMsg
(
`
${
t
(
"hotel.car.inputText"
)}${
t
(
"hotel.car.TCNum"
)}
`
)
return
}
data
.
parameters
.
DetailList
=
[]
as
Array
<
any
>
HotelCarList
.
_value
.
forEach
(
item
=>
{
item
.
timeList
.
forEach
(
t
=>
{
...
...
@@ -233,19 +268,19 @@
})
})
console
.
log
(
data
.
parameters
,
'-----'
)
return
//
console.log(data.parameters,'-----')
//
return
data
.
loading
=
true
HotelService
.
SetCustomerOrder
(
param
)
HotelService
.
SetCustomerOrder
(
data
.
parameters
)
.
then
(
r
=>
{
if
(
r
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
message
.
successMsg
(
`
${
t
(
'success'
)}
`
)
HotelCarList
.
_value
=
[]
as
Array
<
any
>
context
.
emit
(
'close'
)
}
else
{
message
.
errorMsg
(
r
.
data
.
message
)
}
data
.
loading
=
false
})
.
catch
(
e
=>
{
...
...
@@ -323,7 +358,7 @@
methods
.
getLength
()
methods
.
getMoney
()
})
return
{...
toRefs
(
data
),
HotelCarList
,...
methods
}
return
{...
toRefs
(
data
),
HotelCarList
,
TCNumRef
,
ContactNameRef
,
ContactNumberRef
,
...
methods
}
}
})
</
script
>
...
...
src/components/hotel/list/Table-Operation.vue
View file @
ae7a9dce
...
...
@@ -22,7 +22,7 @@
<span
class=
"fz14 q-pl-xs text-weight-bold"
>
{{item.Unit_Price}}
</span>
</div>
</div>
<div
class=
"row items-center justify-between"
>
<div
class=
"row items-center
no-wrap
justify-between"
>
<div>
<q-btn
rounded
dense
color=
"white"
text-color=
"black"
size=
"xs"
icon=
"remove"
@
click=
'addGoods(item,0)'
/>
</div>
...
...
@@ -34,7 +34,7 @@
<q-btn
rounded
dense
color=
"primary"
size=
"xs"
icon=
"add"
@
click=
'addGoods(item,1)'
/>
</div>
</div>
<div
class=
"row items-center justify-between q-pl-md"
>
<div
class=
"row items-center
no-wrap
justify-between q-pl-md"
>
<div>
<q-btn
rounded
dense
color=
"white"
text-color=
"black"
size=
"xs"
icon=
"remove"
@
click=
'addPeople(item,0)'
/>
</div>
...
...
src/i18n/zh-TW/index.ts
View file @
ae7a9dce
...
...
@@ -130,7 +130,11 @@ export default {
OrderType
:
'訂單類型'
,
TCNum
:
'组团号'
,
ContactName
:
'联系人名稱'
,
ContactNumber
:
'联系人电话'
ContactNumber
:
'联系人电话'
,
inputText
:
'請輸入'
,
Remark
:
'備註'
,
scattered
:
'散客'
,
group
:
'團'
},
shopping
:{
labelNum
:
'房數'
,
...
...
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