Commit bad79d12 authored by zhengke's avatar zhengke

2

parent c2780e09
......@@ -29,7 +29,7 @@
<th width="80">操作</th>
</tr>
<tr v-for="(item,index) in dataList">
<td><div class="w80">{{index}}</div></td>
<td><div class="w80">{{index+1}}</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>
......@@ -61,8 +61,8 @@
</td>
<td>
<div class="w80">
<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 class="pHouseStyle" v-if="item.CommonReport.HotelList[0].OrderDetailsList.length>0" v-for="(o,index) in item.CommonReport.HotelList[0].OrderDetailsList">
<el-input class='w50 tcenter' @keyup.native="checkInteger(o,'HouseTypeCount')" v-model='o.HouseTypeCount<=0?item.CommonReport.HouseStatistics.HouseTypeList[index].HouseTypeCount:o.HouseTypeCount'></el-input>
</p>
</div>
</td>
......@@ -168,6 +168,17 @@
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
let totalPrice=0
this.dataList.forEach(x=>{
x.CommonReport.HotelList[0].OrderDetailsList.forEach(y=>{
y.HouseTypeCount = y.HouseTypeCount.toString();
y.HotelDiscount = y.HotelDiscount.toString();
})
x.CommonReport.HotelList[0].OrderDetailsList.forEach(y=>{
totalPrice+=y.UnitPrice*(y.HouseGuestNum-y.HotelDiscount)*(1-y.RebateRatio/100)
})
x.TotalPrice=totalPrice.toFixed(2)
});
}else{
this.Error(res.data.message);
}
......@@ -186,6 +197,10 @@
//单条保存
SaveSingle(item){
item.CommonReport.HotelList[0].HotelOrderState=1;
item.CommonReport.HotelList[0].OrderDetailsList.forEach(y=>{
y.HouseTypeCount = parseInt(y.HouseTypeCount);
y.HotelDiscount = parseInt(y.HotelDiscount);
})
this.apipost('dmcstatistics_post_SetNewHotelOrder',item.CommonReport.HotelList[0],res=>{
if(res.data.resultCode==1){
this.Success(res.data.message)
......
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