Commit 95b32af7 authored by youjie's avatar youjie

no message

parent 527e26f4
......@@ -97,7 +97,7 @@
<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,item,0)">
<div @click="showOrderSubmitHandler(scope.row,0,index)">
<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">
......@@ -105,7 +105,7 @@
:style="{width:(100/scope.row.subList[index].PriceList.length)+'%'}" class="CostPriceHover">
<el-popover
placement="bottom"
width="200"
width="400"
trigger="hover">
<SamplePriceList
v-if="
......@@ -374,33 +374,48 @@
};
},
methods: {
// 编辑购物车
editor(x){
this.dataList.forEach(item => {
let state = true
this.dataList.forEach((item,index) => {
if(item.HotelId==x.HotelId){
console.log(item.subList)
item.subList.forEach(xs=>{
if(xs.DateStr==x.Date){
state = false
this.rightCarOpen = false
this.showOrderSubmitHandler(item,xs,1)
this.showOrderSubmitHandler(item,index,1)
}
})
}
});
if(state){
let oldCars = JSON.parse(localStorage.getItem("cars"))
let newCars = []
oldCars.forEach(item=>{
if(item.Date!=x.Date){
newCars.push(item)
}
})
localStorage.removeItem("cars")
localStorage.setItem("cars",JSON.stringify(newCars))
}
},
// 提交预约成功
success(){
this.close()
this.getList()
},
// 取消
close(){
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
this.showOrderPreview = false
this.rightCarOpen = false
localStorage.removeItem("editor")
},
showOrderSubmitHandler(row,col,type){
console.log(col,'----')
showOrderSubmitHandler(row,type,index){
this.orderSubmitObj = row
this.orderSubmitItemObj = col
this.orderSubmitItemObj = row.subList[index]
this.showOrderPreview = true
this.editorType = type?type:0
},
......
......@@ -44,14 +44,14 @@
<div class="list-content-rooms fz14">
<div v-for="z in y.DetailList">
<el-row :gutter="20">
<el-col :span="4">{{ z.RoomName }}</el-col>
<el-col :span="7">
<el-col :span="6">{{ z.RoomName }}</el-col>
<el-col :span="6">
{{ moneyFormat(z.Unit_Price) }}/人
</el-col>
<el-col :span="5">
<el-col :span="6">
{{ z.PeopleNumber }}{{ z.Number }}
</el-col>
<el-col :span="8" class="row-JCE">
<el-col :span="6" class="row-JCE">
<span>小计:13400.00</span>
</el-col>
</el-row>
......@@ -186,6 +186,7 @@
handler: function (val, oldVal) {
this.HotelLength = this.cars.length
localStorage.setItem("HotelLength",this.HotelLength)
this.getMoney()
},
deep: true
},
......@@ -272,6 +273,11 @@
this.cars[x].Hotels.splice(y,1)
}
this.HotelLength = this.cars.length
localStorage.removeItem('cars')
localStorage.setItem('cars',JSON.stringify(this.cars))
localStorage.removeItem('HotelLength')
localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
}).catch(() => {
});
......@@ -347,7 +353,7 @@
top: 0;
right: 0;
bottom: 0;
width: 500px;
width: 550px;
background: #ffffff;
z-index: 4;
}
......
......@@ -36,10 +36,11 @@
},
methods: {
setCurrentHotel() {
this.rooms = []
let temp = this.price.PriceList?this.price.PriceList[0]:null
if(!temp) return
let roomTyps = ['BidroomPrice', 'SingleroomPrice', 'AddBedPrice', 'GuideRoomPrice']
let roomLangs = ['大床房', '自然单间', '三人间', '司机房']
let roomTyps = ['CostPrice', 'BidroomPrice', 'SingleroomPrice','AddBedPrice', 'GuideRoomPrice']
let roomLangs = ['标准间', '大床房', '自然单间', '三人间', '司机房']
roomTyps.forEach((x, i) => {
if (temp[x] > 0) {
this.rooms.push({
......
......@@ -162,7 +162,6 @@
},
mounted() {
this.editor = JSON.parse(localStorage.getItem('editor'))
if(this.hotelInfor&&this.hotelInfor.RemainingInventory){
this.onlyNum = this.hotelInfor.RemainingInventory
}
......@@ -223,6 +222,7 @@
},
// 组装可选房间
setList() {
this.editor = JSON.parse(localStorage.getItem('editor'))
this.parameters.DetailList = []
let roomTyps = ['CostPrice', 'BidroomPrice', 'SingleroomPrice', 'AddBedPrice', 'GuideRoomPrice']
let roomLangs = ['标准间', '大床房', '自然单间', '三人间', '司机间']
......@@ -243,6 +243,7 @@
this.setDateRange()
roomTyps.forEach((x, i) => {
// console.log(tempPrice[x],i+'-----')
if (tempPrice[x] > 0) {
let dataMsg = {
HotelId: this.HotelRow.HotelId,
......@@ -272,10 +273,10 @@
this.joinHouse.days = 1
},
setInjectHandler(){
if(!this.editorType) return
if(!this.editorType&&!this.editor) return
this.parameters.DetailList.forEach(item=>{
this.editor.DetailList.forEach(x=>{
if(item.RoomName==x.RoomName){
if(item.RoomName==x.RoomName&&item.UPriceFormat==x.UPriceFormat){
item.PeopleNumber = x.PeopleNumber
item.Number = x.Number
}
......
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