Commit 8e386ee3 authored by 黄奎's avatar 黄奎

页面修改

parent 6d92ac8c
......@@ -39,165 +39,25 @@
<template
v-if="scope.row.DayList[index].HotelJourneyOrderList&&scope.row.DayList[index].HotelJourneyOrderList.length>0">
<template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList">
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop">
<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(scope.row.Hotel)" />
</td>
</tr>
</tfoot>
</table>
<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="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{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="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{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="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{childItem.BookGroup}}</div>
</el-popover>
<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="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{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="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{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="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{childItem.BookGroup}}</div>
</template>
</template>
<template v-else>
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop">
<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(scope.row.Hotel)" />
</td>
</tr>
</tfoot>
</table>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="GetChangeHotelList(item.DateAllStr,0)">设置酒店
</div>
</el-popover>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="outerVisible=true,GetChangeHotelList(item.DateAllStr,scope.row.Hotel,0)">设置酒店
</div>
</template>
</template>
</template>
......@@ -208,6 +68,77 @@
<p>{{$t("active.ld_noData")}}</p>
</div>
</template>
<el-dialog custom-class='Tp_hotelDialog' :title="'【'+CurrentDateStr+'】团期酒店信息列表'" :visible.sync="outerVisible" center>
<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="7" style="text-align:center;">
<input type="button" class="normalBtn" value="保存" @click="SaveHotelOrder()" />
<input type="button" class="normalBtn" value="关闭" @click="CloseHotel()" />
</td>
</tr>
</tfoot>
</table>
</el-dialog>
</div>
</template>
<script>
......@@ -221,11 +152,14 @@
CountryId: 651, //只查询日本
},
defaultSelectValue: 0,
HotelId: 0,
dataList: [],
loading: false,
isShow: false,
changeLoading: false, //改变酒店loading
MyDataList: [], //获取可变更的酒店列表
outerVisible: false,
CurrentDateStr:"",//选中的日期
};
},
components: {
......@@ -245,9 +179,18 @@
ChangeStatus(item) {
item.IsChecked = !item.IsChecked;
},
CloseHotel()
{
this.outerVisible=false;
this.HotelId=0;
this.MyDataList=[];
this.CurrentDateStr='';
},
//获取可以改变的酒店列表
GetChangeHotelList(DateStr, TCID) {
GetChangeHotelList(DateStr, HotelId,TCID) {
this.CurrentDateStr=DateStr;
this.changeLoading = true;
this.HotelId=HotelId;
this.MyDataList = [];
var that = this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", {
......@@ -271,15 +214,15 @@
);
},
//保存酒店订单
SaveHotelOrder(HotelId) {
SaveHotelOrder() {
var that = this;
this.Confirm("是否要替换选中的酒店?", function () {
that.Confirm("是否要替换选中的酒店?", function () {
var newList = [];
if (that.MyDataList && that.MyDataList.length > 0) {
that.MyDataList.forEach(item => {
if (item.IsChecked) {
var Nitem = JSON.parse(JSON.stringify(item));
Nitem.NewHotelID = HotelId;
Nitem.NewHotelID = that.HotelId;
newList.push(Nitem);
}
});
......@@ -290,6 +233,7 @@
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
that.CloseHotel();
} else {
that.Error(res.data.message);
}
......@@ -303,7 +247,7 @@
},
getList() {
this.loading = true;
this.isShow=false;
this.isShow = false;
this.dataList = [];
if (this.msg.YearMonthStr == "") {
this.msg.YearMonthStr = new Date().Format("yyyy-MM");
......
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