Commit 58de064b authored by 黄奎's avatar 黄奎

页面修改

parent 3962224d
......@@ -140,7 +140,7 @@
<td colspan="4" class="CP_ComTitle2 CostcomCenter"></td>
<td rowspan="2" width='80' class="CP_ComTitle2 CostcomCenter">门票</td>
<td colspan="3" class="CP_ComTitle2 CostcomCenter"></td>
<td rowspan="2" width='80' class="CP_ComTitle2 CostcomCenter">回佣<br/>(不计入成本)</td>
<td rowspan="2" width='80' class="CP_ComTitle2 CostcomCenter">回佣<br />(不计入成本)</td>
<td rowspan="2" width='80' class="CP_ComTitle2 CostcomCenter">其它费用<br />(保险、司导杂费等)</td>
</tr>
<tr>
......@@ -252,7 +252,7 @@
{{childItem.PeopleNumber}}
</td>
<td>
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,1)}}
......@@ -293,7 +293,7 @@
{{childItem.PeopleNumber}}
</td>
<td>
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,2)}}
......@@ -416,7 +416,7 @@
</template>
</td>
<td>
</td>
<td>
{{getDayXiaoJi(3,1)}}
......@@ -456,7 +456,7 @@
</template>
</td>
<td>
</td>
<td>
{{getDayXiaoJi(3,2)}}
......@@ -767,9 +767,6 @@
</tr>
<tr>
<td colspan="14" class="CP_ComTitle2">领队分摊部分
<span style="color:red;padding-left:5px;">
领队导游分摊,请直接输入日元
</span>
</td>
</tr>
<tr>
......@@ -837,9 +834,6 @@
</tr>
<tr>
<td colspan="14" class="CP_ComTitle2">成本回扣
<span style="color:red;padding-left:5px;">
成本回扣,请直接输入日元
</span>
</td>
</tr>
<tr>
......@@ -871,10 +865,22 @@
<tr>
<td class="CP_ComTitle2">人数统计</td>
<td class="CP_ComTitle2">成本价(人民币)</td>
<td class="CP_ComTitle2">成本价(日元)</td>
<td class="CP_ComTitle2">成本总价(日元)</td>
<td class="CP_ComTitle2">
<template v-if="postConfig.LineId==14">
成本价(日元)
</template>
</td>
<td class="CP_ComTitle2">
<template v-if="postConfig.LineId==14">
成本总价(日元)
</template>
</td>
<td class="CP_ComTitle2">销售价格(人民币)</td>
<td class="CP_ComTitle2">销售价格(日元)</td>
<td class="CP_ComTitle2">
<template v-if="postConfig.LineId==14">
销售价格(日元)
</template>
</td>
<td class="CP_ComTitle2">销售付款方式</td>
<td class="CP_ComTitle2">手配费</td>
<td class="CP_ComTitle2">手配费付款方式</td>
......@@ -883,14 +889,22 @@
<tr v-for="item in CostNumberList" :key="item.subCode">
<td>{{item.PeopleNumber}}+1</td>
<td>{{item.TotalMoney}}</td>
<td>{{item.JPYTotalMoney}}</td>
<td>{{item.JPYTotalMoney*item.PeopleNumber}}</td>
<td>
<template v-if="postConfig.LineId==14">
{{item.JPYTotalMoney}}
</template>
</td>
<td>
<template v-if="postConfig.LineId==14">
{{item.JPYTotalMoney*item.PeopleNumber}}
</template>
</td>
<td>
<el-input type='text' class="w70" v-model="item.SalePrice"
@keyup.native="checkPrice(item,'SalePrice',true)" maxlength="8"></el-input>
</td>
<td>
<el-input type='text' class="w70" v-model="item.JPYSalePrice"
<el-input v-if="postConfig.LineId==14" type='text' class="w70" v-model="item.JPYSalePrice"
@keyup.native="checkPrice(item,'JPYSalePrice',true)" maxlength="8"></el-input>
</td>
<td>
......@@ -988,7 +1002,6 @@
</el-input>
</td>
</tr>
<tr>
<td class="CP_ComTitle2">附件</td>
<td colspan="13">
......
......@@ -81,7 +81,8 @@
<tr>
<td width="80" class="txtRightCost">出团类型</td>
<td>
<el-select class="multiple_input" v-model="postConfig.TeamType" filterable>
<el-select class="multiple_input" v-model="postConfig.TeamType"
@change="postConfig.LineId=0,postConfig.LineteamId=0">
<el-option v-for='item in teamList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
......@@ -91,7 +92,7 @@
<el-select style="width:100%" v-model="postConfig.LineId" :placeholder="$t('pub.pleaseSel')"
@change="changeLine()" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
<el-option v-for="item in getLineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
</el-option>
</el-select>
</td>
......@@ -103,7 +104,6 @@
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="6" style="height:20px;">
......@@ -260,15 +260,36 @@
}, ]
}
},
computed: {
//线路筛选
getLineList() {
var chooseLineList = [];
//散拼
if (this.postConfig.TeamType == 0) {
chooseLineList = this.LineList.filter(qItem => qItem.LineDirection == 2);
} //小包团
else if (this.postConfig.TeamType == 1) {
chooseLineList = this.LineList.filter(qItem => qItem.Is_PacketGroup == 1);
}
//当地游
else if (this.postConfig.TeamType == 2) {
chooseLineList = this.LineList.filter(qItem => qItem.LineDirection == 3);
}
return chooseLineList;
},
},
methods: {
//线路切换
changeLine() {
this.getLineTeamList(this.postConfig.LineId, 1);
},
getData() {
return this.orderList
return this.orderList;
},
addOrderTag() {
this.createOrderList()
},
selectTag(index) {
console.log('selectTag', index)
this.tabsActive = index
this.changeTabs()
},
......@@ -283,11 +304,9 @@
}
},
changeTabs() {
// const canEdit = !this.currentData.queryMsg.IsDefault
this.currentData = this.orderList[this.tabsActive]
let index = this.getDefaultIndex()
this.currentData.queryMsg.canEdit = index === -1 || index === Number(this.tabsActive)
console.log('changeTabs>>>>', this.currentData, index, this.tabsActive)
this.prevKey = Number(this.tabsActive)
},
getDefaultIndex() {
......@@ -326,12 +345,6 @@
lineID: lineId,
isTOOP: 1
};
var that = this;
//获取当前选中的对象
let obj = {};
obj = that.LineList.find(item => {
return item.LineID === lineId;
});
this.apipost("team_post_GetList", msg, res => {
if (res.data.resultCode == 1) {
this.LineTeamList = res.data.data;
......@@ -372,7 +385,6 @@
} else {
dayCostPrice.length = this.postConfig.DayNum;
}
console.log('//生成行程报价 createDayTripPrice', this.postConfig.DayNum, dayCostPrice)
return dayCostPrice
},
//价格转换器
......@@ -441,9 +453,8 @@
this.getAllCurrency();
this.getCompanyList();
this.getTeamList();
console.log('CostNewPrice', this.OfferArray)
this.getLineTeamList();
if (!this.OfferArray.length) {
console.log('CostNewPrice not OfferArray', this.OfferArray)
this.createOrderList();
} else {
this.OfferArray.forEach(item => {
......@@ -462,34 +473,25 @@
this.orderList = this.OfferArray
this.changeTabs()
}
console.log('this.orderList', this.orderList, this.OfferArray)
},
created() {},
watch: {
postConfig: {
OfferArray: {
handler: function (val, oldVal) {
this.getLineTeamList(this.postConfig.LineId);
if (!this.OfferArray.length) {
this.createOrderList();
} else {
this.OfferArray.forEach(item => {
item.OtherPrice = item.otherPrice
item.dayCostPrice = item.dayCostPriceList
})
this.orderList = this.OfferArray
this.changeTabs()
}
},
deep: true
},
}
},
OfferArray: {
handler: function (val, oldVal) {
console.log('watch CostNewPrice', this.OfferArray)
if (!this.OfferArray.length) {
this.createOrderList();
} else {
this.OfferArray.forEach(item => {
item.OtherPrice = item.otherPrice
item.dayCostPrice = item.dayCostPriceList
})
this.orderList = this.OfferArray
this.changeTabs()
}
console.log('watch this.orderList', this.orderList, this.OfferArray)
},
deep: true
}
};
</script>
<template>
<div class="DirectQuotation clearfix" v-loading="loading">
<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>
<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">
<div class="toTop">
<i class="iconfont icon-huidaodingbu"></i>
......@@ -17,9 +18,7 @@
</div>
</template>
<script>
import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation";
export default {
data() {
return {
......@@ -60,7 +59,7 @@
OutBranchId: -1, //出团公司
OutDateTime: "", //出发时间
OfferPayType: 0, //报价单付款方式
SaleOfferPayType:0,//售价付款方式
SaleOfferPayType: 0, //售价付款方式
},
dayCostPriceList: [], //报价列表
isSubmit: true,
......@@ -149,41 +148,29 @@
SaveData(type) {
const data = this.$refs["QuotationPrice"].getData()
function getCostCurrency(CurrencyNumberListExt) {
var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
CurrencyNumberListExt.forEach((item, index) => {
item.currencyNumberList.forEach(subItem => {
currencyNumList.push(subItem);
});
});
});
}
return currencyNumList
}
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
// };
this.postData.TravelState = type;
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
item.OtherPrice.CurrencyNumberList = item.CostCurrencyList
})
var nObj = {
config: this.postData,
OfferArray: data
}
console.log('保存数据',data,nObj)
// return 0;
this.loading = true;
this.apipost(
"travel_post_SetConfigOffer_V3", nObj,
......@@ -224,7 +211,7 @@
IsDefault: 1,
};
this.apipost(
"travel_get_GetMyTravelInfo_V3", // travel_get_GetMyTravelInfo_V2
"travel_get_GetMyTravelInfo_V3",
msg,
res => {
if (res.data.resultCode == 1) {
......@@ -263,51 +250,16 @@
this.postData.OutBranchId = tempData.OutBranchId;
this.postData.OutDateTime = tempData.OutDateTime;
this.postData.OfferPayType = tempData.OfferPayType;
this.postData.SaleOfferPayType=tempData.SaleOfferPayType;
this.postData.SaleOfferPayType = tempData.SaleOfferPayType;
this.postData.TravelState = tempData.TravelState;
this.LineList = tempData.LineList;
if(tempData.OfferArray) {
console.log('getData', tempData.OfferArray)
if (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);
// }
// });
// }
this.haveData = true;
this.haveData = true;
} else {
this.Error(res.data.message);
}
......@@ -326,5 +278,4 @@
DirectQuotation: DirectQuotation
}
};
</script>
</script>
\ No newline at end of file
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