Commit 58dfca4d authored by zhengke's avatar zhengke

增加删除

parent 3a80fccf
...@@ -118,15 +118,15 @@ ...@@ -118,15 +118,15 @@
<span style="color:#FFFFFF; background-color:#000; padding: 2px 4px; border-radius: 5px;">无库存</span> <span style="color:#FFFFFF; background-color:#000; padding: 2px 4px; border-radius: 5px;">无库存</span>
</div> </div>
<template v-if="isShow"> <template v-if="isShow">
<el-table :data="dataList" style="width:100%" border v-loading='loading' height="700"> <el-table :data="dataList" style="width:100%" border v-loading='loading' :height="tableHeight">
<el-table-column fixed label="酒店名称" min-width="180" style="background:#EAEAEA"> <el-table-column fixed label="酒店名称" min-width="220" style="background:#EAEAEA">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="text-decoration: underline;cursor:pointer" @click="GotoHotel(scope.row.Hotel)"> <div style="text-decoration: underline;cursor:pointer" @click="GotoHotel(scope.row.Hotel)">
{{scope.row.HotelName}} {{scope.row.HotelName}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-for='(item,index) in dataList[0].DayList' :label="item.DateStr" :key='index' min-width="150"> <el-table-column v-for='(item,index) in dataList[0].DayList' :label="item.DateStr" :key='index' min-width="210">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.DayList[index].IsHaveStock==0"> <template v-if="scope.row.DayList[index].IsHaveStock==0">
<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">无库存
...@@ -137,12 +137,12 @@ ...@@ -137,12 +137,12 @@
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">
<div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1||childItem.OPState==1" <div :title="childItem.TCID+'【OK】'" v-if="childItem.DMCState==1||childItem.OPState==1"
slot="reference" class="w80" slot="reference"
style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;" style="white-space:nowrap;color:green;cursor:pointer;text-decoration:underline;display:inline-block"
@click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,childItem.TCID)"> @click="outerVisible=true,GetClickItem(item.DateAllStr,scope.row.Hotel,childItem.TCID)">
{{childItem.BookGroup}} {{childItem.BookGroup}}
</div> </div>
<a style="text-decoration:underline;color:red;cursor:pointer" @click="DeleteHotel(item.DateAllStr,scope.row.Hotel,childItem.TCID)">删除</a> <a style="display:inline-block;text-decoration:underline;color:red;cursor:pointer" @click="DeleteHotel(item.DateAllStr,scope.row.Hotel,childItem.TCID)">删除</a>
</template> </template>
</template> </template>
<template v-else> <template v-else>
...@@ -287,6 +287,8 @@ ...@@ -287,6 +287,8 @@
companyList: [], companyList: [],
//酒店列表 //酒店列表
HotelList: [], HotelList: [],
//默认高度
tableHeight:0
}; };
}, },
...@@ -487,6 +489,16 @@ ...@@ -487,6 +489,16 @@
this.loading = false; this.loading = false;
}); });
}, },
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 40;
if (h < 110) {
return;
}
//设置table的行高
this.tableHeight = h;
},
DeleteHotel(DateAllStr,Hotel,TCID) DeleteHotel(DateAllStr,Hotel,TCID)
{ {
var that = this; var that = this;
...@@ -516,6 +528,11 @@ ...@@ -516,6 +528,11 @@
this.getProvinceList(651, 1); this.getProvinceList(651, 1);
this.initSupplier(); this.initSupplier();
this.getList(); this.getList();
//自适应高度调节
this.com_onresize();
window.onresize = () => {
this.com_onresize();
}
}, },
}; };
......
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