Commit d8a14edc authored by 沈良进's avatar 沈良进

SAVE

parent 9e16fb09
......@@ -201,7 +201,7 @@
</template>
<script>
import inAccordanceWith from "./inAccordanceWithDialog"
import inAccordanceWith from "../ImpressionTicketing/inAccordanceWithDialog"
import moment from "moment"
export default {
components:{
......
......@@ -119,6 +119,11 @@
</table>
</div>
<br />
<el-tag v-for="(item, index) in orderList" :key="index" style="margin-right: 10px;margin-bottom: 10px; cursor: pointer;" :type="index ===tabsActive ? '':'info'"
@click="selectTag(index)"
:disable-transitions="false">
{{`报价单${index + 1}${item.IsDefault ? '(默认)' : ''}`}}
</el-tag>
<table class="CostPriceTable CostNewTable">
<thead>
<tr>
......@@ -859,19 +864,41 @@
</template>
<script>
export default {
props: ["postConfig", "OtherPrice", "dayCostPrice", "LineList", "CostNumberList", "CurrencyNumberListExt",
"CostCurrencyList", "teamPrice", "IsEdit"
],
props: ["OfferArray","postConfig", "IsEdit"],
data() {
return {
tabsActive: 0,
orderList: [],
//审核信息
AduitMsg: {
},
OtherPrice: {},
dayCostPrice: [],
CostCurrencyList: [],
CostNumberList: [],
teamPrice: {}
}
},
methods: {
selectTag(index) {
console.log('selectTag', index)
this.tabsActive = index
this.changeTabs()
},
changeTabs() {
this.currentData = this.orderList[this.tabsActive]
console.log('this.orderList[this.tabsActive]', this.orderList,this.tabsActive, this.currentData)
if(!this.currentData) {
return
}
this.OtherPrice = this.currentData.otherPrice
this.dayCostPrice = this.currentData.dayCostPriceList
this.CostCurrencyList = this.currentData.CostCurrencyList
this.CostNumberList = this.currentData.CostNumberList
this.queryMsg = this.currentData.queryMsg
this.teamPrice = this.currentData.teamPrice
},
//下载文件
downloadFile(fileUrl, fileName) {
const link = document.createElement('a');
......@@ -1122,7 +1149,8 @@
}
},
mounted() {
this.orderList = this.OfferArray
this.changeTabs()
},
created() {},
watch: {
......
......@@ -161,10 +161,10 @@
{{getDayXiaoJi(7,1)}}
</td>
<td>
{{childItem.PeopleNumber}}
{{childItem.PeopleNumber}}
</td>
<td>
{{((Number(getDayXiaoJi(2,1))+Number(getDayXiaoJi(7,1)))/Number(childItem.PeopleNumber)).toFixed(0)}}
<!-- {{((Number(getDayXiaoJi(2,1))+Number(getDayXiaoJi(7,1)))/Number(childItem.PeopleNumber)).toFixed(0)}} -->
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,1)}}
......@@ -178,6 +178,12 @@
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(6,1)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(8,1)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(9,1)}}
</td>
</tr>
</template>
<template v-for="(childItem,childIndex) in CostNumberList">
......@@ -196,10 +202,10 @@
{{getDayXiaoJi(7,2)}}
</td>
<td>
{{childItem.PeopleNumber}}
{{childItem.PeopleNumber}}
</td>
<td>
{{((Number(getDayXiaoJi(2,2))+Number(getDayXiaoJi(7,2)))/Number(childItem.PeopleNumber)).toFixed(0)}}
<!-- {{((Number(getDayXiaoJi(2,2))+Number(getDayXiaoJi(7,2)))/Number(childItem.PeopleNumber)).toFixed(0)}} -->
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,2)}}
......@@ -213,6 +219,12 @@
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(6,2)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(8,2)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(9,2)}}
</td>
</tr>
</template>
</template>
......@@ -286,13 +298,13 @@
</td>
<td>
<template v-if="CostNumberList&&CostNumberList.length>0">
{{CostNumberList[0].PeopleNumber}}
{{CostNumberList[0].PeopleNumber}}
</template>
</td>
<td>
<template v-if="CostNumberList&&CostNumberList.length>0">
<!-- <template v-if="CostNumberList&&CostNumberList.length>0">
{{((Number(getDayXiaoJi(2,1))+Number(getDayXiaoJi(7,1)))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template>
</template> -->
</td>
<td>
{{getDayXiaoJi(3,1)}}
......@@ -328,13 +340,14 @@
</td>
<td>
<template v-if="CostNumberList&&CostNumberList.length>0">
{{CostNumberList[0].PeopleNumber}}
{{CostNumberList[0].PeopleNumber}}
</template>
</td>
<td>
<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)}}
</template>
</template> -->
<div>测试</div>
</td>
<td>
{{getDayXiaoJi(3,2)}}
......
......@@ -114,11 +114,11 @@
<div class="switchDiv clearfix" style="width:98%;">
<div class="DirectPriceCenter">
<div class="singlePrice clearfix">
<CostNewPrice ref="CostNewPrice" :postConfig="postConfig" :OtherPrice="otherPrice"
<CostNewPriceMun ref="CostNewPrice" :OfferArray="OfferArray" :postConfig="postConfig" :OtherPrice="otherPrice"
:dayCostPrice="dayCostPrice" :LineList="LineList" :CostCurrencyList="CostCurrencyList"
:CostNumberList="CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"
:teamPrice="teamPrice"
></CostNewPrice>
></CostNewPriceMun>
</div>
</div>
<div class="DirectRightPrice" style="margin-left:20px; display:none;">
......@@ -240,9 +240,10 @@
</template>
<script>
import CostNewPrice from "../TravelNewQuotation/CostNewPrice";
import CostNewPriceMun from "../TravelNewQuotation/CostNewPriceMun";
export default {
props: ["postConfig", "dayCostPrice", "otherPrice", "teamPrice", "LineList", "CostCurrencyList", "CostNumberList",
props: ["OfferArray","postConfig", "dayCostPrice", "otherPrice", "teamPrice", "LineList", "CostCurrencyList", "CostNumberList",
"CurrencyNumberListExt"
],
data() {
......@@ -253,13 +254,17 @@
};
},
methods: {
getData() {
console.log('this.$refs.CostNewPrice',this.$refs.CostNewPrice)
return this.$refs.CostNewPrice.getData()
}
},
created() {
},
components: {
CostNewPrice: CostNewPrice
CostNewPrice: CostNewPrice,
CostNewPriceMun: CostNewPriceMun
}
};
......
......@@ -12,7 +12,7 @@
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<div class="singlePrice clearfix">
<CostNewPriceAudit ref="CostNewPrice" :postConfig="postData" :OtherPrice="otherPrice"
<CostNewPriceAudit v-if="haveData" ref="CostNewPrice" :postConfig="postData" :OtherPrice="otherPrice" :OfferArray="OfferArray"
:dayCostPrice="dayCostPriceList" :CostCurrencyList="CostCurrencyList" :CostNumberList="CostNumberList"
:CurrencyNumberListExt="CurrencyNumberListExt" :teamPrice="teamPrice" :IsEdit="IsEdit"></CostNewPriceAudit>
</div>
......@@ -24,6 +24,8 @@
export default {
data() {
return {
haveData: false,
OfferArray: [],
ConfigID: 0,
IsShow: false,
//基本配置
......@@ -184,10 +186,8 @@
let msg = {
ID: configId,
offerId: offerId
};
this.apipost(
"travel_get_GetMyTravelInfo_V2",
};this.apipost(
"travel_get_GetMyTravelInfo_V3", // travel_get_GetMyTravelInfo_V2
msg,
res => {
if (res.data.resultCode == 1) {
......@@ -222,38 +222,54 @@
if (tempData.NightNum && tempData.NightNum > 0) {
this.postData.NightNum = tempData.NightNum;
}
this.postData.TeamTypeName = tempData.TeamTypeName;
this.postData.CustomerName = tempData.CustomerName;
this.postData.LineName = tempData.LineName;
this.postData.LtName = tempData.LtName;
this.postData.OutBranchId = tempData.OutBranchId;
this.postData.OutDateTime = tempData.OutDateTime;
this.postData.OutBranchName = tempData.OutBranchName;
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.otherPrice) {
this.otherPrice = tempData.otherPrice;
}
if (tempData.teamPrice) {
this.teamPrice = tempData.teamPrice;
if(tempData.OfferArray) {
console.log('getData', tempData.OfferArray)
tempData.OfferArray.forEach(item => {
this.OfferArray.push(item)
})
// this.OfferArray = tempData.OfferArray
}
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;
}
this.IsShow = true;
// 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;
} else {
this.Error(res.data.message);
}
......
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<DirectQuotation ref="QuotationPrice" :postConfig="postData" :dayCostPrice="dayCostPriceList"
<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">
......@@ -23,6 +23,8 @@
export default {
data() {
return {
haveData: false,
OfferArray: [],
ConfigID: 0,
//基本配置
postData: {
......@@ -145,27 +147,46 @@
},
//保存数据
SaveData(type) {
const data = this.$refs["QuotationPrice"].getData()
function getCostCurrency(CurrencyNumberListExt) {
var currencyNumList = [];
if (this.CurrencyNumberListExt != null && this.CurrencyNumberListExt.length > 0) {
this.CurrencyNumberListExt.forEach((item, index) => {
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
});
});
}
this.postData.TravelState = type;
return currencyNumList
}
// 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 => {
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
})
var nObj = {
config: this.postData,
dayCostPriceList: this.dayCostPriceList,
otherPrice: this.otherPrice,
teamPrice: this.teamPrice,
CostCurrencyList: this.CostCurrencyList,
CostNumberList: this.CostNumberList,
CurrencyNumberListExt: currencyNumList
};
OfferArray: data
}
console.log('保存数据',data)
// return 0;
this.loading = true;
this.apipost(
"travel_post_SetConfigOffer_V2", nObj,
"travel_post_SetConfigOffer_V3", nObj,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
......@@ -191,6 +212,7 @@
});
},
getPostData() {
this.haveData = false;
let configId = this.$route.query.configId;
let offerId = 0;
if (this.$route.query.offerid) {
......@@ -198,10 +220,11 @@
}
let msg = {
ID: configId,
offerId: offerId
offerId: offerId,
IsDefault: 1,
};
this.apipost(
"travel_get_GetMyTravelInfo_V2",
"travel_get_GetMyTravelInfo_V3", // travel_get_GetMyTravelInfo_V2
msg,
res => {
if (res.data.resultCode == 1) {
......@@ -241,41 +264,50 @@
this.postData.OutDateTime = tempData.OutDateTime;
this.postData.OfferPayType = tempData.OfferPayType;
this.postData.SaleOfferPayType=tempData.SaleOfferPayType;
this.postData.TravelState = tempData.TravelState;
this.LineList = tempData.LineList;
if (tempData.dayCostPriceList && tempData.dayCostPriceList != null && tempData.dayCostPriceList.length >
0) {
this.dayCostPriceList = tempData.dayCostPriceList;
if(tempData.OfferArray) {
console.log('getData', 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);
}
});
}
// 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;
} else {
this.Error(res.data.message);
}
......
......@@ -596,6 +596,9 @@
configId: configId,
TeamType: this.TeamType
}
if (this.$route.query.offerId) {
msg.OfferId = this.$route.query.offerId;
}
this.loading = true
this.apipost(
'travel_get_GetTravelConfigMakeInfo',
......
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