Commit bb2ce689 authored by 黄奎's avatar 黄奎

报价单页面修改

parent aa1afbb2
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<table class="CP_comTable"> <table class="CP_comTable">
<tr> <tr>
<td class="CP_comBack" width="170">币种</td> <td class="CP_comBack" width="170">币种</td>
<td v-for='(item,index) in OtherPrice.CostCurrencyList'> <td v-for='(item,index) in CostCurrencyList'>
{{item.CurrencyName}} {{item.CurrencyName}}
<span> <span>
<i class="iconfont icon-quxiao" @click="DeleteCurrency(index)"></i> <i class="iconfont icon-quxiao" @click="DeleteCurrency(index)"></i>
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
</tr> </tr>
<tr> <tr>
<td class="CP_comBack">汇率</td> <td class="CP_comBack">汇率</td>
<td v-for='item in OtherPrice.CostCurrencyList'> <td v-for='item in CostCurrencyList'>
<el-input class="w80" v-model='item.ExchangeRate' @keyup.native="checkRate(item,'ExchangeRate')"> <el-input class="w80" v-model='item.ExchangeRate' @keyup.native="checkRate(item,'ExchangeRate')">
</el-input> </el-input>
</td> </td>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<table class="CP_comTable"> <table class="CP_comTable">
<tr> <tr>
<td class="CP_comBack" width="170">人数</td> <td class="CP_comBack" width="170">人数</td>
<td v-for="(item,index) in OtherPrice.CostNumberList" :key='item.subCode'> <td v-for="(item,index) in CostNumberList" :key='item.subCode'>
<el-input class="w80" v-model='item.PeopleNumber' @keyup.native="checkInteger(item,'PeopleNumber')"> <el-input class="w80" v-model='item.PeopleNumber' @keyup.native="checkInteger(item,'PeopleNumber')">
</el-input> </el-input>
<span> <span>
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
</div> </div>
</td> </td>
</tr> </tr>
<tr v-for="item in OtherPrice.CostCurrencyList"> <tr v-for="item in CostCurrencyList">
<td class="CP_comBack">地接报价({{item.CurrencyName}})</td> <td class="CP_comBack">地接报价({{item.CurrencyName}})</td>
<td v-if="checkExists(item.CurrencyId)" v-for="childItem in getCurrencyNumberList(item.CurrencyId)"> <td v-if="checkExists(item.CurrencyId)" v-for="childItem in getCurrencyNumberList(item.CurrencyId)">
<el-form-item> <el-form-item>
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
<el-form-item> <el-form-item>
<el-select v-model='subItem.CurrencyId'> <el-select v-model='subItem.CurrencyId'>
<el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option>
<el-option v-for="items in OtherPrice.CostCurrencyList" :label='items.CurrencyName' <el-option v-for="items in CostCurrencyList" :label='items.CurrencyName' :value='items.CurrencyId'
:value='items.CurrencyId' :key='items.CurrencyId'> :key='items.CurrencyId'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -236,12 +236,12 @@ ...@@ -236,12 +236,12 @@
<td width='200'>内陆段机位(每人)</td> <td width='200'>内陆段机位(每人)</td>
<td width='200'> <td width='200'>
<el-form-item> <el-form-item>
<!-- <el-select v-model='OfferCostPriceObj.InlandAirTicketCurrency'> <el-select v-model='OtherPrice.InlandAirTicketCurrency'>
<el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option>
<el-option v-for="items in OfferCostPriceObj.CostCurrencyList" :label='items.CurrencyName' <el-option v-for="items in CostCurrencyList" :label='items.CurrencyName' :value='items.CurrencyId'
:value='items.CurrencyId' :key='items.CurrencyId'> :key='items.CurrencyId'>
</el-option> </el-option>
</el-select> --> </el-select>
</el-form-item> </el-form-item>
</td> </td>
<td> <td>
...@@ -255,14 +255,14 @@ ...@@ -255,14 +255,14 @@
<td>2</td> <td>2</td>
<td>内陆段船票(每人</td> <td>内陆段船票(每人</td>
<td> <td>
<!-- <el-form-item> <el-form-item>
<el-select v-model='OfferCostPriceObj.InlandShipTicketCurrency'> <el-select v-model='OtherPrice.InlandShipTicketCurrency'>
<el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option>
<el-option v-for="items in OfferCostPriceObj.CostCurrencyList" :label='items.CurrencyName' <el-option v-for="items in CostCurrencyList" :label='items.CurrencyName' :value='items.CurrencyId'
:value='items.CurrencyId' :key='items.CurrencyId'> :key='items.CurrencyId'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</td> </td>
<td> <td>
<el-form-item> <el-form-item>
...@@ -275,14 +275,14 @@ ...@@ -275,14 +275,14 @@
<td>3</td> <td>3</td>
<td>内陆段火车票(每人)</td> <td>内陆段火车票(每人)</td>
<td> <td>
<!-- <el-form-item> <el-form-item>
<el-select v-model='OfferCostPriceObj.InlandTrainTicketCurrency'> <el-select v-model='OtherPrice.InlandTrainTicketCurrency'>
<el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option> <el-option :label="$t('pub.unlimitedSel')" :value='defaultSelect'></el-option>
<el-option v-for="items in OfferCostPriceObj.CostCurrencyList" :label='items.CurrencyName' <el-option v-for="items in CostCurrencyList" :label='items.CurrencyName' :value='items.CurrencyId'
:value='items.CurrencyId' :key='items.CurrencyId'> :key='items.CurrencyId'>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
</td> </td>
<td> <td>
<el-form-item> <el-form-item>
...@@ -410,9 +410,9 @@ ...@@ -410,9 +410,9 @@
<tr> <tr>
<td width='200'>人数</td> <td width='200'>人数</td>
<td width="200"></td> <td width="200"></td>
<!-- <td width="150" v-for="item in OfferCostPriceObj.CostNumberList" :key="item.subCode"> <td width="150" v-for="item in CostNumberList" :key="item.subCode">
{{item.PeopleNumber}}+1 {{item.PeopleNumber}}+1
</td> --> </td>
</tr> </tr>
<tr> <tr>
<td>机票</td> <td>机票</td>
...@@ -422,9 +422,9 @@ ...@@ -422,9 +422,9 @@
@keyup.native="checkPrice(OtherPrice,'AirTicketShareMoney')"></el-input> @keyup.native="checkPrice(OtherPrice,'AirTicketShareMoney')"></el-input>
</el-form-item> </el-form-item>
</td> </td>
<!-- <td v-for="item in OfferCostPriceObj.CostNumberList" :key="item.subCode"> <td v-for="item in CostNumberList" :key="item.subCode">
{{item.AirTicketMoney}} {{item.AirTicketMoney}}
</td> --> </td>
</tr> </tr>
<tr> <tr>
<td>门票</td> <td>门票</td>
...@@ -434,9 +434,9 @@ ...@@ -434,9 +434,9 @@
@keyup.native="checkPrice(OtherPrice,'TicketShareMoney')"></el-input> @keyup.native="checkPrice(OtherPrice,'TicketShareMoney')"></el-input>
</el-form-item> </el-form-item>
</td> </td>
<!-- <td v-for="item in OfferCostPriceObj.CostNumberList" :key="item.subCode"> <td v-for="item in CostNumberList" :key="item.subCode">
{{item.TicketMoney}} {{item.TicketMoney}}
</td> --> </td>
</tr> </tr>
<tr> <tr>
<td>单房差</td> <td>单房差</td>
...@@ -446,9 +446,9 @@ ...@@ -446,9 +446,9 @@
@keyup.native="checkPrice(OtherPrice,'SingleRoomShareMoney')"></el-input> @keyup.native="checkPrice(OtherPrice,'SingleRoomShareMoney')"></el-input>
</el-form-item> </el-form-item>
</td> </td>
<!-- <td v-for="item in OfferCostPriceObj.CostNumberList" :key="item.subCode"> <td v-for="item in CostNumberList" :key="item.subCode">
{{item.SingleRoomMoney}} {{item.SingleRoomMoney}}
</td> --> </td>
</tr> </tr>
<tr> <tr>
<td>内陆段交通</td> <td>内陆段交通</td>
...@@ -496,11 +496,13 @@ ...@@ -496,11 +496,13 @@
</template> </template>
<script> <script>
export default { export default {
props: ["postConfig", "OtherPrice", "dayCostPrice", "LineList"], props: ["postConfig", "OtherPrice", "dayCostPrice", "LineList", "CostNumberList", "CurrencyNumberListExt",
"CostCurrencyList"
],
data() { data() {
return { return {
//下拉框默认值 //下拉框默认值
defaultSelect:0, defaultSelect: 0,
queryMsg: { queryMsg: {
//汇率输入 //汇率输入
RateInput: "", RateInput: "",
...@@ -516,6 +518,22 @@ ...@@ -516,6 +518,22 @@
}, },
methods: { methods: {
ReCalc() {
// this.OfferCostPriceObj = JSON.parse(
// JSON.stringify(this.OfferCostPriceObj)
// );
// this.$emit("headCallBack", this.OfferCostPriceObj);
},
//判断币种是否相等
checkExists(CurrencyId) {
var flag = false;
this.CurrencyNumberListExt.forEach(item => {
if (!flag && item.Key == CurrencyId) {
flag = true;
}
});
return flag;
},
//获取系列列表 //获取系列列表
getLineTeamList(lineId) { getLineTeamList(lineId) {
this.postConfig.LineteamId = 0; this.postConfig.LineteamId = 0;
...@@ -537,7 +555,6 @@ ...@@ -537,7 +555,6 @@
}, },
//生成行程报价 //生成行程报价
createDayTripPrice() { createDayTripPrice() {
if (this.postConfig.DayNum > this.dayCostPrice.length) { if (this.postConfig.DayNum > this.dayCostPrice.length) {
for (var i = this.dayCostPrice.length; i < this.postConfig.DayNum; i++) { for (var i = this.dayCostPrice.length; i < this.postConfig.DayNum; i++) {
//去掉以前默认的交通 //去掉以前默认的交通
...@@ -565,6 +582,18 @@ ...@@ -565,6 +582,18 @@
this.dayCostPrice.length = this.postConfig.DayNum; 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() { addCurrency() {
var currencyId = this.currencyType; var currencyId = this.currencyType;
...@@ -585,7 +614,7 @@ ...@@ -585,7 +614,7 @@
}); });
if ( if (
this.$tripUtils.isInObjArr( this.$tripUtils.isInObjArr(
this.OfferCostPriceObj.CostCurrencyList, this.CostCurrencyList,
"CurrencyId", "CurrencyId",
currencyId currencyId
) )
...@@ -597,19 +626,19 @@ ...@@ -597,19 +626,19 @@
CurObj.CurrencyName = ckedName; CurObj.CurrencyName = ckedName;
CurObj.ExchangeRate = ckedRate; CurObj.ExchangeRate = ckedRate;
CurObj.CurrencyId = currencyId; CurObj.CurrencyId = currencyId;
this.OtherPrice.CostCurrencyList.push(CurObj); this.CostCurrencyList.push(CurObj);
this.currencyType = ""; this.currencyType = "";
this.queryMsg.RateInput = ""; this.queryMsg.RateInput = "";
let currencyNumberItem = { let currencyNumberItem = {
Key: currencyId, Key: currencyId,
currencyNumberList: [] currencyNumberList: []
}; };
if (this.OtherPrice.CurrencyNumberListExt.length > 0) { if (this.CurrencyNumberListExt.length > 0) {
if ( if (
this.OtherPrice.CurrencyNumberListExt[0].currencyNumberList this.CurrencyNumberListExt[0].currencyNumberList
.length > 0 .length > 0
) { ) {
this.OtherPrice.CurrencyNumberListExt[0].currencyNumberList.forEach( this.CurrencyNumberListExt[0].currencyNumberList.forEach(
x => { x => {
let tempData = JSON.parse(JSON.stringify(x)); let tempData = JSON.parse(JSON.stringify(x));
tempData.CurrencyId = currencyId; tempData.CurrencyId = currencyId;
...@@ -619,7 +648,7 @@ ...@@ -619,7 +648,7 @@
); );
} }
} }
this.OtherPrice.CurrencyNumberListExt.push(currencyNumberItem); this.CurrencyNumberListExt.push(currencyNumberItem);
}, },
//添加人数费用 //添加人数费用
addPeoNunber() { addPeoNunber() {
...@@ -630,7 +659,7 @@ ...@@ -630,7 +659,7 @@
} }
if ( if (
this.$tripUtils.isInObjArr( this.$tripUtils.isInObjArr(
this.OtherPrice.CostNumberList, this.CostNumberList,
"PeopleNumber", "PeopleNumber",
PeopleNumber PeopleNumber
) )
...@@ -640,8 +669,8 @@ ...@@ -640,8 +669,8 @@
} }
var CostNumberObj = this.$tripUtils.CostNumber(); var CostNumberObj = this.$tripUtils.CostNumber();
CostNumberObj.PeopleNumber = PeopleNumber; CostNumberObj.PeopleNumber = PeopleNumber;
this.OtherPrice.CostNumberList.push(CostNumberObj); this.CostNumberList.push(CostNumberObj);
this.OtherPrice.CurrencyNumberListExt.forEach(x => { this.CurrencyNumberListExt.forEach(x => {
var CurrencyNumberObj = this.$tripUtils.CurrencyNumber(); var CurrencyNumberObj = this.$tripUtils.CurrencyNumber();
CurrencyNumberObj.CurrencyId = x.Key; CurrencyNumberObj.CurrencyId = x.Key;
CurrencyNumberObj.PeopleNumber = PeopleNumber; CurrencyNumberObj.PeopleNumber = PeopleNumber;
...@@ -653,14 +682,14 @@ ...@@ -653,14 +682,14 @@
}, },
//人数排序 //人数排序
shortPeopleNumber() { shortPeopleNumber() {
// this.OfferCostPriceObj.CurrencyNumberListExt.forEach(x => { this.CurrencyNumberListExt.forEach(x => {
// x.currencyNumberList.sort( x.currencyNumberList.sort(
// this.$commonUtils.createComprisonFunction("PeopleNumber") this.$commonUtils.createComprisonFunction("PeopleNumber")
// ); );
// }); });
// this.OfferCostPriceObj.CostNumberList.sort( this.CostNumberList.sort(
// this.$commonUtils.createComprisonFunction("PeopleNumber") this.$commonUtils.createComprisonFunction("PeopleNumber")
// ); );
}, },
//币种下拉获取汇率 //币种下拉获取汇率
getRate(ID) { getRate(ID) {
...@@ -685,11 +714,10 @@ ...@@ -685,11 +714,10 @@
}, },
mounted() { mounted() {
this.getAllCurrency(); this.getAllCurrency();
console.log("OtherPrice",this.OtherPrice);
},
watch: {
} },
created() {},
watch: {}
}; };
</script> </script>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<div class="singlePrice clearfix"> <div class="singlePrice clearfix">
<CostNewPrice ref="CostNewPrice" :postConfig="postConfig" :OtherPrice="otherPrice" <CostNewPrice ref="CostNewPrice" :postConfig="postConfig" :OtherPrice="otherPrice"
:dayCostPrice="dayCostPrice" :LineList="LineList"></CostNewPrice> :dayCostPrice="dayCostPrice" :LineList="LineList" :CostCurrencyList="CostCurrencyList" :CostNumberList="CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"></CostNewPrice>
</div> </div>
</div> </div>
<div class="DirectRightPrice" style="margin-left:20px;"> <div class="DirectRightPrice" style="margin-left:20px;">
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
import CostNewPrice from "../TravelNewQuotation/CostNewPrice"; import CostNewPrice from "../TravelNewQuotation/CostNewPrice";
export default { export default {
props: ["postConfig", "dayCostPrice", "otherPrice", "teamPrice","LineList"], props: ["postConfig", "dayCostPrice", "otherPrice", "teamPrice","LineList","CostCurrencyList","CostNumberList","CurrencyNumberListExt"],
data() { data() {
return { return {
CheckedVaule: 2, CheckedVaule: 2,
......
<template> <template>
<div class="DirectQuotation clearfix"> <div class="DirectQuotation clearfix">
<DirectQuotation ref="QuotationPrice" :postConfig="postData" :dayCostPrice="dayCostPriceList" <DirectQuotation ref="QuotationPrice" :postConfig="postData" :dayCostPrice="dayCostPriceList"
:otherPrice="otherPrice" :teamPrice="teamPrice" :LineList="LineList"></DirectQuotation> :otherPrice="otherPrice" :teamPrice="teamPrice" :LineList="LineList" :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>
...@@ -33,11 +34,11 @@ ...@@ -33,11 +34,11 @@
IsSubstitution: 1, IsSubstitution: 1,
IsB2B: 1, IsB2B: 1,
IsB2C: 1, IsB2C: 1,
FSeat: "", FSeat: 0,
CSeat: "", CSeat: 0,
YSeat: "", YSeat: 0,
//最低成团人数 //最低成团人数
LowNum: "", LowNum: 0,
//OP备注 //OP备注
OpRemark: "", OpRemark: "",
//产品经理备注 //产品经理备注
...@@ -46,8 +47,8 @@ ...@@ -46,8 +47,8 @@
PriceIsDirect: 1, //是否直采报价(1-否-2-是)【全部默认非直采】 PriceIsDirect: 1, //是否直采报价(1-否-2-是)【全部默认非直采】
PDFAlias: "", //pdf别名 PDFAlias: "", //pdf别名
ImgCover: "", //封面图 ImgCover: "", //封面图
DayNum: "", //天数 DayNum: 0, //天数
NightNum: "", //晚数 NightNum: 0, //晚数
StartCityId: 0, StartCityId: 0,
ReturnArriveCityId: 0, //返回抵达城市 ReturnArriveCityId: 0, //返回抵达城市
}, },
...@@ -78,10 +79,10 @@ ...@@ -78,10 +79,10 @@
SingleRoomShareMoney: 0, //单房差分摊费用 SingleRoomShareMoney: 0, //单房差分摊费用
InlandTrafficShareMoney: 0, //内陆段交通分摊费用 InlandTrafficShareMoney: 0, //内陆段交通分摊费用
OtherShareMoney: 0, //杂费分摊费用 OtherShareMoney: 0, //杂费分摊费用
},
CostCurrencyList: [], //选择的币种 CostCurrencyList: [], //选择的币种
CostNumberList: [], //人数 CostNumberList: [], //人数
CurrencyNumberListExt:[],//币种和人数列表 CurrencyNumberListExt: [], //币种和人数列表
},
//团报价信息 //团报价信息
teamPrice: { teamPrice: {
QuotationId: 0, //主键编号 QuotationId: 0, //主键编号
...@@ -121,20 +122,36 @@ ...@@ -121,20 +122,36 @@
}, },
//保存数据 //保存数据
SaveData() { SaveData() {
var nObj = {
config: this.postData,
dayCostPriceList: this.dayCostPriceList,
otherPrice: this.otherPrice,
teamPrice: this.teamPrice,
CostCurrencyList: this.CostCurrencyList,
CostNumberList: this.CostNumberList
};
console.log("请求参数", nObj);
this.apipost( this.apipost(
"travel_post_SetConfigOffer_V2", { "travel_post_SetConfigOffer_V2", nObj,
config: postData,
dayCostPriceList: dayCostPriceList,
otherPrice: otherPrice,
teamPrice: teamPrice
},
res => { res => {
console.log(res.data); if (res.data.resultCode == 1) {
if (res.data.resultCode == 1) {} this.Success(res.date.message);
this.goUrl('newQuotation');
} else {
this.Error(res.data.message);
}
}, },
err => {} err => {}
); );
}, },
goUrl(path) {
this.$router.push({
path: path,
query: {
cache: true
}
});
},
getPostData() { getPostData() {
let configId = this.$route.query.configId; let configId = this.$route.query.configId;
let msg = { let msg = {
...@@ -146,19 +163,17 @@ ...@@ -146,19 +163,17 @@
res => { res => {
console.log("res.data.data", res.data); console.log("res.data.data", res.data);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var tempData=res.data.data; var tempData = res.data.data;
this.LineList=tempData.LineList; this.LineList = tempData.LineList;
if(tempData.dayCostPriceList && tempData.dayCostPriceList!=null && tempData.dayCostPriceList.length>0) if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
{ 0) {
this.dayCostPriceList=tempData.dayCostPriceList; 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;
} }
} else { } else {
......
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