Commit 2890faae authored by youjie's avatar youjie

新增报价单 酒店调整 QuotationNewPrice

parent 29840919
...@@ -194,6 +194,7 @@ ...@@ -194,6 +194,7 @@
{{getCurrencyName(subItem.CurrencyId)}} {{getCurrencyName(subItem.CurrencyId)}}
</td> </td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length"> <td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{subItem.HotelName}}<br />
<template v-if="subItem.ContainDinnerType==1">含早餐</template> <template v-if="subItem.ContainDinnerType==1">含早餐</template>
<template v-if="subItem.ContainDinnerType==2">含晚餐</template> <template v-if="subItem.ContainDinnerType==2">含晚餐</template>
<template v-if="subItem.ContainDinnerType==3">含晚餐</template> <template v-if="subItem.ContainDinnerType==3">含晚餐</template>
......
...@@ -179,7 +179,18 @@ ...@@ -179,7 +179,18 @@
<el-option label="含早晚餐" :value='3'></el-option> <el-option label="含早晚餐" :value='3'></el-option>
</el-select> </el-select>
<br /> <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> @keyup.native="checkPrice(subItem,'HotelCostPrice')" placeholder="酒店价格"></el-input>
<br /> <br />
</td> </td>
...@@ -277,7 +288,7 @@ ...@@ -277,7 +288,7 @@
<td v-if="childIndex==0" :rowspan="CostNumberList.length" colspan="2"> <td v-if="childIndex==0" :rowspan="CostNumberList.length" colspan="2">
{{getDayXiaoJi(7,2)}} {{getDayXiaoJi(7,2)}}
</td> </td>
<td v-if="childIndex==0" :rowspan="CostNumberList.length"> <td v-if="childIndex==0" :rowspan="CostNumberList.length">
{{getDayXiaoJi(3,2)}} {{getDayXiaoJi(3,2)}}
</td> </td>
...@@ -326,7 +337,18 @@ ...@@ -326,7 +337,18 @@
<el-option label="含早晚餐" :value='3'></el-option> <el-option label="含早晚餐" :value='3'></el-option>
</el-select> </el-select>
<br /> <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> @keyup.native="checkPrice(subItem,'HotelCostPrice'),getchange()" placeholder="酒店价格"></el-input>
<br /> <br />
</td> </td>
...@@ -336,11 +358,11 @@ ...@@ -336,11 +358,11 @@
</el-input> </el-input>
</td> </td>
<td colspan="2"> <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()"> @keyup.native="checkPrice(subItem,'PassFee'),getchange()">
</el-input> </el-input>
</td> </td>
<td> <td>
<el-input type='text' v-model="subItem.ScenicCostPrice" class="w60" <el-input type='text' v-model="subItem.ScenicCostPrice" class="w60"
@keyup.native="checkPrice(subItem,'ScenicCostPrice'),getchange()"></el-input> @keyup.native="checkPrice(subItem,'ScenicCostPrice'),getchange()"></el-input>
...@@ -416,7 +438,7 @@ ...@@ -416,7 +438,7 @@
<td colspan="2"> <td colspan="2">
{{getDayXiaoJi(7,2)}} {{getDayXiaoJi(7,2)}}
</td> </td>
<td> <td>
{{getDayXiaoJi(3,2)}} {{getDayXiaoJi(3,2)}}
</td> </td>
...@@ -1013,10 +1035,55 @@ ...@@ -1013,10 +1035,55 @@
}, { }, {
value: 3, value: 3,
label: '外站自理' label: '外站自理'
}, ] }, ],
HotelName: null,//酒店下拉
loading: false
} }
}, },
methods: { 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) { DeleteFile(subIndex) {
this.teamPrice.ContractArray.splice(subIndex, 1); this.teamPrice.ContractArray.splice(subIndex, 1);
...@@ -1364,6 +1431,8 @@ ...@@ -1364,6 +1431,8 @@
DinnerCostPrice: 0, //晚餐报价 DinnerCostPrice: 0, //晚餐报价
ContainDinnerType: 0, //含餐类型(1-含早餐,2-含晚餐,3-含早晚) ContainDinnerType: 0, //含餐类型(1-含早餐,2-含晚餐,3-含早晚)
PassFee: 0, //过路费 PassFee: 0, //过路费
HotelList: [],//酒店下拉
HotelId: null,//酒店ID
HotelName: "", //酒店名称 HotelName: "", //酒店名称
RebatePrice: 0, //回佣 RebatePrice: 0, //回佣
OtherPrice: 0, //其它费用(保险、司导杂费等) OtherPrice: 0, //其它费用(保险、司导杂费等)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
</div> </div>
</template> </template>
<script> <script>
import Vue from 'Vue'
import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation"; import DirectQuotation from "../TravelNewQuotation/DirectNewQuotation";
export default { export default {
data() { data() {
...@@ -146,7 +147,12 @@ ...@@ -146,7 +147,12 @@
}, },
//保存数据 //保存数据
SaveData(type) { 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) { function getCostCurrency(CurrencyNumberListExt) {
var currencyNumList = []; var currencyNumList = [];
if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) { if (CurrencyNumberListExt != null && CurrencyNumberListExt.length > 0) {
...@@ -283,4 +289,4 @@ ...@@ -283,4 +289,4 @@
DirectQuotation: DirectQuotation 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