Commit 826230b8 authored by zhengke's avatar zhengke

s

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