Commit e0128e84 authored by youjie's avatar youjie

no message

parent f6cf3dfd
...@@ -46,10 +46,11 @@ ...@@ -46,10 +46,11 @@
<li> <li>
<span> <span>
<em>酒店</em> <em>酒店</em>
<el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input w300" <el-input type="Number" v-model="msg.HotelName" placeholder="酒店名称"></el-input>
<!-- <el-select v-model="msg.HotelChooseArray" :placeholder="$t('pub.pleaseSel')" class="multiple_input w300"
filterable multiple collapse-tags :multiple-limit="3"> filterable multiple collapse-tags :multiple-limit="3">
<el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option> <el-option v-for="item in HotelList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select> </el-select> -->
</span> </span>
</li> </li>
<li> <li>
...@@ -77,71 +78,12 @@ ...@@ -77,71 +78,12 @@
<span style="color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px">行前日</span> <span style="color:#000000;background-color: #808000;padding:2px 4px;border-radius:5px">行前日</span>
</div> </div>
<template v-if="isShow"> <template v-if="isShow">
<el-table v-if="dataList.length>0" :data="dataList" <hotelTableList v-loading='loading' :list="dataList"
style="width:100%" border v-loading='loading' :tableHeight="tableHeight"
ref="mytable" key="HotelId" :height="tableHeight"> @showOrderSubmitHandler="showOrderSubmitHandler"
<el-table-column fixed label="酒店名称" min-width="180"> @success="success"
<template slot-scope="scope"> @close="close"></hotelTableList>
<!-- @click="GotoHotel(scope.row.HotelId)" --> <div class="noDataNotice" v-if="dataList&&dataList.length==0">
<div style="text-decoration: underline;cursor:pointer" @click="showHotelDetailHandler(scope.row.HotelId)">
{{scope.row.HotelName}}</div>
<div>{{scope.row.TotalInventory}}</div>
</template>
</el-table-column>
<el-table-column label="价格&库存" fixed min-width="120">
<template slot-scope="scope">
<div class="Hotel_kong">价格</div>
<div class="Hotel_kong" style="min-width:60px;">总/用/剩</div>
<div class="Hotel_kong">确认/预定</div>
<div class="Hotel_kong">超定</div>
</template>
</el-table-column>
<el-table-column v-for='(item,index) in dataList[0].subList' :label="getDateList(item.DateStr)" :key='index'
min-width="120">
<template slot-scope="scope">
<div @click="showOrderSubmitHandler(scope.row,index,0)">
<div class="Hotel_kong Com_hoteldiv">
<template v-if="scope.row.subList[index].PriceList.length>0">
<template v-for="childItem in scope.row.subList[index].PriceList">
<div :class="getClass(1,childItem.InventoryType)"
:style="{width:(100/scope.row.subList[index].PriceList.length)+'%'}" class="CostPriceHover">
<el-popover
placement="bottom"
width="300"
trigger="hover">
<SamplePriceList
v-if="
scope.row.subList[index].PriceList[0].BidroomPrice>0||
scope.row.subList[index].PriceList[0].SingleroomPrice>0||
scope.row.subList[index].PriceList[0].AddBedPrice>0||
scope.row.subList[index].PriceList[0].GuideRoomPrice>0" :price="scope.row.subList[index]"></SamplePriceList>
<div v-else style="text-align: center;width: 100%;">没有其他房型报价</div>
<span slot="reference" class="CostPriceHover">{{childItem.CostPrice}}</span>
</el-popover>
</div>
</template>
</template>
<template v-else>
<div :class="getClass(0,0)" style="width:100%;height:100%">&nbsp;</div>
</template>
</div>
<div class="Hotel_kong Com_hoteldiv Hq_duoge">
{{scope.row.subList[index].Inventory}}/{{scope.row.subList[index].UseInventory}}/{{scope.row.subList[index].RemainingInventory}}
</div>
<div class="Hotel_kong Com_hoteldiv">
{{scope.row.subList[index].ConfirmNum}}/{{scope.row.subList[index].ReserveNum}}
</div>
<div class="Hotel_kong Com_hoteldiv">
<span v-if="scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory>0"
style="color:red;">
{{scope.row.subList[index].UseInventory-scope.row.subList[index].Inventory}}
</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<div class="noDataNotice" v-else>
<i class="iconfont icon-kong"></i> <i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p> <p>{{$t("active.ld_noData")}}</p>
</div> </div>
...@@ -250,7 +192,9 @@ ...@@ -250,7 +192,9 @@
</el-dialog> </el-dialog>
<!-- 暂存购物车 --> <!-- 暂存购物车 -->
<el-dialog custom-class="w800" title="酒店信息" :visible.sync="showOrderPreview" center @close="removeEditor"> <el-dialog custom-class="w800" title="酒店信息" :visible.sync="showOrderPreview" center @close="removeEditor">
<TableOperation :editorType="editorType" :HotelRow="orderSubmitObj" :hotelInfor="orderSubmitItemObj" @close="close"></TableOperation> <TableOperation :editorType="editorType" :HotelRow="orderSubmitObj"
:hotelInfor="orderSubmitItemObj"
@close="close"></TableOperation>
</el-dialog> </el-dialog>
<!-- 购物车 --> <!-- 购物车 -->
<ListCar v-if="rightCarOpen" @close="close" @success="success" @editor="editor"></ListCar> <ListCar v-if="rightCarOpen" @close="close" @success="success" @editor="editor"></ListCar>
...@@ -265,8 +209,9 @@ ...@@ -265,8 +209,9 @@
import TableOperation from './components/TableOperation' import TableOperation from './components/TableOperation'
import ListCar from './components/ListCar' import ListCar from './components/ListCar'
import hotelDetails from './components/hotelDetails' import hotelDetails from './components/hotelDetails'
import hotelTableList from './components/hotelTableList'
export default { export default {
components: { SamplePriceList,TableOperation,ListCar,hotelDetails }, components: { SamplePriceList,TableOperation,ListCar,hotelDetails,hotelTableList },
data() { data() {
return { return {
showHotelDetails: false, showHotelDetails: false,
...@@ -302,7 +247,8 @@ ...@@ -302,7 +247,8 @@
//供应商 //供应商
Supplier: 0, Supplier: 0,
MaxPrice: 0, MaxPrice: 0,
MinPrice: 0 MinPrice: 0,
HotelName: ''
}, },
tableHeight: 0, tableHeight: 0,
beforeCheck: { beforeCheck: {
...@@ -326,8 +272,6 @@ ...@@ -326,8 +272,6 @@
} }
} }
}, },
//分公司列表
companyList: [],
defaultSelectValue: 0, defaultSelectValue: 0,
//国家 省市 区 //国家 省市 区
provinceList: [], provinceList: [],
...@@ -394,11 +338,6 @@ ...@@ -394,11 +338,6 @@
removeEditor(){ removeEditor(){
localStorage.removeItem('editor') localStorage.removeItem('editor')
}, },
// 酒店信息详情
showHotelDetailHandler(hotelId){
this.HotelDetailId = hotelId
this.showHotelDetails = true
},
// 编辑购物车 // 编辑购物车
editor(x){ editor(x){
this.dataList.forEach((item,index) => { this.dataList.forEach((item,index) => {
...@@ -433,49 +372,6 @@ ...@@ -433,49 +372,6 @@
this.showOrderPreview = true this.showOrderPreview = true
this.editorType = type?type:0 this.editorType = type?type:0
}, },
goUrl(name, id) {
this.$router.push({
name: name,
query: {
blank: "y",
tab: "备忘录"
}
});
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
}, res => {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}, err => {});
},
GotoHotel(HotelId) {
this.$router.push({
path: "HotelManagement",
query: {
ID: HotelId,
tab: "酒店查询",
blank: 'y',
}
});
},
GotoUrl(item, subIndex, UseInventory) {
if (UseInventory > 0) {
this.$router.push({
path: "TravelControlList",
query: {
HotelId: item.HotelId,
HotelUseTime: item.subList[subIndex].DateStr,
IsUnionCked: 0,
blank: 'y',
tab: "团控查询",
}
});
}
},
com_onresize() { com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定, //clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight; var contentsHeight = document.body.clientHeight;
...@@ -501,10 +397,6 @@ ...@@ -501,10 +397,6 @@
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count this.total = res.data.data.count
this.isShow = true; this.isShow = true;
let _this = this
this.$nextTick(() => {
_this.$refs.mytable.doLayout();
})
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -527,59 +419,6 @@ ...@@ -527,59 +419,6 @@
err => {} err => {}
); );
}, },
setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1)
},
addMoth(d, m) {
let ds = d.split('-'),
_d = ds[2] - 0;
let nextM = new Date(ds[0], ds[1] - 1 + m + 1, 0);
let max = nextM.getDate();
d = new Date(ds[0], ds[1] - 1 + m, _d > max ? max : _d);
return d.toLocaleDateString().match(/\d+/g).join('-')
},
//格式化返回显示日期
getDateList(dateStr) {
var str = dateStr.split('-');
var weekDay = ["天", "一", "二", "三", "四", "五", "六"];
var myDate = new Date(Date.parse(dateStr));
return str[1] + '/' + str[2] + "(" + weekDay[myDate.getDay()] + ")";
},
//获取星期几
getWeek(dateStr) {
var weekDay = ["天", "一", "二", "三", "四", "五", "六"];
var myDate = new Date(Date.parse(dateStr));
return weekDay[myDate.getDay()]
},
//获取颜色状态
getClass(Status, InventoryType) {
var classStr = "";
if (Status == 0) {
classStr = 'noKucun';
}
switch (InventoryType) {
case 1:
classStr = "classHong";
break;
case 2:
classStr = "classWang";
break;
case 3:
classStr = "classPing";
break;
case 4:
classStr = "classDan";
break;
case 5:
classStr = "classTe";
break;
case 6:
classStr = "hotelQueryListclass6"
break;
}
return classStr;
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
...@@ -679,17 +518,6 @@ ...@@ -679,17 +518,6 @@
err => {} err => {}
); );
}, },
getBranchList() {
let UserInfo = this.getLocalStorage();
this.apipost('admin_get_BranchGetList', {
RB_Group_Id: UserInfo.RB_Group_id,
Status: 0,
}, res => {
if (res.data.resultCode == 1) {
this.companyList = res.data.data;
}
}, err => {})
},
//Excel下载 //Excel下载
DownLoadHotelQuery() { DownLoadHotelQuery() {
this.loading = true; this.loading = true;
...@@ -705,40 +533,15 @@ ...@@ -705,40 +533,15 @@
}, },
}, },
mounted() { mounted() {
// 当前日期小于20天更新数据
// let oldCars = []
// let newCars = []
// let states = true
// oldCars = JSON.parse(localStorage.getItem("cars"))
// if(oldCars){
// oldCars.forEach(item=>{
// if(item.Date<this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))){
// states = false
// }else{
// newCars.push(item)
// }
// })
// if(!states){
// this.HotelLength = newCars.length
// localStorage.removeItem("cars")
// localStorage.setItem("cars",JSON.stringify(newCars))
// localStorage.removeItem('HotelLength')
// localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
// }
// }
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0 this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
let userinfo = this.getLocalStorage(); let userinfo = this.getLocalStorage();
let ActionMenuCode = userinfo.ActionMenuCode; let ActionMenuCode = userinfo.ActionMenuCode;
if (ActionMenuCode.indexOf("HOTEL_memorandum") != -1) { if (ActionMenuCode.indexOf("HOTEL_memorandum") != -1) {
this.HOTEL_memorandum = true; this.HOTEL_memorandum = true;
} }
this.initSupplier();
this.getBranchList();
this.getProvinceList("651", 1); this.getProvinceList("651", 1);
this.GetHotelList(); // this.GetHotelList();//酒店名称下拉
this.getList(); this.getList();
this.GetHotelTipList(); this.GetHotelTipList();
this.com_onresize(); this.com_onresize();
......
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
cars: [],//购物车参数 cars: [],//购物车参数
HotelLength: 0,//购物车酒店数 HotelLength: 0,//购物车酒店数
editor: {},//预定订单对象 editor: {},//预定订单对象
contrastCars: [],//对比缓存cars
}; };
}, },
watch: { watch: {
...@@ -146,6 +147,7 @@ ...@@ -146,6 +147,7 @@
}, },
hotelInfor: { hotelInfor: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
if(this.hotelInfor&&this.hotelInfor.RemainingInventory){ if(this.hotelInfor&&this.hotelInfor.RemainingInventory){
this.onlyNum = this.hotelInfor.RemainingInventory this.onlyNum = this.hotelInfor.RemainingInventory
} }
...@@ -166,6 +168,7 @@ ...@@ -166,6 +168,7 @@
}, },
mounted() { mounted() {
if(this.hotelInfor&&this.hotelInfor.RemainingInventory){ if(this.hotelInfor&&this.hotelInfor.RemainingInventory){
this.onlyNum = this.hotelInfor.RemainingInventory this.onlyNum = this.hotelInfor.RemainingInventory
} }
...@@ -173,6 +176,7 @@ ...@@ -173,6 +176,7 @@
this.setList() this.setList()
} }
}, },
methods: { methods: {
changePeople(val){ changePeople(val){
...@@ -191,6 +195,8 @@ ...@@ -191,6 +195,8 @@
}) })
}, },
join(){ join(){
this.cars = []
this.cars = JSON.parse(localStorage.getItem('cars'))
if(!this.sumPeople) return this.Error('请加入人数'); if(!this.sumPeople) return this.Error('请加入人数');
const temp= JSON.parse(JSON.stringify(this.parameters)) const temp= JSON.parse(JSON.stringify(this.parameters))
temp.Money=0 temp.Money=0
...@@ -201,7 +207,6 @@ ...@@ -201,7 +207,6 @@
temp.Money+=(x.PeopleNumber*(x.Unit_Price+x.TaxesPrice+x.PriceInTangTax)) temp.Money+=(x.PeopleNumber*(x.Unit_Price+x.TaxesPrice+x.PriceInTangTax))
}); });
let existsIndex = this.cars.findIndex((x)=>x.Date == temp.Date) let existsIndex = this.cars.findIndex((x)=>x.Date == temp.Date)
let exists = existsIndex==-1?null:this.cars[existsIndex] let exists = existsIndex==-1?null:this.cars[existsIndex]
if(exists){ if(exists){
let existsHotel = exists.Hotels.findIndex((h)=>h.HotelId==temp.HotelId) let existsHotel = exists.Hotels.findIndex((h)=>h.HotelId==temp.HotelId)
...@@ -218,6 +223,7 @@ ...@@ -218,6 +223,7 @@
return new Date(x.Date).getTime()-new Date(y.Date).getTime() return new Date(x.Date).getTime()-new Date(y.Date).getTime()
}) })
this.HotelLength = this.cars.length this.HotelLength = this.cars.length
localStorage.setItem("cars",JSON.stringify(this.cars)) localStorage.setItem("cars",JSON.stringify(this.cars))
localStorage.setItem("HotelLength",this.HotelLength) localStorage.setItem("HotelLength",this.HotelLength)
this.Success('加入购物车成功'); this.Success('加入购物车成功');
......
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