Commit 95b32af7 authored by youjie's avatar youjie

no message

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