Commit 6d92ac8c authored by 黄奎's avatar 黄奎

页面修改

parent edca8e54
...@@ -35,34 +35,168 @@ ...@@ -35,34 +35,168 @@
<div style="background-color:#000!important;width:50px;height:100%;margin:0,padding:0;color:#FFFFFF">无库存 <div style="background-color:#000!important;width:50px;height:100%;margin:0,padding:0;color:#FFFFFF">无库存
</div> </div>
</template> </template>
<template v-else > <template v-else>
<template <template
v-if="scope.row.DayList[index].HotelJourneyOrderList&&scope.row.DayList[index].HotelJourneyOrderList.length>0"> 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" > <template v-for="(childItem,childIndex) in scope.row.DayList[index].HotelJourneyOrderList">
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop"> <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"> <table v-loading="changeLoading">
</commonHotelWork style="display:none;"> --> <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" <div :title="childItem.TCID+'【未操作】'" v-if="childItem.DMCState==0" slot="reference" class="w80"
style="white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:red;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)"> @click="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{childItem.BookGroup}}</div> {{childItem.BookGroup}}</div>
<div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1" slot="reference" class="w80" <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;" style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)"> @click="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{childItem.BookGroup}}</div> {{childItem.BookGroup}} </div>
<div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80" <div :title="childItem.TCID+'【暂定】'" v-if="childItem.DMCState==2" slot="reference" class="w80"
style="white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:#3333CC;;cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,childIndex)"> @click="GetChangeHotelList(item.DateAllStr,childItem.TCID)">
{{childItem.BookGroup}}</div> {{childItem.BookGroup}}</div>
</el-popover> </el-popover>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<el-popover width="760" trigger="click" popper-class="Bus_HotelPop" style="display:none;"> <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"> <table v-loading="changeLoading">
</commonHotelWork> <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;" <div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="ClickChild(item.DateAllStr,scope.$index,index,'no')">设置酒店</div> @click="GetChangeHotelList(item.DateAllStr,0)">设置酒店
</div>
</el-popover> </el-popover>
</template> </template>
</template> </template>
...@@ -91,18 +225,13 @@ ...@@ -91,18 +225,13 @@
loading: false, loading: false,
isShow: false, isShow: false,
changeLoading: false, //改变酒店loading changeLoading: false, //改变酒店loading
ChangeHotelList: [], //获取可变更的酒店列表 MyDataList: [], //获取可变更的酒店列表
}; };
}, },
components: { components: {
commonHotelWork commonHotelWork
}, },
methods: { methods: {
//调用子组件方法
ClickChild(DateAllStr,rootIndex, index, childIndex) {
let str = `commonHotelWork_${rootIndex}_${index}_${childIndex}`;
this.$refs[str][0].GetChangeHotelList();
},
GotoHotel(HotelId) { GotoHotel(HotelId) {
this.$router.push({ this.$router.push({
path: "HotelManagement", path: "HotelManagement",
...@@ -113,8 +242,68 @@ ...@@ -113,8 +242,68 @@
} }
}); });
}, },
ChangeStatus(item) {
item.IsChecked = !item.IsChecked;
},
//获取可以改变的酒店列表
GetChangeHotelList(DateStr, TCID) {
this.changeLoading = true;
this.MyDataList = [];
var that = this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", {
UseTime: DateStr
},
res => {
that.changeLoading = false;
if (res.data.resultCode == 1) {
var nArray = res.data.data;
nArray.forEach(item => {
if (item.TCID == TCID) {
item.IsChecked = true;
}
});
that.MyDataList = nArray;
} else {
that.Error(res.data.message);
}
},
err => {}
);
},
//保存酒店订单
SaveHotelOrder(HotelId) {
var that = this;
this.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;
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("请选择团期!");
}
});
},
getList() { getList() {
this.loading = true; this.loading = true;
this.isShow=false;
this.dataList = []; this.dataList = [];
if (this.msg.YearMonthStr == "") { if (this.msg.YearMonthStr == "") {
this.msg.YearMonthStr = new Date().Format("yyyy-MM"); this.msg.YearMonthStr = new Date().Format("yyyy-MM");
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</template> </template>
<script> <script>
export default { export default {
props: ["TCID","HotelId","DateStr"], props: ["TCID", "HotelId", "DateStr"],
data() { data() {
return { return {
changeLoading: false, changeLoading: false,
...@@ -86,16 +86,16 @@ ...@@ -86,16 +86,16 @@
//获取可以改变的酒店列表 //获取可以改变的酒店列表
GetChangeHotelList() { GetChangeHotelList() {
this.changeLoading = true; this.changeLoading = true;
this.MyDataList=[]; this.MyDataList = [];
var that=this; var that = this;
this.apipost("journeyorder_post_GetCanChangeHotelListService", { this.apipost("journeyorder_post_GetCanChangeHotelListService", {
UseTime: this.DateStr UseTime: this.DateStr
}, },
res => { res => {
that.changeLoading = false; that.changeLoading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.MyDataList =res.data.data; that.MyDataList = res.data.data;
console.log("that.MyDataList",that.MyDataList)
} else { } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
...@@ -136,9 +136,9 @@ ...@@ -136,9 +136,9 @@
} }
}, },
mounted() { mounted() {
//this.GetChangeHotelList();
}, },
created(){ created() {
} }
}; };
......
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