Commit 1355e8c5 authored by 黄奎's avatar 黄奎

11

parent 06957208
<style>
.comCheckHotel .comCheckHotel {
width: 100%;
height: 150px;
......@@ -33,19 +32,22 @@
background-color: #E95252;
color: #fff;
}
.comCheckHotel .Ck_hotelInfo{
width:100%;
height:40px;
.comCheckHotel .Ck_hotelInfo {
width: 100%;
height: 40px;
background-color: #F6F8FB;
text-align: center;
line-height: 40px;
margin-bottom:10px;
margin-bottom: 10px;
}
.comCheckHotel .ck_goUrl{
color:blue;
cursor: pointer;
margin-left:10px;
.comCheckHotel .ck_goUrl {
color: blue;
cursor: pointer;
margin-left: 10px;
}
</style>
<template>
......@@ -64,54 +66,56 @@
</div>
<div style="float:left;margin-left:10px;">
{{$t('objFill.v101.traveltrip.jiudmcdh')}}:
<el-input type="text" v-model="qMsg.Name" class="w120" @keyup.native.enter="getCheckHotel()" :placeholder="$t('objFill.jiudianhdh')"></el-input>
<el-input type="text" v-model="qMsg.Name" class="w120" @keyup.native.enter="getCheckHotel()"
:placeholder="$t('objFill.jiudianhdh')"></el-input>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getCheckHotel()" />
</div>
</div>
<div v-loading="hotelLoading" >
<el-tabs type="border-card" v-if="IsShow" >
<div v-loading="hotelLoading">
<el-tabs type="border-card" 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}}
<template v-if="subItem.Supplier>0">
{{subItem.SupplierName}}
</template>
</label>
<span class="cm_Inventory">{{subItem.Inventory}}</span>
<span class="cm_Inventory">{{$t('hotel.hotel_remainList')}}:{{subItem.RemainingInventory}}</span>
<span class="ck_goUrl" @click="goUrl(subItem.ID)">{{$t('hotel.hotel_InventoryAdd')}}</span>
</div>
<div class="comCk_list" v-for="(subItem,subIndex) in item.HotelList" :key="`d_2`+index+ `s_`+subIndex">
<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}}
<template v-if="subItem.HotelRealName&&subItem.HotelRealName!=''">
<font style="color:green;">{{subItem.HotelRealName}}</font>
</template>
</label>
<span class="cm_Inventory">{{subItem.Inventory}}</span>
<span class="cm_Inventory">{{$t('hotel.hotel_remainList')}}:{{subItem.RemainingInventory}}</span>
<span class="ck_goUrl" @click="goUrl(subItem.ID)">{{$t('hotel.hotel_InventoryAdd')}}</span>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<br/>
<br/>
<br />
<br />
<input type="button" class="normalBtn com_SaveBtn" @click="sendCkedHotel()" :value="$t('pub.saveBtn')" />
</div>
</template>
<script>
export default {
props: ["UseDate","Country"],
props: ["UseDate", "Country"],
data() {
return {
hotelLoading:false,
hotelLoading: false,
dataList: [],
ProvinceList: [],
qMsg:{
ProvinceId: 0, //选择个省份编号
Name:"",//酒店名称
qMsg: {
ProvinceId: 0, //选择个省份编号
Name: "", //酒店名称
},
IsShow:false,
ckedHotel:{}
IsShow: false,
ckedHotel: {}
};
},
methods: {
getCheckHotel() {
this.hotelLoading=true;
this.IsShow=false;
this.hotelLoading = true;
this.IsShow = false;
this.dataList = [];
this.HotelList = [];
this.apipost('hotel_post_GetHasStockHotelList_V2', {
......@@ -120,11 +124,11 @@
Country: this.Country,
IsAllHotel: 1,
Province: this.qMsg.ProvinceId,
Name:this.qMsg.Name,
Name: this.qMsg.Name,
sDate: this.UseDate
}, res => {
this.hotelLoading=false;
this.IsShow=true;
this.hotelLoading = false;
this.IsShow = true;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.dataList.forEach(x => {
......@@ -132,6 +136,7 @@
y.isChecked = false;
})
})
console.log(" this.dataList", this.dataList);
} else {
this.Error(res.data.message)
}
......@@ -151,17 +156,17 @@
//向父组件传递选中酒店
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;
ckHotelObj.Supplier=this.ckedHotel.Supplier;
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;
ckHotelObj.Supplier = this.ckedHotel.Supplier;
}
this.$emit("childHotel", ckHotelObj);
},
......@@ -180,8 +185,8 @@
err => {}
);
},
goUrl(ID){
this.$router.push({
goUrl(ID) {
this.$router.push({
path: 'HotelProductManage2',
query: {
id: ID,
......@@ -197,4 +202,5 @@
this.getProvinceList();
}
};
</script>
\ No newline at end of file
</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