Commit 4b8a3882 authored by youjie's avatar youjie
parents f8d2996f cf28cb25
......@@ -347,7 +347,6 @@
<!-- <template v-if="CostNumberList&&CostNumberList.length>0">
{{( (Number(getDayXiaoJi(2,2))+Number(getDayXiaoJi(7,2)))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template> -->
<div>测试</div>
</td>
<td>
{{getDayXiaoJi(3,2)}}
......
......@@ -228,6 +228,11 @@
this.postData.OfferPayType = tempData.OfferPayType;
this.postData.SaleOfferPayType=tempData.SaleOfferPayType;
this.LineList = tempData.LineList;
this.postData.LineName = tempData.LineName
this.postData.LtName = tempData.LtName
this.postData.LtName = tempData.LtName
this.postData.OutBranchName = tempData.OutBranchName
this.postData.TeamTypeName = tempData.TeamTypeName
if(tempData.OfferArray) {
console.log('getData', tempData.OfferArray)
tempData.OfferArray.forEach(item => {
......
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<DirectQuotation v-if="haveData" ref="QuotationPrice" :OfferArray="OfferArray" :postConfig="postData" :dayCostPrice="dayCostPriceList"
:otherPrice="otherPrice" :teamPrice="teamPrice" :LineList="LineList" :CostCurrencyList="CostCurrencyList"
:CostNumberList="CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"></DirectQuotation>
<DirectQuotation v-if="haveData" ref="QuotationPrice" :OfferArray="OfferArray" :postConfig="postData"
:dayCostPrice="dayCostPriceList" :otherPrice="otherPrice" :teamPrice="teamPrice" :LineList="LineList"
:CostCurrencyList="CostCurrencyList" :CostNumberList="CostNumberList"
:CurrencyNumberListExt="CurrencyNumberListExt"></DirectQuotation>
<div class="btnFixedDiv">
<div class="toTop">
<i class="iconfont icon-huidaodingbu"></i>
......@@ -17,9 +18,7 @@
</div>
</template>
<script>
import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation";
export default {
data() {
return {
......@@ -60,7 +59,7 @@
OutBranchId: -1, //出团公司
OutDateTime: "", //出发时间
OfferPayType: 0, //报价单付款方式
SaleOfferPayType:0,//售价付款方式
SaleOfferPayType: 0, //售价付款方式
},
dayCostPriceList: [], //报价列表
isSubmit: true,
......@@ -149,41 +148,29 @@
SaveData(type) {
const data = this.$refs["QuotationPrice"].getData()
function getCostCurrency(CurrencyNumberListExt) {
var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
});
});
});
}
return currencyNumList
}
return currencyNumList
}
this.postData.TravelState = this.postData.TravelState || type;
// var nObj = {
// config: this.postData,
// dayCostPriceList: this.dayCostPriceList,
// otherPrice: this.otherPrice,
// teamPrice: this.teamPrice,
// CostCurrencyList: this.CostCurrencyList,
// CostNumberList: this.CostNumberList,
// CurrencyNumberListExt: currencyNumList
// };
this.postData.TravelState = type;
data.forEach(item => {
item.IsDefault = item.queryMsg.IsDefault ? 1 : 0
item.otherPrice = item.OtherPrice
item.dayCostPriceList = item.dayCostPrice
item.CurrencyNumberListExt = getCostCurrency(item.CurrencyNumberListExt)
item.currencyNumberList = item.CostCurrencyList
item.OtherPrice.CurrencyNumberList = item.CostCurrencyList
item.OtherPrice.CurrencyNumberList = item.CostCurrencyList
})
var nObj = {
config: this.postData,
OfferArray: data
}
console.log('保存数据',data)
// return 0;
this.loading = true;
this.apipost(
"travel_post_SetConfigOffer_V3", nObj,
......@@ -224,7 +211,7 @@
IsDefault: 1,
};
this.apipost(
"travel_get_GetMyTravelInfo_V3", // travel_get_GetMyTravelInfo_V2
"travel_get_GetMyTravelInfo_V3",
msg,
res => {
if (res.data.resultCode == 1) {
......@@ -263,51 +250,16 @@
this.postData.OutBranchId = tempData.OutBranchId;
this.postData.OutDateTime = tempData.OutDateTime;
this.postData.OfferPayType = tempData.OfferPayType;
this.postData.SaleOfferPayType=tempData.SaleOfferPayType;
this.postData.SaleOfferPayType = tempData.SaleOfferPayType;
this.postData.TravelState = tempData.TravelState;
this.LineList = tempData.LineList;
if(tempData.OfferArray) {
console.log('getData', tempData.OfferArray)
if (tempData.OfferArray) {
tempData.OfferArray.forEach(item => {
this.OfferArray.push(item)
})
// this.OfferArray = tempData.OfferArray
}
// if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
// 0) {
// this.dayCostPriceList = tempData.dayCostPriceList;
// }
// if (tempData.otherPrice) {
// this.otherPrice = tempData.otherPrice;
// }
// if (tempData.teamPrice) {
// this.teamPrice = tempData.teamPrice;
// }
// if (tempData.CostNumberList && tempData.CostNumberList != null && tempData.CostNumberList.length > 0) {
// this.CostNumberList = tempData.CostNumberList;
// }
// if (tempData.CostCurrencyList && tempData.CostCurrencyList != null && tempData.CostCurrencyList.length >
// 0) {
// this.CostCurrencyList = tempData.CostCurrencyList;
// }
// if (tempData.CurrencyNumberListExt && tempData.CurrencyNumberListExt != null && tempData
// .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.haveData = true;
this.haveData = true;
} else {
this.Error(res.data.message);
}
......@@ -326,5 +278,4 @@
DirectQuotation: DirectQuotation
}
};
</script>
</script>
\ No newline at end of file
......@@ -114,7 +114,7 @@
<div class="switchDiv clearfix" style="width:98%;">
<div class="DirectPriceCenter">
<div class="singlePrice clearfix">
<CostNewPrice ref="CostNewPrice" :postConfig="postData" :OtherPrice="otherPrice"
<CostNewPrice ref="CostNewPrice" :postConfig="postData" :OtherPrice="OtherPrice"
:dayCostPrice="dayCostPriceList" :LineList="LineList" :CostCurrencyList="CostCurrencyList"
:CostNumberList="CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"
:teamPrice="teamPrice"
......@@ -288,7 +288,7 @@
},
dayCostPriceList: [], //报价列表
isSubmit: true,
otherPrice: {
OtherPrice: {
CostId: 0, //主键编号
ConfigID: 0, //配置编号
OfferId: 0, //报价单编号
......@@ -376,7 +376,7 @@
offerId: offerId
};
this.apipost(
"travel_get_GetMyTravelInfo_V2",
"travel_get_GetMyTravelInfo_V3",
msg,
res => {
if (res.data.resultCode == 1) {
......@@ -417,40 +417,49 @@
this.postData.OfferPayType = tempData.OfferPayType;
this.postData.SaleOfferPayType=tempData.SaleOfferPayType;
this.LineList = tempData.LineList;
if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
0) {
this.dayCostPriceList = tempData.dayCostPriceList;
if(tempData.OfferArray) {
this.currentData = tempData.OfferArray.find(item => item.IsDefault)
this.OtherPrice = this.currentData.otherPrice
this.dayCostPriceList = this.currentData.dayCostPriceList
this.CostCurrencyList = this.currentData.CostCurrencyList
this.CostNumberList = this.currentData.CostNumberList
this.queryMsg = this.currentData.queryMsg
this.teamPrice = this.currentData.teamPrice
}
// if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
// 0) {
// this.dayCostPriceList = tempData.dayCostPriceList;
// }
if (tempData.otherPrice) {
this.otherPrice = tempData.otherPrice;
}
if (tempData.teamPrice) {
this.teamPrice = tempData.teamPrice;
}
if (tempData.CostNumberList && tempData.CostNumberList != null && tempData.CostNumberList.length > 0) {
this.CostNumberList = tempData.CostNumberList;
}
if (tempData.CostCurrencyList && tempData.CostCurrencyList != null && tempData.CostCurrencyList.length >
0) {
this.CostCurrencyList = tempData.CostCurrencyList;
}
if (tempData.CurrencyNumberListExt && tempData.CurrencyNumberListExt != null && tempData
.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);
}
});
}
// if (tempData.otherPrice) {
// this.otherPrice = tempData.otherPrice;
// }
// if (tempData.teamPrice) {
// this.teamPrice = tempData.teamPrice;
// }
// if (tempData.CostNumberList && tempData.CostNumberList != null && tempData.CostNumberList.length > 0) {
// this.CostNumberList = tempData.CostNumberList;
// }
// if (tempData.CostCurrencyList && tempData.CostCurrencyList != null && tempData.CostCurrencyList.length >
// 0) {
// this.CostCurrencyList = tempData.CostCurrencyList;
// }
// if (tempData.CurrencyNumberListExt && tempData.CurrencyNumberListExt != null && tempData
// .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);
// }
// });
// }
} 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