Commit 9ecdb166 authored by 黄奎's avatar 黄奎

页面修改

parent 130d6742
......@@ -232,10 +232,7 @@
<li>
<span>
<em>{{$t('system.quety_area')}}</em>
<el-select v-model="msg.QCountry" clearable class="w150" filterable
@change="getProvinceList(msg.QCountry,1)" :placeholder="$t('hotel.hotel_country')">
<el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.QProvince" class="w150" filterable @change="getProvinceList(msg.QProvince,2)"
:placeholder="$t('hotel.hotel_province')">
<el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
......@@ -348,10 +345,11 @@
<div class="btnList">
<button @click="goSubInfo('GnHotelInfo',item.ID)" class="hotelBtnMan">{{$t('pub.updateMsg')}}</button>
<button @click="CopyHotel(item.ID)" class="hotelBtnMan" v-if="userInfo.RB_Group_id==QjGroupId()">复制</button>
<button @click="goproduct('HotelProductManage',item)" class="hotelBtnMan" v-if="userInfo.RB_Group_id!=QjGroupId()">房型</button>
<br/>
<button v-if="IsHotelPriceStock==1" style="width:80px;margin-top:10px;" @click="goUrl('HotelProductManage2',item)"
class="hotelBtnMan">{{$t('ground.baojiayukucun')}}</button>
<button @click="goproduct('HotelProductManage',item)" class="hotelBtnMan"
v-if="userInfo.RB_Group_id!=QjGroupId()">房型</button>
<br />
<button v-if="IsHotelPriceStock==1" style="width:80px;margin-top:10px;"
@click="goUrl('HotelProductManage2',item)" class="hotelBtnMan">{{$t('ground.baojiayukucun')}}</button>
</div>
</div>
</div>
......@@ -363,7 +361,7 @@
export default {
data() {
return {
userInfo:{},//登录用户信息
userInfo: {}, //登录用户信息
IsHotelPriceStock: 0, //1-有获取酒店库存与报价添加修改权限
countryList: "",
provinceList: "",
......@@ -390,7 +388,7 @@
pageIndex: 1,
pageSize: 14,
Name: "",
QCountry: "",
QCountry: "2",
QProvince: "",
QCity: "",
Status: "0",
......@@ -401,7 +399,7 @@
currentPage: 1,
ID: 0,
UpdateBy: 0, //操作人
ProductType:2,//国内酒店
ProductType:1,
}
};
},
......@@ -486,16 +484,6 @@
);
}
},
//获取国家
getCountryList() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
selectResource() {
this.loading = true;
if (this.msg.Status == "") {
......@@ -537,8 +525,8 @@
path: path,
query: {
id: item.ID,
Country:item.Country,
IsSelfBook:item.IsSelfBook,
Country: item.Country,
IsSelfBook: item.IsSelfBook,
blank: 'y',
tab: '房型列表'
}
......@@ -610,10 +598,10 @@
},
},
mounted() {
this.userInfo=this.getLocalStorage();
this.userInfo = this.getLocalStorage();
this.getEmployeeList();
this.GetHotelPirceStockAuth();
this.getCountryList();
this.getProvinceList(this.msg.QCountry, 1);
this.GetHotelTypeList();
this.GetHotelPirceTypeList();
},
......@@ -623,18 +611,18 @@
this.msg = this.$store.state.pageCondition;
}
}
if(this.$route.query.StatisticsSTime){
this.msg.StatisticsSTime=this.$route.query.StatisticsSTime
if (this.$route.query.StatisticsSTime) {
this.msg.StatisticsSTime = this.$route.query.StatisticsSTime
}
if(this.$route.query.StatisticsETime){
this.msg.StatisticsETime=this.$route.query.StatisticsETime
if (this.$route.query.StatisticsETime) {
this.msg.StatisticsETime = this.$route.query.StatisticsETime
}
if(this.$route.query.type){
if(this.$route.query.type==1){
this.msg.CreateBy =this.$route.query.EmployeeId;
if (this.$route.query.type) {
if (this.$route.query.type == 1) {
this.msg.CreateBy = this.$route.query.EmployeeId;
}
if(this.$route.query.type==2){
this.msg.UpdateBy =this.$route.query.EmployeeId;
if (this.$route.query.type == 2) {
this.msg.UpdateBy = this.$route.query.EmployeeId;
}
}
var id = this.$route.query.ID;
......
<style>
.syslog_Content {
.syslog_Content {
width: 100%;
}
.syslog_ul li {
}
.syslog_ul li {
width: 100%;
min-height: 135px;
margin-bottom: 10px;
}
.syslog_top {
}
.syslog_top {
width: 100%;
height: 34px;
line-height: 34px;
background-color: #dfdfdf;
}
.sys_content {
}
.sys_content {
width: 100%;
min-height: 101px;
padding: 20px;
font-size: 14px;
background-color: #fff;
}
.appUpdateLog .ql-editor {
}
.appUpdateLog .ql-editor {
min-height: 200px;
}
.sysTop_left {
}
.sysTop_left {
float: left;
}
.sysTop_banben {
}
.sysTop_banben {
display: inline-block;
color: #38425d;
font-size: 14px;
font-weight: bold;
margin: 0 30px;
}
.sysTop_uptime {
}
.sysTop_uptime {
font-size: 14px;
color: #666666;
}
.sysTop_right {
}
.sysTop_right {
float: right;
margin-right: 30px;
}
.sysliteleBtn {
}
.sysliteleBtn {
color: #fff;
padding: 0 10px;
height: 20px;
......@@ -50,55 +59,86 @@
cursor: pointer;
border-radius: 15px;
margin-left: 10px;
}
}
</style>
<template>
<div class="flexOne appUpdateLog">
<div class="query-box">
<ul>
<li>
<span class="hotel_name">
<em>{{$t('hotel.hotel_name')}}</em>
<el-input maxlength="50" @keyup.native.enter="RefreshPage()" v-model="msg.Name">
</el-input>
</span>
</li>
<li>
<span class="hotel_name">
<em>类型</em>
<el-select v-model="msg.DictKey" filterable>
<el-option key="" value="" label="请选择"></el-option>
<el-option v-for="item in HotelTypeList" :key="item.Key" :label="item.Name" :value="item.Key">
</el-option>
</el-select>
</span>
</li>
<li>
<button class="hollowFixedBtn" type="button" @click="RefreshPage()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" type="button" @click="updateLog(null)">{{$t('pub.addBtn')}}</button>
</li>
</ul>
</div>
<table v-loading="loading" class="singeRowTable">
<tr>
<th width="150">编号</th>
<th width="150">类型</th>
<th width="150">名称</th>
<th width="150">Code</th>
<th>Content</th>
<th>内容</th>
<th width="100">操作</th>
</tr>
<tr v-for="(item, index) in dataList" :key="index">
<td>
{{ item.Name }}
{{ item.ID }}
</td>
<td>
{{ item.Code }}
{{getTypeName(item.DictKey)}}
</td>
<td>
{{ item.Name }}
</td>
<td style="text-align:left;padding:0 5px;">
{{ item.Content }}
</td>
<td>
<input
type="button"
class="sysliteleBtn"
@click="updateLog(item)"
value="修改"
/>
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="right">
<el-button type="primary" icon="el-icon-edit" @click="updateLog(item)" circle></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('adm.adm_chehui')" placement="top-start">
<el-button @click='removeItem(item)' type="warning" icon="el-icon-delete" circle></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
:page-size="msg.pageSize" layout="total,prev, pager, next, jumper" :total="msg.total"></el-pagination>
<el-dialog
custom-class="w800"
:title="dialogTitle"
:visible.sync="outerVisible"
center
>
<el-dialog custom-class="w800" :title="dialogTitle" :visible.sync="outerVisible" center>
<el-form :model="addMsg" label-width="80px">
<table style="width:100%">
<tr>
<td colspan="2">
<el-form-item label="更新內容">
<el-input
v-model="addMsg.Content"
class="w595"
placeholder="请输入"
/>
<el-form-item label="类型">
<el-select v-model="addMsg.DictKey" filterable>
<el-option v-for="item in HotelTypeList" :key="item.Key" :label="item.Name" :value="item.Key">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="名称">
<el-input v-model="addMsg.Name" class="w595" placeholder="请输入" />
</el-form-item>
<el-form-item label="更新內容" v-if="addMsg.DictKey=='Domestic_Hotel_Booking'">
<el-input v-model="addMsg.Content" class="w595" placeholder="请输入" />
</el-form-item>
</td>
</tr>
......@@ -109,10 +149,7 @@
{{ $t("pub.saveBtn") }}
</button>
&nbsp;
<button
class="hollowFixedBtn"
@click="(outerVisible = false), clearMsg()"
>
<button class="hollowFixedBtn" @click="(outerVisible = false), clearMsg()">
{{ $t("pub.cancelBtn") }}
</button>
</div>
......@@ -121,31 +158,79 @@
</template>
<script>
export default {
export default {
data() {
return {
msg: {},
msg: {
pageIndex: 1,
pageSize: 10,
total: 0,
currentPage: 1,
QKeys: "'Domestic_Hotel_PublicFacilities','Domestic_Hotel_RoomFacilities','Domestic_Hotel_ServiceItems','Domestic_Hotel_Booking'",
Name: "",
DictKey: "",
},
loading: false,
dataList: [],
dialogTitle: "",
outerVisible: false,
addMsg: {
ID: 0,
Content: ""
DictKey: "", //Key
Name: "", //名称
Content: "", //内容
},
//酒店类型
HotelTypeList: [{
Key: "Domestic_Hotel_PublicFacilities",
Name: "公共服务设施"
},
{
Key: "Domestic_Hotel_RoomFacilities",
Name: "房间设施"
},
{
Key: "Domestic_Hotel_ServiceItems",
Name: "服务项目"
},
{
Key: "Domestic_Hotel_Booking",
Name: "订房须知"
}
]
};
},
methods: {
//刷新页面
RefreshPage() {
this.msg.pageIndex = 1;
this.msg.currentPage = 1;
this.getList();
},
getTypeName(dicKey) {
var obj = this.HotelTypeList.find((item) => {
return item.Key === dicKey;
})
if (obj != null) {
return obj.Name;
}
return "";
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//获取酒店配置列表
getList() {
//获取现有线路列表
this.loading = true;
this.apipost(
"admin_get_GetDictValueListService",
"dict_post_GetPageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.dataList = res.data.data.pageData;
this.msg.total = res.data.data.count;
} else {
this.Error(res.data.message);
}
......@@ -155,18 +240,26 @@ export default {
},
//修改获取数据
updateLog(item) {
if (item != null) {
this.addMsg.ID = item.ID;
this.addMsg.DictKey = item.DictKey;
this.addMsg.Name = item.Name;
this.addMsg.Content = item.Content;
this.dialogTitle = "修改更新日志";
this.dialogTitle = "修改配置";
} else {
this.dialogTitle = "新增配置";
}
this.outerVisible = true;
},
clearMsg() {
this.addMsg.ID = 0;
this.addMsg.DictKey = "";
this.addMsg.Name = "";
this.addMsg.Content = "";
},
SaveAppLog() {
this.apipost(
"admin_post_SetDictValueListService",
"dict_post_Set",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
......@@ -180,12 +273,31 @@ export default {
},
err => {}
);
},
//删除配置
removeItem(item) {
var that = this;
this.Confirm("是否要删除此项?", function () {
this.apipost(
"dict_post_Remove", {
dictID: item.ID
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},
err => {}
);
});
}
},
mounted() {
this.getList();
}
};
</script>
};
</script>
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