Commit 826230b8 authored by zhengke's avatar zhengke

s

parent b7103bd8
......@@ -30,7 +30,7 @@
</tr>
<tr v-for="(item,index) in dataList">
<td><div class="w80">{{index}}</div></td>
<td><div class="w120">{{item.TCNUMS}}</div></td>
<td><div class="w120">{{item.CommonReport.HotelList[0].TCNUM}}</div></td>
<td><div class="w120">{{item.StartCityNames}}</div></td>
<td><div class="w120">{{item.LeaderName}}</div></td>
<td><div class="w120">{{item.GuideName}}</div></td>
......@@ -61,42 +61,42 @@
</td>
<td>
<div class="w80">
<p class="pHouseStyle" v-for="o in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="o in item.CommonReport.HotelList[0].OrderDetailsList">
<el-input class='w50 tcenter' @keyup.native="checkInteger(o,'HouseTypeCount')" v-model='o.HouseTypeCount'></el-input>
</p>
</div>
</td>
<td>
<div class="w80">
<p class="pHouseStyle" :class="{colorRed:o.HouseTypeCount-item.CommonReport.HouseStatistics.HouseTypeList[index].HouseTypeCount<0}" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" :class="{colorRed:o.HouseTypeCount-item.CommonReport.HouseStatistics.HouseTypeList[index].HouseTypeCount<0}" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
{{o.HouseTypeCount-item.CommonReport.HouseStatistics.HouseTypeList[index].HouseTypeCount}}
</p>
</div>
</td>
<td>
<div class="w120">
<p class="pHouseStyle" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList" @input="calculationPrice(item)">
<el-input @keyup.native="checkInteger(o,'UnitPrice')" class='w80 tcenter' v-model='o.UnitPrice'></el-input>
</p>
</div>
</td>
<td>
<div class="w80">
<p class="pHouseStyle" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList" @input="calculationPrice(item)">
<el-input class='w50' @keyup.native="checkInteger(o,'HotelDiscount')" v-model='o.HotelDiscount'></el-input>
</p>
</div>
</td>
<td>
<div class="w80">
<p class="pHouseStyle" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
{{o.UnitPrice*(o.HouseGuestNum-o.HotelDiscount)}}
</p>
</div>
</td>
<td>
<div class="w80">
<p class="pHouseStyle link" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<p class="pHouseStyle link" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList" @input="calculationPrice(item)">
<span class="spanlink" v-if='o.IsRebateRatio==0' @click="goUrl('HotelInfo',o,'酒店管理')">设置</span>
<span v-if='o.IsRebateRatio!=0'>{{o.RebateRatio}}</span>
</p>
......@@ -109,12 +109,12 @@
</td>
<td>
<div class="w120">
<el-select class='w100 sel' v-model='item.PayStyle' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' value='0' ></el-option>
<el-option label='现付' value='1' ></el-option>
<el-option label='签单' value='2' ></el-option>
<el-option label='实物抵扣' value='5' ></el-option>
<el-option label='预付' value='4' ></el-option>
<el-select class='w100 sel' v-model='item.CommonReport.HotelList[0].PayStyle' :placeholder="$t('pub.pleaseSel')">
<el-option label='请选择' :value='0' ></el-option>
<el-option label='现付' :value='1' ></el-option>
<el-option label='签单' :value='2' ></el-option>
<el-option label='实物抵扣' :value='5' ></el-option>
<el-option label='预付' :value='4' ></el-option>
</el-select>
</div>
</td>
......@@ -126,12 +126,12 @@
</td>
<td>
<div class="w150">
<el-input class='w120' v-model='item.ReserveNo'></el-input>
<el-input class='w120' v-model='item.CommonReport.HotelList[0].ReserveNo'></el-input>
</div>
</td>
<td>
<div class="w150">
<el-input type='textarea' class='w120' v-model='item.Remarks'></el-input>
<el-input type='textarea' class='w120' v-model='item.CommonReport.HotelList[0].Remarks'></el-input>
</div>
</td>
<td>
......@@ -140,7 +140,7 @@
</tr>
<tbody v-if="dataList.length===0">
<tr>
<td :colspan="3">暂无数据</td>
<td :colspan="24">暂无数据</td>
</tr>
</tbody>
</table>
......@@ -162,8 +162,10 @@
},
methods: {
getList(){
this.loading = true;
this.apipost("dmcstatistics_post_GetHotelByIDAndUseTime", this.msg, res => {
console.log(res);
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
}else{
......@@ -184,15 +186,23 @@
//单条保存
SaveSingle(item){
item.CommonReport.HotelList[0].HotelOrderState=1;
this.apipost('dmcstatistics_post_SetNewHotelOrder',item,res=>{
this.apipost('dmcstatistics_post_SetNewHotelOrder',item.CommonReport.HotelList[0],res=>{
if(res.data.resultCode==1){
this.Success(res.data.message)
}else{
this.Error(res.data.message)
}
},err=>{})
}
},
//计算总价
calculationPrice(obj){
let totalPrice=0
obj.CommonReport.HotelList[0].OrderDetailsList.forEach(item=>{
totalPrice+=item.UnitPrice*(item.HouseGuestNum-item.HotelDiscount)*(1-item.RebateRatio/100)
})
obj.TotalPrice=totalPrice.toFixed(2)
this.$forceUpdate()
},
},
mounted: function () {
this.msg.HotelId = this.$route.query.HotelId;
......
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