Commit 2890faae authored by youjie's avatar youjie

新增报价单 酒店调整 QuotationNewPrice

parent 29840919
......@@ -194,6 +194,7 @@
{{getCurrencyName(subItem.CurrencyId)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{subItem.HotelName}}<br />
<template v-if="subItem.ContainDinnerType==1">含早餐</template>
<template v-if="subItem.ContainDinnerType==2">含晚餐</template>
<template v-if="subItem.ContainDinnerType==3">含晚餐</template>
......
......@@ -179,7 +179,18 @@
<el-option label="含早晚餐" :value='3'></el-option>
</el-select>
<br />
<el-input type='text' v-model="subItem.HotelCostPrice" class="w100"
<el-select
filterable remote
:remote-method="(query) => remoteSearchAdGroup(query, subItem)"
v-model='subItem.HotelId'
class="w100" placeholder="检索酒店"
:loading="loading"
@change="getHotel(subItem,subItem.HotelId)">
<el-option v-for="(x,index) in subItem.HotelList"
:key="x.ID" :label="x.Name" :value='x.ID'></el-option>
</el-select>
</br/>
<el-input type='text' v-model="subItem.HotelCostPrice" class="w100" style="margin-bottom: 5px;"
@keyup.native="checkPrice(subItem,'HotelCostPrice')" placeholder="酒店价格"></el-input>
<br />
</td>
......@@ -277,7 +288,7 @@
<td v-if="childIndex==0" :rowspan="CostNumberList.length" colspan="2">
{{getDayXiaoJi(7,2)}}
</td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,2)}}
</td>
......@@ -326,7 +337,18 @@
<el-option label="含早晚餐" :value='3'></el-option>
</el-select>
<br />
<el-input type='text' v-model="subItem.HotelCostPrice" class="w100"
<el-select
filterable remote
:remote-method="(query) => remoteSearchAdGroup(query, subItem)"
v-model='subItem.HotelId'
class="w100" placeholder="检索酒店"
:loading="loading"
@change="getHotel(subItem,subItem.HotelId)">
<el-option v-for="(x,index) in subItem.HotelList"
:key="x.ID" :label="x.Name" :value='x.ID'></el-option>
</el-select>
</br/>
<el-input type='text' v-model="subItem.HotelCostPrice" class="w100" style="margin-bottom: 5px;"
@keyup.native="checkPrice(subItem,'HotelCostPrice'),getchange()" placeholder="酒店价格"></el-input>
<br />
</td>
......@@ -336,11 +358,11 @@
</el-input>
</td>
<td colspan="2">
<el-input type='text' v-model="subItem.PassFee" class="w60"
<el-input type='text' v-model="subItem.PassFee" class="w60"
@keyup.native="checkPrice(subItem,'PassFee'),getchange()">
</el-input>
</td>
<td>
<el-input type='text' v-model="subItem.ScenicCostPrice" class="w60"
@keyup.native="checkPrice(subItem,'ScenicCostPrice'),getchange()"></el-input>
......@@ -416,7 +438,7 @@
<td colspan="2">
{{getDayXiaoJi(7,2)}}
</td>
<td>
{{getDayXiaoJi(3,2)}}
</td>
......@@ -1013,10 +1035,55 @@
}, {
value: 3,
label: '外站自理'
}, ]
}, ],
HotelName: null,//酒店下拉
loading: false
}
},
methods: {
// 获取酒店名称
getHotel(subItem,HotelId){
subItem.HotelList.forEach(x=>{
if(x.ID==HotelId){
subItem.HotelName = x.Name
}
})
this.$forceUpdate()
},
remoteSearchAdGroup(query,subItem) {
if (query !== '') {
this.loading = true;
this.initHotel(query,subItem)
} else {
subItem.HotelList = []
this.HotelName = [];
}
},
//初始化酒店列表
initHotel(query,subItem) {
this.apipost(
"hotel_post_GetList", {
Name: query
},
res => {
this.loading = false
if (res.data.resultCode == 1) {
for(let i=0;i<this.dayCostPrice.length;i++){
if(!this.dayCostPrice[i].HotelList||this.dayCostPrice[i].HotelList.length==0){
this.dayCostPrice[i].HotelList = res.data.data
}
}
if(subItem&&(subItem.HotelList||subItem.HotelList.length>0)){
subItem.HotelList = res.data.data
subItem.HotelId = null
subItem.HotelName = ''
}
this.HotelName = res.data.data;
}
},
null
);
},
//删除文件
DeleteFile(subIndex) {
this.teamPrice.ContractArray.splice(subIndex, 1);
......@@ -1364,6 +1431,8 @@
DinnerCostPrice: 0, //晚餐报价
ContainDinnerType: 0, //含餐类型(1-含早餐,2-含晚餐,3-含早晚)
PassFee: 0, //过路费
HotelList: [],//酒店下拉
HotelId: null,//酒店ID
HotelName: "", //酒店名称
RebatePrice: 0, //回佣
OtherPrice: 0, //其它费用(保险、司导杂费等)
......
......@@ -18,6 +18,7 @@
</div>
</template>
<script>
import Vue from 'Vue'
import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation";
export default {
data() {
......@@ -146,7 +147,12 @@
},
//保存数据
SaveData(type) {
const data = this.$refs["QuotationPrice"].getData()
const data = JSON.parse(JSON.stringify(this.$refs["QuotationPrice"].getData()))
data.forEach(x=>{
x.dayCostPrice.forEach(y=>{
delete y.HotelList
})
})
function getCostCurrency(CurrencyNumberListExt) {
var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
......@@ -283,4 +289,4 @@
DirectQuotation: DirectQuotation
}
};
</script>
\ No newline at end of file
</script>
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