Commit ee9b719c authored by 沈良进's avatar 沈良进
parents 52698445 3962224d
......@@ -74,12 +74,13 @@
<tr>
<td colspan="14" class="CP_ComTitle2 CostcomCenter">报价信息</td>
</tr>
<tr>
<td class="CP_ComTitle2">默认报价单</td>
<td colspan="13">
<el-switch type="textarea" :disabled="!canEdit" v-model="IsDefault" @change="queryMsg.IsDefault = IsDefault"></el-switch>
</td>
</tr>
<tr>
<td class="CP_ComTitle2">默认报价单</td>
<td colspan="13">
<el-switch type="textarea" :disabled="!canEdit" v-model="IsDefault"
@change="queryMsg.IsDefault = IsDefault"></el-switch>
</td>
</tr>
<tr>
<td class="CP_ComTitle2 CostcomCenter" style="width:120px">币种</td>
<td v-for='(item,index) in CostCurrencyList'>
......@@ -139,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">回佣</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>
......@@ -172,8 +173,6 @@
</el-form-item>
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
<!-- <el-input type='text' v-model="subItem.HotelName" class="w100" placeholder="酒店备注"></el-input>
<br /> -->
<el-select style="margin:0 5px;" v-model='subItem.ContainDinnerType' class="w100" placeholder="含餐类型"
@change="DinnerTypeChange(subItem)">
<el-option label="含餐类型" :value='0'></el-option>
......@@ -234,7 +233,6 @@
</tr>
</template>
</template>
<template v-for="(childItem,childIndex) in CostNumberList">
<tr>
<td colspan="3" class="CP_ComTitle2 CostcomCenter" v-if="childIndex==0"
......@@ -251,10 +249,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)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,1)}}
......@@ -292,10 +290,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)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,2)}}
......@@ -337,8 +335,6 @@
</el-form-item>
</td>
<td>
<!-- <el-input type='text' v-model="subItem.HotelName" class="w100" placeholder="酒店备注"></el-input>
<br /> -->
<el-select v-model='subItem.ContainDinnerType' class="w100" placeholder="含餐类型"
@change="DinnerTypeChange(subItem)">
<el-option label="含餐类型" :value='0'></el-option>
......@@ -416,13 +412,11 @@
</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">
{{((Number(getDayXiaoJi(2,1))+Number(getDayXiaoJi(7,1)))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template>
</td>
<td>
{{getDayXiaoJi(3,1)}}
......@@ -458,13 +452,11 @@
</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">
{{( (Number(getDayXiaoJi(2,2))+Number(getDayXiaoJi(7,2)))/Number(CostNumberList[0].PeopleNumber)).toFixed(0)}}
</template>
</td>
<td>
{{getDayXiaoJi(3,2)}}
......@@ -589,7 +581,7 @@
</el-form-item>
</td>
<td class="CP_ComTitle2 CostcomCenter">3</td>
<td class="CP_ComTitle2">领队小费</td>
<td class="CP_ComTitle2">领队小费(每人)</td>
<td colspan="2">
<el-form-item>
<el-select v-model='OtherPrice.LeaderTripMoneyCurrencyId' class="w70">
......@@ -627,7 +619,7 @@
</el-form-item>
</td>
<td class="CP_ComTitle2 CostcomCenter">4</td>
<td class="CP_ComTitle2">司机小费</td>
<td class="CP_ComTitle2">司机小费(每人)</td>
<td colspan="2">
<el-form-item>
<el-select v-model='OtherPrice.DriverGuideMoneyCurrencyId' class="w70">
......@@ -648,7 +640,7 @@
<tr>
<td colspan="7"></td>
<td class="CP_ComTitle2 CostcomCenter">5</td>
<td class="CP_ComTitle2">导游小费</td>
<td class="CP_ComTitle2">导游小费(每人)</td>
<td colspan="2">
<el-form-item>
<el-select v-model='OtherPrice.GuideMoneyCurrencyId' class="w70">
......@@ -996,17 +988,13 @@
</el-input>
</td>
</tr>
<!-- <tr>
<td class="CP_ComTitle2">备注</td>
<td colspan="13">
<el-input type="textarea" v-model="OtherPrice.OtherRemark"></el-input>
</td>
</tr> -->
<tr>
<td class="CP_ComTitle2">附件</td>
<td colspan="13">
<el-upload v-if="!teamPrice.ContractArray || !teamPrice.ContractArray.length" class="upload-demo" style="display:inline-block;position:relative;top:-1px;left:3px;"
:http-request="uploadFileBtn" :show-file-list="false" action="">
<el-upload v-if="!teamPrice.ContractArray || !teamPrice.ContractArray.length" class="upload-demo"
style="display:inline-block;position:relative;top:-1px;left:3px;" :http-request="uploadFileBtn"
:show-file-list="false" action="">
<el-button size="small" type="primary">报价单附件</el-button>
</el-upload>
<template v-if="teamPrice.ContractArray&& teamPrice.ContractArray.length>0">
......@@ -1603,26 +1591,21 @@
var wuPrice = Number(this.getDayXiaoJi(5, 2)); //午餐
var wanPrice = Number(this.getDayXiaoJi(6, 2)); //晚餐
var otherPrice = Number(this.getDayXiaoJi(9, 2)); //其它费用
var busFee = Number(this.getDayXiaoJi(2, 2))+ Number(this.getDayXiaoJi(7, 2)); //车费
var busFee = Number(this.getDayXiaoJi(2, 2)) + Number(this.getDayXiaoJi(7, 2)); //车费
totalMoney = busFee + hotelPrice + sencePrice + zaoPrice + wuPrice + wanPrice + otherPrice;
return totalMoney.toFixed(0);
},
//获取地接项目报价
getLocalJpyTotalMoney(PeopleNumber) {
let totalMoney = 0.0;
//每人车费
var perBusFee = 0;
if (PeopleNumber > 0) {
perBusFee = (Number(this.getDayXiaoJi(2, 1)) + Number(this.getDayXiaoJi(7, 1))) / Number(PeopleNumber)
.toFixed(0);
}
var busFee = Number(this.getDayXiaoJi(2, 1)) + Number(this.getDayXiaoJi(7, 1));
var hotelPrice = Number(this.getDayXiaoJi(1, 1)); //酒店费用
var sencePrice = Number(this.getDayXiaoJi(3, 1)); //景点费用
var zaoPrice = Number(this.getDayXiaoJi(4, 1)); //早餐
var wuPrice = Number(this.getDayXiaoJi(5, 1)); //午餐
var wanPrice = Number(this.getDayXiaoJi(6, 1)); //晚餐
var otherPrice = Number(this.getDayXiaoJi(9, 1)); //其它费用
totalMoney = perBusFee + hotelPrice + sencePrice + zaoPrice + wuPrice + wanPrice + otherPrice;
totalMoney = busFee + hotelPrice + sencePrice + zaoPrice + wuPrice + wanPrice + otherPrice;
return totalMoney.toFixed(0);
},
//计算领队分摊
......@@ -1650,7 +1633,6 @@
}
},
mounted() {
console.log('queryMsg', this.queryMsg)
this.IsDefault = this.queryMsg.IsDefault
this.canEdit = this.queryMsg.canEdit
this.getSubtotalMoney();
......@@ -1663,15 +1645,15 @@
postConfig: {
handler: function (val, oldVal) {
this.getLineTeamList(this.postConfig.LineId);
this.IsDefault = this.queryMsg.IsDefault
this.canEdit = this.queryMsg.canEdit
this.IsDefault = this.queryMsg.IsDefault
this.canEdit = this.queryMsg.canEdit
},
deep: true
},
CostNumberList: {
handler: function (val, oldVal) {
this.IsDefault = this.queryMsg.IsDefault
this.canEdit = this.queryMsg.canEdit
this.IsDefault = this.queryMsg.IsDefault
this.canEdit = this.queryMsg.canEdit
this.getchange()
},
deep: true
......
......@@ -61,11 +61,15 @@
.CostNewPrice .el-form-item {
margin-bottom: 0 !important;
};
}
;
.select-tag {
font-weight: bold;
color: #f12a2a;
}
</style>
<template>
......@@ -75,6 +79,13 @@
<div class="QuotationFirstDiv1">
<table>
<tr>
<td width="80" class="txtRightCost">出团类型</td>
<td>
<el-select class="multiple_input" v-model="postConfig.TeamType" filterable>
<el-option v-for='item in teamList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</td>
<td width="80" class="txtRightCost">线路</td>
<td>
<el-select style="width:100%" v-model="postConfig.LineId" :placeholder="$t('pub.pleaseSel')"
......@@ -92,11 +103,7 @@
</el-option>
</el-select>
</td>
<td width="80" class="txtRightCost">客户名称</td>
<td>
<el-input v-model="postConfig.CustomerName" type="text" placeholder="客户名称" maxlength="200">
</el-input>
</td>
</tr>
<tr>
<td colspan="6" style="height:20px;">
......@@ -137,12 +144,10 @@
<el-date-picker type="date" v-model="postConfig.OutDateTime" value-format="yyyy-MM-dd" placeholder>
</el-date-picker>
</td>
<td width="80" class="txtRightCost">出团类型</td>
<td width="80" class="txtRightCost">客户名称</td>
<td>
<el-select class="multiple_input" v-model="postConfig.TeamType" filterable>
<el-option v-for='item in teamList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
<el-input v-model="postConfig.CustomerName" type="text" placeholder="客户名称" maxlength="200">
</el-input>
</td>
</tr>
</table>
......@@ -186,43 +191,47 @@
</div>
</div>
<br />
<!-- <el-tabs v-model="tabsActive" @tab-click="changeTabs">
<el-tab-pane :label="`报价单${index + 1}${item.queryMsg.IsDefault ? '(默认)' : ''}`" v-for="(item, index) in orderList" :key="index"></el-tab-pane>
</el-tabs> -->
<el-tag v-for="(item, index) in orderList" :key="index" style="margin-right: 10px;margin-bottom: 10px; cursor: pointer;" :type="index ===tabsActive ? '':'info'"
closable
@click="selectTag(index)"
:disable-transitions="false"
@close="handleClose(index)">
{{`报价单${index + 1}${item.queryMsg.IsDefault ? '(默认)' : ''}`}}
</el-tag>
<el-button class="button-new-tag" size="small" @click="addOrderTag">新增报价单</el-button>
<CostNewPriceFormVue ref="CostNewPrice" :postConfig="postConfig" :OtherPrice="currentData.OtherPrice"
:dayCostPrice="currentData.dayCostPrice" :LineList="LineList" :CostCurrencyList="currentData.CostCurrencyList"
:CostNumberList="currentData.CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt" :queryMsg="currentData.queryMsg"
:teamPrice="currentData.teamPrice"
></CostNewPriceFormVue>
<el-tag v-for="(item, index) in orderList" :key="index"
style="margin-right: 10px;margin-bottom: 10px; cursor: pointer;" :type="index ===tabsActive ? '':'info'"
closable @click="selectTag(index)" :disable-transitions="false" @close="handleClose(index)">
{{`报价单${index + 1}${item.queryMsg.IsDefault ? '(默认)' : ''}`}}
</el-tag>
<el-button class="button-new-tag" size="small" @click="addOrderTag">新增报价单</el-button>
<CostNewPriceFormVue ref="CostNewPrice" :postConfig="postConfig" :OtherPrice="currentData.OtherPrice"
:dayCostPrice="currentData.dayCostPrice" :LineList="LineList" :CostCurrencyList="currentData.CostCurrencyList"
:CostNumberList="currentData.CostNumberList" :CurrencyNumberListExt="CurrencyNumberListExt"
:queryMsg="currentData.queryMsg" :teamPrice="currentData.teamPrice"></CostNewPriceFormVue>
</el-form>
</div>
</div>
</template>
<script>
import CostNewPriceFormVue from './CostNewPriceForm.vue';
import CostNewPriceFormVue from './CostNewPriceForm.vue';
export default {
props: ["OfferArray", "postConfig", "OtherPrice", "dayCostPrice", "LineList", "CostNumberList", "CurrencyNumberListExt",
props: ["OfferArray", "postConfig", "OtherPrice", "dayCostPrice", "LineList", "CostNumberList",
"CurrencyNumberListExt",
"CostCurrencyList", "teamPrice"
],
components: {CostNewPriceFormVue},
components: {
CostNewPriceFormVue
},
data() {
return {
tabsActive: 0,
currentData: {dayCostPrice: [],CostCurrencyList: [],queryMsg: {
IsDefault: false,
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
},OtherPrice: {},teamPrice: {},CostNumberList: []},
currentData: {
dayCostPrice: [],
CostCurrencyList: [],
queryMsg: {
IsDefault: false,
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
},
OtherPrice: {},
teamPrice: {},
CostNumberList: []
},
orderList: [],
//下拉框默认值
defaultSelect: 0,
......@@ -264,13 +273,13 @@ import CostNewPriceFormVue from './CostNewPriceForm.vue';
this.changeTabs()
},
handleClose(index) {
if(this.tabsActive === index) {
if (this.tabsActive === index) {
this.tabsActive = 0
this.orderList.splice(index, 1)
this.orderList.splice(index, 1)
this.changeTabs()
} else {
this.orderList.splice(index, 1)
this.orderList.splice(index, 1)
}
},
changeTabs() {
......@@ -330,7 +339,7 @@ import CostNewPriceFormVue from './CostNewPriceForm.vue';
});
},
createDayTripPrice() {
for(let i = 0; i < this.orderList.length; i++) {
for (let i = 0; i < this.orderList.length; i++) {
this.orderList[i].dayCostPrice = this.createDayTripPriceItem([...this.orderList[i].dayCostPrice])
}
},
......@@ -396,17 +405,17 @@ import CostNewPriceFormVue from './CostNewPriceForm.vue';
postConfig: this.postConfig,
dayCostPrice: this.createDayTripPriceItem([]),
CostCurrencyList: JSON.parse(JSON.stringify(this.CostCurrencyList)),
queryMsg: {
canEdit: true,
IsDefault: false,
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
},
OtherPrice: JSON.parse(JSON.stringify(this.OtherPrice)),
teamPrice: JSON.parse(JSON.stringify(this.teamPrice)),
CostNumberList: JSON.parse(JSON.stringify(this.CostNumberList)),
queryMsg: {
canEdit: true,
IsDefault: false,
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
},
OtherPrice: JSON.parse(JSON.stringify(this.OtherPrice)),
teamPrice: JSON.parse(JSON.stringify(this.teamPrice)),
CostNumberList: JSON.parse(JSON.stringify(this.CostNumberList)),
})
this.tabsActive = this.orderList.length - 1
this.changeTabs()
......@@ -414,46 +423,46 @@ import CostNewPriceFormVue from './CostNewPriceForm.vue';
// 构建币种列表
buildCostCurrency(CostCurrencyList, CurrencyNumberListExt) {
if (CostCurrencyList && CostCurrencyList.length > 0 &&
CurrencyNumberListExt) {
CostCurrencyList.forEach(item => {
let currencyNumberItem = {
Key: item.CurrencyId,
currencyNumberList: []
};
if (CurrencyNumberListExt.length == 0) {
CurrencyNumberListExt.push(currencyNumberItem);
}
});
}
return CurrencyNumberListExt
},
CurrencyNumberListExt) {
CostCurrencyList.forEach(item => {
let currencyNumberItem = {
Key: item.CurrencyId,
currencyNumberList: []
};
if (CurrencyNumberListExt.length == 0) {
CurrencyNumberListExt.push(currencyNumberItem);
}
});
}
return CurrencyNumberListExt
},
},
mounted() {
this.getAllCurrency();
this.getCompanyList();
this.getTeamList();
console.log('CostNewPrice', this.OfferArray)
if(!this.OfferArray.length) {
console.log('CostNewPrice not OfferArray', this.OfferArray)
this.createOrderList();
if (!this.OfferArray.length) {
console.log('CostNewPrice not OfferArray', this.OfferArray)
this.createOrderList();
} else {
this.OfferArray.forEach(item => {
item.OtherPrice = item.otherPrice
item.dayCostPrice = item.dayCostPriceList
item.CostCurrencyList =item.CostCurrencyList || []
item.CostCurrencyList = item.CostCurrencyList || []
item.CurrencyNumberListExt = this.buildCostCurrency(item.CostCurrencyList, item.CurrencyNumberListExt)
item.queryMsg ={
IsDefault: Boolean(item.IsDefault),
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
}
})
item.queryMsg = {
IsDefault: Boolean(item.IsDefault),
//汇率输入
RateInput: "",
//人数
PeopleNumber: ""
}
})
this.orderList = this.OfferArray
this.changeTabs()
}
console.log('this.orderList', this.orderList,this.OfferArray)
console.log('this.orderList', this.orderList, this.OfferArray)
},
created() {},
watch: {
......@@ -465,21 +474,21 @@ import CostNewPriceFormVue from './CostNewPriceForm.vue';
},
},
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
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
this.orderList = this.OfferArray
this.changeTabs()
}
console.log('watch this.orderList', this.orderList, this.OfferArray)
},
deep: true
}
};
......
......@@ -160,7 +160,7 @@
}
return currencyNumList
}
this.postData.TravelState = this.postData.TravelState || type;
this.postData.TravelState = type;
// var nObj = {
// config: this.postData,
// dayCostPriceList: this.dayCostPriceList,
......@@ -182,7 +182,7 @@
config: this.postData,
OfferArray: data
}
console.log('保存数据',data)
console.log('保存数据',data,nObj)
// return 0;
this.loading = true;
this.apipost(
......
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