Commit 90bfe3cf authored by 黄奎's avatar 黄奎

页面跳转修改

parent d7b2d269
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<li> <li>
<span> <span>
<em>酒店</em> <em>酒店</em>
<el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable> <el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable>
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
</li> </li>
<li> <li>
<input type="button" class="normalBtn" value="查询" @click="getList()" /> <input type="button" class="normalBtn" value="查询" @click="getList()" />
</li> </li>
</ul> </ul>
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="HotelQueryList"> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="HotelQueryList">
<div class="hotelProductManage2_tableBox"> <div class="hotelProductManage2_tableBox">
<span style="color:#000000;background-color: #ff3737;padding:2px 4px;border-radius:5px" >红日</span> <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> <span style="color:#000000;background-color: #ff99cc;padding:2px 4px;border-radius:5px">旺季</span>
<span style="color:#000000;background-color: #bcd6ee;padding:2px 4px;border-radius:5px" >平季</span> <span style="color:#000000;background-color: #bcd6ee;padding:2px 4px;border-radius:5px">平季</span>
<span style="color:#000000;background-color: #DDDDDD;padding:2px 4px;border-radius:5px">淡季</span> <span style="color:#000000;background-color: #DDDDDD;padding:2px 4px;border-radius:5px">淡季</span>
<span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px" >特别价</span> <span style="color:#000000;background-color: #02F78E;padding:2px 4px;border-radius:5px">特别价</span>
</div> </div>
<table border="0" cellspacing="1" cellpadding="0" class="HouseTypeList" v-if="isShow"> <table border="0" cellspacing="1" cellpadding="0" class="HouseTypeList" v-if="isShow">
<tr> <tr>
<th width="300">酒店名称</th> <th width="300">酒店名称</th>
...@@ -47,25 +47,25 @@ ...@@ -47,25 +47,25 @@
</th> </th>
</tr> </tr>
<tr v-for="item in dataList"> <tr v-for="item in dataList">
<td> <td>
<div style="min-width:300px; text-align:left;padding-left:5px;">{{item.HotelName}}</div> <div style="min-width:300px; text-align:left;padding-left:5px;">{{item.HotelName}}</div>
</td> </td>
<td> <td>
<div class="Hotel_kong">价格</div> <div class="Hotel_kong">价格</div>
<div class="Hotel_kong" style="min-width:60px;">总/用/剩</div> <div class="Hotel_kong" style="min-width:60px;">总/用/剩</div>
<div class="Hotel_kong">超定</div> <div class="Hotel_kong">超定</div>
</td> </td>
<td v-for="(subItem,subIndex) in item.subList"> <td v-for="(subItem,subIndex) in item.subList">
<div class="Hotel_kong Com_hoteldiv" :class="getClass(subItem)"> <div class="Hotel_kong Com_hoteldiv" :class="getClass(subItem)">
{{subItem.CostPrice}}</div> {{subItem.CostPrice}}</div>
<div class="Hotel_kong Com_hoteldiv Hq_duoge" @click="GotoUrl(item,subIndex)"> <div class="Hotel_kong Com_hoteldiv Hq_duoge" @click="GotoUrl(item,subIndex,subItem.UseInventory)">
{{subItem.Inventory}}/{{subItem.UseInventory}}/{{subItem.RemainingInventory}}</div> {{subItem.Inventory}}/{{subItem.UseInventory}}/{{subItem.RemainingInventory}}</div>
<div class="Hotel_kong Com_hoteldiv"> <div class="Hotel_kong Com_hoteldiv">
<span v-if="subItem.UseInventory-subItem.Inventory>0" style="color:red;"> <span v-if="subItem.UseInventory-subItem.Inventory>0" style="color:red;">
{{subItem.UseInventory-subItem.Inventory}} {{subItem.UseInventory-subItem.Inventory}}
</span> </span>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -76,28 +76,29 @@ ...@@ -76,28 +76,29 @@
export default { export default {
data() { data() {
return { return {
msg:{ msg: {
HotelId:0, HotelId: 0,
StartDate: new Date().Format("yyyy-MM-dd"), StartDate: new Date().Format("yyyy-MM-dd"),
EndDate: this.setEdate(), EndDate: this.setEdate(),
}, },
HotelList: [], HotelList: [],
dataList: [], dataList: [],
isShow:false, isShow: false,
}; };
}, },
methods: { methods: {
GotoUrl(item,subIndex) GotoUrl(item, subIndex, UseInventory) {
{ if (UseInventory > 0) {
this.$router.push({ this.$router.push({
path: "TravelControlList", path: "TravelControlList",
query: { query: {
HotelId: item.HotelId, HotelId: item.HotelId,
HotelUseTime: item.subList[subIndex].DateStr, HotelUseTime: item.subList[subIndex].DateStr,
blank: "y", blank: "y",
tab: name tab: "团控查询"
} }
}); });
}
}, },
getList() { getList() {
if (this.msg.StartDate == null) { if (this.msg.StartDate == null) {
...@@ -106,11 +107,11 @@ ...@@ -106,11 +107,11 @@
if (this.msg.EndDate == null) { if (this.msg.EndDate == null) {
this.msg.EndDate = this.setEdate() this.msg.EndDate = this.setEdate()
} }
this.apipost("dict_post_HotelOffer_GetHotelStatics",this.msg, this.apipost("dict_post_HotelOffer_GetHotelStatics", this.msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
this.isShow=true; this.isShow = true;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -133,8 +134,8 @@ ...@@ -133,8 +134,8 @@
err => {} err => {}
); );
}, },
setEdate(){ setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1) return this.addMoth(new Date().Format("yyyy-MM-dd"), 1)
}, },
addMoth(d, m) { addMoth(d, m) {
let ds = d.split('-'), let ds = d.split('-'),
...@@ -145,21 +146,21 @@ ...@@ -145,21 +146,21 @@
return d.toLocaleDateString().match(/\d+/g).join('-') return d.toLocaleDateString().match(/\d+/g).join('-')
}, },
//格式化返回显示日期 //格式化返回显示日期
getDateList(dateStr){ getDateList(dateStr) {
var str = dateStr.split('-'); var str = dateStr.split('-');
return str[1]+'/'+str[2]; return str[1] + '/' + str[2];
}, },
//获取星期几 //获取星期几
getWeek(dateStr){ getWeek(dateStr) {
var weekDay = ["天", "一", "二", "三", "四", "五", "六"]; var weekDay = ["天", "一", "二", "三", "四", "五", "六"];
var myDate = new Date(Date.parse(dateStr)); var myDate = new Date(Date.parse(dateStr));
return weekDay[myDate.getDay()] return weekDay[myDate.getDay()]
}, },
//获取颜色状态 //获取颜色状态
getClass(subItem) { getClass(subItem) {
var classStr = ""; var classStr = "";
if(subItem.Status==0){ if (subItem.Status == 0) {
classStr='noKucun'; classStr = 'noKucun';
} }
switch (subItem.InventoryType) { switch (subItem.InventoryType) {
case 1: case 1:
...@@ -186,48 +187,60 @@ ...@@ -186,48 +187,60 @@
this.getList(); this.getList();
} }
}; };
</script> </script>
<style> <style>
.Hq_duoge{ .Hq_duoge {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
} }
.classHong{
.classHong {
background-color: rgb(255, 55, 55); background-color: rgb(255, 55, 55);
} }
.classWang{
.classWang {
background-color: rgb(255, 153, 204); background-color: rgb(255, 153, 204);
} }
.classPing{
.classPing {
background-color: rgb(188, 214, 238); background-color: rgb(188, 214, 238);
} }
.classDan{
.classDan {
background-color: rgb(221, 221, 221); background-color: rgb(221, 221, 221);
} }
.classTe{
.classTe {
background-color: rgb(2, 247, 142); background-color: rgb(2, 247, 142);
} }
.HouseTypeList { .HouseTypeList {
background: #ccc; background: #ccc;
width:100%; width: 100%;
margin-top:20px; margin-top: 20px;
} }
.Com_hoteldiv{
.Com_hoteldiv {
min-width: 70px; min-width: 70px;
} }
.noKucun{
background-color: black!important; .noKucun {
background-color: black !important;
} }
.Hotel_kong{
width:100%; .Hotel_kong {
height:35px; width: 100%;
height: 35px;
line-height: 35px; line-height: 35px;
border-bottom:1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
} }
.Hotel_kong:last-child{
border:0; .Hotel_kong:last-child {
border: 0;
} }
.HouseTypeList tr th { .HouseTypeList tr th {
background: #e6e6e6; background: #e6e6e6;
height: 35px; height: 35px;
...@@ -244,7 +257,9 @@ ...@@ -244,7 +257,9 @@
.HouseTypeList tr td { .HouseTypeList tr td {
font-size: 12px; font-size: 12px;
} }
.hotelProductManage2_tableBox span{
margin:0 10px 10px 0; .hotelProductManage2_tableBox span {
margin: 0 10px 10px 0;
} }
</style> </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