Commit 4d4c2515 authored by 黄奎's avatar 黄奎

酒店选择新增验证

parent 5709168b
......@@ -374,12 +374,12 @@
@click="GetHotelLog(subItem,index,subIndex)">日志</div>
</el-popover>
<br />
<el-popover width="700" trigger="click" popper-class="DMC_HotelPop">
<!-- <el-popover width="700" trigger="click" popper-class="DMC_HotelPop">
<commonPHInfo :name='"dmccomPriceHotelInfo"+index+subIndex'
:ref='"dmccomPriceHotelInfo"+index+subIndex'></commonPHInfo>
<span slot="reference" class="price" style="cursor:pointer;text-decoration:underline;"
@click="GetHotelUsePriceList(subItem.HotelId,item.UseTimeStr,index,subIndex)">库存情况</span>
</el-popover>
</el-popover> -->
</td>
</tr>
</template>
......@@ -447,23 +447,55 @@
let str = `comHotelLog${index}${hotelSubIndex}`
this.$refs[str][0].getHotelLogsList(subItem.TCID, subItem.HotelId, subItem.CheckInDateStr);
},
//获取子组件返回的数据
childHotelList(ckedObj) {
//使用时间
var oldData = JSON.parse(JSON.stringify(this.list[this.findex].HotelOrderList[this.childIndex]));
this.list.forEach(x => {
x.HotelOrderList.forEach(y => {
y.isShowPop = false;
})
});
this.list[this.findex].HotelOrderList[this.childIndex].Address = ckedObj.Address;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelName = ckedObj.Name;
this.list[this.findex].HotelOrderList[this.childIndex].Tel = ckedObj.Tel;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelId = ckedObj.ID;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyle = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyleExt = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach(subItem => {
subItem.UnitPrice = ckedObj.CostPrice;
subItem.RebateRatio = ckedObj.RebateRatio;
});
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]);
var useTime = oldData.CheckInDateStr;
var hotelId = ckedObj.ID;
var TCID = oldData.TCID;
this.apipost('travel_get_GetHotelUsePriceListService_V2', {
HotelId: hotelId,
UseTime: useTime,
TCID: TCID
}, res => {
if (res.data.resultCode == 1) {
var objData = res.data.data;
//库存不够
if (objData.isOverStock == 0) {
if (objData.list && objData.list.length > 0) {
var str = "";
objData.list.forEach((cItem, cIndex) => {
str += (cIndex == 0 ? "" : ",") + cItem.TCNUM + "使用了" + cItem.LastUseNum+"间";
});
if (str != "") {
this.Info(str);
}
}
}
//库存充足或没有酒店库存的情况
else if(objData.isOverStock == 1||objData.isOverStock == -1){
this.list[this.findex].HotelOrderList[this.childIndex].Address = ckedObj.Address;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelName = ckedObj.Name;
this.list[this.findex].HotelOrderList[this.childIndex].Tel = ckedObj.Tel;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelId = ckedObj.ID;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyle = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyleExt = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach(subItem => {
subItem.UnitPrice = ckedObj.CostPrice;
subItem.RebateRatio = ckedObj.RebateRatio;
});
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]);
}
} else {
this.Error("请求参数错误!");
}
}, err => {})
},
getChildHotel(index, subIndex) {
this.findex = index;
......
......@@ -55,16 +55,16 @@
</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:15px;">
酒店名称:
<el-input type="text" v-model="qMsg.Name" class="w120" @keyup.native.enter="getCheckHotel()" placeholder="请输入关键字"></el-input>
<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>
......@@ -73,10 +73,10 @@
<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">
<!-- "'comCheckHotel'+index+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}}</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>
......
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