Commit d85014ba authored by zhengke's avatar zhengke

修改

parent 109dc69f
......@@ -139,6 +139,37 @@
padding-left: 20px;
}
.HotelAdd_ImgBtn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.hotl_ImgDiv {
margin: 0 20px 0 0;
position: relative;
display: inline-block;
}
.hotelproduct .colapp-image {
background-size: cover;
background-position: 50%;
width: 100px;
height: 100px;
border-radius: 0;
}
.hotelproduct .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
</style>
<template>
<div class="flexOne hotelproduct">
......@@ -199,6 +230,9 @@
<el-form-item label="床型描述">
<el-input class="w300" type="textarea" v-model="addMsg.BedDesc" :rows="4" maxlength="200"></el-input>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_produceDes')" prop="Description">
<el-input class="w300" type="textarea" v-model="addMsg.Description"></el-input>
</el-form-item>
<el-form-item label="是否有窗">
<el-switch v-model="addMsg.HasWindow" :active-value="1" :inactive-value="2">
</el-switch>
......@@ -210,8 +244,25 @@
<el-form-item label="免费取消时间" v-if="addMsg.IsCancel==2">
<el-input class="w300" type="text" v-model="addMsg.CancelTime" maxlength="200"></el-input>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_produceDes')" prop="Description">
<el-input class="w300" type="textarea" v-model="addMsg.Description"></el-input>
<el-form-item label="房型图">
<div style="display:flex;flex-wrap:wrap;">
<div style="display:inline-block;">
<div class="hotl_ImgDiv" v-for="(item,index) in addMsg.RoomImage" :key="index">
<div class="colapp-image" :style="{backgroundImage: 'url(' + item.Path + ')'}">
</div>
<el-button @click="delHotelImg(item,index)" class="delBtn" type="danger" icon="el-icon-close" circle>
</el-button>
</div>
</div>
<el-upload class="avatar-uploader" action="" style="display:inline-block;"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" :http-request="UploadImage"
multiple>
<div class="HotelAdd_ImgBtn">
+ 添加图片
</div>
</el-upload>
</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -312,7 +363,8 @@
BedDesc: '', //床型描述
HasWindow: 1, //是否有窗(1-有窗,2-无窗)
IsCancel: 1, //'是否可免费取消(1-不可取消,2-可取消
CancelTime: '' //免费取消时间
CancelTime: '', //免费取消时间
RoomImage: [], //房型图
},
//早餐类型下拉
BreakfastList: [{
......@@ -324,6 +376,9 @@
}, {
Id: 3,
Name: '双早餐'
}, {
Id: 4,
Name: '无早餐'
}],
//床型下拉
BedTypeList: [{
......@@ -355,6 +410,44 @@
};
},
methods: {
//上传酒店图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
var obj = {
TagName: '',
Path: imgUrl
}
this.addMsg.RoomImage.push(obj);
});
},
//删除房型图片
delHotelImg(item, index) {
if (item.ID > 0) {
let msg = {
Id:item.ID,
PicId:item.Pic
}
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost("hotel_post_RemoveHotelImage", msg, res => {
});
}).catch(() => {
});
}else{
this.addMsg.RoomImage.splice(index, 1);
}
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.initData();
......@@ -467,12 +560,12 @@
Name: "",
Description: "",
ServiceNumber: "",
BreakfastType:1,
BedType:1,
BedDesc:'',
HasWindow:1,
IsCancel:1,
CancelTime:''
BreakfastType: 1,
BedType: 1,
BedDesc: '',
HasWindow: 1,
IsCancel: 1,
CancelTime: ''
};
this.addMsg = newMsg;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment