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

酒店选择新增验证

parent 5709168b
...@@ -374,12 +374,12 @@ ...@@ -374,12 +374,12 @@
@click="GetHotelLog(subItem,index,subIndex)">日志</div> @click="GetHotelLog(subItem,index,subIndex)">日志</div>
</el-popover> </el-popover>
<br /> <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' <commonPHInfo :name='"dmccomPriceHotelInfo"+index+subIndex'
:ref='"dmccomPriceHotelInfo"+index+subIndex'></commonPHInfo> :ref='"dmccomPriceHotelInfo"+index+subIndex'></commonPHInfo>
<span slot="reference" class="price" style="cursor:pointer;text-decoration:underline;" <span slot="reference" class="price" style="cursor:pointer;text-decoration:underline;"
@click="GetHotelUsePriceList(subItem.HotelId,item.UseTimeStr,index,subIndex)">库存情况</span> @click="GetHotelUsePriceList(subItem.HotelId,item.UseTimeStr,index,subIndex)">库存情况</span>
</el-popover> </el-popover> -->
</td> </td>
</tr> </tr>
</template> </template>
...@@ -447,23 +447,55 @@ ...@@ -447,23 +447,55 @@
let str = `comHotelLog${index}${hotelSubIndex}` let str = `comHotelLog${index}${hotelSubIndex}`
this.$refs[str][0].getHotelLogsList(subItem.TCID, subItem.HotelId, subItem.CheckInDateStr); this.$refs[str][0].getHotelLogsList(subItem.TCID, subItem.HotelId, subItem.CheckInDateStr);
}, },
//获取子组件返回的数据
childHotelList(ckedObj) { childHotelList(ckedObj) {
//使用时间
var oldData = JSON.parse(JSON.stringify(this.list[this.findex].HotelOrderList[this.childIndex]));
this.list.forEach(x => { this.list.forEach(x => {
x.HotelOrderList.forEach(y => { x.HotelOrderList.forEach(y => {
y.isShowPop = false; y.isShowPop = false;
}) })
}); });
this.list[this.findex].HotelOrderList[this.childIndex].Address = ckedObj.Address; var useTime = oldData.CheckInDateStr;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelName = ckedObj.Name; var hotelId = ckedObj.ID;
this.list[this.findex].HotelOrderList[this.childIndex].Tel = ckedObj.Tel; var TCID = oldData.TCID;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelId = ckedObj.ID; this.apipost('travel_get_GetHotelUsePriceListService_V2', {
this.list[this.findex].HotelOrderList[this.childIndex].PayStyle = ckedObj.PayStyle; HotelId: hotelId,
this.list[this.findex].HotelOrderList[this.childIndex].PayStyleExt = ckedObj.PayStyle; UseTime: useTime,
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach(subItem => { TCID: TCID
subItem.UnitPrice = ckedObj.CostPrice; }, res => {
subItem.RebateRatio = ckedObj.RebateRatio; if (res.data.resultCode == 1) {
}); var objData = res.data.data;
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]); //库存不够
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) { getChildHotel(index, subIndex) {
this.findex = index; this.findex = index;
......
...@@ -55,16 +55,16 @@ ...@@ -55,16 +55,16 @@
</div> </div>
<div class="cm_hotelTitle clearfix"> <div class="cm_hotelTitle clearfix">
<div style="float:left;"> <div style="float:left;">
地区筛选: 地区:
<el-select filterable v-model="qMsg.ProvinceId" class="w120" :placeholder="$t('pub.pleaseSel')"> <el-select filterable v-model="qMsg.ProvinceId" class="w120" :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" :value='0'></el-option> <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 v-for="item in ProvinceList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div style="float:left;margin-left:15px;"> <div style="float:left;margin-left:10px;">
酒店名称: 酒店名称/电话:
<el-input type="text" v-model="qMsg.Name" class="w120" @keyup.native.enter="getCheckHotel()" placeholder="请输入关键字"></el-input> <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()" /> <input type="button" class="normalBtn" value="查询" @click="getCheckHotel()" />
</div> </div>
</div> </div>
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
<el-tab-pane :label="item.ProvinceName" v-for="(item,index) in dataList" :key="item.subCode"> <el-tab-pane :label="item.ProvinceName" v-for="(item,index) in dataList" :key="item.subCode">
<div class="clearfix comCheckHotel"> <div class="clearfix comCheckHotel">
<div class="comCk_list" v-for="(subItem,subIndex) in item.HotelList"> <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)"/> <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> <label :for="'H'+index+'_'+subIndex" style="cursor: pointer">{{subItem.Name}}</label>
<span class="cm_Inventory">{{subItem.Inventory}}</span> <span class="cm_Inventory">{{subItem.Inventory}}</span>
<span class="cm_Inventory">剩余:{{subItem.RemainingInventory}}</span>
<span class="ck_goUrl" @click="goUrl(subItem.ID)">新增库存</span> <span class="ck_goUrl" @click="goUrl(subItem.ID)">新增库存</span>
</div> </div>
</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