Commit 4060cd5b authored by 黄奎's avatar 黄奎

11

parent 1b067ae0
......@@ -75,7 +75,7 @@
<th>{{$t('sm.Date')}}</th>
<th>{{$t('hotel.table_hotelname')}}</th>
</tr>
<template v-for="(lItem,lIndex) in list">
<template v-for="(lItem,lIndex) in dataList">
<tr v-for="(subItem,subIndex) in lItem.HotelOrderList" :key="subIndex+lIndex">
<td style="width:120px;">
{{lItem.UseTimeStr}}
......@@ -166,7 +166,7 @@
</tr>
</thead>
<tbody>
<template v-for="(item,index) in list">
<template v-for="(item,index) in dataList">
<template v-for="(subItem,subIndex) in item.HotelOrderList">
<tr v-for="(childItem,childIndex) in subItem.OrderDetailsList" :key="`h_`+index+subIndex+childIndex">
<td v-if="childIndex==0&&subIndex==0" :rowspan="6*item.HotelOrderList.length">
......@@ -321,8 +321,7 @@
</td>
<td>
<el-input class='w40 tcenter' maxlength="2" @keyup.native="checkInteger(childItem,'BookNum')"
@input="calculationPrice(subItem)" v-model='childItem.BookNum'
:disabled="IsEditHotelPeople==0?true:false">
@input="calcPrice()" v-model='childItem.BookNum' :disabled="IsEditHotelPeople==0?true:false">
</el-input>
</td>
<!-- 单价/每人 -->
......@@ -331,7 +330,7 @@
<template v-if="(subItem.LineId==14||subItem.LineId==118)">
<template v-if="subItem.IsHaveHotelStock==1||childItem.UnitPrice>0">
<el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter'
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice'></el-input>
@input="calcPrice()" v-model='childItem.UnitPrice'></el-input>
</template>
<template v-else>
<el-popover placement="right" width="540" trigger="click"
......@@ -348,20 +347,19 @@
</template>
<template v-else>
<el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter'
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice'></el-input>
@input="calcPrice()" v-model='childItem.UnitPrice'></el-input>
</template>
</template>
<template v-else>
<el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter'
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice'
:disabled="IsEditHotel==0?true:false">
@input="calcPrice()" v-model='childItem.UnitPrice' :disabled="IsEditHotel==0?true:false">
</el-input>
</template>
</td>
<!-- 免减人数 -->
<td>
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'HotelDiscount')"
v-model='childItem.HotelDiscount' @input="calculationPrice(subItem)">
v-model='childItem.HotelDiscount' @input="calcPrice()">
</el-input>
</td>
<!-- 金额小计 -->
......@@ -381,17 +379,16 @@
<td>
<template v-if="childIndex<4">
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'RebateRatio')"
v-model='childItem.RebateRatio'
@input="SetRebateRatio(subItem,childItem.RebateRatio),calculationPrice(subItem)"
v-model='childItem.RebateRatio' @input="SetRebateRatio(subItem,childItem.RebateRatio),calcPrice()"
:disabled="IsEditHotel==0?true:false"></el-input> %
</template>
<template v-if="childIndex==5">
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'RebateRatio')"
v-model='childItem.RebateRatio' @input="calculationPrice(subItem)" :disabled="true"></el-input> %
v-model='childItem.RebateRatio' @input="calcPrice()" :disabled="true"></el-input> %
</template>
<template v-if="childIndex==4 && subItem.DriverGuideIsRebate==0">
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'RebateRatio')"
v-model='childItem.RebateRatio' @input="calculationPrice(subItem)" :disabled="true"></el-input> %
v-model='childItem.RebateRatio' @input="calcPrice()" :disabled="true"></el-input> %
</template>
</td>
<!--返佣金额-->
......@@ -420,9 +417,6 @@
<!-- 金额总计 -->
<td v-if="childIndex==0" :rowspan="6" style="white-space:nowrap;">
{{subItem.TotalPrice}}
<template v-if="subItem.NewTotalPrice">
<br /><span style="color:red;">{{subItem.NewTotalPrice}}</span>
</template>
</td>
<!-- 付款方式 -->
<td v-if="childIndex==0" :rowspan="6">
......@@ -431,7 +425,7 @@
<td width="70" style="text-align:right;">{{$t('hotel.hotel_Currency')}}:</td>
<td>
<el-select v-model="subItem.CurrencyId" :placeholder="$t('pub.pleaseSel')" class='w135 sel'
@change="calculationPrice(subItem)">
@change="calcPrice()">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="(item,index) in allCurrencyList" :key="index" :label="item.Name"
:value="item.ID">
......@@ -446,7 +440,7 @@
<td width="70" style="text-align:right;">{{$t('ground.dfzhuangtai')}}:</td>
<td>
<el-select class='w135 sel' v-model='subItem.DMCState' :placeholder="$t('pub.pleaseSel')"
:disabled="IsEditHotel==0?true:false">
:disabled="IsEditHotel==0?true:false" @change="changeState(subItem)">
<el-option :label="$t('pub.pleaseSel')" :value='0'></el-option>
<el-option :label="$t('pub.sureBtn')" :value='1'></el-option>
<el-option :label="$t('visa.v_zanding')" :value='2'></el-option>
......@@ -470,7 +464,7 @@
<td width="70" style="text-align:right;">{{$t('ground.shurushubie')}}:</td>
<td>
<el-select class='w135 sel' v-model='subItem.TaxType' :placeholder="$t('pub.pleaseSel')"
@change="calculationPrice(subItem)" :disabled="IsEditHotel==0?true:false">
@change="calcPrice()" :disabled="IsEditHotel==0?true:false">
<el-option :label="$t('pub.pleaseSel')" :value='0'></el-option>
<el-option :label="$t('pub.SR')" :value='1'></el-option>
<el-option :label="$t('pub.SB')" :value='2'></el-option>
......@@ -506,7 +500,7 @@
<td width="70" style="text-align:right;">{{$t('ground.sidaoffkfs')}}:</td>
<td>
<el-select class='w135 sel' v-model='subItem.DMCPayType' :placeholder="$t('pub.pleaseSel')"
:disabled="IsEditHotel==0?true:false" @change="calculationPrice(subItem)">
:disabled="IsEditHotel==0?true:false" @change="calcPrice()">
<el-option :label="$t('pub.pleaseSel')" :value='0'></el-option>
<el-option :label="$t('ground.yuejie')" :value='9'></el-option>
<el-option :label="$t('ground.xianfu')" :value='1'></el-option>
......@@ -585,7 +579,7 @@
</span>
</td>
</tr>
<tr v-if="EditBtn">
<tr v-if="EditBtn" style="display:none;">
<td width="70" style="text-align:right;">{{$t('ground.shifoutbgxfj')}}:</td>
<td>
<el-select class='w135 sel' v-model='subItem.IsSyncHotelCount'>
......@@ -597,14 +591,11 @@
</table>
</td>
<!-- 操作 -->
<td v-if="childIndex==0" :rowspan="5">
<td v-if="childIndex==0" :rowspan="6">
<template v-if="subItem.OPState==1">
<span class="Hotel_red">{{$t('salesModule.OPZD')}}</span>
</template>
<template v-if="IsOperation!=1">
<el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" placement="top-start">
<el-button icon="iconfont icon-baocun1" @click="SaveSingle(subItem)" type="primary"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('pub.addBtn')" v-if="subItem.OPState!=1"
placement="top-start">
<el-button @click='AddHotel(item,subIndex)' icon="iconfont icon-tianjia" type="primary">
......@@ -626,8 +617,52 @@
</template>
</template>
</tbody>
<tfoot>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td colspan="2">
合计:
</td>
<td>
<font style="color:red;font-weight:bold;">
{{allTotalPrice}}
</font>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</tfoot>
</table>
<div class="noDataNotice" v-if="list.length<1">
<div class="noDataNotice" v-if="dataList.length<1">
<i class="iconfont icon-kong"></i>
<p>{{$t('active.ld_noData')}}</p>
</div>
......@@ -646,7 +681,7 @@
LineId: 0,
EditBtn: false, //房餐景点修改权限
defaultSelectValue: 0,
list: [],
dataList: [],
roomList: [],
TCNUM: '',
flightTotal: 0,
......@@ -727,6 +762,7 @@
ChooseCountry: "651",
currentUserInfo: {},
saveLoading: false, //保存,防止重复提交
allTotalPrice: 0,
}
},
components: {
......@@ -735,6 +771,14 @@
setHotelStock,
},
methods: {
//订房状态切换
changeState(subItem) {
if (subItem.DMCState == 1) {
subItem.SureTime = this.$commonUtils.getCurrentDate();
} else {
subItem.SureTime = "";
}
},
//批量修改房间数和房间人
BatchHotelOrder() {
var checkArray = [];
......@@ -789,7 +833,7 @@
//获取子组件返回的数据
childHotelList(ckedObj) {
//使用时间
var oldData = JSON.parse(JSON.stringify(this.list[this.findex].HotelOrderList[this.childIndex]));
var oldData = JSON.parse(JSON.stringify(this.dataList[this.findex].HotelOrderList[this.childIndex]));
var useTime = oldData.CheckInDateStr;
var hotelId = ckedObj.ID;
var TCID = oldData.TCID;
......@@ -816,7 +860,7 @@
}
//库存充足或没有酒店库存的情况
else if (objData.isOverStock == 1 || objData.isOverStock == -1) {
var tempOrderObj = this.list[this.findex].HotelOrderList[this.childIndex];
var tempOrderObj = this.dataList[this.findex].HotelOrderList[this.childIndex];
if (tempOrderObj) {
tempOrderObj.Address = ckedObj.Address;
tempOrderObj.NewHotelName = ckedObj.Name;
......@@ -840,7 +884,7 @@
}
});
}
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]);
this.calcPrice();
let str = `elPopoverHotel${this.findex}${this.childIndex}`
//关闭组件
this.$refs[str][0].doClose();
......@@ -856,8 +900,8 @@
let str = `elPopoverEditHotelPrice${this.findex}${this.childIndex}`
//关闭组件
this.$refs[str][0].doClose();
var tempObj = this.list[this.findex].HotelOrderList[this.childIndex];
if (this.list[this.findex].HotelOrderList[this.childIndex]) {
var tempObj = this.dataList[this.findex].HotelOrderList[this.childIndex];
if (this.dataList[this.findex].HotelOrderList[this.childIndex]) {
if (tempObj && tempObj.IsHaveHotelStock) {
tempObj.IsHaveHotelStock = 1;
}
......@@ -949,7 +993,7 @@
var fileUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
//批量上传
if (this.IsMoreUpdate == 1) {
this.list.forEach((sItem, sIndex) => {
this.dataList.forEach((sItem, sIndex) => {
sItem.HotelOrderList.forEach((subItem, subIndex) => {
if (subItem.IsChecked) {
subItem.ContractUrl = fileUrl;
......@@ -960,7 +1004,7 @@
});
this.isShowPiliangPop = false;
} else {
this.list[this.checkedIndex].HotelOrderList[this.checkedsubIndex].ContractUrl = fileUrl;
this.dataList[this.checkedIndex].HotelOrderList[this.checkedsubIndex].ContractUrl = fileUrl;
}
this.IsMoreUpdate = 0;
this.$forceUpdate()
......@@ -1035,7 +1079,6 @@
if (list != null && list.length > 0) {
list.forEach((item, sIndex) => {
item.HotelOrderList.forEach(subItem => {
subItem.hotelList.push({
Name: subItem.NewHotelName,
ID: subItem.NewHotelId
......@@ -1044,7 +1087,6 @@
if (subItem.CurrencyId == 0) {
subItem.CurrencyId = 3;
}
this.calculationPrice(subItem);
subItem.OrderDetailsList.forEach((x, index1) => {
x.HouseTypeCount = x.HouseTypeCount.toString();
x.UnitPrice = x.UnitPrice.toString();
......@@ -1066,7 +1108,8 @@
})
})
});
this.list = list;
this.dataList = list;
this.calcPrice();
this.$forceUpdate();
}
} else {
......@@ -1075,70 +1118,47 @@
this.loading = false
}, err => {})
},
calculationPrice(obj) {
//计算价格
calcPrice() {
let totalPrice = 0;
//获取当前选中的对象
let currentObj = {};
if (obj.CurrencyId != 0) {
currentObj = this.allCurrencyList.find(item => {
return item.ID === obj.CurrencyId; //筛选出匹配数据
});
}
//日元
let jpaObj = this.allCurrencyList.find(item => {
return item.ID === 3; //筛选出匹配数据
});
obj.OrderDetailsList.forEach((item, index) => {
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(rItem => {
if (rItem.HotelOrderList && rItem.HotelOrderList.length > 0) {
rItem.HotelOrderList.forEach(oItem => {
var tempPrice = 0;
oItem.OrderDetailsList.forEach((dItem, index) => {
var coefficient = 1;
//税别
if (obj.TaxType == 2) {
if (oItem.TaxType == 2) {
coefficient = 1 + this.XiaoFeiTaxFee;
}
if (index == 4 && obj.DMCPayType == 9) {
tempPrice = 0;
if (index == 4 && oItem.DMCPayType == 9) {
tempPrice += 0;
} else {
tempPrice = item.UnitPrice * (item.BookNum - item.HotelDiscount) * (coefficient - item.RebateRatio /
tempPrice += dItem.UnitPrice * (dItem.BookNum - dItem.HotelDiscount) * (
coefficient - dItem.RebateRatio /
100);
}
totalPrice += tempPrice;
})
totalPrice += obj.ParkFee + obj.CityTax + obj.InTangTax;
obj.TotalPrice = totalPrice.toFixed(2);
if (this.LineId == 14) {
if (currentObj && currentObj.ID > 0) {
//人民币
if (currentObj.ID == 1) {
obj.NewTotalPrice = currentObj.Name + ":" + (totalPrice * jpaObj.PayRate).toFixed(2);
}
//日元
else if (currentObj.ID == 3) {
obj.NewTotalPrice = "";
} else {
if (currentObj.CurrentRate > 1) {
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice * jpaObj.PayRate) / currentObj.CurrentRate)
.toFixed(2);
} else {
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice * jpaObj.PayRate) * currentObj.CurrentRate)
.toFixed(2);
}
}
} else {
obj.NewTotalPrice = "";
oItem.TotalPrice = tempPrice.toFixed(2);
totalPrice += tempPrice;
});
}
});
}
this.allTotalPrice = totalPrice.toFixed(2);
this.$forceUpdate();
},
saveList(type) {
if (type == 0) {
this.list.forEach(item => {
this.dataList.forEach(item => {
item.HotelOrderList.forEach(subItem => {
subItem.HotelOrderState = 0;
});
})
}
if (type == 1) {
this.list.forEach(item => {
this.dataList.forEach(item => {
item.HotelOrderList.forEach(subItem => {
subItem.HotelOrderState = 1;
});
......@@ -1147,7 +1167,7 @@
var flag = true;
var isUpload = true;
var str = "";
this.list.forEach(item => {
this.dataList.forEach(item => {
item.HotelOrderList.forEach(subItem => {
if (isUpload && subItem.PayStyle == 1 && subItem.ContractUrl == '' && !this.EditBtn) {
str += `${this.$t('objFill.qingshangchuan')}${item.UseTimeStr}${this.$t('objFill.deshoups')}`
......@@ -1183,7 +1203,7 @@
})
this.saveLoading = true;
this.loading = true;
this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
this.apipost('dmcstatistics_get_SetHotelOrder', this.dataList, res => {
this.loading = false;
this.saveLoading = false;
if (res.data.resultCode == 1) {
......@@ -1194,56 +1214,6 @@
}
}, err => {})
},
//单条保存
SaveSingle(item) {
item.HotelOrderState = 1;
var flag = true;
var isUpload = true;
var str = "";
this.list.forEach(item => {
item.HotelOrderList.forEach(subItem => {
if (isUpload && subItem.PayStyle == 1 && subItem.ContractUrl == '' && !this.EditBtn) {
str += `${this.$t('objFill.qingshangchuan')}${item.UseTimeStr}${this.$t('objFill.deshoups')}`
isUpload = false;
}
subItem.OrderDetailsList.forEach(y => {
if (y.HouseTypeCount) {
y.HouseTypeCount = parseFloat(y.HouseTypeCount);
} else {
y.HouseTypeCount = 0;
}
if (y.UnitPrice) {
y.UnitPrice = parseInt(y.UnitPrice);
} else {
y.UnitPrice = 0;
}
if (y.HotelDiscount) {
y.HotelDiscount = parseInt(y.HotelDiscount);
} else {
y.HotelDiscount = 0;
}
if (y.BookNum == "") {
y.BookNum = 0;
}
if (!this.$commonUtils.isNumber(y.RebateRatio)) {
y.RebateRatio = 0;
}
})
if (!this.$commonUtils.isNumber(subItem.TotalPrice)) {
subItem.TotalPrice = 0;
}
});
})
this.apipost('dmcstatistics_get_SetHotelOrder', this.list, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
}, err => {})
},
// 获取供应商
initSupplier() {
this.apipost("travel_get_GetAllHotelList", {
......
<style scoped>
.bookDinnerStatisticsTalbe {
table-layout: fixed;
}
.bookDinnerStatisticsTalbe thead tr th {
position: sticky;
top: 0;
z-index: 10;
}
</style>
<template>
<div>
<div class="query-box" style="border-bottom: none;">
......@@ -15,8 +26,10 @@
</li>
</ul>
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle">
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}">
<table border="0" cellspacing="1" cellpadding="0" class="bookDinnerStatisticsTalbe" v-loading="loading">
<thead>
<tr>
<th>
{{$t('salesModule.CompanyNum')}}
......@@ -42,6 +55,8 @@
<th width="210">{{$t('ground.fkfsdcfsdth')}}</th>
<th width="170">{{$t('pub.pubRemark')}}</th>
</tr>
</thead>
<tbody>
<template v-for="(item,index) in dinnerList">
<template v-for="(subItem,subIndex) in item.DiningSummaryList">
<tr v-for="(childItem,childIndex) in subItem.DiningPriceList" :key="`d_`+index+subIndex+childIndex">
......@@ -59,7 +74,7 @@
</span>
</td>
</tr>
<tr>
<tr v-if="subItem.Tel&&subItem.Tel!=''">
<td width="40">
{{$t('hotel.table_tel')}}
</td>
......@@ -250,15 +265,15 @@
<td style="text-align:left;">
<!--午餐-->
<template v-if="subItem.UseDinnerType==2">
<el-time-select class='w135' :placeholder="$t('objFill.yuyuetime')" v-model="subItem.BookTime"
:picker-options="{ start: '11:00',step: '00:15',end: '14:00'}"
<el-time-select class='w135' :placeholder="$t('objFill.yuyuetime')"
v-model="subItem.BookTime" :picker-options="{ start: '11:00',step: '00:15',end: '14:00'}"
@keyup.native="checkTime(subItem,'BookTime')">
</el-time-select>
</template>
<!--晚餐-->
<template v-if="subItem.UseDinnerType==3">
<el-time-select class='w135' :placeholder="$t('objFill.yuyuetime')" v-model="subItem.BookTime"
:picker-options="{ start: '17:00',step: '00:15', end: '20:00'}"
<el-time-select class='w135' :placeholder="$t('objFill.yuyuetime')"
v-model="subItem.BookTime" :picker-options="{ start: '17:00',step: '00:15', end: '20:00'}"
@keyup.native="checkTime(subItem,'BookTime')">
</el-time-select>
</template>
......@@ -304,6 +319,7 @@
</tr>
</template>
</template>
</tbody>
<tfoot>
<tr>
<td>
......@@ -364,6 +380,7 @@
LineId: 0,
currentUserInfo: {},
sTotalPrice: 0, //合计
boxHeight: 0,
};
},
components: {
......@@ -581,6 +598,8 @@
this.allCurrencyList = res.data.data;
}
}, err => {});
let height = window.innerHeight - 65 - 55;
this.boxHeight = height;
}
};
......@@ -635,4 +654,5 @@
.bookDinnerStatisticsTalbe .dinnerTable tr td {
border: none;
}
</style>
<style scoped>
.admissionStatisticsDetailsTalbe {
table-layout: fixed;
}
.admissionStatisticsDetailsTalbe thead tr th {
position: sticky;
top: 0;
z-index: 10;
}
</style>
<template>
<div>
<div class="query-box" style="border-bottom: none;">
......@@ -15,8 +27,10 @@
</li>
</ul>
</div>
<div style="width: 100%; overflow-y: auto;padding-bottom: 10px; height: 100%; " class="ownScrollbarStyle">
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}">
<table border="0" cellspacing="1" cellpadding="0" class="admissionStatisticsDetailsTalbe" v-loading="loading">
<thead>
<tr>
<th>
{{$t('salesModule.CompanyNum')}}
......@@ -41,6 +55,8 @@
<th width="210">{{$t('ground.fkfsdth')}}</th>
<th width="200">{{$t('pub.pubRemark')}}</th>
</tr>
</thead>
<tbody>
<template v-for="(item,index) in DataList">
<template v-for="(subItem,subIndex) in item.ScenicStatisticsList">
<tr v-for="(childItem,childIndex) in subItem.TicketPriceList" :key="`s_`+index+subIndex+childIndex">
......@@ -103,8 +119,8 @@
{{childItem.PeopleNum}}
</td>
<td>
<el-input class='w50 tcenter' v-model='childItem.UsePeopleNum' type="number" @input='calculationPrice()'
@keyup.native="checkInteger(childItem,'UsePeopleNum')"></el-input>
<el-input class='w50 tcenter' v-model='childItem.UsePeopleNum' type="number"
@input='calculationPrice()' @keyup.native="checkInteger(childItem,'UsePeopleNum')"></el-input>
</td>
<td>
<el-input class='w50 tcenter' maxlength='2' v-model='childItem.Discount' type="number"
......@@ -187,6 +203,7 @@
</tr>
</template>
</template>
</tbody>
<tfoot>
<tr>
<td>
......@@ -241,6 +258,7 @@
LineId: 0, //线路编号
currentUserInfo: {},
sTotalPrice: 0, //合计
boxHeight: 0,
}
},
methods: {
......@@ -381,6 +399,9 @@
this.GuestNum = this.$route.query.GuestNum;
this.getList();
this.getCurrencyList();
let height = window.innerHeight - 65 - 55;
this.boxHeight = height;
},
}
......
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