Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
罗超
SuperMan
Commits
e0128e84
Commit
e0128e84
authored
Feb 23, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
f6cf3dfd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
224 deletions
+33
-224
HotelList.vue
src/components/Hotel/singleProduct/HotelList.vue
+17
-214
TableOperation.vue
...ponents/Hotel/singleProduct/components/TableOperation.vue
+16
-10
No files found.
src/components/Hotel/singleProduct/HotelList.vue
View file @
e0128e84
...
...
@@ -46,10 +46,11 @@
<li>
<span>
<em>
酒店
</em>
<el-select
v-model=
"msg.HotelChooseArray"
:placeholder=
"$t('pub.pleaseSel')"
class=
"multiple_input w300"
<el-input
type=
"Number"
v-model=
"msg.HotelName"
placeholder=
"酒店名称"
></el-input>
<!--
<el-select
v-model=
"msg.HotelChooseArray"
:placeholder=
"$t('pub.pleaseSel')"
class=
"multiple_input w300"
filterable
multiple
collapse-tags
:multiple-limit=
"3"
>
<el-option
v-for=
"item in HotelList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
</el-select>
</el-select>
-->
</span>
</li>
<li>
...
...
@@ -77,71 +78,12 @@
<span
style=
"color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px"
>
行前日
</span>
</div>
<template
v-if=
"isShow"
>
<el-table
v-if=
"dataList.length>0"
:data=
"dataList"
style=
"width:100%"
border
v-loading=
'loading'
ref=
"mytable"
key=
"HotelId"
:height=
"tableHeight"
>
<el-table-column
fixed
label=
"酒店名称"
min-width=
"180"
>
<template
slot-scope=
"scope"
>
<!-- @click="GotoHotel(scope.row.HotelId)" -->
<div
style=
"text-decoration: underline;cursor:pointer"
@
click=
"showHotelDetailHandler(scope.row.HotelId)"
>
{{
scope
.
row
.
HotelName
}}
</div>
<div>
{{
scope
.
row
.
TotalInventory
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"价格&库存"
fixed
min-width=
"120"
>
<
template
slot-scope=
"scope"
>
<div
class=
"Hotel_kong"
>
价格
</div>
<div
class=
"Hotel_kong"
style=
"min-width:60px;"
>
总/用/剩
</div>
<div
class=
"Hotel_kong"
>
确认/预定
</div>
<div
class=
"Hotel_kong"
>
超定
</div>
</
template
>
</el-table-column>
<el-table-column
v-for=
'(item,index) in dataList[0].subList'
:label=
"getDateList(item.DateStr)"
:key=
'index'
min-width=
"120"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showOrderSubmitHandler(scope.row,index,0)"
>
<div
class=
"Hotel_kong Com_hoteldiv"
>
<template
v-if=
"scope.row.subList[index].PriceList.length>0"
>
<template
v-for=
"childItem in scope.row.subList[index].PriceList"
>
<div
:class=
"getClass(1,childItem.InventoryType)"
:style=
"
{width:(100/scope.row.subList[index].PriceList.length)+'%'}" class="CostPriceHover">
<el-popover
placement=
"bottom"
width=
"300"
trigger=
"hover"
>
<SamplePriceList
v-if=
"
scope.row.subList[index].PriceList[0].BidroomPrice>0||
scope.row.subList[index].PriceList[0].SingleroomPrice>0||
scope.row.subList[index].PriceList[0].AddBedPrice>0||
scope.row.subList[index].PriceList[0].GuideRoomPrice>0"
:price=
"scope.row.subList[index]"
></SamplePriceList>
<div
v-else
style=
"text-align: center;width: 100%;"
>
没有其他房型报价
</div>
<span
slot=
"reference"
class=
"CostPriceHover"
>
{{
childItem
.
CostPrice
}}
</span>
</el-popover>
</div>
</
template
>
</template>
<
template
v-else
>
<div
:class=
"getClass(0,0)"
style=
"width:100%;height:100%"
>
</div>
</
template
>
</div>
<div
class=
"Hotel_kong Com_hoteldiv Hq_duoge"
>
{{scope.row.subList[index].Inventory}}/{{scope.row.subList[index].UseInventory}}/{{scope.row.subList[index].RemainingInventory}}
</div>
<div
class=
"Hotel_kong Com_hoteldiv"
>
{{scope.row.subList[index].ConfirmNum}}/{{scope.row.subList[index].ReserveNum}}
</div>
<div
class=
"Hotel_kong Com_hoteldiv"
>
<span
v-if=
"scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory>0"
style=
"color:red;"
>
{{scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory}}
</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<div
class=
"noDataNotice"
v-else
>
<hotelTableList
v-loading=
'loading'
:list=
"dataList"
:tableHeight=
"tableHeight"
@
showOrderSubmitHandler=
"showOrderSubmitHandler"
@
success=
"success"
@
close=
"close"
></hotelTableList>
<div
class=
"noDataNotice"
v-if=
"dataList&&dataList.length==0"
>
<i
class=
"iconfont icon-kong"
></i>
<p>
{{
$t
(
"active.ld_noData"
)
}}
</p>
</div>
...
...
@@ -250,7 +192,9 @@
</el-dialog>
<!-- 暂存购物车 -->
<el-dialog
custom-class=
"w800"
title=
"酒店信息"
:visible
.
sync=
"showOrderPreview"
center
@
close=
"removeEditor"
>
<TableOperation
:editorType=
"editorType"
:HotelRow=
"orderSubmitObj"
:hotelInfor=
"orderSubmitItemObj"
@
close=
"close"
></TableOperation>
<TableOperation
:editorType=
"editorType"
:HotelRow=
"orderSubmitObj"
:hotelInfor=
"orderSubmitItemObj"
@
close=
"close"
></TableOperation>
</el-dialog>
<!-- 购物车 -->
<ListCar
v-if=
"rightCarOpen"
@
close=
"close"
@
success=
"success"
@
editor=
"editor"
></ListCar>
...
...
@@ -265,8 +209,9 @@
import
TableOperation
from
'./components/TableOperation'
import
ListCar
from
'./components/ListCar'
import
hotelDetails
from
'./components/hotelDetails'
import
hotelTableList
from
'./components/hotelTableList'
export
default
{
components
:
{
SamplePriceList
,
TableOperation
,
ListCar
,
hotelDetails
},
components
:
{
SamplePriceList
,
TableOperation
,
ListCar
,
hotelDetails
,
hotelTableList
},
data
()
{
return
{
showHotelDetails
:
false
,
...
...
@@ -302,7 +247,8 @@
//供应商
Supplier
:
0
,
MaxPrice
:
0
,
MinPrice
:
0
MinPrice
:
0
,
HotelName
:
''
},
tableHeight
:
0
,
beforeCheck
:
{
...
...
@@ -326,8 +272,6 @@
}
}
},
//分公司列表
companyList
:
[],
defaultSelectValue
:
0
,
//国家 省市 区
provinceList
:
[],
...
...
@@ -394,11 +338,6 @@
removeEditor
(){
localStorage
.
removeItem
(
'editor'
)
},
// 酒店信息详情
showHotelDetailHandler
(
hotelId
){
this
.
HotelDetailId
=
hotelId
this
.
showHotelDetails
=
true
},
// 编辑购物车
editor
(
x
){
this
.
dataList
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -433,49 +372,6 @@
this
.
showOrderPreview
=
true
this
.
editorType
=
type
?
type
:
0
},
goUrl
(
name
,
id
)
{
this
.
$router
.
push
({
name
:
name
,
query
:
{
blank
:
"y"
,
tab
:
"备忘录"
}
});
},
// 获取供应商
initSupplier
()
{
this
.
apipost
(
"supplier_post_GetAllList"
,
{
Type
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
===
1
)
{
this
.
SupplierList
=
res
.
data
.
data
;
}
},
err
=>
{});
},
GotoHotel
(
HotelId
)
{
this
.
$router
.
push
({
path
:
"HotelManagement"
,
query
:
{
ID
:
HotelId
,
tab
:
"酒店查询"
,
blank
:
'y'
,
}
});
},
GotoUrl
(
item
,
subIndex
,
UseInventory
)
{
if
(
UseInventory
>
0
)
{
this
.
$router
.
push
({
path
:
"TravelControlList"
,
query
:
{
HotelId
:
item
.
HotelId
,
HotelUseTime
:
item
.
subList
[
subIndex
].
DateStr
,
IsUnionCked
:
0
,
blank
:
'y'
,
tab
:
"团控查询"
,
}
});
}
},
com_onresize
()
{
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var
contentsHeight
=
document
.
body
.
clientHeight
;
...
...
@@ -501,10 +397,6 @@
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
this
.
isShow
=
true
;
let
_this
=
this
this
.
$nextTick
(()
=>
{
_this
.
$refs
.
mytable
.
doLayout
();
})
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
...
...
@@ -527,59 +419,6 @@
err
=>
{}
);
},
setEdate
()
{
return
this
.
addMoth
(
new
Date
().
Format
(
"yyyy-MM-dd"
),
1
)
},
addMoth
(
d
,
m
)
{
let
ds
=
d
.
split
(
'-'
),
_d
=
ds
[
2
]
-
0
;
let
nextM
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
+
1
,
0
);
let
max
=
nextM
.
getDate
();
d
=
new
Date
(
ds
[
0
],
ds
[
1
]
-
1
+
m
,
_d
>
max
?
max
:
_d
);
return
d
.
toLocaleDateString
().
match
(
/
\d
+/g
).
join
(
'-'
)
},
//格式化返回显示日期
getDateList
(
dateStr
)
{
var
str
=
dateStr
.
split
(
'-'
);
var
weekDay
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
var
myDate
=
new
Date
(
Date
.
parse
(
dateStr
));
return
str
[
1
]
+
'/'
+
str
[
2
]
+
"("
+
weekDay
[
myDate
.
getDay
()]
+
")"
;
},
//获取星期几
getWeek
(
dateStr
)
{
var
weekDay
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
var
myDate
=
new
Date
(
Date
.
parse
(
dateStr
));
return
weekDay
[
myDate
.
getDay
()]
},
//获取颜色状态
getClass
(
Status
,
InventoryType
)
{
var
classStr
=
""
;
if
(
Status
==
0
)
{
classStr
=
'noKucun'
;
}
switch
(
InventoryType
)
{
case
1
:
classStr
=
"classHong"
;
break
;
case
2
:
classStr
=
"classWang"
;
break
;
case
3
:
classStr
=
"classPing"
;
break
;
case
4
:
classStr
=
"classDan"
;
break
;
case
5
:
classStr
=
"classTe"
;
break
;
case
6
:
classStr
=
"hotelQueryListclass6"
break
;
}
return
classStr
;
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
...
...
@@ -679,17 +518,6 @@
err
=>
{}
);
},
getBranchList
()
{
let
UserInfo
=
this
.
getLocalStorage
();
this
.
apipost
(
'admin_get_BranchGetList'
,
{
RB_Group_Id
:
UserInfo
.
RB_Group_id
,
Status
:
0
,
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
companyList
=
res
.
data
.
data
;
}
},
err
=>
{})
},
//Excel下载
DownLoadHotelQuery
()
{
this
.
loading
=
true
;
...
...
@@ -705,40 +533,15 @@
},
},
mounted
()
{
// 当前日期小于20天更新数据
// let oldCars = []
// let newCars = []
// let states = true
// oldCars = JSON.parse(localStorage.getItem("cars"))
// if(oldCars){
// oldCars.forEach(item=>{
// if(item.Date
<
this
.
getBeforeDate
(
-
20
,
new
Date
().
Format
(
"yyyy-MM-dd"
))){
// states = false
// }else{
// newCars.push(item)
// }
// })
// if(!states){
// this.HotelLength = newCars.length
// localStorage.removeItem("cars")
// localStorage.setItem("cars",JSON.stringify(newCars))
// localStorage.removeItem('HotelLength')
// localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
// }
// }
this
.
HotelLength
=
localStorage
.
getItem
(
"HotelLength"
)?
localStorage
.
getItem
(
"HotelLength"
):
0
let
userinfo
=
this
.
getLocalStorage
();
let
ActionMenuCode
=
userinfo
.
ActionMenuCode
;
if
(
ActionMenuCode
.
indexOf
(
"HOTEL_memorandum"
)
!=
-
1
)
{
this
.
HOTEL_memorandum
=
true
;
}
this
.
initSupplier
();
this
.
getBranchList
();
this
.
getProvinceList
(
"651"
,
1
);
this
.
GetHotelList
();
// this.GetHotelList();//酒店名称下拉
this
.
getList
();
this
.
GetHotelTipList
();
this
.
com_onresize
();
...
...
src/components/Hotel/singleProduct/components/TableOperation.vue
View file @
e0128e84
...
...
@@ -128,6 +128,7 @@
cars
:
[],
//购物车参数
HotelLength
:
0
,
//购物车酒店数
editor
:
{},
//预定订单对象
contrastCars
:
[],
//对比缓存cars
};
},
watch
:
{
...
...
@@ -146,6 +147,7 @@
},
hotelInfor
:
{
handler
:
function
(
val
,
oldVal
)
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
){
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
...
...
@@ -166,6 +168,7 @@
},
mounted
()
{
if
(
this
.
hotelInfor
&&
this
.
hotelInfor
.
RemainingInventory
){
this
.
onlyNum
=
this
.
hotelInfor
.
RemainingInventory
}
...
...
@@ -173,6 +176,7 @@
this
.
setList
()
}
},
methods
:
{
changePeople
(
val
){
...
...
@@ -191,6 +195,8 @@
})
},
join
(){
this
.
cars
=
[]
this
.
cars
=
JSON
.
parse
(
localStorage
.
getItem
(
'cars'
))
if
(
!
this
.
sumPeople
)
return
this
.
Error
(
'请加入人数'
);
const
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
parameters
))
temp
.
Money
=
0
...
...
@@ -201,7 +207,6 @@
temp
.
Money
+=
(
x
.
PeopleNumber
*
(
x
.
Unit_Price
+
x
.
TaxesPrice
+
x
.
PriceInTangTax
))
});
let
existsIndex
=
this
.
cars
.
findIndex
((
x
)
=>
x
.
Date
==
temp
.
Date
)
let
exists
=
existsIndex
==-
1
?
null
:
this
.
cars
[
existsIndex
]
if
(
exists
){
let
existsHotel
=
exists
.
Hotels
.
findIndex
((
h
)
=>
h
.
HotelId
==
temp
.
HotelId
)
...
...
@@ -218,6 +223,7 @@
return
new
Date
(
x
.
Date
).
getTime
()
-
new
Date
(
y
.
Date
).
getTime
()
})
this
.
HotelLength
=
this
.
cars
.
length
localStorage
.
setItem
(
"cars"
,
JSON
.
stringify
(
this
.
cars
))
localStorage
.
setItem
(
"HotelLength"
,
this
.
HotelLength
)
this
.
Success
(
'加入购物车成功'
);
...
...
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