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

SAVE

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