Commit 4ef40476 authored by 黄奎's avatar 黄奎

酒店库存修改

parent 8b71372f
......@@ -127,7 +127,8 @@
<tr>
<td width="70" style="text-align:center;" colspan="2">
<span style="color:green">{{subItem.NewHotelName}}</span>
<el-popover placement="right" width="540" trigger="click" v-model="subItem.isShowPop" v-if="subItem.OPState!=1">
<el-popover placement="right" width="540" trigger="click" v-model="subItem.isShowPop"
v-if="subItem.OPState!=1">
<comCheckHotel :ref="'comCheckHotel'+index+subIndex+''" v-on:childHotel="childHotelList"
:UseDate="item.UseTimeStr">
</comCheckHotel>
......@@ -138,7 +139,7 @@
</el-button>
</el-popover>
<template v-else>
<br /> <span class="Hotel_red">OP-指定,不能更换酒店.</span>
<br /> <span class="Hotel_red">OP-指定,不能更换酒店.</span>
</template>
</td>
</tr>
......@@ -196,7 +197,8 @@
<!-- 单价/每人 -->
<td>
<el-input @keyup.native="checkInteger(childItem,'UnitPrice')" class='w60 tcenter'
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice' :disabled="IsEditHotel==0?true:false">
@input="calculationPrice(subItem)" v-model='childItem.UnitPrice'
:disabled="IsEditHotel==0?true:false">
</el-input>
</td>
<!-- 免减人数 -->
......@@ -211,10 +213,11 @@
</td>
<!--返佣-->
<td>
<p class="pHouseStyle link" >
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'RebateRatio')"
v-model='childItem.RebateRatio' @input="calculationPrice(subItem)" :disabled="IsEditHotel==0?true:false" ></el-input> %
<span style="display:none;" class="spanlink" @click="goUrl('HotelInfo',childItem,'酒店管理')">设置</span>
<p class="pHouseStyle link">
<el-input class='w40' maxlength="2" @keyup.native="checkInteger(childItem,'RebateRatio')"
v-model='childItem.RebateRatio' @input="calculationPrice(subItem)"
:disabled="IsEditHotel==0?true:false"></el-input> %
<span style="display:none;" class="spanlink" @click="goUrl('HotelInfo',childItem,'酒店管理')">设置</span>
</p>
</td>
<!-- 金额总计 -->
......@@ -227,7 +230,8 @@
<tr>
<td width="70" style="text-align:right;">订房状态:</td>
<td>
<el-select class='w135 sel' v-model='subItem.DMCState' :placeholder="$t('pub.pleaseSel')" :disabled="IsEditHotel==0?true:false">
<el-select class='w135 sel' v-model='subItem.DMCState' :placeholder="$t('pub.pleaseSel')"
:disabled="IsEditHotel==0?true:false">
<el-option label='请选择' :value='0'></el-option>
<el-option label='确定' :value='1'></el-option>
<el-option label='暂定' :value='2'></el-option>
......@@ -240,7 +244,8 @@
<tr>
<td width="70" style="text-align:right;">确认时间:</td>
<td>
<el-date-picker v-model='subItem.SureTime' class='w135' value-format="yyyy-MM-dd" type="date" :disabled="IsEditHotel==0?true:false"></el-date-picker>
<el-date-picker v-model='subItem.SureTime' class='w135' value-format="yyyy-MM-dd" type="date"
:disabled="IsEditHotel==0?true:false"></el-date-picker>
</td>
</tr>
<tr>
......@@ -249,7 +254,8 @@
<tr>
<td width="70" style="text-align:right;">税入/税别:</td>
<td>
<el-select class='w135 sel' v-model='subItem.TaxType' :placeholder="$t('pub.pleaseSel')" @change="calculationPrice(subItem)" :disabled="IsEditHotel==0?true:false">
<el-select class='w135 sel' v-model='subItem.TaxType' :placeholder="$t('pub.pleaseSel')"
@change="calculationPrice(subItem)" :disabled="IsEditHotel==0?true:false">
<el-option label='请选择' :value='0'></el-option>
<el-option label='税入' :value='1'></el-option>
<el-option label='税别' :value='2'></el-option>
......@@ -262,7 +268,8 @@
<tr>
<td width="70" style="text-align:right;color:red">付款方式:</td>
<td>
<el-select class='w135 sel' v-model='subItem.DMCPayType' :placeholder="$t('pub.pleaseSel')" :disabled="IsEditHotel==0?true:false">
<el-select class='w135 sel' v-model='subItem.DMCPayType' :placeholder="$t('pub.pleaseSel')"
:disabled="IsEditHotel==0?true:false">
<el-option label='请选择' :value='0'></el-option>
<el-option label='现付' :value='1'></el-option>
<el-option label='签单' :value='2'></el-option>
......@@ -278,7 +285,8 @@
<tr style="display:none;">
<td width="70" style="text-align:right;">报账付款方式:</td>
<td>
<el-select class='w135 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')" :disabled="IsEditHotel==0?true:false">
<el-select class='w135 sel' v-model='subItem.PayStyle' :placeholder="$t('pub.pleaseSel')"
:disabled="IsEditHotel==0?true:false">
<el-option label='请选择' :value='0'></el-option>
<el-option label='现付' :value='1' v-if="subItem.PayStyleExt==1"></el-option>
<el-option label='签单' :value='2' v-if="subItem.PayStyleExt==2"></el-option>
......@@ -295,7 +303,8 @@
<tr v-show="subItem.PayStyle==6">
<td width="70" style="text-align:right;">付款团号:</td>
<td>
<el-input class='w135' v-model='subItem.PayTypeTCNUM' :disabled="IsEditHotel==0?true:false"></el-input>
<el-input class='w135' v-model='subItem.PayTypeTCNUM' :disabled="IsEditHotel==0?true:false">
</el-input>
</td>
</tr>
<tr>
......@@ -353,16 +362,24 @@
<el-tooltip class="item" effect="dark" content="新增" v-if="subItem.OPState!=1" placement="top-start">
<el-button @click='AddHotel(item,subIndex)' icon="iconfont icon-tianjia" type="primary"></el-button>
</el-tooltip>
<el-tooltip v-if="item.HotelOrderList.length>1 && subItem.OPState!=1" class="item" effect="dark" content="删除"
placement="top-start">
<el-tooltip v-if="item.HotelOrderList.length>1 && subItem.OPState!=1" class="item" effect="dark"
content="删除" placement="top-start">
<el-button type="primary" icon="iconfont icon-shanchu" @click='DeleteHotel(item,subIndex)'>
</el-button>
</el-tooltip>
</template>
<el-popover width="200" trigger="click" popper-class="Bus_HotelPop">
<commonHotelLog :ref="'comHotelLog'+index+subIndex+''"> </commonHotelLog>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;" @click="GetHotelLog(subItem,index,subIndex)">日志</div>
</el-popover>
<el-popover width="200" trigger="click" popper-class="Bus_HotelPop">
<commonHotelLog :ref="'comHotelLog'+index+subIndex+''"> </commonHotelLog>
<div slot="reference" class="w80" style="cursor:pointer;text-decoration:underline;"
@click="GetHotelLog(subItem,index,subIndex)">日志</div>
</el-popover>
<br />
<el-popover width="700" trigger="click" popper-class="DMC_HotelPop">
<commonPHInfo :name='"dmccomPriceHotelInfo"+index+subIndex'
:ref='"dmccomPriceHotelInfo"+index+subIndex'></commonPHInfo>
<span slot="reference" class="price" style="cursor:pointer;text-decoration:underline;"
@click="GetHotelUsePriceList(subItem.HotelId,item.UseTimeStr,index,subIndex)">库存情况</span>
</el-popover>
</td>
</tr>
</template>
......@@ -375,6 +392,7 @@
import moment from 'moment'
import comCheckHotel from "../commonPage/comCheckHotel.vue";
import commonHotelLog from "../commonPage/commonHotelLog.vue";
import commonPHlInfo from "../commonPage/commonPriceHotelInfo.vue";
export default {
data() {
return {
......@@ -399,7 +417,7 @@
checkedsubIndex: '',
loading: false,
boxHeight: 0,
//供应商列表
SupplierList: [],
ckedHotelId: 0,
......@@ -408,7 +426,7 @@
findex: 0,
childIndex: 0,
//修改酒店价格,付款方式权限[0-不能修改,1-有权限修改]
IsEditHotel:0,
IsEditHotel: 0,
//0-可以操作,1-已制单,不能操作
IsOperation: 1,
}
......@@ -416,12 +434,18 @@
components: {
comCheckHotel,
commonHotelLog,
commonPHInfo: commonPHlInfo
},
methods: {
//调用子组件获取日志方法
GetHotelLog(subItem,index,hotelSubIndex) {
//调用子组件方法
GetHotelUsePriceList(HotelId, UseDay, index, hotelSubIndex) {
let str = `dmccomPriceHotelInfo${index}${hotelSubIndex}`;
this.$refs[str][0].getHotelPriceList(HotelId, UseDay);
},
//调用子组件获取日志方法
GetHotelLog(subItem, index, hotelSubIndex) {
let str = `comHotelLog${index}${hotelSubIndex}`
this.$refs[str][0].getHotelLogsList(subItem.TCID,subItem.HotelId,subItem.CheckInDateStr);
this.$refs[str][0].getHotelLogsList(subItem.TCID, subItem.HotelId, subItem.CheckInDateStr);
},
childHotelList(ckedObj) {
this.list.forEach(x => {
......@@ -435,9 +459,9 @@
this.list[this.findex].HotelOrderList[this.childIndex].NewHotelId = ckedObj.ID;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyle = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].PayStyleExt = ckedObj.PayStyle;
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach(subItem=>{
subItem.UnitPrice=ckedObj.CostPrice;
subItem.RebateRatio=ckedObj.RebateRatio;
this.list[this.findex].HotelOrderList[this.childIndex].OrderDetailsList.forEach(subItem => {
subItem.UnitPrice = ckedObj.CostPrice;
subItem.RebateRatio = ckedObj.RebateRatio;
});
this.calculationPrice(this.list[this.findex].HotelOrderList[this.childIndex]);
},
......@@ -570,7 +594,7 @@
}, res => {
if (res.data.resultCode == 1) {
this.IsOperation = res.data.data.IsOperation;
this.IsEditHotel=res.data.data.IsEditHotel;
this.IsEditHotel = res.data.data.IsEditHotel;
let list = res.data.data.HotelOrderListReport;
this.CreateBy = res.data.data.CreateBy;
this.CreateByPhoto = res.data.data.CreateByPhoto;
......@@ -607,15 +631,13 @@
calculationPrice(obj) {
let totalPrice = 0;
obj.OrderDetailsList.forEach(item => {
//税别
if(obj.TaxType==2)
{
totalPrice += item.UnitPrice * (item.BookNum - item.HotelDiscount) * (1+0.08- item.RebateRatio / 100);
}
else
{
totalPrice += item.UnitPrice * (item.BookNum - item.HotelDiscount) * (1 - item.RebateRatio / 100);
}
//税别
if (obj.TaxType == 2) {
totalPrice += item.UnitPrice * (item.BookNum - item.HotelDiscount) * (1 + 0.08 - item.RebateRatio /
100);
} else {
totalPrice += item.UnitPrice * (item.BookNum - item.HotelDiscount) * (1 - item.RebateRatio / 100);
}
})
obj.TotalPrice = totalPrice.toFixed(2);
this.$forceUpdate();
......@@ -684,9 +706,8 @@
if (y.BookNum == "") {
y.BookNum = 0;
}
if(y.RebateRatio=="")
{
y.RebateRatio=0;
if (y.RebateRatio == "") {
y.RebateRatio = 0;
}
})
});
......@@ -727,9 +748,8 @@
if (y.BookNum == "") {
y.BookNum = 0;
}
if(y.RebateRatio=="")
{
y.RebateRatio=0;
if (y.RebateRatio == "") {
y.RebateRatio = 0;
}
})
});
......@@ -853,7 +873,7 @@
color: red;
}
.roomReservationsDetailsTalbe .hotelTable {
......
......@@ -3,21 +3,21 @@
</style>
<template>
<div class="commonPriceHotelInfo">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="singeRowTable" v-loading="loading">
<tr>
<th width="100">日期</th>
<th width="135">占房时间</th>
<th width="120">团期</th>
<th width="80">库存</th>
<th width="80">使用库存</th>
<th width="80">状态</th>
</tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="singeRowTable" v-loading="loading">
<tr>
<th width="100">日期</th>
<th width="135">占房时间</th>
<th width="120">团期</th>
<th width="80">总库存</th>
<th width="80">使用库存</th>
<th width="80">状态</th>
</tr>
<template v-if="HotelPriceList.length>0">
<tr v-for="(item,index) in HotelPriceList">
<td>
{{item.UseTimeStr}}
</td>
<td>
<td>
{{item.CreateTimeStr}}
</td>
<td>
......@@ -34,7 +34,15 @@
<template v-else><span style="color:red;">暂定</span></template>
</td>
</tr>
</table>
</template>
<template v-else>
<tr>
<td colspan="6">
<span style="color:red;"> 暂无库存使用记录.</span>
</td>
</tr>
</template>
</table>
</div>
</template>
<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