Commit 743dcfd1 authored by 黄奎's avatar 黄奎

酒店查询修改

parent 9f9bc00d
......@@ -18,13 +18,14 @@
</span>
</li>
<li>
<input type="button" class="normalBtn" value="温馨提示" @click="showNotice=true" style="display:none"/>
<input type="button" class="normalBtn" value="温馨提示" @click="showNotice=true" />
<input type="button" class="normalBtn" value="查询" @click="getList()" />
</li>
</ul>
</div>
<div style="width: 100%;min-height:200px; overflow-x: auto;padding-bottom: 10px; " class="HotelQueryList" v-loading="loading">
<div style="width: 100%;min-height:200px; overflow-x: auto;padding-bottom: 10px; " class="HotelQueryList"
v-loading="loading">
<div class="hotelProductManage2_tableBox">
<span style="color:#000000;background-color: #ff3737;padding:2px 4px;border-radius:5px">红日</span>
<span style="color:#000000;background-color: #ff99cc;padding:2px 4px;border-radius:5px">旺季</span>
......@@ -76,26 +77,26 @@
<el-row>
<el-col :span="20">
<el-form-item label="日期">
<el-date-picker class="w150" type="date" v-model="queryMsg.startTime"
<el-date-picker class="w150" type="date" v-model="queryMsg.QStartDate"
:picker-options="pickerBeginDateBefore" value-format="yyyy-MM-dd" placeholder></el-date-picker>
<el-date-picker class="w150" type="date" v-model="queryMsg.endTime"
<el-date-picker class="w150" type="date" v-model="queryMsg.QEndDate"
:picker-options="pickerBeginDateAfter" value-format="yyyy-MM-dd" placeholder></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<input type="button" class="normalBtn" value="查询" />
<input type="button" class="normalBtn" value="取消" @click="showNotice=false" />
<input type="button" class="normalBtn" value="查询" @click="resetPageIndex(),GetHotelTipList()" />
<input type="button" class="normalBtn" value="关闭" @click="showNotice=false" />
</el-col>
</el-row>
<div class="Hq_addDetail">
<el-row>
<el-col :span="9">
<el-form-item label="说明">
<el-input type="textarea" v-model="queryMsg.Remark" class="w600" maxlength="200"></el-input>
<el-input type="textarea" v-model="postMsg.TipContent" class="w600" maxlength="200"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<input type="button" class="normalBtn" value="新增"/>
<input type="button" class="normalBtn" value="保存" @click="SaveHotelTip()" />
</el-col>
</el-row>
</div>
......@@ -109,27 +110,33 @@
<th>操作时间</th>
<th>操作</th>
</tr>
<tr>
<td>007</td>
<td>撒大多数阿萨德</td>
<td>张三丰</td>
<td>2019-09-09</td>
<template v-if="queryMsg.total>0">
<tr v-for="(item,index) in HotelTipList">
<td>{{item.Id}}</td>
<td>{{item.TipContent}}</td>
<td>{{item.CreateByName}}</td>
<td>{{item.CreateTimeStr}}</td>
<td>
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<el-button type="primary" icon="el-icon-edit" circle ></el-button>
<el-button type="primary" icon="el-icon-edit" circle @click="GetHotelTip(item.Id)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button type="danger" icon="el-icon-delete" circle></el-button>
<el-button type="danger" icon="el-icon-delete" circle @click="RemoveHotelTip(item.Id)"></el-button>
</el-tooltip>
</td>
</tr>
</template>
<tr v-else>
<td colspan="5">暂无数据...</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="queryMsg.currentPage"
:page-size="queryMsg.pageSize" layout="total,prev, pager, next, jumper" :total="queryMsg.total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
......@@ -139,25 +146,35 @@
StartDate: new Date().Format("yyyy-MM-dd"),
EndDate: this.setEdate(),
},
queryMsg:{
startTime:'',
endTime:'',
Remark:'',
queryMsg: {
QStartDate: '',
QEndDate: '',
pageIndex: 1,
pageSize: 5,
currentPage: 1,
total: 0
},
postMsg: {
Id: 0,
TipContent: ''
},
//酒店温馨提示列表
HotelTipList: [],
HotelList: [],
dataList: [],
isShow: false,
loading:false,
showNotice:false,
loading: false,
showNotice: false,
pickerBeginDateBefore: {
disabledDate: time => {
let endTime = new Date(this.queryMsg.startTime)
let endTime = new Date(this.queryMsg.QStartDate)
return endTime.getTime() < time.getTime()
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.queryMsg.endTime)
let startTime = new Date(this.queryMsg.QEndDate)
return startTime.getTime() >= time.getTime()
}
}
......@@ -177,7 +194,7 @@
}
},
getList() {
this.loading=true;
this.loading = true;
if (this.msg.StartDate == null) {
this.msg.StartDate = new Date().Format("yyyy-MM-dd")
}
......@@ -258,11 +275,84 @@
break;
}
return classStr;
},
handleCurrentChange(val) {
this.queryMsg.pageIndex = val;
this.GetHotelTipList();
},
resetPageIndex() {
this.queryMsg.pageIndex = 1;
this.queryMsg.currentPage = 1;
},
//获取酒店列表
GetHotelTipList() {
this.apipost(
"hoteltip_get_GetPageList", this.queryMsg,
res => {
if (res.data.resultCode == 1) {
this.HotelTipList = res.data.data.pageData;
this.queryMsg.total = res.data.data.count;
}
},
err => {}
);
},
SaveHotelTip() {
this.apipost(
"hoteltip_post_SetHotelTip", this.postMsg,
res => {
if (res.data.resultCode == 1) {
this.Success("保存成功!");
this.postMsg.Id = 0;
this.postMsg.TipContent = "";
this.GetHotelTipList();
} else {
this.Error("保存失败!");
}
},
err => {}
);
},
RemoveHotelTip(Id) {
var that = this;
this.Confirm('是否要删除此数据?', function () {
that.apipost(
"hoteltip_post_RemoveHotelTip", {
ID: Id
},
res => {
if (res.data.resultCode == 1) {
that.Success("删除成功!");
that.GetHotelTipList();
} else {
that.Error("删除失败!");
}
},
err => {}
);
})
},
GetHotelTip(Id) {
this.apipost(
"hoteltip_get_GetHotelTip", {
ID: Id
},
res => {
if (res.data.resultCode == 1) {
this.postMsg.Id = res.data.data.Id;
this.postMsg.TipContent = res.data.data.TipContent;
} else {
this.Error("获取数据失败!");
}
},
err => {}
);
},
},
mounted() {
this.GetHotelList();
this.getList();
this.GetHotelTipList();
}
};
......@@ -339,20 +429,26 @@
.hotelProductManage2_tableBox span {
margin: 0 10px 10px 0;
}
.Hq_addDetail{
margin-top:20px;
.Hq_addDetail {
margin-top: 20px;
}
.Hq_addDetail .el-textarea__inner{
resize:none;
.Hq_addDetail .el-textarea__inner {
resize: none;
}
.Hq_addTable .el-button.is-circle{
padding:5px;
.Hq_addTable .el-button.is-circle {
padding: 5px;
}
.HqCom_bottom .el-form-item{
margin-bottom:0
.HqCom_bottom .el-form-item {
margin-bottom: 0
}
.HqCom_bottom{
height:350px;
padding-top:35px;
.HqCom_bottom {
height: 350px;
padding-top: 35px;
}
</style>
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