Commit 340567cb authored by 黄奎's avatar 黄奎

团酒店修改

parent 5a1b63ae
......@@ -242,7 +242,7 @@
</div>
</template>
<script>
import commonHotelWork from "../commonPage/commonHotelWork.vue";
export default {
data() {
return {
......@@ -287,9 +287,7 @@
HotelList: [],
};
},
components: {
commonHotelWork
},
methods: {
GotoHotel(HotelId) {
this.$router.push({
......
......@@ -114,6 +114,7 @@
<th width="120">团号</th>
<th width="80">地接团号</th>
<th width="90">机位数</th>
<th width="90">操作人</th>
<th width="110">时间</th>
<th width="120">酒店名称</th>
<th width="120">更换酒店</th>
......@@ -121,7 +122,7 @@
<th width="100">地接状态</th>
<th width="150">操作</th>
</tr>
<template v-for="item in DataList">
<template v-for="(item,index) in DataList">
<tbody>
<template v-for="(subItem,subIndex) in item.HotelOrderListReports">
<template v-for="(childItem,childIndex) in subItem.SubList">
......@@ -129,11 +130,13 @@
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'>{{item.LtName}}</td>
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'>{{item.TCNUM}}({{item.TCID}})</td>
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'>{{item.DMCNum}} </td>
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'>
{{$t('Airticket.Air_firstClass')}}{{item.FSeat}}
{{$t('Airticket.Air_businessClass')}}{{item.CSeat}}
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'
style="text-align:left; padding-left:5px;">
{{$t('Airticket.Air_firstClass')}}{{item.FSeat}} <br />
{{$t('Airticket.Air_businessClass')}}{{item.CSeat}} <br />
{{$t('Airticket.Air_EconomyClass')}}{{item.YSeat}}
</td>
<td :rowspan="item.rootRowspan" v-if='subIndex==0&&childIndex==0'>{{item.OPName}} </td>
<td :rowspan="subItem.SubList.length" v-if='childIndex==0'>
{{childItem.JourneyDate}}
</td>
......@@ -151,31 +154,33 @@
</template>
</td>
<td>
<template v-if="childItem.OPState==1">
<span style="color: green;">OP-指定</span>
</template>
<template v-else-if="childItem.OPState==2">
<span style="color:red;">OP-暂定</span>
</template>
<template v-if="childItem.OPState==1">
<span style="color: green;">OP-指定</span>
</template>
<template v-else-if="childItem.OPState==2">
<span style="color:red;">OP-暂定</span>
</template>
</td>
<td>
<template v-if="childItem.DMCState==1">
<span style="color: green;">地接-OK</span>
</template>
<template v-else-if="childItem.DMCState==2">
<span style="color:red;">地接-暂定</span>
</template>
<template v-else-if="childItem.DMCState==0">
<span style="color:red;">地接-未操作</span>
</template>
<span style="color: green;">地接-OK</span>
</template>
<template v-else-if="childItem.DMCState==2">
<span style="color:red;">地接-暂定</span>
</template>
<template v-else-if="childItem.DMCState==0">
<span style="color:red;">地接-未操作</span>
</template>
</td>
<td>
<el-popover placement="right" width="540" trigger="click" v-model="subItem.isShowPop">
<comCheckHotel :ref="'comCheckHotel'+subIndex+childIndex+''" :UseDate="childItem.JourneyDate">
</comCheckHotel>
<el-button size="small" type="danger" :data-index="'comCheckHotel'+subIndex+childIndex+''"
slot="reference" style="cursor:pointer;"
@click="getChildHotel(subIndex,childIndex),subItem.isShowPop=true">
<commonPriceHotelWork :ref="'commonPriceHotelWork_'+index+'_'+subIndex+'_'+childIndex+''"
:DateStr="childItem.JourneyDate" :TCID="item.TCID" :DayNum="subItem.DayNum">
</commonPriceHotelWork>
<el-button size="small" type="danger"
:data-index="'commonPriceHotelWork_'+index+'_'+subIndex+'_'+childIndex+''" slot="reference"
style="cursor:pointer;"
@click="getPriceHotel(index,subIndex,childIndex),subItem.isShowPop=true">
更换酒店
</el-button>
</el-popover>
......@@ -184,7 +189,7 @@
</template>
</template>
<tr>
<td :colspan="10">
<td :colspan="11" style="text-align:left;padding-left:5px;">
{{item.Title}}
</td>
</tr>
......@@ -197,7 +202,7 @@
</div>
</template>
<script>
import comCheckHotel from "../../commonPage/comCheckHotel.vue";
import commonPriceHotelWork from "../../commonPage/commonPriceHotelWork.vue";
export default {
data() {
return {
......@@ -280,9 +285,16 @@
}
},
components: {
comCheckHotel
commonPriceHotelWork
},
methods: {
//点击酒店
getPriceHotel(index, subIndex, childIndex) {
console.log(index, subIndex, childIndex);
let str = `commonPriceHotelWork_${index}_${subIndex}_${childIndex}`;
console.log("str", str);
//this.$refs[str].getCheckHotel();
},
goUrlR(path, obj, title) {
this.$router.push({
name: path,
......
<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;
} 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() {
},
created() {
}
};
</script>
<style>
.comCheckHotel .comCheckHotel {
width: 100%;
height: 150px;
overflow: auto
}
.comCheckHotel .comCk_list {
padding: 0 20px;
margin: 0 15px 5px 0;
}
.comCheckHotel .cm_Inventory {
margin-left: 20px;
color: red;
display: inline-block;
}
.comCheckHotel .cm_hotelTitle {
width: 100%;
text-align: center;
margin-bottom: 20px;
border-bottom: 1px solid #d1d1d1;
padding: 0 20px 10px 20px;
}
.comCheckHotel .com_SaveBtn {
margin: 10px 20px 0 45%;
}
.comCheckHotel .ckedList {
background-color: #E95252;
color: #fff;
}
.comCheckHotel .Ck_hotelInfo{
width:100%;
height:40px;
background-color: #F6F8FB;
text-align: center;
line-height: 40px;
margin-bottom:10px;
}
.comCheckHotel .ck_goUrl{
color:blue;
cursor: pointer;
margin-left:10px;
}
</style>
<template>
<div class="comCheckHotel">
<div class="Ck_hotelInfo">
<span style="color:red">{{DateStr}}</span> 酒店库存信息
</div>
<div class="cm_hotelTitle clearfix">
<div style="float:left;">
地区:
<el-select filterable v-model="qMsg.ProvinceId" class="w120" :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" :value='0'></el-option>
<el-option v-for="item in ProvinceList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</div>
<div style="float:left;margin-left:10px;">
酒店名称/电话:
<el-input type="text" v-model="qMsg.Name" class="w120" @keyup.native.enter="getCheckHotel()" placeholder="酒店名称或电话"></el-input>
<input type="button" class="normalBtn" value="查询" @click="getCheckHotel()" />
</div>
</div>
<div>
<el-tabs type="border-card" v-loading="loading" v-if="IsShow" >
<el-tab-pane :label="item.ProvinceName" v-for="(item,index) in dataList" :key="item.subCode">
<div class="clearfix comCheckHotel">
<div class="comCk_list" v-for="(subItem,subIndex) in item.HotelList">
<input :id="'H'+index+'_'+subIndex" type="checkbox" v-model="subItem.isChecked" @click="getCheck(item.HotelList,subIndex)"/>
<label :for="'H'+index+'_'+subIndex" style="cursor: pointer">{{subItem.Name}}</label>
<span class="cm_Inventory">{{subItem.Inventory}}</span>
<span class="cm_Inventory">剩余:{{subItem.RemainingInventory}}</span>
<span class="ck_goUrl" @click="goUrl(subItem.ID)">新增库存</span>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<input type="button" class="normalBtn com_SaveBtn" @click="sendCkedHotel()" value="保存" />
</div>
</template>
<script>
export default {
props: ["TCID", "DateStr","DayNum"],
data() {
return {
loading:false,
dataList: [],
ProvinceList: [],
qMsg:{
ProvinceId: 0, //选择个省份编号
Name:"",//酒店名称
},
IsShow:false,
ckedHotel:{}
};
},
methods: {
getCheckHotel() {
this.loading=true;
this.IsShow=false;
this.dataList = [];
this.HotelList = [];
this.apipost('hotel_post_GetHasStockHotelList_V2', {
//1-只查询有库存的酒店
IsMoreThanZero: 0,
Country: "651",
IsAllHotel: 1,
Province: this.qMsg.ProvinceId,
Name:this.qMsg.Name,
sDate: this.UseDate
}, res => {
this.loading=false;
this.IsShow=true;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.dataList.forEach(x => {
x.HotelList.forEach(y => {
y.isChecked = false;
})
})
} else {
this.Error(res.data.message)
}
}, err => {})
},
getCheck(hotelList, index) {
hotelList.forEach((x, subIndex) => {
if (index == subIndex) {
x.isChecked = !x.isChecked;
this.ckedHotel = x;
} else {
x.isChecked = false;
}
})
this.$forceUpdate();
},
//向父组件传递选中酒店
sendCkedHotel() {
var ckHotelObj = {};
if(this.ckedHotel){
ckHotelObj.ID = this.ckedHotel.ID;
ckHotelObj.Address = this.ckedHotel.Address;
ckHotelObj.Inventory = this.ckedHotel.Inventory;
ckHotelObj.Name = this.ckedHotel.Name;
ckHotelObj.PayStyle = this.ckedHotel.PayStyle;
ckHotelObj.Tel = this.ckedHotel.Tel;
ckHotelObj.RebateRatio=this.ckedHotel.RebateRatio;
ckHotelObj.RebateCount=this.ckedHotel.RebateCount;
ckHotelObj.CostPrice=this.ckedHotel.CostPrice;
}
this.$emit("childHotel", ckHotelObj);
},
//获取日本下面的市->下拉框用
getProvinceList() {
let msg = {
Id: 651
};
this.apipost("dict_post_Destination_GetChildList", msg, res => {
if (res.data.resultCode == 1) {
this.ProvinceList = res.data.data;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
goUrl(ID){
this.$router.push({
path: 'HotelProductManage2',
query: {
id: ID,
Country: 651,
IsSelfBook: 1,
blank: 'y',
tab: '报价详情'
}
});
}
},
mounted() {
this.getProvinceList();
}
};
</script>
\ No newline at end of file
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