Commit d907e038 authored by 罗超's avatar 罗超
parents 235256b6 0050c2a0
......@@ -1564,7 +1564,7 @@
</div>
<div style="padding-left: 75px;">
<button class="hollowFixedBtn"
v-if="(bossID===1 || bossID===5||bossID===1934 || bossID===2786) && (GetDetail.Status===2 || GetDetail.Status===5 || GetDetail.Status===1)"
v-if="(bossID===1 || bossID===5||bossID===1934 || bossID===2786 || bossID===2769) && (GetDetail.Status===2 || GetDetail.Status===5 || GetDetail.Status===1)"
@click="bohui()">{{$t('fnc.bohui')}}</button>
<button class="hollowFixedBtn" @click="AuditOrRefund()">{{$t('pub.returnBack')}}</button>
</div>
......
......@@ -2717,6 +2717,7 @@ export default {
cW = allW - 90;
cH = allH - 350 - 52;
this.msg.pageSize = parseInt(cH / 30) - 2;
if(this.msg.pageSize>16){this.msg.pageSize=16;}
let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id = userInfo.RB_Group_id; //集团ID
this.userId = userInfo.EmployeeId;
......
......@@ -595,7 +595,8 @@
<th width="80">{{ $t("system.query_arrivalTime") }}</th>
<th width="100">{{ $t("system.query_stopCity") }}</th>
</tr>
<tr v-for="(fItem, fIndex) in nItem.flightList" :key="`hd_`+newIndex+`d_`+fIndex" style="text-align: center">
<tr v-for="(fItem, fIndex) in nItem.flightList" :key="`hd_`+newIndex+`d_`+fIndex"
style="text-align: center">
<td class="_d_name _color_666">
<span v-if="fIndex == 0">{{ $t("Airticket.Air_go") }}</span>
<span v-else-if="fIndex == item.flightList.length - 1">{{
......@@ -634,8 +635,8 @@
<div class="FlightDiv-TCL" slot="reference">
<template v-if="item.UseFlightType == 0">
<template v-for="(nItem,newIndex) in item.newFlightList">
<div v-for="(subItem) in nItem.flightList" slot="reference" :key="`f_`+newIndex+`_`+subItem.ID"
class="TCL-flighInfoList">
<div v-for="(subItem) in nItem.flightList" slot="reference"
:key="`d_`+index+`f_`+newIndex+`_`+subItem.ID" class="TCL-flighInfoList">
<span class="travelnowrap">
<span class="TCL-FlightNumber">{{
subItem.Flight_number
......@@ -2390,7 +2391,7 @@
CurrentUserInfo: {},
showHotelObj: {
showPrice: true, //是否显示价格
showPay: false, //是否显示支付方式
showPay: true, //是否显示支付方式
showZhan: true, //占房时间
showBtnList: false, //是否下载、确认按钮
ShowTaxType: false, //显示税入税别
......
......@@ -279,11 +279,10 @@
<div class="comSearchDiv">
<span>{{$t('Operation.Op_TransportState')}}</span>
<span>
<el-select class="w180 multiple_input" v-model="queryMsg.IsShowUnion">
<el-option :key="-1" :label="$t('advmanager.v_all')" :value="-1"></el-option>
<el-option :key="1" :label="$t('system.table_isShows')" :value="1"></el-option>
<el-option :key="0" :label="$t('Operation.Op_hide')" :value="0"></el-option>
</el-select>
<el-checkbox-group v-model="queryCommonData.IsUnionCked" style="margin-left: 0">
<el-checkbox v-for="state in unionStatus" :label="state.Id" :checked="state.Checked"
@change="checkedUnion(state)" :key="state.Name">{{ state.Name }}</el-checkbox>
</el-checkbox-group>
</span>
</div>
<div class="comSearchDiv" style="display: flex;align-items: center;">
......@@ -1733,6 +1732,7 @@
singleTCID: 0,
outerVisible: false,
flightCKed: [],
IsUnionCked: [],
loading: false,
checkCompanyAll: true,
showUnion: false,
......@@ -1791,7 +1791,7 @@
CurrentUserInfo: {},
showHotelObj: {
showPrice: true, //是否显示价格
showPay: false, //是否显示支付方式
showPay: true, //是否显示支付方式
showZhan: true, //占房时间
showBtnList: false, //是否下载、确认按钮
ShowTaxType: false, //显示税入税别
......@@ -1826,6 +1826,23 @@
Checked: false
}
],
//联运状态
unionStatus: [{
Id: -1,
Name: this.$t("advmanager.v_all"),
Checked: true,
},
{
Id: 0,
Name: this.$t("op.MainGroup"),
Checked: false,
},
{
Id: 1,
Name: this.$t("op.DistributionGroup"),
Checked: false,
},
],
CopyTripAndFeatureMsg: {
updateType: 1, //1-复制行程,2-修改出团日期,3-修改行程版面
isShowTripFeature: false,
......@@ -2979,6 +2996,11 @@
this.queryCommonData.flightCKed = [];
this.queryCommonData.flightCKed.push(item.Id);
},
checkedUnion(item) {
this.queryMsg.IsShowUnion = item.Id;
this.queryCommonData.IsUnionCked = [];
this.queryCommonData.IsUnionCked.push(item.Id);
},
//点击选取出团公司
getCompanyCheck(item) {
item.isShow = !item.isShow;
......
......@@ -165,8 +165,8 @@
</template>
</font>
</template>
<!-- </br><a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a> -->
<br /><a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a>
</td>
<td :colspan="13-2-CostCurrencyList.length+1">
</td>
......@@ -185,9 +185,9 @@
</template>
</font>
</template>
<!-- <br/>
<br />
<a v-if="IsEdit==3" style="color:blue;cursor:pointer"
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a> -->
@click="showOfferChange(3,item,index)">{{$t('objFill.dayofferchange')}}</a>
</td>
<td :colspan="13-2-CostNumberList.length+1">
</td>
......@@ -333,7 +333,6 @@
</font><br />
</template>
</template>
</td>
<td style="white-space:nowrap;">
<template v-if="subItem.BreakfastCostPrice>0||subItem.IsBreakfastChange">
......@@ -391,7 +390,9 @@
v-if="(childItem.TicketName&&childItem.TicketName!='')||(childItem.NewTicketName&&childItem.NewTicketName!='')">
<font>
{{childIndex+1}}
<font v-if="childItem.TicketName!=''" :style="(childItem.TicketCostPrice+childItem.NewTicketCostPrice==0)?'text-decoration: line-through;':''">{{childItem.TicketName}}</font>
<font v-if="childItem.TicketName!=''"
:style="(childItem.TicketCostPrice+childItem.NewTicketCostPrice==0)?'text-decoration: line-through;':''">
{{childItem.TicketName}}</font>
<font v-if="childItem.NewTicketName&&childItem.NewTicketName!=''" style="color:red;">
{{childItem.NewTicketName}}</font>
</font>
......@@ -463,7 +464,6 @@
<template v-else>
{{getDayChangeXiaoJi(1,1)}}
</template>
</font>
=<font style="color:red">{{Number(getDayXiaoJi(1,1))+Number(getDayChangeXiaoJi(1,1))}}</font>
</template>
......@@ -547,14 +547,17 @@
</template>
</template>
<template v-if="getRateChangeXiaoJi(1)!=0">
<el-tooltip content="汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getRateChangeXiaoJi(1)>0">
+{{getRateChangeXiaoJi(1)}}
</template>
<template v-else>
{{getRateChangeXiaoJi(1)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
{{Number(getDayXiaoJi(1,2))+Number(getDayChangeXiaoJi(1,2))+Number(getRateChangeXiaoJi(1))}}</font>
......@@ -574,12 +577,16 @@
</template>
</template>
<template v-if="getRateChangeXiaoJi(2)!=0">
<el-tooltip content="汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getRateChangeXiaoJi(2)>0">
+{{getRateChangeXiaoJi(2)}}
</template>
<template v-else>
{{getRateChangeXiaoJi(2)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -600,12 +607,16 @@
</template>
</template>
<template v-if="getRateChangeXiaoJi(4)!=0">
<el-tooltip content="汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getRateChangeXiaoJi(4)>0">
+{{getRateChangeXiaoJi(4)}}
</template>
<template v-else>
{{getRateChangeXiaoJi(4)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -626,12 +637,16 @@
</template>
</template>
<template v-if="getRateChangeXiaoJi(3)!=0">
<el-tooltip content="汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getRateChangeXiaoJi(3)>0">
+{{getRateChangeXiaoJi(3)}}
</template>
<template v-else>
{{getRateChangeXiaoJi(3)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -652,12 +667,16 @@
</template>
</template>
<template v-if="getRateChangeXiaoJi(9)!=0">
<el-tooltip content="汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getRateChangeXiaoJi(9)>0">
+{{getRateChangeXiaoJi(9)}}
</template>
<template v-else>
{{getRateChangeXiaoJi(9)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red;">
......@@ -770,7 +789,6 @@
<td colspan="2">
<el-form-item :label="$t('objFill.qitafeiyongsm')">
{{OtherPrice.OtherRemark}}
</el-form-item>
</td>
<td colspan="2" rowspan="2">
......@@ -1116,28 +1134,23 @@
</td>
<td style="white-space:nowrap;">
{{getLocalJpyTotalMoney(subItem.PeopleNumber)}}
<template
v-if="(getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0||getPeopleNumJpyChangeTotalMoney(subItem))!=0">
<template v-if="(getLocalJpyChangeTotalMoney(subItem)!=0)!=0">
<font style="color:red;">
<template v-if="getLocalJpyChangeTotalMoney(subItem.PeopleNumber)!=0">
<template v-if="getLocalJpyChangeTotalMoney(subItem.PeopleNumber)>0">
+{{getLocalJpyChangeTotalMoney(subItem.PeopleNumber)}}
</template>
<template v-else>
{{getLocalJpyChangeTotalMoney(subItem.PeopleNumber)}}
</template>
</template>
<template v-if="getPeopleNumJpyChangeTotalMoney(subItem)!=0">
<template v-if="getPeopleNumJpyChangeTotalMoney(subItem)>0">
+{{getPeopleNumJpyChangeTotalMoney(subItem)}}
<template v-if="getLocalJpyChangeTotalMoney(subItem)!=0">
<el-tooltip content="地接费用变更金额">
<font>
<template v-if="getLocalJpyChangeTotalMoney(subItem)>0">
+{{getLocalJpyChangeTotalMoney(subItem)}}
</template>
<template v-else>
{{getPeopleNumJpyChangeTotalMoney(subItem)}}
{{getLocalJpyChangeTotalMoney(subItem)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem.PeopleNumber))+Number(getPeopleNumJpyChangeTotalMoney(subItem))).toFixed(2)}}
{{(Number(getLocalJpyTotalMoney(subItem.PeopleNumber))+Number(getLocalJpyChangeTotalMoney(subItem))).toFixed(2)}}
</font>
</template>
</td>
......@@ -1156,12 +1169,16 @@
</template>
</template>
<template v-if="getPeopleNumberChangeTotalMoney(subItem)!=0">
<el-tooltip content="人数汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getPeopleNumberChangeTotalMoney(subItem)>0">
+{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
<template v-else>
{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -1183,12 +1200,16 @@
</template>
</template>
<template v-if="getPeopleNumberChangeTotalMoney(subItem)!=0">
<el-tooltip content="人数汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getPeopleNumberChangeTotalMoney(subItem)>0">
+{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
<template v-else>
{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -1210,12 +1231,16 @@
</template>
</template>
<template v-if="getPeopleNumberChangeTotalMoney(subItem)!=0">
<el-tooltip content="人数汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getPeopleNumberChangeTotalMoney(subItem)>0">
+{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
<template v-else>
{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
</font>
</el-tooltip>
</template>
</font>
=<font style="color:red">
......@@ -1241,12 +1266,16 @@
</template>
</template>
<template v-if="getPeopleNumberChangeTotalMoney(subItem)!=0">
<el-tooltip content="人数汇率变更">
<font style="color:#ef5b9c;">
<template v-if="getPeopleNumberChangeTotalMoney(subItem)>0">
+{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
<template v-else>
{{getPeopleNumberChangeTotalMoney(subItem)}}
</template>
</font>
</el-tooltip>
</template>
<template v-if="getChangeCostTotalMoney()!=0">
<template v-if="getChangeCostTotalMoney()>0">
......@@ -1595,7 +1624,6 @@
this.changMsg.checkObj = item;
}
}
},
GetDayStr(dayNum) {
var str = "";
......@@ -1911,10 +1939,14 @@
return totalMoney.toFixed(2);
},
//获取地接项目变更金额
getLocalJpyChangeTotalMoney(PeopleNumber) {
getLocalJpyChangeTotalMoney(subItem) {
var PeopleNumber = subItem.PeopleNumber;
if (PeopleNumber <= 0) {
PeopleNumber = 1;
}
if (subItem.OtherChangeModel != null && subItem.OtherChangeModel.HotelChangeValue != 0) {
PeopleNumber += Number(subItem.OtherChangeModel.HotelChangeValue);
}
let totalMoney = 0.0;
var busFee = Number(this.getDayChangeXiaoJi(2, 1)) / PeopleNumber;
var hotelPrice = Number(this.getDayChangeXiaoJi(1, 1)); //酒店费用
......@@ -1924,21 +1956,6 @@
totalMoney = busFee + hotelPrice + sencePrice + canPrice + otherPrice;
return totalMoney.toFixed(2);
},
//地接成本(日元)
getPeopleNumJpyChangeTotalMoney(subItem) {
let totalMoney = 0.0;
var peopleNumber = Number(subItem.PeopleNumber);
if (subItem.OtherChangeModel != null && subItem.OtherChangeModel.HotelChangeValue != 0) {
peopleNumber += Number(subItem.OtherChangeModel.HotelChangeValue);
var busFee = Number(this.getDayXiaoJi(2, 1)) / peopleNumber;
var otherPrice = Number(this.getDayXiaoJi(9, 1)) / peopleNumber; //其它费用
totalMoney = busFee + otherPrice; //hotelPrice + sencePrice + canPrice +
if (subItem.OtherChangeModel.HotelChangeValue > 0) {
totalMoney = Number(totalMoney) * Number(-1);
}
}
return totalMoney.toFixed(2);
},
getPeopleNumberChangeTotalMoney(subItem) {
let totalMoney = 0.0;
//汇率的变更
......@@ -1955,8 +1972,7 @@
//人数的变更
if (subItem.OtherChangeModel != null && subItem.OtherChangeModel.HotelChangeValue != 0) {
peopleNumber += Number(subItem.OtherChangeModel.HotelChangeValue);
// console.log(peopleNumber, "otherPrice", this.getRateChangeXiaoJi(9));
// console.log(peopleNumber, "busFee", this.getRateChangeXiaoJi(2));
if (subItem.OtherChangeModel.HotelChangeValue > 0) {
totalMoney -= Number(this.getRateChangeXiaoJi(9)) / Number(peopleNumber); //其它费用
totalMoney -= Number(this.getRateChangeXiaoJi(2)) / Number(peopleNumber); //车费
......
......@@ -48,7 +48,7 @@
<template>
<div class="changeOffer">
<div>
<table class="changeOfferTable" >
<table class="changeOfferTable">
<tr>
<td style="width:105px;" class="CP_ComTitle2 CostcomCenter">币种</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">汇率</td>
......@@ -57,18 +57,15 @@
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">人数变更值</td>
<td style="width:500px;" class="CP_ComTitle2 CostcomCenter">变更备注</td>
<td style="width:100px;" class="CP_ComTitle2 CostcomCenter">
<a style="color:blue;cursor:pointer;" @click="AddOfferObj()" v-show="dataList.length<costCurrencyList.length">添加</a>
<a style="color:blue;cursor:pointer;" @click="AddOfferObj()"
v-show="dataList.length<costCurrencyList.length">添加</a>
</td>
</tr>
<tbody>
<tr v-for="(item,index) in dataList" :key="index">
<td>
<el-select v-model="item.CurrencyId" filterable @change="handleCheckChange(index,item)" placeholder="请选择">
<!-- <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option> -->
<el-option
v-for="item in costCurrencyList"
:key="item.CurrencyId"
:label="item.CurrencyName"
<el-option v-for="item in costCurrencyList" :key="item.CurrencyId" :label="item.CurrencyName"
:value="item.CurrencyId">
</el-option>
</el-select>
......@@ -104,34 +101,16 @@
</template>
<script>
export default {
props: ["OfferCurrency","costNumberList","costCurrencyList"],
props: ["OfferCurrency", "costNumberList", "costCurrencyList"],
data() {
return {
loading: false,
dataList: [],
datas: {
ChangeId:0,
OfferId:0,
EidtType:3,
DayNum:0,
ChangeType:8,
ChangeValue:0,
ChangeRemarks:"",
OldPrice:0,
DJPrice:0,
CostId:0,
PeopleNumber:0,
ExchangeRate:0,
CurrencyId:'',
NewExchangeRate:0,
NewPeopleNumber:0,
},
};
},
watch:{
},
watch: {},
methods: {
handleCheckChange(index,nowItem) {
handleCheckChange(index, nowItem) {
var flag = false;
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach((qitem, qIndex) => {
......@@ -145,33 +124,30 @@
if (flag) {
this.Error("已存在此项币种,请选择其他变更币种!");
nowItem.CurrencyId = '';
return ;
return;
}
if (this.costCurrencyList != null && this.costCurrencyList.length > 0) {
var typeIndex=this.dataList[index];
var costCurrency = this.costCurrencyList.find(item=>item.CurrencyId==typeIndex.CurrencyId);//币种信息
var typeIndex = this.dataList[index];
var costCurrency = this.costCurrencyList.find(item => item.CurrencyId == typeIndex.CurrencyId); //币种信息
//查找人数信息
var costNumber={};
if(this.costNumberList.length>index){
costNumber=this.costNumberList[index];
}
else{
costNumber=this.costNumberList[0];
var costNumber = {};
if (this.costNumberList.length > index) {
costNumber = this.costNumberList[index];
} else {
costNumber = this.costNumberList[0];
}
// 使用find方法查找value为3的对象
let hasCurrencyId = this.dataList.findIndex(item => item.CurrencyId === nowItem.CurrencyId)
const nowData = this.dataList[hasCurrencyId];
// 创建深拷贝(避免引用问题)
const newData = JSON.parse(JSON.stringify(nowData));
newData.PeopleNumber=costNumber.PeopleNumber;
newData.CostId=costNumber.Id;
newData.NewPeopleNumber=Number(0) - Number(newData.PeopleNumber);//costNumber.PeopleNumber;
newData.ExchangeRate=costCurrency.ExchangeRate;
newData.NewExchangeRate=Number(0) - Number(newData.ExchangeRate);//costCurrency.ExchangeRate;
newData.ChangeRemarks="";
console.log("newData",newData);
newData.PeopleNumber = costNumber.PeopleNumber;
newData.CostId = costNumber.Id;
newData.NewPeopleNumber = 0; //costNumber.PeopleNumber;
newData.ExchangeRate = costCurrency.ExchangeRate;
newData.NewExchangeRate = 0; //costCurrency.ExchangeRate;
newData.ChangeRemarks = "人数/汇率变更";
// 替换原对象
this.$set(this.dataList, hasCurrencyId, newData);
this.getOfferChange();
......@@ -179,25 +155,25 @@
},
AddOfferObj() {
var obj = {
ChangeId:0,
OfferId:0,
EidtType:3,
DayNum:0,
ChangeType:8,
ChangeValue:0,
ChangeRemarks:"",
OldPrice:0,
DJPrice:0,
CostId:0,
PeopleNumber:0,
ExchangeRate:0,
CurrencyId:'',
NewExchangeRate:0,
NewPeopleNumber:0,
ChangeId: 0,
OfferId: 0,
EidtType: 3,
DayNum: 0,
ChangeType: 8,
ChangeValue: 0,
ChangeRemarks: "人数/汇率变更",
OldPrice: 0,
DJPrice: 0,
CostId: 0,
PeopleNumber: 0,
ExchangeRate: 0,
CurrencyId: '',
NewExchangeRate: 0,
NewPeopleNumber: 0,
}
obj.OfferId = this.OfferCurrency.OfferId;
obj.EidtType = this.OfferCurrency.EditType;
if(this.dataList.length<this.costCurrencyList.length){
if (this.dataList.length < this.costCurrencyList.length) {
this.dataList.push(obj);
}
},
......@@ -231,36 +207,37 @@
},
//向父组件传递选中酒店
saveOfferChange() {
var tempMsg=[];
var changeList=[];
if( this.dataList!=null&& this.dataList.length>0){
var tempMsg = [];
var changeList = [];
if (this.dataList != null && this.dataList.length > 0) {
this.dataList.forEach(item => {
if(item.CurrencyId!=""&& item.CurrencyId>0){
changeList.push( {
CurrencyId:item.CurrencyId,
OfferId:item.OfferId,
CostId:item.CostId,
PeopleNumber:item.NewPeopleNumber,
ExchangeRate:item.NewExchangeRate,
ChangeRemarks:item.ChangeRemarks, });
if (item.CurrencyId != "" && item.CurrencyId > 0) {
changeList.push({
CurrencyId: item.CurrencyId,
OfferId: item.OfferId,
CostId: item.CostId,
PeopleNumber: item.NewPeopleNumber,
ExchangeRate: item.NewExchangeRate,
ChangeRemarks: item.ChangeRemarks,
});
}
});
if(changeList==null||changeList.length==0){
if (changeList == null || changeList.length == 0) {
this.Error("请选择变更类型");
return;
}
tempMsg.push({
ChangeId:this.dataList[0].ChangeId,
OfferId:this.dataList[0].OfferId,
EidtType:this.dataList[0].EidtType,
DayNum:0,
ChangeType:this.dataList[0].ChangeType,
ChangeValue:0,
ChangeRemarks:'',
OldPrice:0,
DJPrice:0,
ChangeContent:JSON.stringify(changeList),
HotelList:[]
ChangeId: this.dataList[0].ChangeId,
OfferId: this.dataList[0].OfferId,
EidtType: this.dataList[0].EidtType,
DayNum: 0,
ChangeType: this.dataList[0].ChangeType,
ChangeValue: 0,
ChangeRemarks: '人数/汇率变更',
OldPrice: 0,
DJPrice: 0,
ChangeContent: JSON.stringify(changeList),
HotelList: []
});
this.apipost("travel_post_SetChangeOffer", tempMsg, res => {
if (res.data.resultCode == 1) {
......@@ -271,8 +248,7 @@
this.Error(res.data.message);
}
});
}
else{
} else {
var searchParmeters = {
EidtType: 0,
OfferId: 0,
......@@ -294,9 +270,6 @@
}
);
}
},
//查询价格变更信息
getOfferChange() {
......@@ -313,65 +286,61 @@
this.loading = false;
if (res.data.resultCode == 1) {
var tempArray = res.data.data;
if(tempArray!=null&&tempArray.length>0){
if (tempArray != null && tempArray.length > 0) {
tempArray.forEach(item => {
var ChangeContentList= JSON.parse(item.ChangeContent);
var ChangeContentList = JSON.parse(item.ChangeContent);
ChangeContentList.forEach(ChangeContentModel => {
let hasCurrencyId = this.dataList.findIndex(itemd => itemd.CurrencyId === ChangeContentModel.CurrencyId)
console.log("hasCurrencyId",hasCurrencyId);
if(hasCurrencyId!=-1){
let hasCurrencyId = this.dataList.findIndex(itemd => itemd.CurrencyId ===
ChangeContentModel.CurrencyId)
if (hasCurrencyId != -1) {
const nowData = this.dataList[hasCurrencyId];
// 创建深拷贝(避免引用问题)
const newData = JSON.parse(JSON.stringify(nowData));
newData.NewPeopleNumber=ChangeContentModel.PeopleNumber;
newData.NewExchangeRate=ChangeContentModel.ExchangeRate;
newData.ChangeRemarks=ChangeContentModel.ChangeRemarks;
newData.ChangeId=item.ChangeId;
newData.CostId=ChangeContentModel.CostId;
newData.NewPeopleNumber = ChangeContentModel.PeopleNumber;
newData.NewExchangeRate = ChangeContentModel.ExchangeRate;
newData.ChangeRemarks = ChangeContentModel.ChangeRemarks;
newData.ChangeId = item.ChangeId;
newData.CostId = ChangeContentModel.CostId;
// 替换原对象
this.$set(this.dataList, hasCurrencyId, newData);
}
else{
} else {
var obj = {
ChangeId:item.ChangeId,
OfferId:0,
EidtType:3,
DayNum:0,
ChangeType:8,
ChangeValue:0,
ChangeRemarks:ChangeContentModel.ChangeRemarks,
OldPrice:0,
DJPrice:0,
CostId:ChangeContentModel.CostId,
PeopleNumber:0,
ExchangeRate:0,
CurrencyId:ChangeContentModel.CurrencyId,
NewExchangeRate:ChangeContentModel.ExchangeRate,
NewPeopleNumber:ChangeContentModel.PeopleNumber,
ChangeId: item.ChangeId,
OfferId: 0,
EidtType: 3,
DayNum: 0,
ChangeType: 8,
ChangeValue: 0,
ChangeRemarks: ChangeContentModel.ChangeRemarks,
OldPrice: 0,
DJPrice: 0,
CostId: ChangeContentModel.CostId,
PeopleNumber: 0,
ExchangeRate: 0,
CurrencyId: ChangeContentModel.CurrencyId,
NewExchangeRate: ChangeContentModel.ExchangeRate,
NewPeopleNumber: ChangeContentModel.PeopleNumber,
}
let hasOCurrencyId = this.costCurrencyList.findIndex(item => item.CurrencyId === ChangeContentModel.CurrencyId)
let hasOCurrencyId = this.costCurrencyList.findIndex(item => item.CurrencyId ===
ChangeContentModel.CurrencyId)
obj.ExchangeRate=this.costCurrencyList[hasOCurrencyId].ExchangeRate;
obj.ExchangeRate = this.costCurrencyList[hasOCurrencyId].ExchangeRate;
//查找人数信息
var costNumber={};
if(this.costNumberList.length>hasOCurrencyId){
costNumber=this.costNumberList[hasOCurrencyId];
}
else{
costNumber=this.costNumberList[0];
var costNumber = {};
if (this.costNumberList.length > hasOCurrencyId) {
costNumber = this.costNumberList[hasOCurrencyId];
} else {
costNumber = this.costNumberList[0];
}
obj.PeopleNumber=costNumber.PeopleNumber;
obj.PeopleNumber = costNumber.PeopleNumber;
obj.OfferId = this.OfferCurrency.OfferId;
obj.EidtType = this.OfferCurrency.EditType;
this.dataList.push(obj);
}
});
});
}
}
});
},
......
......@@ -2416,7 +2416,6 @@
}
);
}
},
//测试方法
testEmp() {
......
......@@ -468,7 +468,7 @@
<div class="dline">
<div class="d1">
<div v-if="item.IsB2B === 0" class="product_nei"></div>
<div v-if="item.IsUnionTravel === 1" class="product_union"></div>
<div v-else-if="item.IsUnionTravel === 1" class="product_union"></div>
<div v-if="item.IsWarning === 1" class="product_warning"></div>
<div class="d12" style="float: none; margin: auto" :style="{'width': pagesTitle=='跟团游产品'?'300px':'auto'}">
<p><i class="iconfont icon-biaoti1"></i> {{ item.LineName }}</p>
......@@ -904,9 +904,9 @@
icon="iconfont icon-sousuo">
</el-button>
</el-tooltip>
<!--关内团后不能在报名 hk 2022-07-13去掉 && item.IsB2B === 1 修改为可报名 -->
<!--关内团后(IsB2B=0)不能在报名 过了出发日期不能下单(IsPayOrder=1) -->
<el-tooltip class="item" effect="dark" :content="$t('salesModule.LJXD')" placement="top-start"
v-if="item.IsPayOrder !== 1 && item.IsB2B !== 0 ">
v-if="item.IsPayOrder == 2 && item.IsB2B == 1 ">
<el-button type="primary" style="background-color: #f16c3c !important; border-color: #f16c3c !important"
v-if="!TCIDList" icon="iconfont icon-fukuan1" @click="goBuy(item)"></el-button>
</el-tooltip>
......
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