Commit 885ee5e6 authored by 黄奎's avatar 黄奎

页面修改

parent 8c5bf8d2
......@@ -35,86 +35,34 @@
<div style="background-color:#000!important;width:50px;height:100%;margin:0,padding:0;color:#FFFFFF">无库存
</div>
</template>
<template v-else>
<template v-else style="display:none;">
<template
v-if="scope.row.DayList[index].HotelJourneyOrderList&&scope.row.DayList[index].HotelJourneyOrderList.length>0">
<template v-for="childItem in scope.row.DayList[index].HotelJourneyOrderList">
<div style="white-space:nowrap;color:red;" :title="childItem.TCID+'【未操作】'"
v-if="childItem.DMCState==0">
{{childItem.BookGroup}}</div>
<div style="white-space:nowrap;color:green;" :title="childItem.TCID+'【OK】'"
v-if="childItem.DMCState==1">
{{childItem.BookGroup}}</div>
<div style="white-space:nowrap;color:#3333CC;" :title="childItem.TCID+'【暂定】'"
v-if="childItem.DMCState==2">{{childItem.BookGroup}}</div>
<template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList" >
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop">
<commonHotelWork :ref="'commonHotelWork_'+scope.$index+'_'+index+'_'+childIndex+''" :TCID="childItem.TCID" :HotelId="scope.row.Hotel" :DateStr="item.DateAllStr">
</commonHotelWork>
<div :title="childItem.TCID+'【未操作】'" v-if="childItem.DMCState==0" slot="reference" class="w80"
style="white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)">
{{childItem.BookGroup}}</div>
<div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1" slot="reference" class="w80"
style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)">
{{childItem.BookGroup}}</div>
<div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80"
style="white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)">
{{childItem.BookGroup}}</div>
</el-popover>
</template>
</template>
<template v-else>
<el-popover width="650" trigger="click" popper-class="Bus_HotelPop">
<table v-loading="changeLoading">
<tr>
<th width="60">
选择
</th>
<th width="140">
团号
</th>
<th width="120">
酒店
</th>
<th width="120">
更换酒店
</th>
<th width="100">
OP状态
</th>
<th width="100">
地接状态
</th>
</tr>
<tr v-for="(hItem,hIndex) in ChangeHotelList">
<td>
<el-checkbox :checked="hItem.IsChecked" @change="ChangeStatus(hItem)"></el-checkbox>
</td>
<td style="text-align:center;">
{{hItem.TCNUM}}<br />({{hItem.TCID}})
</td>
<td style="text-align:left;">
{{hItem.OldHotelName}}
</td>
<td style="text-align:left;">
{{hItem.NewHotelName}}
</td>
<td>
<template v-if="hItem.OPState==1">
<a style="color:green">OP-指定</a>
</template>
<template v-else-if="hItem.OPState==2">
<a style="color:red">OP-暂定</a>
</template>
</td>
<td>
<template v-if="hItem.DMCState==1">
<a style="color:green">地接-OK</a>
</template>
<template v-else-if="hItem.DMCState==2">
<a style="color:red">地接-暂定</a>
</template>
<template v-else-if="hItem.DMCState==0">
<a style="color:red">地接-未操作</a>
</template>
</td>
</tr>
<tfoot>
<tr>
<td colspan="6">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder(scope.row.Hotel)" />
</td>
</tr>
</tfoot>
</table>
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop">
<commonHotelWork :ref="'commonHotelWork_'+scope.$index+'_'+index+'_no'" :TCID="0" :HotelId="scope.row.Hotel" :DateStr="item.DateAllStr">
</commonHotelWork>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="GetChangeList(item.DateAllStr)">设置酒店</div>
@click="ClickChild(item.DateAllStr,scope.$index,index,'no')">设置酒店</div>
</el-popover>
</template>
</template>
......@@ -129,6 +77,7 @@
</div>
</template>
<script>
import commonHotelWork from "../commonPage/commonHotelWork.vue";
export default {
data() {
return {
......@@ -145,9 +94,14 @@
ChangeHotelList: [], //获取可变更的酒店列表
};
},
components: {
commonHotelWork
},
methods: {
ChangeStatus(item) {
item.IsChecked = !item.IsChecked;
//调用子组件方法
ClickChild(DateAllStr,rootIndex, index, childIndex) {
let str = `commonHotelWork_${rootIndex}_${index}_${childIndex}`;
this.$refs[str][0].GetChangeHotelList();
},
GotoHotel(HotelId) {
this.$router.push({
......@@ -178,54 +132,6 @@
err => {}
);
},
//获取可以改变的酒店列表
GetChangeList(useTime) {
this.changeLoading = true;
this.ChangeHotelList = [];
this.apipost("journeyorder_post_GetCanChangeHotelListService", {
UseTime: useTime
},
res => {
this.changeLoading = false;
if (res.data.resultCode == 1) {
this.ChangeHotelList = res.data.data;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//保存酒店订单
SaveHotelOrder(HotelID) {
var that=this;
this.Confirm("是否要替换选中的酒店?", function () {
var newList = [];
if (that.ChangeHotelList && that.ChangeHotelList.length > 0) {
that.ChangeHotelList.forEach(item => {
if (item.IsChecked) {
var Nitem = JSON.parse(JSON.stringify(item));
Nitem.NewHotelID = HotelID;
newList.push(Nitem);
}
});
}
if (newList && newList.length > 0) {
that.apipost("journeyorder_post_SaveWorkHotelOrderService", newList,
res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
} else {
that.Info("请选择团期!");
}
});
}
},
mounted() {
this.msg.YearMonthStr = new Date().Format("yyyy-MM");
......
<template>
<div class="commonPriceHotelInfo">
<table v-loading="changeLoading">
<tr>
<th width="60" style="text-align:center;">
选择
</th>
<th width="145" style="text-align:center;">
团号
</th>
<th width="140" style="text-align:center;">
地接团号
</th>
<th width="120" style="text-align:center;">
酒店
</th>
<th width="120" style="text-align:center;">
更换酒店
</th>
<th width="100" style="text-align:center;">
OP状态
</th>
<th width="100" style="text-align:center;">
地接状态
</th>
</tr>
<tr v-for="(hItem,hIndex) in MyDataList">
<td style="text-align:center;">
<el-checkbox :checked="hItem.IsChecked" @change="ChangeStatus(hItem)"></el-checkbox>
</td>
<td style="text-align:center;">
{{hItem.TCNUM}}<br />({{hItem.TCID}})
</td>
<td style="text-align:center;">
{{hItem.DMCNum}}
</td>
<td style="text-align:left;">
{{hItem.OldHotelName}}
</td>
<td style="text-align:left;">
{{hItem.NewHotelName}}
</td>
<td style="text-align:center;">
<template v-if="hItem.OPState==1">
<a style="color:green">OP-指定</a>
</template>
<template v-else-if="hItem.OPState==2">
<a style="color:red">OP-暂定</a>
</template>
</td>
<td style="text-align:center;">
<template v-if="hItem.DMCState==1">
<a style="color:green">地接-OK</a>
</template>
<template v-else-if="hItem.DMCState==2">
<a style="color:red">地接-暂定</a>
</template>
<template v-else-if="hItem.DMCState==0">
<a style="color:red">地接-未操作</a>
</template>
</td>
</tr>
<tfoot>
<tr>
<td colspan="6" style="text-align:center;">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
</td>
</tr>
</tfoot>
</table>
</div>
</template>
<script>
export default {
props: ["TCID","HotelId","DateStr"],
data() {
return {
changeLoading: false,
MyDataList: [],
};
},
methods: {
ChangeStatus(item) {
item.IsChecked = !item.IsChecked;
},
//获取可以改变的酒店列表
GetChangeHotelList() {
this.changeLoading = true;
this.MyDataList=[];
var that=this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", {
UseTime: this.DateStr
},
res => {
that.changeLoading = false;
if (res.data.resultCode == 1) {
that.MyDataList =res.data.data;
console.log("that.MyDataList",that.MyDataList)
} else {
that.Error(res.data.message);
}
},
err => {}
);
},
//保存酒店订单
SaveHotelOrder() {
var that = this;
this.Confirm("是否要替换选中的酒店?", function () {
var newList = [];
if (that.ChangeHotelList && that.ChangeHotelList.length > 0) {
that.ChangeHotelList.forEach(item => {
if (item.IsChecked) {
var Nitem = JSON.parse(JSON.stringify(item));
Nitem.NewHotelID = this.HotelId;
newList.push(Nitem);
}
});
}
if (newList && newList.length > 0) {
that.apipost("journeyorder_post_SaveWorkHotelOrderService", newList,
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
//that.getList();
} else {
that.Error(res.data.message);
}
},
err => {}
);
} else {
that.Info("请选择团期!");
}
});
}
},
mounted() {
//this.GetChangeHotelList();
},
created(){
}
};
</script>
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