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

页面修改

parent 7d3c7788
<template> <template>
<div v-if="isShow" class="DirectQuotation clearfix"> <div v-if="isShow" class="DirectQuotation clearfix">
<DirectQuotation ref="QuotationPrice" :postConfig="postData" :dayCostPrice="dayCostPriceList"></DirectQuotation> <DirectQuotation ref="QuotationPrice" :postConfig="postData" :dayCostPrice="dayCostPriceList"
:otherPrice="otherPrice"></DirectQuotation>
<div class="btnFixedDiv"> <div class="btnFixedDiv">
<div class="toTop" @click="backTop"> <div class="toTop" @click="backTop">
<i class="iconfont icon-huidaodingbu"></i> <i class="iconfont icon-huidaodingbu"></i>
</div> </div>
<div class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="submitForm(2)">提交</div> <div class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="SaveData(2)">提交</div>
<div class="DTSaveBtn" @click="copyQuotationData" style="display:none;">复制</div> <div class="DTSaveBtn" @click="copyQuotationData" style="display:none;">复制</div>
<div class="DTSaveBtn caogao" :class="{'disClick':!isSubmit}" @click="submitForm(1)"> <div class="DTSaveBtn caogao" :class="{'disClick':!isSubmit}" @click="SaveData(1)">
<span>保存</span> <span>保存</span>
<span>草稿</span> <span>草稿</span>
</div> </div>
...@@ -15,9 +16,9 @@ ...@@ -15,9 +16,9 @@
</div> </div>
</template> </template>
<script> <script>
import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation"; import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation";
export default { export default {
data() { data() {
return { return {
//基本配置 //基本配置
...@@ -27,10 +28,10 @@ export default { ...@@ -27,10 +28,10 @@ export default {
LineId: 0, LineId: 0,
LineteamId: 0, LineteamId: 0,
Title: "", Title: "",
IsOrder:0, IsOrder: 0,
IsSubstitution:0, IsSubstitution: 0,
IsB2B:0, IsB2B: 0,
IsB2C:0, IsB2C: 0,
FSeat: "", FSeat: "",
CSeat: "", CSeat: "",
YSeat: "", YSeat: "",
...@@ -49,8 +50,33 @@ export default { ...@@ -49,8 +50,33 @@ export default {
StartCityId: 0, StartCityId: 0,
ReturnArriveCityId: 0, //返回抵达城市 ReturnArriveCityId: 0, //返回抵达城市
}, },
dayCostPriceList:[],//报价列表 dayCostPriceList: [], //报价列表
otherPrice: {
CostId: 0, //主键编号
ConfigID: 0, //配置编号
OfferId: 0, //报价单编号
InlandAirTicketCurrency: 0, //内陆段机位币种
InlandAirTicketMoney: 0, //内陆段机位金额(每人)
InlandShipTicketCurrency: 0, //内陆段船票币种
InlandShipTicketMoney: 0, //内陆段船票金额(每人)
InlandTrainTicketCurrency: 0, //内陆段火车币种
InlandTrainTicketMoney: 0, //内陆段火车金额(每人)
VisaMoney: 0, //签证费用(每人)
SafeMoney: 0, //保险费用(每人)
LeaderTripMoney: 0, //领队小费
DriverGuideMoney: 0, //司机导游小费
SalesCommissionMoney: 0, //销售提成
OfficeCommissionMoney: 0, //作业处提成
TripMoney: 0, //小费
GuidePeopleMoney: 0, //导游人头费
AirTicketMoeny: 0, //机票成本费用
KBMoney: 0, //KB人头费
AirTicketShareMoney: 0, //机票分摊费用
TicketShareMoney: 0, //门票分摊费用,
SingleRoomShareMoney: 0, //单房差分摊费用
InlandTrafficShareMoney: 0, //内陆段交通分摊费用
OtherShareMoney: 0, //杂费分摊费用
},
}; };
}, },
methods: { methods: {
...@@ -58,100 +84,27 @@ export default { ...@@ -58,100 +84,27 @@ export default {
submitForm(type) { submitForm(type) {
this.$refs["QuotationPrice"].submitForm(type); this.$refs["QuotationPrice"].submitForm(type);
}, },
changeDirect(value) { //保存数据
this.priceIsDirect = value; SaveData() {
this.postData.PriceIsDirect = value; this.apipost(
this.isSubmit = true; "travel_post_SetConfigOffer_V2", {
if (this.postData.IsDirect == 1) { config: postData,
this.changeTeamLocalOfferValue(); dayCostPriceList: dayCostPriceList,
} otherPrice: otherPrice
}, },
updateSubmitState(state) { res => {
this.isSubmit = state; console.log(res.data);
if (res.data.resultCode == 1) {}
}, },
changeTeamLocalOfferValue() { err => {}
this.postData.PriceList.forEach(y => {
let localOfferList = JSON.parse(
JSON.stringify(y.OfferPrice.FullLocalOfferList)
); );
y.OfferPrice.LocalOfferList = localOfferList;
});
},
//回到顶部
backTop() {
var timer = setInterval(function() {
var scrollTop = document.getElementsByClassName("flexParent")[0]
.scrollTop;
var ispeed = Math.floor(-scrollTop / 6);
if (scrollTop == 0) {
clearInterval(timer);
}
document.getElementsByClassName("flexParent")[0].scrollTop =
scrollTop + ispeed;
}, 30);
},
//获取行程信息
getConfigDayTrip(subConfig) {
var TrafficList = [];
var ScenicList = [];
var HotelList = [];
var DinnerList = [];
var FreedomList = [];
var WarmTipList = [];
var TitleList = [];
subConfig.DayList.forEach((item, dayIndex) => {
var rank = 1;
if (item.dayArray != null && item.dayArray.length > 0) {
item.dayArray.forEach(subItem => {
subItem.childItem.Rank = rank;
subItem.childItem.dayNum = item.dayNum;
subItem.Type = subItem.Type.toString();
switch (subItem.Type) {
case this.$tripUtils.TypeKey.traffic:
TrafficList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.scenic:
ScenicList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.hotel:
HotelList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.dinner:
DinnerList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.freedom:
FreedomList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.warmtip:
WarmTipList.push(subItem.childItem);
break;
case this.$tripUtils.TypeKey.title:
TitleList.push(subItem.childItem);
break;
}
rank++;
});
}
});
var obj = {
DinnerList: DinnerList,
FreedomList: FreedomList,
HotelList: HotelList,
ScenicList: ScenicList,
TrafficList: TrafficList,
WarmTipList: WarmTipList,
TitleList: TitleList
};
return obj;
},
//复制信息
copyQuotationData() {
this.$refs.QuotationPrice.copyInfo();
}, },
getPostData() { getPostData() {
let configId = this.$route.query.configId; let configId = this.$route.query.configId;
if (configId > 0) { if (configId > 0) {
let msg = { ID: configId }; let msg = {
ID: configId
};
this.apipost( this.apipost(
"travel_get_GetMyTravelInfo", "travel_get_GetMyTravelInfo",
msg, msg,
...@@ -184,8 +137,13 @@ export default { ...@@ -184,8 +137,13 @@ export default {
err => {} err => {}
); );
} else { } else {
let params = { isNoOffer: false }; let params = {
this.$router.push({ name: "quoTation", params: params }); isNoOffer: false
};
this.$router.push({
name: "quoTation",
params: params
});
} }
} }
}, },
...@@ -195,5 +153,6 @@ export default { ...@@ -195,5 +153,6 @@ export default {
components: { components: {
DirectQuotation: DirectQuotation DirectQuotation: DirectQuotation
} }
}; };
</script> </script>
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