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

酒店库存修改

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