Commit e66ea37b authored by 黄奎's avatar 黄奎

页面修改

parent 117d15ba
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
.roomReservationsDetailsTalbe { .roomReservationsDetailsTalbe {
table-layout: fixed; table-layout: fixed;
} }
.roomReservationsDetailsTalbe thead tr th { .roomReservationsDetailsTalbe thead tr th {
...@@ -333,7 +332,7 @@ ...@@ -333,7 +332,7 @@
<td> <td>
<template v-if="childIndex==1"> <template v-if="childIndex==1">
<template v-if="(subItem.LineId==14||subItem.LineId==118)&&subItem.HotelBookType==2"> <template v-if="(subItem.LineId==14||subItem.LineId==118)&&subItem.HotelBookType==2">
<template v-if="subItem.IsHaveHotelStock==1"> <template v-if="subItem.IsHaveHotelStock==1||childItem.UnitPrice>0">
<el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter' <el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter'
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice'></el-input> @input="calculationPrice(subItem)" v-model='childItem.UnitPrice'></el-input>
</template> </template>
...@@ -344,7 +343,7 @@ ...@@ -344,7 +343,7 @@
:HotelId="subItem.NewHotelId" :HotelName="subItem.NewHotelName" @success="GetNewHotelPrice"> :HotelId="subItem.NewHotelId" :HotelName="subItem.NewHotelName" @success="GetNewHotelPrice">
</set-hotel-stock> </set-hotel-stock>
<el-button size="small" type="danger" :data-index="'comSetHotelPrice'+index+subIndex+''" <el-button size="small" type="danger" :data-index="'comSetHotelPrice'+index+subIndex+''"
slot="reference" @click="subItem.isShowHStock=true"> slot="reference" @click="subItem.isShowHStock=true,getHotelPrice(index,subIndex)">
添加报价 添加报价
</el-button> </el-button>
</el-popover> </el-popover>
...@@ -810,6 +809,7 @@ ...@@ -810,6 +809,7 @@
var useTime = oldData.CheckInDateStr; var useTime = oldData.CheckInDateStr;
var hotelId = ckedObj.ID; var hotelId = ckedObj.ID;
var TCID = oldData.TCID; var TCID = oldData.TCID;
console.log("checkHotel", ckedObj);
this.apipost('travel_get_GetHotelUsePriceListService_V2', { this.apipost('travel_get_GetHotelUsePriceListService_V2', {
HotelId: hotelId, HotelId: hotelId,
UseTime: useTime, UseTime: useTime,
...@@ -833,28 +833,30 @@ ...@@ -833,28 +833,30 @@
} }
//库存充足或没有酒店库存的情况 //库存充足或没有酒店库存的情况
else if (objData.isOverStock == 1 || objData.isOverStock == -1) { else if (objData.isOverStock == 1 || objData.isOverStock == -1) {
this.list[this.findex].HotelOrderList[this.childIndex].Address = ckedObj.Address; var tempOrderObj = this.list[this.findex].HotelOrderList[this.childIndex];
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelName = ckedObj.Name; if (tempOrderObj) {
this.list[this.findex].HotelOrderList[this.childIndex].Tel = ckedObj.Tel; tempOrderObj.Address = ckedObj.Address;
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelId = ckedObj.ID; tempOrderObj.NewHotelName = ckedObj.Name;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyle = ckedObj.PayStyle; tempOrderObj.Tel = ckedObj.Tel;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyleExt = ckedObj.PayStyle; tempOrderObj.NewHotelId = ckedObj.ID;
//判断供应商编号是否大于0 tempOrderObj.PayStyle = ckedObj.PayStyle;
if (ckedObj.Supplier > 0) { tempOrderObj.PayStyleExt = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].SupplierId = ckedObj.Supplier; tempOrderObj.IsHaveHotelStock = 0;
} if (ckedObj && ckedObj.Inventory > 0) {
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach((subItem, tempOrderObj.IsHaveHotelStock = 1;
subIndex) => {
//判断是否有库存价格
if (subIndex == 1 && ckedObj.CostPrice > 0 && ckedObj.Inventory > 0) {
subItem.IsHaveStockPrice = 1;
} else {
subItem.IsHaveStockPrice = 0;
} }
subItem.UnitPrice = ckedObj.CostPrice; //判断供应商编号是否大于0
subItem.RebateRatio = ckedObj.RebateRatio; if (ckedObj.Supplier > 0) {
}); tempOrderObj.SupplierId = ckedObj.Supplier;
}
tempOrderObj.OrderDetailsList.forEach((subItem,
subIndex) => {
//判断是否有库存价格
if (subItem.HouseType == 2) {
subItem.UnitPrice = ckedObj.CostPrice;
}
});
}
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]); this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]);
let str = `elPopoverHotel${this.findex}${this.childIndex}` let str = `elPopoverHotel${this.findex}${this.childIndex}`
//关闭组件 //关闭组件
...@@ -865,9 +867,31 @@ ...@@ -865,9 +867,31 @@
} }
}, err => {}) }, err => {})
}, },
//酒店报价
GetNewHotelPrice(newHPObj) { GetNewHotelPrice(newHPObj) {
console.log("newHPObj", newHPObj); if (newHPObj) {
this.getList(); let str = `elPopoverEditHotelPrice${this.findex}${this.childIndex}`
//关闭组件
this.$refs[str][0].doClose();
var tempObj = this.list[this.findex].HotelOrderList[this.childIndex];
if (this.list[this.findex].HotelOrderList[this.childIndex]) {
if (tempObj && tempObj.IsHaveHotelStock) {
tempObj.IsHaveHotelStock = 1;
}
if (tempObj && tempObj.OrderDetailsList && tempObj.OrderDetailsList.length > 0) {
tempObj.OrderDetailsList.forEach((subItem,
subIndex) => {
if (subItem.HouseType == 2) {
subItem.UnitPrice = newHPObj.CostPrice;
}
});
}
}
}
},
getHotelPrice(index, subIndex) {
this.findex = index;
this.childIndex = subIndex;
}, },
//点击酒店选择 //点击酒店选择
getChildHotel(index, subIndex) { getChildHotel(index, subIndex) {
...@@ -1374,9 +1398,6 @@ ...@@ -1374,9 +1398,6 @@
color: red; color: red;
} }
.roomReservationsDetailsTalbe .hotelTable { .roomReservationsDetailsTalbe .hotelTable {
border: none; border: none;
} }
......
...@@ -991,6 +991,7 @@ ...@@ -991,6 +991,7 @@
EditType: 0, EditType: 0,
OfferId: 0, OfferId: 0,
DayNum: 0, DayNum: 0,
checkObj: {}
}, },
dialogDiningTitle: "行程变更", dialogDiningTitle: "行程变更",
} }
...@@ -1004,6 +1005,7 @@ ...@@ -1004,6 +1005,7 @@
this.changMsg.isShowChangeOffer = false; this.changMsg.isShowChangeOffer = false;
this.changMsg.EditType = 0; this.changMsg.EditType = 0;
this.changMsg.DayNum = 0; this.changMsg.DayNum = 0;
this.changMsg.checkObj = {};
}, },
refreshPage(rType) { refreshPage(rType) {
this.changMsg.isShowChangeOffer = false; this.changMsg.isShowChangeOffer = false;
...@@ -1023,6 +1025,7 @@ ...@@ -1023,6 +1025,7 @@
this.dialogDiningTitle = "报价单变更" this.dialogDiningTitle = "报价单变更"
if (item && item.DayNum) { if (item && item.DayNum) {
this.changMsg.DayNum = item.DayNum; this.changMsg.DayNum = item.DayNum;
this.changMsg.checkObj = item;
} }
}, },
GetDayStr(dayNum) { GetDayStr(dayNum) {
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">类别</td> <td style="width:100px;" class="CP_ComTitle2 CostcomCenter">类别</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">变更类型</td> <td style="width:100px;" class="CP_ComTitle2 CostcomCenter">变更类型</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">天数</td> <td style="width:100px;" class="CP_ComTitle2 CostcomCenter">天数</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">原金额</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">地接金额</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">变更值</td> <td style="width:100px;" class="CP_ComTitle2 CostcomCenter">变更值</td>
<td style="width:250px;" class="CP_ComTitle2 CostcomCenter">变更备注</td> <td style="width:250px;" class="CP_ComTitle2 CostcomCenter">变更备注</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter"> <td style="width:100px;" class="CP_ComTitle2 CostcomCenter">
...@@ -64,7 +66,8 @@ ...@@ -64,7 +66,8 @@
</template> </template>
</td> </td>
<td> <td>
<el-select v-model="item.ChangeType" style="width:100px;" @change="checkChangeType(item,index)"> <el-select v-model="item.ChangeType" style="width:100px;"
@change="checkChangeType(item,index),getDiJiePrice(item)">
<el-option v-for="item in changeTypeList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in changeTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
...@@ -72,6 +75,12 @@ ...@@ -72,6 +75,12 @@
<td> <td>
{{item.DayNum}} {{item.DayNum}}
</td> </td>
<td>
{{item.OldPrice}}
</td>
<td>
{{item.DJPrice}}
</td>
<td> <td>
<el-input v-model="item.ChangeValue" style="width:100px;" max="6"></el-input> <el-input v-model="item.ChangeValue" style="width:100px;" max="6"></el-input>
</td> </td>
...@@ -109,22 +118,67 @@ ...@@ -109,22 +118,67 @@
}, },
methods: { methods: {
getDiJiePrice(item) { getDiJiePrice(item) {
// var postMsg = { var postMsg = {
// OfferId: this.qMsg.OfferId, OfferId: this.qMsg.OfferId,
// ChangeType: item.ChangeType, ChangeType: item.ChangeType,
// DayNum: this.qMsg.DayNum, DayNum: this.qMsg.DayNum,
// }; };
// this.apipost( item.OldPrice = 0;
// "dmcstatistics_post_GetGroupDayUserMoney", postMsg, item.DJPrice = 0;
// res => { item.ChangeValue = 0;
// // if (res.data.resultCode == 1) { this.apipost(
// // that.Success(that.$t('objFill.v101.hote.shanchucg')); "dmcstatistics_post_GetGroupDayUserMoney", postMsg,
// // that.getOfferChange(); res => {
// // } else { if (res.data.resultCode == 1) {
// // that.Error(that.$t('objFill.v101.hote.shanchusb')); var tempValue = res.data.data;
// // } if (tempValue) {
// } item.DJPrice = Number(tempValue);
// ); }
//酒店变更
if (item.ChangeType == 1) {
item.OldPrice = Number(this.qMsg.checkObj.HotelCostPrice);
}
//用车变更
else if (item.ChangeType == 2) {
var totalBus = Number(this.qMsg.checkObj.BusCostPrice) + Number(this.qMsg.checkObj.PassFee)
item.OldPrice = totalBus;
}
//早餐变更
else if (item.ChangeType == 3) {
item.OldPrice = Number(this.qMsg.checkObj.BreakfastCostPrice);
}
//午餐变更
else if (item.ChangeType == 4) {
item.OldPrice = Number(this.qMsg.checkObj.LunchCostPrice);
}
//晚餐变更
else if (item.ChangeType == 5) {
item.OldPrice = Number(this.qMsg.checkObj.DinnerCostPrice);
}
//景点变更
else if (item.ChangeType == 6) {
var tempScenic = 0;
if (this.qMsg.checkObj.ScenicList && this.qMsg.checkObj.ScenicList.length > 0) {
this.qMsg.checkObj.ScenicList.forEach(sItem => {
if (sItem.TicketName != '' || sItem.TicketId > 0) {
tempScenic += Number(sItem.TicketCostPrice);
}
})
}
item.OldPrice = Number(tempScenic);
}
//其他费用
else if (item.ChangeType == 7) {
item.OldPrice = Number(this.qMsg.checkObj.OtherPrice);
}
if (Number(item.DJPrice) >= Number(item.OldPrice)) {
item.ChangeValue = Number(tempValue) - Number(item.OldPrice);
} else {
item.ChangeValue = Number(tempValue) - Number(item.OldPrice);
}
}
}
);
}, },
AddOfferObj() { AddOfferObj() {
var obj = { var obj = {
...@@ -135,6 +189,8 @@ ...@@ -135,6 +189,8 @@
ChangeType: "", ChangeType: "",
ChangeValue: 0, ChangeValue: 0,
ChangeRemarks: "", ChangeRemarks: "",
OldPrice: 0, //原报价项目单金额
DJPrice: 0, //地接价格
} }
obj.OfferId = this.qMsg.OfferId; obj.OfferId = this.qMsg.OfferId;
obj.EidtType = this.qMsg.EditType; obj.EidtType = this.qMsg.EditType;
......
...@@ -160,8 +160,7 @@ ...@@ -160,8 +160,7 @@
<template v-if="PostConfig.LineId==14||PostConfig.LineId==118"> <template v-if="PostConfig.LineId==14||PostConfig.LineId==118">
<template v-if="hotelArray&&hotelArray.length>0"> <template v-if="hotelArray&&hotelArray.length>0">
<el-select placeholder="预定方式" v-model="hotelArray[0].HotelBookType" @change="ChangeHotelBookType" <el-select placeholder="预定方式" v-model="hotelArray[0].HotelBookType" @change="ChangeHotelBookType"
style="width:100px;display:none;"> style="width:100px;">
<el-option :value="0" :key="0" label="请选择"></el-option>
<el-option :value="1" :key="1" label="自订"></el-option> <el-option :value="1" :key="1" label="自订"></el-option>
<el-option :value="2" :key="2" label="PIC预订"></el-option> <el-option :value="2" :key="2" label="PIC预订"></el-option>
</el-select> </el-select>
...@@ -313,12 +312,10 @@ ...@@ -313,12 +312,10 @@
ChangeHotelBookType() { ChangeHotelBookType() {
if (this.hotelArray && this.hotelArray.length > 0) { if (this.hotelArray && this.hotelArray.length > 0) {
let tempHotelBookType = this.hotelArray[0].HotelBookType; let tempHotelBookType = this.hotelArray[0].HotelBookType;
console.log("tempHotelBookType", tempHotelBookType);
this.hotelArray.forEach(item => { this.hotelArray.forEach(item => {
item.HotelBookType = tempHotelBookType; item.HotelBookType = tempHotelBookType;
}); });
} }
console.log("this.hotelArray", this.hotelArray);
}, },
//酒店选择改变 //酒店选择改变
changeHotelList() { changeHotelList() {
...@@ -369,6 +366,17 @@ ...@@ -369,6 +366,17 @@
} }
}); });
} }
if (newHotelArray && newHotelArray.length > 0) {
let tempHotelBookType = newHotelArray[0].HotelBookType;
if (this.PostConfig.LineId == 14 || this.PostConfig.LineId == 118) {
if (tempHotelBookType == 0) {
tempHotelBookType = 2;
}
newHotelArray.forEach(item => {
item.HotelBookType = tempHotelBookType;
});
}
}
this.hotelArray = newHotelArray; this.hotelArray = newHotelArray;
//清除数据 //清除数据
let hotelDescribeArr = []; let hotelDescribeArr = [];
......
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