Commit 774c459d authored by 黄奎's avatar 黄奎

1

parent 97004ef3
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
.el-input-group__prepend { .el-input-group__prepend {
padding: 0 5px !important; padding: 0 5px !important;
} }
/deep/.SimulateDrop-box { /deep/.SimulateDrop-box {
width: 176px; width: 176px;
min-height: 34px; min-height: 34px;
...@@ -64,7 +65,8 @@ ...@@ -64,7 +65,8 @@
float: left; float: left;
/* margin: 4px 0 0 10px; */ /* margin: 4px 0 0 10px; */
border: 1px solid #d1d1d1; border: 1px solid #d1d1d1;
} }
.SD_flight { .SD_flight {
display: inline-block; display: inline-block;
height: 24px; height: 24px;
...@@ -73,12 +75,14 @@ ...@@ -73,12 +75,14 @@
line-height: 22px; line-height: 22px;
background-color: #f0f2f5; background-color: #f0f2f5;
} }
.SimulaDrop { .SimulaDrop {
position: absolute; position: absolute;
top: 3px; top: 3px;
right: 10px; right: 10px;
color: #c0c4cc; color: #c0c4cc;
} }
._TravelPricePopover .jiDiv { ._TravelPricePopover .jiDiv {
width: 750px; width: 750px;
max-height: 400px; max-height: 400px;
...@@ -118,6 +122,7 @@ ...@@ -118,6 +122,7 @@
._TravelPricePopover table td._d_name { ._TravelPricePopover table td._d_name {
background-color: #ededed; background-color: #ededed;
} }
</style> </style>
<!--下单表单--> <!--下单表单-->
<template> <template>
...@@ -207,8 +212,8 @@ ...@@ -207,8 +212,8 @@
<!--同行联系人Id--> <!--同行联系人Id-->
<el-form-item :label="$t('hotel.suplier_contact')" prop="CustomerChildrenId"> <el-form-item :label="$t('hotel.suplier_contact')" prop="CustomerChildrenId">
<el-select v-model="addMsg.CustomerChildrenId" filterable :placeholder="$t('pub.pleaseSel')"> <el-select v-model="addMsg.CustomerChildrenId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option v-for="(item, index) in customerChildrenList" :label="item.contactName +'-'+item.contactPhone+ '/' + item.contactDuty" <el-option v-for="(item, index) in customerChildrenList"
:value="item.id" :key="index"> :label="item.contactName +'-'+item.contactPhone+ '/' + item.contactDuty" :value="item.id" :key="index">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -628,7 +633,8 @@ ...@@ -628,7 +633,8 @@
-¥{{item.RefundMoney}} -¥{{item.RefundMoney}}
</td> </td>
<td> <td>
<el-input class="w80" type="Number" :max='addMsg.GuestNum' v-model="item.Number" @keyup.native="initScenic()"></el-input> <el-input class="w80" type="Number" :max='addMsg.GuestNum' v-model="item.Number"
@keyup.native="initScenic()"></el-input>
<!-- --> <!-- -->
</td> </td>
...@@ -637,7 +643,8 @@ ...@@ -637,7 +643,8 @@
</div> </div>
</div> </div>
<div slot="reference" class="SimulateDrop-box"> <div slot="reference" class="SimulateDrop-box">
<span class="SD_flight" v-for="subItem in addMsg.ScenicList">{{subItem.ScenicName}}*{{subItem.Number}}</span> <span class="SD_flight"
v-for="subItem in addMsg.ScenicList">{{subItem.ScenicName}}*{{subItem.Number}}</span>
<i class="iconfont icon-arrow-down SimulaDrop"></i> <i class="iconfont icon-arrow-down SimulaDrop"></i>
</div> </div>
</el-popover> </el-popover>
...@@ -896,7 +903,7 @@ ...@@ -896,7 +903,7 @@
ContactName: "", ContactName: "",
ContactMobile: "", ContactMobile: "",
CustomerId: "", CustomerId: "",
CustomerChildrenId:"", CustomerChildrenId: "",
DepartureCityId: "0", DepartureCityId: "0",
ReturnArriveCityId: "", ReturnArriveCityId: "",
IsIntermodal: "2", IsIntermodal: "2",
...@@ -935,7 +942,7 @@ ...@@ -935,7 +942,7 @@
SafeNum: "0", SafeNum: "0",
AirticketNum: "0", AirticketNum: "0",
ScenicRefundArr: [], ScenicRefundArr: [],
ScenicList:[],//可退景点人数 ScenicList: [], //可退景点人数
GoCityTime: "", GoCityTime: "",
BackCityTime: "", BackCityTime: "",
CommissionSharePeople: "0", CommissionSharePeople: "0",
...@@ -965,7 +972,7 @@ ...@@ -965,7 +972,7 @@
}, ], }, ],
CustomerChildrenId: [{ CustomerChildrenId: [{
required: true, required: true,
message: this.$t('objFill.qingxzkhmd')+this.$t('hotel.suplier_contact'), message: this.$t('objFill.qingxzkhmd') + this.$t('hotel.suplier_contact'),
trigger: "change", trigger: "change",
}, ], }, ],
ManNum: [{ ManNum: [{
...@@ -1150,18 +1157,17 @@ ...@@ -1150,18 +1157,17 @@
//初始化景点 //初始化景点
initScenic() { initScenic() {
this.addMsg.ScenicList = []; this.addMsg.ScenicList = [];
var totalGuest=(Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) var totalGuest = (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum))
this.ScenicRefundList.forEach(x => { this.ScenicRefundList.forEach(x => {
if (/^\d+$/.test(x.Number)&&x.Number>0&&x.Number<=totalGuest) { if (/^\d+$/.test(x.Number) && x.Number > 0 && x.Number <= totalGuest) {
this.addMsg.ScenicList.push(x); this.addMsg.ScenicList.push(x);
} } else {
else{ x.Number = 0;
x.Number=0;
} }
}) })
this.getTotalPrice(); this.getTotalPrice();
this.getTicheng(); this.getTicheng();
console.log("this.ScenicList",this.addMsg.ScenicList); console.log("this.ScenicList", this.addMsg.ScenicList);
}, },
// 获取已选优惠券 // 获取已选优惠券
...@@ -1752,8 +1758,8 @@ ...@@ -1752,8 +1758,8 @@
resetSelect() { resetSelect() {
if (this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) { if (this.addMsg.CustomerType == 1 || this.addMsg.CustomerType == 2) {
this.addMsg.CustomerId = ""; this.addMsg.CustomerId = "";
this.addMsg.CustomerChildrenId =""; this.addMsg.CustomerChildrenId = "";
this.customerChildrenList=[]; this.customerChildrenList = [];
} }
}, },
//清空联系人和联系电话 //清空联系人和联系电话
...@@ -1906,7 +1912,10 @@ ...@@ -1906,7 +1912,10 @@
0; 0;
} }
// this.addMsg.PredictRoomNum = (Number(this.addMsg.AirticketNum) + (Number(this.addMsg.ManNum) +Number(this.addMsg.ChirdNeedBedNum) -Number(etbzc) +Number(this.addMsg.OldPeopleNum)) -Number(this.addMsg.TripleRoomNum) * 3 -Number(this.addMsg.SingleRoomNum)) /2 +Number(this.addMsg.SingleRoomNum) +Number(this.addMsg.TripleRoomNum); // this.addMsg.PredictRoomNum = (Number(this.addMsg.AirticketNum) + (Number(this.addMsg.ManNum) +Number(this.addMsg.ChirdNeedBedNum) -Number(etbzc) +Number(this.addMsg.OldPeopleNum)) -Number(this.addMsg.TripleRoomNum) * 3 -Number(this.addMsg.SingleRoomNum)) /2 +Number(this.addMsg.SingleRoomNum) +Number(this.addMsg.TripleRoomNum);
this.addMsg.PredictRoomNum = (Number(this.addMsg.AirticketNum) + (Number(this.addMsg.ManNum) +Number(this.addMsg.ChirdNeedBedNum) -Number(etbzc) +Number(this.addMsg.OldPeopleNum)) -Number(this.addMsg.TripleRoomNum) * 3 -Number(this.addMsg.SingleRoomNum)) /2 +Number(this.addMsg.SingleRoomNum) +Number(this.addMsg.TripleRoomNum); this.addMsg.PredictRoomNum = (Number(this.addMsg.AirticketNum) + (Number(this.addMsg.ManNum) + Number(this
.addMsg.ChirdNeedBedNum) - Number(etbzc) + Number(this.addMsg.OldPeopleNum)) - Number(this.addMsg
.TripleRoomNum) * 3 - Number(this.addMsg.SingleRoomNum)) / 2 + Number(this.addMsg.SingleRoomNum) + Number(
this.addMsg.TripleRoomNum);
}, },
getNumber() { getNumber() {
if ( if (
...@@ -2023,7 +2032,8 @@ ...@@ -2023,7 +2032,8 @@
let danfang = Number(this.addMsg.SingleRoomNum) * this.priceObj.SingleRoomPrice; let danfang = Number(this.addMsg.SingleRoomNum) * this.priceObj.SingleRoomPrice;
//儿童占床、不占床价格 //儿童占床、不占床价格
let ertongbed = this.priceObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) - this.priceObj.ChildNoNeedPrice * (Number(this.addMsg.ChirdNum) - Number(this.addMsg.ChirdNeedBedNum)); let ertongbed = this.priceObj.ChildNeedPrice * Number(this.addMsg.ChirdNeedBedNum) - this.priceObj
.ChildNoNeedPrice * (Number(this.addMsg.ChirdNum) - Number(this.addMsg.ChirdNeedBedNum));
//联运 (单价已包含联运价格了,所以不需要联运价格) //联运 (单价已包含联运价格了,所以不需要联运价格)
let lianyun = 0; let lianyun = 0;
...@@ -2033,12 +2043,14 @@ ...@@ -2033,12 +2043,14 @@
// (Number(this.stratPrice) + Number(this.returnPrice)); // (Number(this.stratPrice) + Number(this.returnPrice));
//退景点费用 //退景点费用
var refundScenicPrice =0; var refundScenicPrice = 0;
if(this.addMsg.ScenicList!=null&&this.addMsg.ScenicList.length>0){ if (this.addMsg.ScenicList != null && this.addMsg.ScenicList.length > 0) {
var totalGuest=(Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg.OldPeopleNum)) var totalGuest = (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + Number(this.addMsg
.OldPeopleNum))
this.addMsg.ScenicList.forEach(item => { this.addMsg.ScenicList.forEach(item => {
if(totalGuest>=item.Number){ if (totalGuest >= item.Number) {
refundScenicPrice+=item.Number*item.RefundMoney;} refundScenicPrice += item.Number * item.RefundMoney;
}
}); });
} }
// var refundScenicPrice = this.ScenicRefundMoney * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) + // var refundScenicPrice = this.ScenicRefundMoney * (Number(this.addMsg.ManNum) + Number(this.addMsg.ChirdNum) +
...@@ -2066,9 +2078,13 @@ ...@@ -2066,9 +2078,13 @@
dandijie = this.priceObj.SingleDMCPrice * Number(this.addMsg.AirticketNum); dandijie = this.priceObj.SingleDMCPrice * Number(this.addMsg.AirticketNum);
} }
//总应收价格 //总应收价格
this.addMsg.PreferPrice = Number(dandijie) + Number(lianyun) + Number(chengren) + Number(ertong) + Number(yinger) + Number(laoren) + Number(zafeiqianzhen) + Number(danfang) + Number(ertongbed) - Number(refundScenicPrice) this.addMsg.PreferPrice = Number(dandijie) + Number(lianyun) + Number(chengren) + Number(ertong) + Number(
console.log(dandijie +'--',lianyun +'--',chengren +'--',ertong +'--',yinger +'--',laoren +'--',zafeiqianzhen +'--',danfang +'--',ertongbed +'--',refundScenicPrice) yinger) + Number(laoren) + Number(zafeiqianzhen) + Number(danfang) + Number(ertongbed) - Number(
if (this.priceObj.IsLessPrice == 1 && this.addMsg.GroupType == 1 && (this.addMsg.CustomerType == '1' || this.addMsg.CustomerType == '2') && this.priceObj.LineID > 0 && this.LessRule && this.LessRule.length > 0) { refundScenicPrice)
console.log(dandijie + '--', lianyun + '--', chengren + '--', ertong + '--', yinger + '--', laoren + '--',
zafeiqianzhen + '--', danfang + '--', ertongbed + '--', refundScenicPrice)
if (this.priceObj.IsLessPrice == 1 && this.addMsg.GroupType == 1 && (this.addMsg.CustomerType == '1' || this
.addMsg.CustomerType == '2') && this.priceObj.LineID > 0 && this.LessRule && this.LessRule.length > 0) {
let LessNum = (Number(this.addMsg.ManNum) + let LessNum = (Number(this.addMsg.ManNum) +
Number(this.addMsg.ChirdNum) + Number(this.addMsg.ChirdNum) +
Number(this.addMsg.OldPeopleNum)); Number(this.addMsg.OldPeopleNum));
...@@ -2126,10 +2142,10 @@ ...@@ -2126,10 +2142,10 @@
}, },
//清空表单信息 //清空表单信息
clearMsg() { clearMsg() {
this.DiscountAmountId = null, this.DiscountAmountId = null;
this.DiscountAmountObj = {}, this.DiscountAmountObj = {};
this.ScenicRefundList=[], this.ScenicRefundList = [];
this.addMsg.ScenicList=[]; this.addMsg.ScenicList = [];
this.addMsg = { this.addMsg = {
price: "0", price: "0",
GroupTypeNeedHouse: "0", GroupTypeNeedHouse: "0",
...@@ -2181,7 +2197,7 @@ ...@@ -2181,7 +2197,7 @@
SafeNum: "0", SafeNum: "0",
AirticketNum: "0", AirticketNum: "0",
ScenicRefundArr: [], ScenicRefundArr: [],
ScenicList:[], ScenicList: [],
GoCityTime: "", GoCityTime: "",
BackCityTime: "", BackCityTime: "",
CommissionSharePeople: "-1", CommissionSharePeople: "-1",
...@@ -2352,12 +2368,9 @@ ...@@ -2352,12 +2368,9 @@
this.DiscountAmountId = null this.DiscountAmountId = null
this.DiscountAmountObj = {} this.DiscountAmountObj = {}
this.Success(res.data.message); this.Success(res.data.message);
this.cancelSubmit();
this.$refs["addMsg"].resetFields();
this.clearMsg(); this.clearMsg();
//调用父组件方法 //调用父组件方法
this.$emit("success"); this.$emit("success");
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -2520,13 +2533,15 @@ ...@@ -2520,13 +2533,15 @@
(err) => {} (err) => {}
); );
}, },
getCustomerChildrenList(){ getCustomerChildrenList() {
this.apipost( this.apipost(
"app_today_visit_GerOrderCustomerChildrenList", {CustomerId: this.addMsg.CustomerId}, "app_today_visit_GerOrderCustomerChildrenList", {
CustomerId: this.addMsg.CustomerId
},
(res) => { (res) => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.customerChildrenList = res.data.data; this.customerChildrenList = res.data.data;
if(this.customerChildrenList && this.customerChildrenList.length>0){ if (this.customerChildrenList && this.customerChildrenList.length > 0) {
this.addMsg.CustomerChildrenId = this.customerChildrenList[0].id; this.addMsg.CustomerChildrenId = this.customerChildrenList[0].id;
} }
} }
......
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