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