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
98adb269
Commit
98adb269
authored
May 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d24b5fd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
204 additions
and
351 deletions
+204
-351
GnHotelInfo.vue
src/components/Hotel/GnHotelInfo.vue
+204
-351
No files found.
src/components/Hotel/GnHotelInfo.vue
View file @
98adb269
...
...
@@ -27,27 +27,25 @@
<el-input
type=
"text"
v-model=
"addMsg.HotelRealName"
maxlength=
"100"
class=
"w300"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_openplatform')"
>
<el-select
v-model=
"openplatString"
class=
'multiple_input w300'
multiple
<el-select
v-model=
"
chooseObj.
openplatString"
class=
'multiple_input w300'
multiple
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
v-for=
"item in openplatform"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
<el-option
v-for=
"item in dropdownObj.openplatformList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_starlevel')"
>
<el-select
class=
"w300"
:placeholder=
"$t('pub.unlimitedSel')"
v-model=
"addMsg.Star"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'SelectDefaultValue'
></el-option>
<el-option
v-for=
"item in starslevel"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
></el-option>
<el-option
v-for=
"item in dropdownObj.starslevel"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_landline')"
>
<el-input
type=
"text"
v-model=
"addMsg.Tel"
maxlength=
"20"
:placeholder=
"$t('hotel.hotel_landline')"
class=
"w300"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_province')"
>
<el-select
:placeholder=
"$t('ground.qingxuanzesheng')"
filterable
class=
'multiple_input w300'
v-model=
"addMsg.Province"
@
change=
"GetSubAreaList(addMsg.Province,2)"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'SelectDefaultValue'
></el-option>
<el-option
v-for=
"childItem in ProvinceList"
:key=
"childItem.ID"
:label=
"childItem.Name"
<el-option
v-for=
"childItem in
dropdownObj.
ProvinceList"
:key=
"childItem.ID"
:label=
"childItem.Name"
:value=
"childItem.ID"
>
</el-option>
</el-select>
...
...
@@ -56,13 +54,13 @@
<el-select
:placeholder=
"$t('ground.qingxuanzeshi')"
filterable
class=
'multiple_input w300'
v-model=
"addMsg.City"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'SelectDefaultValue'
></el-option>
<el-option
v-for=
"childItem in CityList"
:key=
"childItem.ID"
:label=
"childItem.Name"
<el-option
v-for=
"childItem in
dropdownObj.
CityList"
:key=
"childItem.ID"
:label=
"childItem.Name"
:value=
"childItem.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('hotel.hotel_detailinfo')"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.
add
Address"
size=
"small"
>
<el-input
type=
"text"
class=
"w300"
v-model=
"addMsg.Address"
size=
"small"
>
<el-button
slot=
"append"
@
click=
"getMapShow"
>
地图
</el-button>
</el-input>
</el-form-item>
...
...
@@ -88,7 +86,6 @@
size=
"small"
@
keyup
.
enter
.
native=
"handleInputConfirm"
@
blur=
"handleInputConfirm"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput"
>
+ 新增标签
</el-button>
</el-form-item>
<div
class=
"resource-imginfo"
>
<span
class=
"resource-lititle"
>
{{
$t
(
'hotel.hotel_imgintroduce'
)
}}
</span>
...
...
@@ -111,18 +108,6 @@
</div>
</div>
<div
class=
"add-img"
>
<!--
<div
class=
"reimg-add"
>
<i
class=
"iconfont icon-img_haha"
></i>
<div
class=
"ad-one"
>
<div
class=
"re-upload"
>
<el-upload
class=
"upload-demo"
:http-request=
"UploadImage"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
action=
""
>
<i
class=
"iconfont icon-img_bdsc"
></i>
</el-upload>
</div>
<div
class=
"re-find"
@
click=
"addImgOpen"
><i
class=
"iconfont icon-img_cz"
></i></div>
</div>
</div>
-->
<button
class=
"save-Btn"
@
click=
"isShowImg=true"
>
新增图片
</button>
</div>
</div>
...
...
@@ -132,30 +117,75 @@
<div
class=
"jz_HotelName"
>
{{
addMsg
.
HotelRealName
}}
</div>
<el-row
style=
"display:flex;justify-content:space-between;"
>
<el-col
:span=
"12"
>
<el-input
placeholder=
"开业时间"
></el-input>
<el-form-item
label=
"开业时间"
>
<el-input
placeholder=
"开业时间"
v-model=
"addMsg.HotelInfo.OpenTime"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-input
placeholder=
"装修时间"
></el-input>
<el-form-item
label=
"装修时间"
>
<el-input
placeholder=
"装修时间"
v-model=
"addMsg.HotelInfo.DecorationTime"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"display:flex;justify-content:space-between;"
>
<el-col
:span=
"12"
>
<el-input
placeholder=
"房间数量"
></el-input>
<el-form-item
label=
"房间数量"
>
<el-input
placeholder=
"房间数量"
v-model=
"addMsg.RoomNumber"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-input
placeholder=
"联系方式"
></el-input>
<el-form-item
label=
"联系方式"
>
<el-input
placeholder=
"联系方式"
v-model=
"addMsg.Tel"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"display:flex;justify-content:space-between;"
>
<el-col
:span=
"22"
>
<el-form-item
label=
"酒店介绍"
>
<el-input
type=
"textarea"
v-model=
"addMsg.HotelInfo.Into"
:rows=
"9"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-input
type=
"textarea"
v-model=
"textarea"
:rows=
"9"
></el-input>
</
template
>
<
template
v-if=
"activeName==3"
>
<el-form-item
label=
"设施服务"
>
<el-form-item
label=
"公共服务设施"
>
<el-select
multiple
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
'multiple_input w300'
v-model=
"chooseObj.PublicFacilities"
>
<el-option
v-for=
"subitem in dropdownObj.PublicFacilitieList"
:key=
"subitem.ID"
:label=
"subitem.Name"
:value=
"subitem.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"房间设施"
>
<el-select
multiple
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
'multiple_input w300'
v-model=
"chooseObj.RoomFacilities"
>
<el-option
v-for=
"subitem in dropdownObj.RoomFacilitieList"
:key=
"subitem.ID"
:label=
"subitem.Name"
:value=
"subitem.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"服务项目"
>
<el-select
multiple
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
'multiple_input w300'
v-model=
"chooseObj.ServiceItems"
>
<el-option
v-for=
"subitem in dropdownObj.ServiceItemList"
:key=
"subitem.ID"
:label=
"subitem.Name"
:value=
"subitem.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"订房须知"
>
<el-select
multiple
:placeholder=
"$t('pub.pleaseSel')"
filterable
class=
'multiple_input w300'
v-model=
"serviceCked"
>
<el-option
v-for=
"subitem in serviceList"
:key=
"subitem.ID"
:label=
"subitem.Name"
:value=
"subitem.ID"
>
v-model=
"chooseObj.Bookings"
@
change=
"changeBooking"
>
<el-option
v-for=
"subitem in dropdownObj.BookingList"
:key=
"subitem.ID"
:label=
"subitem.Name"
:value=
"subitem.ID"
>
</el-option>
</el-select>
</el-form-item>
<template
v-if=
"chooseObj.Bookings && chooseObj.Bookings.length>0"
v-for=
"(item,index) in chooseObj.Bookings"
>
<el-form-item
:label=
"item.Name"
:key=
"index"
>
<el-input
placeholder=
"联系方式"
v-model=
"item.Content"
></el-input>
</el-form-item>
</
template
>
</template>
<
template
v-if=
"activeName==4"
>
<button
class=
"save-Btn"
style=
"float:right;"
@
click=
"addTraffic()"
>
新增交通
</button>
...
...
@@ -195,7 +225,6 @@
export
default
{
data
()
{
return
{
textarea
:
''
,
imageOptions
:
{
navbar
:
false
,
title
:
false
...
...
@@ -211,42 +240,33 @@
HotelImageArray
:
[],
//删除的图片文件数组
DeleteImageArray
:
[],
//地接资源图片
imglistArry
:
[],
//地接图片搜索关键字
imgKeyword
:
""
,
openplatform
:
""
,
//获取开放平台
starslevel
:
""
,
//获取酒店星级
serviceList
:
[],
//获取酒店服务
GetPolicy
:
""
,
//获取酒店政策
OpenPlatformStrings
:
""
,
UseDinnerformString
:
""
,
totalimg
:
""
,
selecnum
:
0
,
hotelID
:
""
,
openplatString
:
""
,
UseDinnerString
:
""
,
inActive
:
1
,
//已选中
notInActive
:
0
,
//未选中
SupplierList
:
""
,
imgBeforeFile
:
this
.
domainManager
().
ViittoFileUrl
,
isBook
:
true
,
isDinner
:
false
,
dinerList
:
""
,
//下拉对象
dropdownObj
:
{
PublicFacilitieList
:
[],
//公共设施服务
RoomFacilitieList
:
[],
//房间设施服务
ServiceItemList
:
[],
//服务项目
BookingList
:
[],
//预定须知
starslevel
:
[],
//获取酒店星级
SupplierList
:
[],
//供应商列表
dinerList
:
[],
//用餐类型列表
openplatformList
:
[],
//开放平台列表
ProvinceList
:
[],
//省份列表
CityList
:
[],
//城市列表
},
//选中对象
chooseObj
:
{
PublicFacilities
:
[],
//选中的公共设施
RoomFacilities
:
[],
//选中的房间设施
ServiceItems
:
[],
//选中的服务项目
Bookings
:
[],
//选中的预定须知
openplatString
:
[],
//选中的平台
UseDinnerString
:
[],
//选中的用餐类型
},
//下拉框默认值
SelectDefaultValue
:
0
,
//省份列表
ProvinceList
:
[],
//城市列表
CityList
:
[],
//支付方式
PayList
:
[],
//酒店类型
HotelTypeList
:
[],
//酒店价格
HotelPirceTypeList
:
[],
addMsg
:
{
ID
:
0
,
Name
:
""
,
...
...
@@ -301,23 +321,23 @@
RebateType
:
0
,
//司导房是否返佣:0-不返佣,1-返佣
DriverGuideIsRebate
:
0
,
ProductType
:
1
,
//国内酒店
ProductType
:
2
,
//国内酒店
Tags
:
''
,
//标签
TrafficInfo
:
[],
//交通数据
//酒店信息
HotelInfo
:
{
OpenTime
:
""
,
//开业时间
DecorationTime
:
""
,
//装修时间
Into
:
""
,
//酒店介绍
},
},
HotelImgArr
:[{
Id
:
0
,
label
:
''
,
imgArr
:[]
HotelImgArr
:
[{
Id
:
0
,
label
:
''
,
imgArr
:
[]
}],
//酒店标签列表
TagsList
:
[],
DiscountList
:
{
ID
:
0
,
StartNum
:
''
,
EndNum
:
''
,
DisCountNum
:
''
},
qMsg
:
{},
rules
:
{
//表单必填验证
Name
:
[{
...
...
@@ -345,7 +365,7 @@
inputVisible
:
false
,
inputValue
:
''
,
serviceCked
:
[],
isShowImg
:
false
,
isShowImg
:
false
,
};
},
components
:
{
...
...
@@ -354,6 +374,9 @@
comHotelImg
:
comHotelImg
},
methods
:
{
changeBooking
()
{
},
//新增交通
addTraffic
()
{
let
obj
=
{
...
...
@@ -383,54 +406,11 @@
mapEvent
(
e
)
{
this
.
addMsg
.
Lat
=
e
.
lat
;
this
.
addMsg
.
Lng
=
e
.
long
;
this
.
addMsg
.
addAddress
=
e
.
address
;
this
.
isShowMap
=
false
;
},
getMapShow
()
{
this
.
isShowMap
=
true
;
},
deleteAir
(
i
)
{
this
.
addMsg
.
DiscountList
.
splice
(
i
,
1
);
},
addAir
()
{
this
.
addMsg
.
DiscountList
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
DiscountList
)));
},
//上传酒店图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/DMC/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
var
obj
=
this
.
$DMCUtils
.
DMCImageObj
();
var
str
=
x
.
data
.
FilePath
;
var
imgUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
obj
.
Path
=
str
;
obj
.
ShowPath
=
imgUrl
;
this
.
HotelImageArray
.
push
(
obj
);
});
},
//更新酒店图片
updatePic
()
{
if
(
this
.
hotelID
>
0
)
{
var
postMsg
=
{
ID
:
this
.
hotelID
,
Name
:
this
.
addMsg
.
Name
,
HotelImageList
:
this
.
HotelImageArray
,
//新增修改
DeleteImageList
:
this
.
DeleteImageArray
//删除的图片
};
this
.
apipost
(
"hotel_post_UpateHotelPic"
,
postMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
this
.
$t
(
'ground.tupianczcg'
));
}
},
null
);
}
},
//删除图片
delImg
(
index
)
{
var
item
=
this
.
HotelImageArray
[
index
];
...
...
@@ -455,21 +435,13 @@
}
this
.
$viewer
.
show
()
},
addImgOpen
()
{
this
.
addimg
=
true
;
this
.
initimgList
();
},
//保存酒店信息
saveResource
()
{
//保存酒店信息
if
(
this
.
isBook
)
{
this
.
addMsg
.
IsSelfBook
=
1
;
}
else
{
this
.
addMsg
.
IsSelfBook
=
0
;
}
this
.
addMsg
.
FacilityServices
=
this
.
serviceCked
.
toString
();
this
.
addMsg
.
HotelPolicy
=
`
${
JSON
.
stringify
(
this
.
GetPolicy
)}
`
;
this
.
addMsg
.
OpenPlatform
=
this
.
openplatString
.
toString
();
this
.
addMsg
.
UseDinnerType
=
this
.
UseDinnerString
.
toString
();
this
.
addMsg
.
OpenPlatform
=
this
.
chooseObj
.
openplatString
.
toString
();
this
.
addMsg
.
UseDinnerType
=
this
.
chooseObj
.
UseDinnerString
.
toString
();
this
.
addMsg
.
PublicFacilities
=
this
.
chooseObj
.
PublicFacilities
.
toString
();
this
.
addMsg
.
RoomFacilities
=
this
.
chooseObj
.
RoomFacilities
.
toString
();
this
.
addMsg
.
ServiceItems
=
this
.
chooseObj
.
ServiceItems
.
toString
();
if
(
this
.
addMsg
.
IsUseDinner
==
0
)
{
this
.
addMsg
.
UseDinnerType
=
""
;
}
...
...
@@ -477,98 +449,29 @@
this
.
addMsg
.
ID
=
this
.
hotelID
;
}
this
.
addMsg
.
Tags
=
this
.
TagsList
.
toString
();
this
.
addMsg
.
HotelImageList
=
this
.
HotelImageArray
;
this
.
addMsg
.
DeleteImageList
=
this
.
DeleteImageArray
;
this
.
apipost
(
"hotel_post_Set"
,
this
.
addMsg
,
response
=>
{
//修改添加接口
if
(
response
.
data
.
resultCode
==
1
)
{
this
.
Success
(
this
.
$t
(
'tips.saveYes'
));
this
.
goUrl
(
"HotelManagement"
);
}
else
{
this
.
Error
(
response
.
data
.
message
);
}
},
null
);
},
init
()
{
var
msg
=
{};
this
.
apipost
(
"hotel_post_GetStar"
,
msg
,
response
=>
{
//初始化星级
if
(
response
.
data
.
resultCode
==
1
)
{
this
.
starslevel
=
response
.
data
.
data
;
}
},
null
);
this
.
apipost
(
"hotel_post_GetPlatform"
,
msg
,
res
=>
{
//获取开放平台
this
.
openplatform
=
res
.
data
.
data
;
});
},
inithotelService
()
{
//初始化酒店服务
this
.
apipost
(
"hotel_post_GetHotelConfigService"
,
{},
res
=>
{
this
.
apipost
(
"hotel_post_SetInternalHotel"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
tempData
=
res
.
data
.
data
;
this
.
serviceList
=
[];
tempData
.
forEach
(
x
=>
{
x
.
SubList
.
forEach
(
y
=>
{
this
.
serviceList
.
push
(
y
);
})
})
this
.
Success
(
this
.
$t
(
'tips.saveYes'
));
this
.
goUrl
(
"GnHotelManagement"
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
});
},
inithotelPolicy
()
{
//初始化酒店政策
let
msg
=
{
Key
:
"SK_HOTEL_POLICY"
};
this
.
apipost
(
"dict_post_GetList"
,
msg
,
response
=>
{
if
(
response
.
data
.
resultCode
==
1
)
{
this
.
GetPolicy
=
response
.
data
.
data
;
//初始化星级和开放平台
initStarAndPlatform
()
{
//初始化星级
this
.
apipost
(
"hotel_post_GetStar"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dropdownObj
.
starslevel
=
res
.
data
.
data
;
}
});
},
initimgList
()
{
//初始化弹窗图片列表
var
keyWord
=
this
.
imgKeyword
;
this
.
imglistArry
=
[];
let
msg
=
{
Name
:
keyWord
};
this
.
apipost
(
"hotel_post_GetPicList"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
imglistArry
=
res
.
data
.
data
;
this
.
totalimg
=
this
.
imglistArry
.
length
;
}
},
null
);
},
selectImg
(
index
)
{
//选取弹窗图片
this
.
imglistArry
[
index
].
isShow
=
!
this
.
imglistArry
[
index
].
isShow
;
let
num
=
0
;
if
(
this
.
imglistArry
!=
null
)
{
this
.
imglistArry
.
forEach
(
x
=>
{
if
(
x
.
isShow
==
true
)
{
num
++
;
}
this
.
selecnum
=
num
;
});
}
//获取开放平台
this
.
apipost
(
"hotel_post_GetPlatform"
,
{},
res
=>
{
this
.
dropdownObj
.
openplatformList
=
res
.
data
.
data
;
});
},
initHotelData
()
{
var
msg
=
{
...
...
@@ -581,53 +484,53 @@
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
_self
.
addMsg
=
res
.
data
.
data
;
if
(
_self
.
addMsg
.
Country
>
0
)
{
this
.
GetSubAreaList
(
_self
.
addMsg
.
Country
,
1
,
1
);
console
.
log
(
"res.data"
,
res
.
data
);
var
tempMsg
=
res
.
data
.
data
;
_self
.
addMsg
.
ID
=
tempMsg
.
ID
;
_self
.
addMsg
.
HotelRealName
=
tempMsg
.
HotelRealName
;
_self
.
addMsg
.
OpenPlatform
=
tempMsg
.
OpenPlatform
;
_self
.
addMsg
.
Star
=
tempMsg
.
Star
;
_self
.
addMsg
.
Tel
=
tempMsg
.
Tel
;
_self
.
addMsg
.
Country
=
tempMsg
.
Country
;
_self
.
addMsg
.
Province
=
tempMsg
.
Province
;
_self
.
addMsg
.
City
=
tempMsg
.
City
;
_self
.
addMsg
.
Address
=
tempMsg
.
Address
;
_self
.
addMsg
.
Lng
=
tempMsg
.
Lng
;
_self
.
addMsg
.
Lat
=
tempMsg
.
Lat
;
_self
.
addMsg
.
Tags
=
tempMsg
.
Tags
;
_self
.
addMsg
.
RoomNumber
=
tempMsg
.
RoomNumber
;
_self
.
addMsg
.
PublicFacilities
=
tempMsg
.
PublicFacilities
;
if
(
tempMsg
.
PublicFacilitieList
&&
tempMsg
.
PublicFacilitieList
.
length
>
0
)
{
this
.
chooseObj
.
PublicFacilities
=
tempMsg
.
PublicFacilitieList
;
}
if
(
_self
.
addMsg
.
Province
>
0
)
{
this
.
GetSubAreaList
(
_self
.
addMsg
.
Province
,
2
,
1
);
_self
.
addMsg
.
RoomFacilities
=
tempMsg
.
RoomFacilities
;
if
(
tempMsg
.
RoomFacilitieList
&&
tempMsg
.
RoomFacilitieList
.
length
>
0
)
{
this
.
chooseObj
.
RoomFacilities
=
tempMsg
.
RoomFacilitieList
;
}
if
(
_self
.
addMsg
.
IsUseDinner
==
1
)
{
_self
.
isDinner
=
true
;
}
else
{
_self
.
isDinner
=
false
;
_self
.
addMsg
.
ServiceItems
=
tempMsg
.
ServiceItems
;
if
(
tempMsg
.
ServiceItemList
&&
tempMsg
.
ServiceItemList
.
length
>
0
)
{
this
.
chooseObj
.
ServiceItems
=
tempMsg
.
ServiceItemList
;
}
if
(
_self
.
addMsg
.
UseDinnerType
!=
""
)
{
_self
.
UseDinnerformString
=
_self
.
addMsg
.
UseDinnerType
.
split
(
","
);
_self
.
UseDinnerformString
.
forEach
(
x
=>
{
_self
.
UseDinnerString
.
push
(
Number
(
x
));
});
if
(
tempMsg
.
HotelInfo
)
{
if
(
tempMsg
.
HotelInfo
.
DecorationTime
)
{
_self
.
addMsg
.
HotelInfo
.
DecorationTime
=
tempMsg
.
HotelInfo
.
DecorationTime
;
}
if
(
tempMsg
.
HotelInfo
.
OpenTime
)
{
_self
.
addMsg
.
HotelInfo
.
OpenTime
=
tempMsg
.
HotelInfo
.
OpenTime
;
}
if
(
tempMsg
.
HotelInfo
.
Into
)
{
_self
.
addMsg
.
HotelInfo
.
Into
=
tempMsg
.
HotelInfo
.
Into
;
}
}
if
(
_self
.
addMsg
.
OpenPlatform
!=
""
)
{
_self
.
OpenPlatformStrings
=
_self
.
addMsg
.
OpenPlatform
.
split
(
","
);
_self
.
OpenPlatformStrings
.
forEach
(
x
=>
{
_self
.
openplatString
.
push
(
Number
(
x
));
});
}
if
(
_self
.
addMsg
.
FacilityServices
!=
""
)
{
var
itemArray
=
JSON
.
parse
(
_self
.
addMsg
.
FacilityServices
);
itemArray
.
forEach
(
x
=>
{
_self
.
serviceCked
.
push
(
x
);
});
if
(
_self
.
addMsg
.
Country
>
0
)
{
this
.
GetSubAreaList
(
_self
.
addMsg
.
Country
,
1
,
1
);
}
if
(
_self
.
addMsg
.
HotelPolicy
!=
""
)
{
_self
.
GetPolicy
=
JSON
.
parse
(
_self
.
addMsg
.
HotelPolicy
);
if
(
_self
.
addMsg
.
Province
>
0
)
{
this
.
GetSubAreaList
(
_self
.
addMsg
.
Province
,
2
,
1
);
}
_self
.
isBook
=
_self
.
addMsg
.
IsSelfBook
;
if
(
res
.
data
.
data
.
List
!=
null
)
{
//临时文件
res
.
data
.
data
.
List
.
forEach
(
imgItem
=>
{
var
obj
=
this
.
$DMCUtils
.
DMCImageObj
();
obj
.
ID
=
imgItem
.
ID
;
obj
.
Path
=
imgItem
.
Path
;
obj
.
PicID
=
imgItem
.
PicID
;
obj
.
ShowPath
=
_self
.
imgBeforeFile
+
imgItem
.
Path
;
this
.
HotelImageArray
.
push
(
obj
);
});
if
(
tempMsg
.
OpenPlatformList
&&
tempMsg
.
OpenPlatformList
.
length
>
0
)
{
this
.
chooseObj
.
openplatString
=
tempMsg
.
OpenPlatformList
;
}
}
else
{
_self
.
Error
(
res
.
data
.
message
);
...
...
@@ -655,26 +558,6 @@
}
});
},
//选中的数组
checkImgList
()
{
if
(
this
.
imglistArry
!=
null
)
{
this
.
imglistArry
.
forEach
(
x
=>
{
if
(
x
.
isShow
==
true
)
{
var
obj
=
this
.
$DMCUtils
.
DMCImageObj
();
obj
.
Path
=
"/U"
+
this
.
$commonUtils
.
getCaption
(
x
.
Path
,
"Upload"
);
obj
.
ShowPath
=
x
.
Path
;
obj
.
PicID
=
x
.
ID
;
this
.
HotelImageArray
.
push
(
obj
);
}
x
.
isShow
=
false
;
this
.
selecnum
=
0
;
});
}
this
.
addimg
=
false
;
},
googleMap
()
{
this
.
selectAddress
=
false
;
},
closeDMCchooseImg
()
{
this
.
addimg
=
false
;
},
...
...
@@ -692,20 +575,16 @@
this
.
HotelImageArray
.
push
(
obj
);
});
},
//获取供应商
getSuplier
()
{
let
msg
=
{
Type
:
1
};
//HK新增查询条件
this
.
apipost
(
"supplier_post_GetAllList"
,
msg
,
response
=>
{
if
(
response
.
data
.
resultCode
==
1
)
{
this
.
SupplierList
=
response
.
data
.
data
;
}
},
null
);
this
.
apipost
(
"supplier_post_GetAllList"
,
msg
,
response
=>
{
if
(
response
.
data
.
resultCode
==
1
)
{
this
.
dropdownObj
.
SupplierList
=
response
.
data
.
data
;
}
});
},
//获取用餐列表
getDinnerList
()
{
...
...
@@ -714,16 +593,12 @@
}
else
{
this
.
addMsg
.
IsUseDinner
=
0
;
}
let
msg
=
{};
this
.
apipost
(
"hotel_get_GetUseDinnerTypeList"
,
msg
,
res
=>
{
"hotel_get_GetUseDinnerTypeList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dinerList
=
res
.
data
.
data
;
this
.
d
ropdownObj
.
d
inerList
=
res
.
data
.
data
;
}
},
null
}
);
},
//获取省份和城市
...
...
@@ -742,54 +617,14 @@
}
}
if
(
this
.
addMsg
.
Country
!=
0
)
{
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
ProvinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
CityList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
}
},
//获取支付方式列表
GetPayList
()
{
this
.
apipost
(
"dmc_post_Get_GetPayStyleList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
PayList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//获取酒店类型列表
GetHotelTypeList
()
{
this
.
apipost
(
"dmc_post_Get_GetHotelType"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HotelTypeList
=
res
.
data
.
data
;
this
.
apipost
(
"dict_post_Destination_GetChildList"
,
msg
,
res
=>
{
if
(
type
==
1
)
{
this
.
dropdownObj
.
ProvinceList
=
res
.
data
.
data
;
}
else
if
(
type
==
2
)
{
this
.
dropdownObj
.
CityList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
GetHotelPirceTypeList
()
{
this
.
apipost
(
"dmc_post_Get_GetHotelPriceType"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
HotelPirceTypeList
=
res
.
data
.
data
;
}
},
err
=>
{}
);
});
}
},
//图片左移右移
ExchangeImg
(
index
,
IsMove
)
{
...
...
@@ -806,23 +641,41 @@
this
.
$set
(
this
.
HotelImageArray
,
index
,
downItem
);
}
},
//获取国内酒店配置列表
getHotelConfig
()
{
this
.
apipost
(
"hotel_post_GetHotelConfigService"
,
{},
res
=>
{
var
tempData
=
res
.
data
.
data
;
if
(
tempData
&&
tempData
.
length
>
0
)
{
tempData
.
forEach
(
sItem
=>
{
if
(
sItem
.
DictKey
==
"Domestic_Hotel_PublicFacilities"
)
{
this
.
dropdownObj
.
PublicFacilitieList
=
sItem
.
SubList
}
if
(
sItem
.
DictKey
==
"Domestic_Hotel_RoomFacilities"
)
{
this
.
dropdownObj
.
RoomFacilitieList
=
sItem
.
SubList
}
if
(
sItem
.
DictKey
==
"Domestic_Hotel_ServiceItems"
)
{
this
.
dropdownObj
.
ServiceItemList
=
sItem
.
SubList
}
if
(
sItem
.
DictKey
==
"Domestic_Hotel_Booking"
)
{
this
.
dropdownObj
.
BookingList
=
sItem
.
SubList
}
});
}
});
}
},
mounted
()
{
let
userInfo
=
this
.
getLocalStorage
()
let
userInfo
=
this
.
getLocalStorage
()
;
//有权限操作的部门
if
(
userInfo
.
RB_Department_Id
==
240
||
userInfo
.
RB_Department_Id
==
1
||
userInfo
.
RB_Department_Id
==
3
||
userInfo
.
RB_Branch_id
==
49
)
{
this
.
IsHaveAuth
=
1
;
}
this
.
GetPayList
();
this
.
GetHotelTypeList
();
this
.
GetHotelPirceTypeList
();
this
.
qMsg
=
this
.
$route
.
query
.
qMsg
;
this
.
hotelID
=
this
.
$route
.
query
.
id
;
this
.
inithotelService
();
//初始化酒店服务
this
.
inithotelPolicy
();
//初始化酒店政策
this
.
init
();
//初始化星级和开放平台
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
id
)
{
this
.
hotelID
=
this
.
$route
.
query
.
id
;
}
this
.
getHotelConfig
();
this
.
initStarAndPlatform
();
//初始化星级和开放平台
this
.
getSuplier
();
//初始化供应商
this
.
GetSubAreaList
(
this
.
addMsg
.
Country
,
1
,
1
);
if
(
this
.
hotelID
>
0
)
{
...
...
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