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

页面修改

parent 8dcf3e27
<style>
@import "../../../assets/css/newTravelManager.css";
.Audit_left{
display: -webkit-box;
-webkit-box-align: center;
align-items: center;
border-right: 1px dashed #dddddd;
}
</style>
<template>
<div class="flexOne quoTation">
......@@ -55,19 +50,19 @@
<div class="commonContent" v-loading="loading">
<ul class="_content">
<li v-for="item in dataList" :key="item.subCode" :data-id='item.ID'>
<div class="Audit_left" style="width:100px;">
<div class="_left">
<div>
<p class="quoListName" style="width:80px;">
<p class="quoListName">
<el-tooltip popper-class="max-w250" effect="dark" :content="item.ID" placement="top-start">
<span>{{item.ID}}</span>
</el-tooltip>
</p>
</div>
</div>
<div class="Audit_left">
<div class="_left">
<div>
<p class="quoListName" >
<p class="quoListName">
<el-tooltip popper-class="max-w250" effect="dark" :content="item.LineName" placement="top-start">
<span>{{item.LineName}}</span>
</el-tooltip>
......@@ -77,9 +72,9 @@
</p>
</div>
</div>
<div class="Audit_left">
<div class="_left">
<div>
<p class="quoListName" >
<p class="quoListName">
<el-tooltip popper-class="max-w250" effect="dark" :content="item.Title" placement="top-start">
<span>{{item.Title}}</span>
</el-tooltip>
......@@ -136,7 +131,7 @@
</div>
<span slot="reference" class="diPrice">{{item.SalesPrice}}<span class="qi"></span></span>
</el-popover>
</div>
</div>
<div class="_rightAudit">
......@@ -184,12 +179,12 @@
<div class="AD_Operation">
<span class="openGroup opbd">
<el-tooltip class="item" effect="dark" content="查看" placement="top-start" popper-class="max-w250">
<span @click="goUrl('QuotationDetails',item.ID,1)"></span>
<span @click="goUrl('QuotationAduit',item.ID,1)"></span>
</el-tooltip>
</span>
<span class="openGroup opbd" v-if="item.TravelState==2">
<el-tooltip class="item" effect="dark" content="审核" placement="top-start" popper-class="max-w250">
<span @click="goUrl('QuotationDetails',item.ID,2)"></span>
<span @click="goUrl('QuotationAduit',item.ID,2)"></span>
</el-tooltip>
</span>
<span class="openGroup opbd">
......@@ -465,7 +460,9 @@
name: path,
query: {
configId: configId,
Qtype: qType
Qtype: qType,
blank: 'y',
tab: '报价单审核'
}
});
} else {
......
......@@ -290,7 +290,7 @@
{{childItem.PeopleNumber}}
</td>
<td>
{{(Number(subItem.BusCostPrice)/Number(childItem.PeopleNumber)).toFixed(0)}}
{{((Number(subItem.BusCostPrice)+Number(subItem.PassFee))/Number(childItem.PeopleNumber)).toFixed(0)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
<el-input type='text' v-model="subItem.ScenicCostPrice" class="w70"
......@@ -435,7 +435,7 @@
</td>
<td>
<template v-if="CostNumberList&&CostNumberList.length>0">
{{(Number(subItem.BusCostPrice)/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
{{((Number(subItem.BusCostPrice)+Number(subItem.PassFee))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template>
</td>
<td>
......
......@@ -73,15 +73,15 @@
<tr>
<td width="80" class="txtRightCost">线路</td>
<td width="300">
{{getLineName(postConfig.LineId)}}
{{postConfig.LineName}}
</td>
<td width="60" class="txtRightCost">系列</td>
<td width="300">
{{getTeamName(postConfig.LineteamId)}}
{{postConfig.LtName}}
</td>
<td width="80" class="txtRightCost">客户名称</td>
<td>
{{postConfig.CustomerName}}
{{postConfig.CustomerName}}
</td>
</tr>
<tr>
......@@ -91,56 +91,14 @@
<tr>
<td width="80" class="txtRightCost">团队标题</td>
<td colspan="3">
{{postConfig.Title}}
{{postConfig.Title}}
</td>
<td width="80" class="txtRightCost">行程天数</td>
<td>
{{postConfig.DayNum}}
<el-input class="w120 LowNum" v-model="postConfig.NightNum" style="display:none;"
@keyup.native="checkInteger(postConfig,'NightNum')" maxlength="2">
<template slot="append"></template>
</el-input>
</td>
</tr>
</table>
<div class="seat-box" style="display:none;">
<div class="left" style="float:left;margin:6px 0 0 64px;">座位</div>
<div class="right">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item prop="YSeat">
<el-input placeholder="人数" v-model="postConfig.YSeat" maxlength="2"
@keyup.native="checkInteger(postConfig,'YSeat')">
<template slot="prepend">经济舱/上铺</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="CSeat">
<el-input placeholder="人数" v-model="postConfig.CSeat" maxlength="2"
@keyup.native="checkInteger(postConfig,'CSeat')">
<template slot="prepend">商务舱/中铺</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item prop="FSeat">
<el-input placeholder="人数" v-model="postConfig.FSeat" maxlength="2"
@keyup.native="checkInteger(postConfig,'FSeat')">
<template slot="prepend">头等舱/下铺</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item>
<el-input placeholder="人数" v-model="postConfig.LowNum" maxlength="2">
<template slot="prepend">最低成团人数</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
</div>
<br />
<table class="CostPriceTable CostNewTable">
......@@ -159,7 +117,7 @@
<tr>
<td class="CP_ComTitle2 CostcomCenter">汇率</td>
<td v-for='item in CostCurrencyList'>
{{item.ExchangeRate}}
{{item.ExchangeRate}}
</td>
<td :colspan="13-2-CostCurrencyList.length+1">
</td>
......@@ -202,17 +160,10 @@
<div style="width:100px;">{{subItem.DayNum}}</div>
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{subItem.Title}}
{{subItem.Title}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
<el-form-item>
<el-select v-model='subItem.CurrencyId' class="w70">
<el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option>
<el-option v-for="items in CostCurrencyList" :label='items.CurrencyName'
:value='items.CurrencyId' :key='items.CurrencyId'>
</el-option>
</el-select>
</el-form-item>
{{getCurrencyName(subItem.CurrencyId)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
<template v-if="subItem.ContainDinnerType==0">含餐类型</template>
......@@ -232,10 +183,10 @@
{{childItem.PeopleNumber}}
</td>
<td>
{{(Number(subItem.BusCostPrice)/Number(childItem.PeopleNumber)).toFixed(0)}}
{{((Number(subItem.BusCostPrice)+Number(subItem.PassFee))/Number(childItem.PeopleNumber)).toFixed(0)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{subItem.ScenicCostPrice}}
{{subItem.ScenicCostPrice}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{subItem.BreakfastCostPrice}}
......@@ -327,16 +278,16 @@
<div style="width:100px;">{{subItem.DayNum}}</div>
</td>
<td>
{{subItem.Title}}
{{subItem.Title}}
</td>
<td>
{{getCurrencyDetail(OtherPrice.CurrencyId)}}
{{getCurrencyName(OtherPrice.CurrencyId)}}
</td>
<td>
<template v-if="subItem.ContainDinnerType==0">含餐类型</template>
<template v-if="subItem.ContainDinnerType==1">含早餐</template>
<template v-if="subItem.ContainDinnerType==2">含晚餐</template>
<template v-if="subItem.ContainDinnerType==3">含晚餐</template>
<template v-if="subItem.ContainDinnerType==0">含餐类型</template>
<template v-if="subItem.ContainDinnerType==1">含早餐</template>
<template v-if="subItem.ContainDinnerType==2">含晚餐</template>
<template v-if="subItem.ContainDinnerType==3">含晚餐</template>
<br />
{{subItem.HotelCostPrice}}
</td>
......@@ -353,7 +304,7 @@
</td>
<td>
<template v-if="CostNumberList&&CostNumberList.length>0">
{{(Number(subItem.BusCostPrice)/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
{{((Number(subItem.BusCostPrice)+Number(subItem.PassFee))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template>
</td>
<td>
......@@ -453,15 +404,15 @@
<td class="CP_ComTitle2 CostcomCenter">1</td>
<td class="CP_ComTitle2">内陆段机位(每人)</td>
<td colspan="2">
{{getCurrencyDetail(OtherPrice.InlandAirTicketCurrency)}}
{{getCurrencyName(OtherPrice.InlandAirTicketCurrency)}}
</td>
<td colspan="2">
{{OtherPrice.InlandAirTicketMoney}}
{{OtherPrice.InlandAirTicketMoney}}
</td>
<td class="CP_ComTitle2 CostcomCenter">1</td>
<td colspan="2" class="CP_ComTitle2">签证费(每人)</td>
<td>
{{getCurrencyDetail(OtherPrice.VisaMoneyCurrencyId)}}
{{getCurrencyName(OtherPrice.VisaMoneyCurrencyId)}}
</td>
<td colspan="2">
{{OtherPrice.VisaMoney}}
......@@ -471,7 +422,7 @@
<td class="CP_ComTitle2 CostcomCenter">2</td>
<td class="CP_ComTitle2">内陆段船票(每人)</td>
<td colspan="2">
{{getCurrencyDetail(OtherPrice.InlandShipTicketCurrency)}}
{{getCurrencyName(OtherPrice.InlandShipTicketCurrency)}}
</td>
<td colspan="2">
{{OtherPrice.InlandShipTicketMoney}}
......@@ -479,7 +430,7 @@
<td class="CP_ComTitle2 CostcomCenter">2</td>
<td colspan="2" class="CP_ComTitle2">保险费(每人)</td>
<td>
{{getCurrencyDetail(OtherPrice.SafeMoneyCurrencyId)}}
{{getCurrencyName(OtherPrice.SafeMoneyCurrencyId)}}
</td>
<td colspan="2">
{{OtherPrice.SafeMoney}}
......@@ -489,7 +440,7 @@
<td class="CP_ComTitle2 CostcomCenter">3</td>
<td class="CP_ComTitle2">内陆段火车票(每人)</td>
<td colspan="2">
{{getCurrencyDetail(OtherPrice.InlandTrainTicketCurrency)}}
{{getCurrencyName(OtherPrice.InlandTrainTicketCurrency)}}
</td>
<td colspan="2">
{{OtherPrice.InlandTrainTicketMoney}}
......@@ -497,7 +448,7 @@
<td class="CP_ComTitle2 CostcomCenter">3</td>
<td colspan="2" class="CP_ComTitle2">领队小费</td>
<td>
{{getCurrencyDetail(OtherPrice.LeaderTripMoneyCurrencyId)}}
{{getCurrencyName(OtherPrice.LeaderTripMoneyCurrencyId)}}
</td>
<td colspan="2">
{{OtherPrice.LeaderTripMoney}}
......@@ -508,7 +459,7 @@
<td class="CP_ComTitle2 CostcomCenter">4</td>
<td colspan="2" class="CP_ComTitle2">司机、导游小费</td>
<td>
{{getCurrencyDetail(OtherPrice.DriverGuideMoneyCurrencyId)}}
{{getCurrencyName(OtherPrice.DriverGuideMoneyCurrencyId)}}
</td>
<td colspan="2">
{{OtherPrice.DriverGuideMoney}}
......@@ -564,30 +515,30 @@
<tr>
<td style="white-space:nowrap; " class="CP_ComTitle2" colspan="2">销售提成1%</td>
<td colspan="2">
{{OtherPrice.SalesCommissionMoney}}
{{OtherPrice.SalesCommissionMoney}}
</td>
<td class="CP_ComTitle2" colspan="2" style="display:none;">机票</td>
<td style="display:none;">
{{OtherPrice.AirTicketMoeny}}
{{OtherPrice.AirTicketMoeny}}
</td>
<td class="CP_ComTitle2" colspan="2">客人小费收入</td>
<td colspan="2">
{{OtherPrice.TripMoney}}
{{OtherPrice.TripMoney}}
</td>
<td class="CP_ComTitle2" colspan="2">KB</td>
<td colspan="3">
{{OtherPrice.KBMoney}}
{{OtherPrice.KBMoney}}
</td>
</tr>
<tr>
<td style="white-space:nowrap; " class="CP_ComTitle2" colspan="2">作业处提成</td>
<td colspan="2">
{{OtherPrice.OfficeCommissionMoney}}
{{OtherPrice.OfficeCommissionMoney}}
</td>
<td colspan="3" style="display:none;"></td>
<td class="CP_ComTitle2" colspan="2">导游人头费</td>
<td colspan="2">
{{OtherPrice.GuidePeopleMoney}}
{{OtherPrice.GuidePeopleMoney}}
</td>
<td colspan="5"></td>
</tr>
......@@ -637,23 +588,23 @@
<tr>
<td></td>
<td>
{{OtherPrice.AirTicketShareMoney}}
{{OtherPrice.AirTicketShareMoney}}
</td>
<td>
{{OtherPrice.TicketShareMoney}}
{{OtherPrice.TicketShareMoney}}
</td>
<td>
{{OtherPrice.LeaderGuideDriveZhuSu}}
{{OtherPrice.LeaderGuideDriveZhuSu}}
</td>
<td>
{{OtherPrice.SingleRoomShareMoney}}
{{OtherPrice.SingleRoomShareMoney}}
</td>
<td colspan="2">
{{OtherPrice.InlandTrafficShareMoney}}
{{OtherPrice.InlandTrafficShareMoney}}
</td>
<td colspan="2">
{{OtherPrice.OtherShareMoney}}
{{OtherPrice.OtherShareMoney}}
</td>
<td colspan="3"></td>
</tr>
......@@ -686,10 +637,10 @@
<td>{{item.PeopleNumber}}+1</td>
<td>{{item.TotalMoney}}</td>
<td colspan="2">
{{item.SalePrice}}
{{item.SalePrice}}
</td>
<td colspan="8">
{{item.CostRemark}}
{{item.CostRemark}}
</td>
</tr>
<tr>
......@@ -723,48 +674,48 @@
</tr>
<tr>
<td>
{{teamPrice.BabyPrice}}
{{teamPrice.BabyPrice}}
</td>
<td colspan="2">
{{teamPrice.SingleDMCPrice}}
{{teamPrice.SingleDMCPrice}}
</td>
<td colspan="2">
{{teamPrice.ChildNeedPrice}}
{{teamPrice.ChildNeedPrice}}
</td>
<td colspan="2">
{{teamPrice.ChildNoNeedPrice}}
{{teamPrice.ChildNoNeedPrice}}
</td>
<td>
{{teamPrice.BabyChargePrice}}
{{teamPrice.BabyChargePrice}}
</td>
<td>
{{teamPrice.OldManChargePrice}}
{{teamPrice.OldManChargePrice}}
</td>
<td>
{{teamPrice.VisaPrice}}
{{teamPrice.VisaPrice}}
</td>
<td colspan="2">
{{teamPrice.SingleRoomPrice}}
{{teamPrice.SingleRoomPrice}}
</td>
</tr>
<tr>
<td class="CP_ComTitle2">备注</td>
<td colspan="12">
{{OtherPrice.OtherRemark}}
{{OtherPrice.OtherRemark}}
</td>
</tr>
<tr>
<td class="CP_ComTitle2">备注</td>
<td colspan="12">
<el-input type="textarea"></el-input>
<el-input type="textarea"></el-input>
</td>
</tr>
<tr>
<td colspan="13" style="text-align:center;">
<input type="button" class="normalBtn" value="同意"/>
<input type="button" class="normalBtn" value="拒绝"/>
</td>
<td colspan="13" style="text-align:center;">
<input type="button" class="normalBtn" value="同意" />
<input type="button" class="normalBtn" value="拒绝" />
</td>
</tr>
</table>
......@@ -780,39 +731,13 @@
],
data() {
return {
//下拉框默认值
defaultSelect: 0,
queryMsg: {
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
},
//币种下拉
currencyType: "",
checkedPei: [],
currencyTypeArr: [], //币种下拉列表
LineTeamList: [], //系列下拉列表
//审核信息
AduitMsg: {
}
}
},
methods: {
//含餐类型切换
DinnerTypeChange(subItem) {
switch (subItem.ContainDinnerType) {
//含早餐
case 1:
subItem.BreakfastCostPrice = 0;
break;
//含晚餐
case 2:
subItem.DinnerCostPrice = 0;
break;
case 3:
subItem.BreakfastCostPrice = 0;
subItem.DinnerCostPrice = 0;
break;
}
},
//交通部分小计
trafficXiaoJi(currencyType) {
var trafficTotal = 0;
......@@ -898,7 +823,6 @@
}
return zazhiTotal.toFixed(0);
},
//每天小计
getDayXiaoJi(type, currencyType) {
var xiaoJi = 0;
......@@ -958,30 +882,6 @@
});
return CurrencyName;
},
//判断币种是否相等
checkExists(CurrencyId) {
var flag = false;
this.CurrencyNumberListExt.forEach(item => {
if (!flag && item.Key == CurrencyId) {
flag = true;
}
});
return flag;
},
//获取不同人数组合价
getCurrencyNumberTotalMoney(peopleNumber) {
let totalMoney = 0.0;
this.CurrencyNumberListExt.forEach(x => {
x.currencyNumberList.forEach(y => {
// if (peopleNumber === y.PeopleNumber) {
// totalMoney +=
// this.getConvertMoney(y.Money) *
// this.getCurrencyMoney(y.CurrencyId);
// }
});
});
return totalMoney;
},
//获取主成本价
getCostTotalMoney() {
let totalMoney =
......@@ -1011,205 +911,8 @@
this.OtherPrice.VisaMoneyCurrencyId
);
//KBMoney[团负费用减法]
// this.getConvertMoney(this.OtherPrice.AirTicketMoeny) +
return totalMoney;
},
//获取系列列表
getLineTeamList(lineId, isClear) {
if (isClear && isClear == 1) {
this.postConfig.LineteamId = 0;
}
let msg = {
lineID: lineId,
isTOOP: 1
};
var that = this;
//获取当前选中的对象
let obj = {};
obj = that.LineList.find(item => {
return item.LineID === lineId;
});
this.apipost("team_post_GetList", msg, res => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
}
});
},
//生成行程报价
createDayTripPrice() {
if (this.postConfig.DayNum > this.dayCostPrice.length) {
for (var i = this.dayCostPrice.length; i < this.postConfig.DayNum; i++) {
//去掉以前默认的交通
var dayItem = {
Id: 0, //主键编号
OfferId: 0, //报价单编号
ConfigId: 0, //配置编号
Title: "", //行程大点
DayNum: i + 1, //行程天数
CurrencyId: 0, //币种
HotelCostPrice: 0, //酒店报价
BusCostPrice: 0, //车辆报价
ScenicCostPrice: 0, //景点报价
BreakfastCostPrice: 0, //早餐报价
LunchCostPrice: 0, //午餐报价
DinnerCostPrice: 0, //晚餐报价
ContainDinnerType: 0, //含餐类型(1-含早餐,2-含晚餐,3-含早晚)
PassFee:0,//过路费
};
this.dayCostPrice.push(dayItem);
}
} else {
//删除多余的项
for (var i = this.postConfig.DayNum; i < this.dayCostPrice.length; i++) {
this.dayCostPrice.splice(i, 1);
}
this.dayCostPrice.length = this.postConfig.DayNum;
}
},
//获取币种对应 的人数报价
getCurrencyNumberList(CurrencyId) {
let currencyNumberList = [];
let flag = false;
this.CurrencyNumberListExt.forEach(item => {
if (!flag && item.Key == CurrencyId) {
flag = true;
currencyNumberList = item.currencyNumberList;
}
});
return currencyNumberList;
},
//添加币种
addCurrency() {
var currencyId = this.currencyType;
var ckedName;
var ckedRate = this.queryMsg.RateInput;
if (currencyId == "") {
this.Info("请选择币种");
return;
}
if (ckedRate == "") {
this.Info("请输入汇率");
return;
}
this.currencyTypeArr.forEach(x => {
if (currencyId == x.ID) {
ckedName = x.Name;
}
});
if (
this.$tripUtils.isInObjArr(
this.CostCurrencyList,
"CurrencyId",
currencyId
)
) {
this.Info("币种已经存在");
return;
}
var CurObj = this.$tripUtils.CostCurrency();
CurObj.CurrencyName = ckedName;
CurObj.ExchangeRate = ckedRate;
CurObj.CurrencyId = currencyId;
this.CostCurrencyList.push(CurObj);
this.currencyType = "";
this.queryMsg.RateInput = "";
let currencyNumberItem = {
Key: currencyId,
currencyNumberList: []
};
if (this.CurrencyNumberListExt.length > 0) {
if (
this.CurrencyNumberListExt[0].currencyNumberList
.length > 0
) {
this.CurrencyNumberListExt[0].currencyNumberList.forEach(
x => {
let tempData = JSON.parse(JSON.stringify(x));
tempData.CurrencyId = currencyId;
tempData.Money = 0.0;
currencyNumberItem.currencyNumberList.push(tempData);
}
);
}
}
this.CurrencyNumberListExt.push(currencyNumberItem);
},
//添加人数费用
addPeoNunber() {
var PeopleNumber = this.queryMsg.PeopleNumber;
if (PeopleNumber == "") {
this.Info("请输入人数");
return;
}
if (
this.$tripUtils.isInObjArr(
this.CostNumberList,
"PeopleNumber",
PeopleNumber
)
) {
this.Info("人数已经存在");
return;
}
var CostNumberObj = this.$tripUtils.CostNumber();
CostNumberObj.PeopleNumber = PeopleNumber;
this.CostNumberList.push(CostNumberObj);
this.CurrencyNumberListExt.forEach(x => {
var CurrencyNumberObj = this.$tripUtils.CurrencyNumber();
CurrencyNumberObj.CurrencyId = x.Key;
CurrencyNumberObj.PeopleNumber = PeopleNumber;
x.currencyNumberList.push(CurrencyNumberObj);
});
this.queryMsg.PeopleNumber = "";
this.queryMsg.Money = "";
this.shortPeopleNumber();
},
//删除币种
DeleteCurrency(index) {
this.CostCurrencyList.splice(index, 1);
},
//删除人数
DeletePNumber(index) {
this.CostNumberList.splice(index, 1);
},
//人数排序
shortPeopleNumber() {
this.CurrencyNumberListExt.forEach(x => {
x.currencyNumberList.sort(
this.$commonUtils.createComprisonFunction("PeopleNumber")
);
});
this.CostNumberList.sort(
this.$commonUtils.createComprisonFunction("PeopleNumber")
);
},
//币种下拉获取汇率
getRate(ID) {
this.currencyTypeArr.forEach(x => {
if (x.ID == ID) {
this.queryMsg.RateInput = x.CurrentRate;
}
});
},
//获取所有币种
getAllCurrency() {
this.apipost(
"financeinfo_post_GetList", {},
res => {
if (res.data.resultCode == 1) {
this.currencyTypeArr = res.data.data;
this.currencyTypeArr.forEach(item => {
if (item.ID == 3) {
//徐总说日元默认加0.002
item.CurrentRate = Number(item.CurrentRate) + Number(0.002);
}
});
}
},
err => {}
);
},
//计算总价
getSubtotalMoney() {
let that = this;
......@@ -1219,20 +922,16 @@
that.getConvertMoney(x.TicketMoney) +
that.getConvertMoney(x.SingleRoomMoney) +
that.getConvertMoney(x.InlandTrafficMoney) +
that.getConvertMoney(x.OtherMoney)+
that.getConvertMoney(x.OtherMoney) +
that.getConvertMoney(x.LeaderGuideDriveZhuSu)
).toFixed(0);
//房餐车景点价格
var trip = Number(that.getLocalTotalMoney(x.PeopleNumber));
console.log("trip",trip);
//其他价格
var otherPrice = Number(that.getCostTotalMoney())
console.log("otherPrice",otherPrice)
x.TotalMoney = (trip + otherPrice +
Number(that.getConvertMoney(x.SubtotalMoney))
).toFixed(0);
// + that.getCurrencyNumberTotalMoney(x.PeopleNumber)
});
},
//价格转换器
......@@ -1245,14 +944,13 @@
//获取地接项目报价
getLocalTotalMoney(PeopleNumber) {
let totalMoney = 0.0;
totalMoney = Number(this.getDayXiaoJi(1, 2))
+ Number(this.getDayXiaoJi(3, 2))
+ Number(this.getDayXiaoJi(4, 2))
+ Number(this.getDayXiaoJi(5, 2))
+ Number(this.getDayXiaoJi(6, 2))
+ Number(this.getDayXiaoJi(2, 2))/ Number(PeopleNumber)
+ Number(this.getDayXiaoJi(7, 2))/ Number(PeopleNumber)
;
totalMoney = Number(this.getDayXiaoJi(1, 2)) +
Number(this.getDayXiaoJi(3, 2)) +
Number(this.getDayXiaoJi(4, 2)) +
Number(this.getDayXiaoJi(5, 2)) +
Number(this.getDayXiaoJi(6, 2)) +
Number(this.getDayXiaoJi(2, 2)) / Number(PeopleNumber) +
Number(this.getDayXiaoJi(7, 2)) / Number(PeopleNumber);
return totalMoney.toFixed(0);
},
//计算领队分摊
......@@ -1264,74 +962,29 @@
var InlandTrafficShareMoney = this.OtherPrice.InlandTrafficShareMoney;
var OtherShareMoney = this.OtherPrice.OtherShareMoney;
//司机导游住宿
var LeaderGuideDriveZhuSu=this.OtherPrice.LeaderGuideDriveZhuSu;
var LeaderGuideDriveZhuSu = this.OtherPrice.LeaderGuideDriveZhuSu;
this.CostNumberList.forEach(x => {
x.AirTicketMoney = (AirTicketShareMoney / x.PeopleNumber).toFixed(0);
x.TicketMoney = (TicketShareMoney / x.PeopleNumber).toFixed(0);
x.SingleRoomMoney = (SingleRoomShareMoney / x.PeopleNumber).toFixed(0);
x.InlandTrafficMoney = (InlandTrafficShareMoney / x.PeopleNumber).toFixed(0);
x.OtherMoney = (OtherShareMoney / x.PeopleNumber).toFixed(0);
x.LeaderGuideDriveZhuSu=(LeaderGuideDriveZhuSu / x.PeopleNumber).toFixed(0);
x.LeaderGuideDriveZhuSu = (LeaderGuideDriveZhuSu / x.PeopleNumber).toFixed(0);
});
},
getchange() {
this.getLeaderShare();
this.getSubtotalMoney();
},
//遍历显示下拉框
getCurrencyDetail(id){
var str = '';
this.CostCurrencyList.forEach(x=>{
if(id==x.CurrencyId){
str=x.CurrencyName;
}
})
if(id==0){
str='不限'
}
return str;
},
//遍历显示线路名
getLineName(id){
var str = '';
this.LineList.forEach(x=>{
if(id==x.LineID){
str=x.LineName;
}
})
if(id==0){
str='不限'
}
return str;
},
//获取系列名
getTeamName(id){
var str = '';
this.LineTeamList.forEach(x=>{
if(id==x.LtID){
str=x.LtName;
}
})
if(id==0){
str='不限'
}
return str;
}
},
mounted() {
this.getSubtotalMoney();
this.getAllCurrency();
},
created() {
console.log("CostCurrencyList", this.CostCurrencyList);
console.log("Post", this.postConfig)
},
watch: {
postConfig: {
handler: function (val, oldVal) {
this.getLineTeamList(this.postConfig.LineId);
},
deep: true
},
CostNumberList: {
handler: function (val, oldVal) {
this.getchange()
......@@ -1340,5 +993,4 @@
},
},
};
</script>
</script>
\ No newline at end of file
......@@ -10,9 +10,9 @@
</style>
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<div class="singlePrice clearfix">
<div class="singlePrice clearfix" v-show="IsShow">
<CostNewPriceAudit ref="CostNewPrice" :postConfig="postData" :OtherPrice="otherPrice"
:dayCostPrice="dayCostPriceList" :LineList="LineList" :CostCurrencyList="CostCurrencyList"
:dayCostPrice="dayCostPriceList" :CostCurrencyList="CostCurrencyList"
:CostNumberList="CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"
:teamPrice="teamPrice"
></CostNewPriceAudit>
......@@ -37,6 +37,7 @@
data() {
return {
ConfigID: 0,
IsShow:false,
//基本配置
postData: {
ID: 0,
......@@ -66,7 +67,9 @@
StartCityId: 0,
ReturnArriveCityId: 0, //返回抵达城市
CustomerName: "", //客户名称
TeamType: 0, //团队类型
TeamType: 0, //团队类型,
LineName:"",//线路名称
LtName:"",//系列名称
},
dayCostPriceList: [], //报价列表
isSubmit: true,
......@@ -146,41 +149,29 @@
},
//保存数据
SaveData() {
var currencyNumList = [];
if (this.CurrencyNumberListExt != null && this.CurrencyNumberListExt.length > 0) {
this.CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
});
});
}
var nObj = {
config: this.postData,
dayCostPriceList: this.dayCostPriceList,
otherPrice: this.otherPrice,
teamPrice: this.teamPrice,
CostCurrencyList: this.CostCurrencyList,
CostNumberList: this.CostNumberList,
CurrencyNumberListExt: currencyNumList
};
this.loading = true;
this.apipost(
"travel_post_SetConfigOffer_V2", nObj,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
if (this.postData.TeamType == 1) {
this.goUrl('newQuotation2');
} else {
this.goUrl('newQuotation');
}
} else {
this.Error(res.data.message);
}
},
err => {}
);
// this.loading = true;
// this.apipost(
// "travel_post_SetConfigOffer_V2", nObj,
// res => {
// this.loading = false;
// if (res.data.resultCode == 1) {
// this.Success(res.data.message);
// if (this.postData.TeamType == 1) {
// this.goUrl('newQuotation2');
// } else {
// this.goUrl('newQuotation');
// }
// } else {
// this.Error(res.data.message);
// }
// },
// err => {}
// );
},
goUrl(path) {
this.$router.push({
......@@ -200,13 +191,14 @@
ID: configId,
offerId: offerId
};
this.apipost(
"travel_get_GetMyTravelInfo_V2",
msg,
res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
console.log("tempData", tempData);
console.log("tempData1", tempData);
if (tempData.ID && tempData.ID > 0) {
this.postData.ID = tempData.ID;
}
......@@ -238,6 +230,8 @@
this.postData.NightNum = tempData.NightNum;
}
this.postData.CustomerName = tempData.CustomerName;
this.postData.LineName=tempData.LineName;
this.postData.LtName=tempData.LtName;
this.LineList = tempData.LineList;
if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
0) {
......@@ -260,18 +254,7 @@
.CurrencyNumberListExt.length > 0) {
this.CurrencyNumberListExt = tempData.CurrencyNumberListExt;
}
if (this.CostCurrencyList && this.CostCurrencyList.length > 0 &&
this.CurrencyNumberListExt) {
this.CostCurrencyList.forEach(item => {
let currencyNumberItem = {
Key: item.CurrencyId,
currencyNumberList: []
};
if (this.CurrencyNumberListExt.length == 0) {
this.CurrencyNumberListExt.push(currencyNumberItem);
}
});
}
this.IsShow=true;
} else {
this.Error(res.data.message);
}
......
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