Commit e8996745 authored by 华国豪's avatar 华国豪 🙄
parents 011e8c8b 2a896f40
......@@ -2,7 +2,7 @@
<div>
<div class="query-box" style="border-bottom: none;">
<ul>
<li>
<li>
<span>
<em>酒店</em>
<el-select v-model="msg.HotelId" :placeholder="$t('pub.pleaseSel')" filterable>
......@@ -19,18 +19,18 @@
</li>
<li>
<input type="button" class="normalBtn" value="查询" @click="getList()" />
</li>
</ul>
</li>
</ul>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="HotelQueryList">
<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>
<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: #02F78E;padding:2px 4px;border-radius:5px" >特别价</span>
</div>
<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>
<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: #02F78E;padding:2px 4px;border-radius:5px">特别价</span>
</div>
<table border="0" cellspacing="1" cellpadding="0" class="HouseTypeList" v-if="isShow">
<tr>
<th width="300">酒店名称</th>
......@@ -47,25 +47,25 @@
</th>
</tr>
<tr v-for="item in dataList">
<td>
<div style="min-width:300px; text-align:left;padding-left:5px;">{{item.HotelName}}</div>
</td>
<td>
<div class="Hotel_kong">价格</div>
<div class="Hotel_kong" style="min-width:60px;">总/用/剩</div>
<div class="Hotel_kong">超定</div>
</td>
<td v-for="(subItem,subIndex) in item.subList">
<div class="Hotel_kong Com_hoteldiv" :class="getClass(subItem)">
{{subItem.CostPrice}}</div>
<div class="Hotel_kong Com_hoteldiv Hq_duoge" @click="GotoUrl(item,subIndex)">
{{subItem.Inventory}}/{{subItem.UseInventory}}/{{subItem.RemainingInventory}}</div>
<div class="Hotel_kong Com_hoteldiv">
<span v-if="subItem.UseInventory-subItem.Inventory>0" style="color:red;">
{{subItem.UseInventory-subItem.Inventory}}
</span>
</div>
</td>
<td>
<div style="min-width:300px; text-align:left;padding-left:5px;">{{item.HotelName}}</div>
</td>
<td>
<div class="Hotel_kong">价格</div>
<div class="Hotel_kong" style="min-width:60px;">总/用/剩</div>
<div class="Hotel_kong">超定</div>
</td>
<td v-for="(subItem,subIndex) in item.subList">
<div class="Hotel_kong Com_hoteldiv" :class="getClass(subItem)">
{{subItem.CostPrice}}</div>
<div class="Hotel_kong Com_hoteldiv Hq_duoge" @click="GotoUrl(item,subIndex,subItem.UseInventory)">
{{subItem.Inventory}}/{{subItem.UseInventory}}/{{subItem.RemainingInventory}}</div>
<div class="Hotel_kong Com_hoteldiv">
<span v-if="subItem.UseInventory-subItem.Inventory>0" style="color:red;">
{{subItem.UseInventory-subItem.Inventory}}
</span>
</div>
</td>
</tr>
</table>
</div>
......@@ -76,41 +76,44 @@
export default {
data() {
return {
msg:{
HotelId:0,
StartDate: new Date().Format("yyyy-MM-dd"),
EndDate: this.setEdate(),
},
HotelList: [],
dataList: [],
isShow:false,
msg: {
HotelId: 0,
StartDate: new Date().Format("yyyy-MM-dd"),
EndDate: this.setEdate(),
},
HotelList: [],
dataList: [],
isShow: false,
loading:false,
};
},
methods: {
GotoUrl(item,subIndex)
{
this.$router.push({
path: "TravelControlList",
query: {
HotelId: item.HotelId,
HotelUseTime: item.subList[subIndex].DateStr,
blank: "y",
tab: name
}
});
GotoUrl(item, subIndex, UseInventory) {
if (UseInventory > 0) {
this.$router.push({
path: "TravelControlList",
query: {
HotelId: item.HotelId,
HotelUseTime: item.subList[subIndex].DateStr,
tab: "团控查询"
}
});
}
},
getList() {
this.loading=true;
if (this.msg.StartDate == null) {
this.msg.StartDate = new Date().Format("yyyy-MM-dd")
}
if (this.msg.EndDate == null) {
this.msg.EndDate = this.setEdate()
}
this.apipost("dict_post_HotelOffer_GetHotelStatics",this.msg,
this.apipost("dict_post_HotelOffer_GetHotelStatics", this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.isShow=true;
this.isShow = true;
} else {
this.Error(res.data.message);
}
......@@ -133,8 +136,8 @@
err => {}
);
},
setEdate(){
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1)
setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1)
},
addMoth(d, m) {
let ds = d.split('-'),
......@@ -145,21 +148,21 @@
return d.toLocaleDateString().match(/\d+/g).join('-')
},
//格式化返回显示日期
getDateList(dateStr){
getDateList(dateStr) {
var str = dateStr.split('-');
return str[1]+'/'+str[2];
return str[1] + '/' + str[2];
},
//获取星期几
getWeek(dateStr){
var weekDay = ["天", "一", "二", "三", "四", "五", "六"];
var myDate = new Date(Date.parse(dateStr));
getWeek(dateStr) {
var weekDay = ["天", "一", "二", "三", "四", "五", "六"];
var myDate = new Date(Date.parse(dateStr));
return weekDay[myDate.getDay()]
},
//获取颜色状态
getClass(subItem) {
getClass(subItem) {
var classStr = "";
if(subItem.Status==0){
classStr='noKucun';
if (subItem.Status == 0) {
classStr = 'noKucun';
}
switch (subItem.InventoryType) {
case 1:
......@@ -186,48 +189,60 @@
this.getList();
}
};
</script>
<style>
.Hq_duoge{
.Hq_duoge {
cursor: pointer;
text-decoration: underline;
}
.classHong{
.classHong {
background-color: rgb(255, 55, 55);
}
.classWang{
.classWang {
background-color: rgb(255, 153, 204);
}
.classPing{
.classPing {
background-color: rgb(188, 214, 238);
}
.classDan{
.classDan {
background-color: rgb(221, 221, 221);
}
.classTe{
.classTe {
background-color: rgb(2, 247, 142);
}
.HouseTypeList {
background: #ccc;
width:100%;
margin-top:20px;
width: 100%;
margin-top: 20px;
}
.Com_hoteldiv{
min-width: 40px;
.Com_hoteldiv {
min-width: 70px;
}
.noKucun{
background-color: black!important;
.noKucun {
background-color: black !important;
}
.Hotel_kong{
width:100%;
height:35px;
.Hotel_kong {
width: 100%;
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 {
background: #e6e6e6;
height: 35px;
......@@ -244,7 +259,9 @@
.HouseTypeList tr td {
font-size: 12px;
}
.hotelProductManage2_tableBox span{
margin:0 10px 10px 0;
.hotelProductManage2_tableBox span {
margin: 0 10px 10px 0;
}
</style>
......@@ -289,25 +289,30 @@ export default {
);
},
isDelete(ID) {
var that = this;
that.Confirm("是否删除?", function() {
let msg = {
ID: ID
};
this.apipost(
"ticketcouponsticket_post_Remove",
msg,
res => {
this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.apipost('ticketcouponsticket_post_Remove', {
ID: ID
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.getList()
} else {
this.Error(res.data.message);
}
},
null
);
});
}, err => {
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
goUrl(path, id) {
this.$router.push({
......
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