Commit 7063ba28 authored by youjie's avatar youjie

no message

parent 9c7153d9
...@@ -1060,7 +1060,7 @@ ...@@ -1060,7 +1060,7 @@
} }
}, },
//初始化酒店列表 //初始化酒店列表
initHotel(query,subItem) { initHotel(query,subItem,day) {
this.apipost( this.apipost(
"hotel_post_GetList", { "hotel_post_GetList", {
Name: query Name: query
...@@ -1068,6 +1068,7 @@ ...@@ -1068,6 +1068,7 @@
res => { res => {
this.loading = false this.loading = false
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if(day==null){
for(let i=0;i<this.dayCostPrice.length;i++){ for(let i=0;i<this.dayCostPrice.length;i++){
if(!this.dayCostPrice[i].HotelList||this.dayCostPrice[i].HotelList.length==0){ if(!this.dayCostPrice[i].HotelList||this.dayCostPrice[i].HotelList.length==0){
this.dayCostPrice[i].HotelList = res.data.data this.dayCostPrice[i].HotelList = res.data.data
...@@ -1075,9 +1076,13 @@ ...@@ -1075,9 +1076,13 @@
} }
if(subItem&&(subItem.HotelList||subItem.HotelList.length>0)){ if(subItem&&(subItem.HotelList||subItem.HotelList.length>0)){
subItem.HotelList = res.data.data subItem.HotelList = res.data.data
subItem.HotelId = null // subItem.HotelId = null
subItem.HotelName = '' // subItem.HotelName = ''
} }
}else if(day!=null){
this.dayCostPrice[day].HotelList = res.data.data
}
this.$forceUpdate()
this.HotelName = res.data.data; this.HotelName = res.data.data;
} }
}, },
...@@ -1680,6 +1685,8 @@ ...@@ -1680,6 +1685,8 @@
this.getAllCurrency(); this.getAllCurrency();
this.getCompanyList(); this.getCompanyList();
this.getTeamList(); this.getTeamList();
}, },
created() {}, created() {},
watch: { watch: {
...@@ -1699,6 +1706,27 @@ ...@@ -1699,6 +1706,27 @@
}, },
deep: true deep: true
}, },
dayCostPrice: {
handler(val, oldVal) {
// 初始化酒店
setTimeout(()=>{
if(this.dayCostPrice&&this.dayCostPrice.length>0){
let arrList = function(list){
list.forEach(x=>{
x.HotelList = []
})
}
arrList(this.dayCostPrice)
for(let i=0;i<this.dayCostPrice.length;i++){
if(this.dayCostPrice[i].HotelName!=''){
this.initHotel(this.dayCostPrice[i].HotelName,this.dayCostPrice[i],i)
}
}
}
},100)
},
deep: true,
}
}, },
}; };
......
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