Commit 7b4b6da2 authored by 黄奎's avatar 黄奎

页面修改

parent a6564541
......@@ -972,7 +972,8 @@
</el-input>
</td>
<td>
{{childItem.DayNum}}
<el-input v-model="childItem.DayNum" @keyup.native="checkInteger(childItem,'DayNum'),CalcFeeTotal()"
placeholder="次/N數" maxlength="1" class="w150"></el-input>
</td>
<td>
<el-input v-model="childItem.Times" @keyup.native="checkInteger(childItem,'Times'),CalcFeeTotal()"
......@@ -1285,10 +1286,10 @@
雜支
</td>
<td>
{{ZaZhiSum.USPriceSum}}
{{ZaZhiSum.USPriceSingle}}
</td>
<td>
{{ZaZhiSum.VNDPriceSum}}
{{ZaZhiSum.VNDPriceSingle}}
</td>
<td>
{{ZaZhiSum.USTotalSum}}
......@@ -1445,7 +1446,9 @@
//杂支统计
ZaZhiSum: {
USPriceSum: 0, //美金单价统计
USPriceSingle: 0, //单人美元
VNDPriceSum: 0, //越盾单价统计
VNDPriceSingle: 0, //单人越盾
USTotalSum: 0, //美金合计
VNDTotalSum: 0, //越盾合计
},
......@@ -1482,12 +1485,12 @@
var total_vnd_price = 0; //团体越盾
single_us_price = Number(this.HotelSum.USPriceSum) + Number(this.DinnerSum.USPriceSum) + Number(this.TicketSum
.USPriceSum) +
Number(this.ZaZhiSum.USPriceSum) + Number(this.ShipSum.USPriceSum) + Number(this.SelfFeeSum.USPriceSum);
Number(this.ZaZhiSum.USPriceSingle) + Number(this.ShipSum.USPriceSum) + Number(this.SelfFeeSum.USPriceSum);
single_vnd_price = Number(this.HotelSum.VNDPriceSum) + Number(this.DinnerSum.VNDPriceSum) + Number(this
.TicketSum
.VNDPriceSum) +
Number(this.ZaZhiSum.VNDPriceSum) + Number(this.ShipSum.VNDPriceSum) + Number(this.SelfFeeSum.VNDPriceSum);
Number(this.ZaZhiSum.VNDPriceSingle) + Number(this.ShipSum.VNDPriceSum) + Number(this.SelfFeeSum.VNDPriceSum);
total_us_price = Number(this.HotelSum.USTotalSum) + Number(this.DinnerSum.USTotalSum) + Number(this.TicketSum
.USTotalSum) +
......@@ -1670,6 +1673,142 @@
},
//保存数据
SaveData(type) {
//酒店默认值赋值
if (this.postData.SWTHotelList && this.postData.SWTHotelList.length > 0) {
this.postData.SWTHotelList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
})
}
//餐厅默认值赋值
if (this.postData.SWTDinnerList && this.postData.SWTDinnerList.length > 0) {
this.postData.SWTDinnerList.forEach(rootItem => {
rootItem.SubDinnerList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
})
})
}
//景点门票默认值赋值
if (this.postData.SWTTicketList && this.postData.SWTTicketList.length > 0) {
this.postData.SWTTicketList.forEach(rootItem => {
rootItem.SubTicketList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
})
})
}
//车资默认值赋值
if (this.postData.SWTBusList && this.postData.SWTBusList.length > 0) {
this.postData.SWTBusList.forEach(rootItem => {
rootItem.SubBusList.forEach(item => {
if (!item.Kilometre) {
item.Kilometre = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
if (!item.Price) {
item.Price = 0;
}
})
})
}
//船票默认值赋值
if (this.postData.SWTShipList && this.postData.SWTShipList.length > 0) {
this.postData.SWTShipList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
if (!item.FOCNum) {
item.FOCNum = 0;
}
})
}
//杂支默认值赋值
if (this.postData.SWTOtherPayList && this.postData.SWTOtherPayList.length > 0) {
this.postData.SWTOtherPayList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
if (!item.FOCNum) {
item.FOCNum = 0;
}
if (!item.DayNum) {
item.DayNum = 0;
}
})
}
//自费默认值赋值
if (this.postData.SWTSelfFeeList && this.postData.SWTSelfFeeList.length > 0) {
this.postData.SWTSelfFeeList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
if (!item.FOCNum) {
item.FOCNum = 0;
}
})
}
//小费默认值赋值
if (this.postData.SWTTipFeeList && this.postData.SWTTipFeeList.length > 0) {
this.postData.SWTTipFeeList.forEach(item => {
if (!item.USPrice) {
item.USPrice = 0;
}
if (!item.VNDPrice) {
item.VNDPrice = 0;
}
if (!item.Times) {
item.Times = 0;
}
if (!item.FOCNum) {
item.FOCNum = 0;
}
})
}
this.apipost("travel_post_SetBaoJiaDanSwtService", this.postData, res => {
if (res.data.resultCode == 1) {
this.Id = res.data.data;
......@@ -2037,7 +2176,16 @@
totalVNDPrice += parseFloat(item.VNDSubTotal);
});
this.ZaZhiSum.USPriceSum = subUSPrice.toFixed(2);
this.ZaZhiSum.VNDPriceSum = subVNDPrice.toFixed(2);
var USPrice_Single = 0;
if (this.postData.GuestNum > 0) {
USPrice_Single = parseFloat(subUSPrice) / parseFloat(this.postData.GuestNum);
}
this.ZaZhiSum.USPriceSingle = USPrice_Single.toFixed(2);
var VNDPrice_Single = 0;
if (this.postData.GuestNum > 0) {
VNDPrice_Single = parseFloat(subVNDPrice) / parseFloat(this.postData.GuestNum);
}
this.ZaZhiSum.VNDPriceSingle = VNDPrice_Single.toFixed(2);
this.ZaZhiSum.USTotalSum = totalUSPrice.toFixed(2);
this.ZaZhiSum.VNDTotalSum = totalVNDPrice.toFixed(2);
}
......
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