Commit 51af9f1e authored by zhengke's avatar zhengke

s

parent 7bfd23fb
...@@ -115,8 +115,8 @@ ...@@ -115,8 +115,8 @@
</td> </td>
</tr> </tr>
</template> </template>
<tr> <tr v-if="dataList.ScenicList.length>0">
<td class="comTotal" colspan="4">合计:</td> <td class="comTotal" colspan="4">合计:{{totalScenicPrice}}</td>
</tr> </tr>
<tr v-for="(item,index) in dataList.BusList"> <tr v-for="(item,index) in dataList.BusList">
<td v-if="index==0" :rowspan="dataList.BusList.length">交通</td> <td v-if="index==0" :rowspan="dataList.BusList.length">交通</td>
...@@ -126,17 +126,17 @@ ...@@ -126,17 +126,17 @@
<span v-if='index==dataList.BusList.length-1'>送机</span> <span v-if='index==dataList.BusList.length-1'>送机</span>
</td> </td>
<td> <td>
{{item.TotalPrice}} {{subItem.CurrencyStr}} {{item.TotalPrice}} {{item.CurrencyStr}}
</td> </td>
<td> <td>
{{item.Remarks}} {{item.Remarks}}
</td> </td>
</tr> </tr>
<tr> <tr v-if="dataList.BusList.length>0">
<td class="comTotal" colspan="4">合计:{{totalTrafficPrice}}</td> <td class="comTotal" colspan="4">合计:{{totalTrafficPrice}}</td>
</tr> </tr>
<template v-for='(item,index) in dataList.DiningList'> <template v-for='(item,index) in dataList.DiningList'>
<tr class="splitP ScenicTr" v-for='(titem,tindex) in item.DiningSummaryList'> <tr class="splitP ScenicTr">
<td v-if="index==0" :rowspan="dataList.DiningList.length">餐饮</td> <td v-if="index==0" :rowspan="dataList.DiningList.length">餐饮</td>
<td> <td>
<div class="itemName" v-for="subItem in item.DiningSummaryList"> <div class="itemName" v-for="subItem in item.DiningSummaryList">
...@@ -155,8 +155,8 @@ ...@@ -155,8 +155,8 @@
</td> </td>
</tr> </tr>
</template> </template>
<tr> <tr v-if="dataList.DiningList.length>0">
<td class="comTotal" colspan="4">合计:</td> <td class="comTotal" colspan="4">合计:{{totalDinnerPrice}}</td>
</tr> </tr>
<template v-for='(item,index) in dataList.HotelList'> <template v-for='(item,index) in dataList.HotelList'>
<tr> <tr>
...@@ -168,9 +168,12 @@ ...@@ -168,9 +168,12 @@
<td>{{item.Remarks}}</td> <td>{{item.Remarks}}</td>
</tr> </tr>
</template> </template>
<tr> <tr v-if="dataList.HotelList.length>0">
<td class="comTotal" colspan="4">合计:{{totalHotelPrice}}</td> <td class="comTotal" colspan="4">合计:{{totalHotelPrice}}</td>
</tr> </tr>
<tr>
<td colspan="4">总计:{{allTotal}}</td>
</tr>
</tbody> </tbody>
</table> </table>
<input type="button" class="printBtn" value="打印" @click="printTable()"> <input type="button" class="printBtn" value="打印" @click="printTable()">
...@@ -189,10 +192,16 @@ export default { ...@@ -189,10 +192,16 @@ export default {
}, },
nav:[], nav:[],
dataList:[], dataList:[],
//合计景点
totalScenicPrice:0,
//合计餐饮
totalDinnerPrice:0,
//合计酒店 //合计酒店
totalHotelPrice:0, totalHotelPrice:0,
//合计交通 //合计交通
totalTrafficPrice:0, totalTrafficPrice:0,
allTotal:0,
} }
}, },
methods: { methods: {
...@@ -205,12 +214,18 @@ export default { ...@@ -205,12 +214,18 @@ export default {
console.log(res.data.data,'ressssssss'); console.log(res.data.data,'ressssssss');
this.dataList = res.data.data; this.dataList = res.data.data;
this.dataList.HotelList.forEach(x=>{ this.dataList.HotelList.forEach(x=>{
this.totalHotelPrice+=x.TotalPrice this.totalHotelPrice+=parseFloat(x.TotalPrice)
}) })
this.dataList.BusList.forEach(x=>{ this.dataList.BusList.forEach(x=>{
this.totalTrafficPrice+=x.TotalPrice this.totalTrafficPrice+=parseFloat(x.TotalPrice);
}) })
this.dataList.ScenicList.forEach(x=>{
this.totalScenicPrice+= parseFloat(x.ScenicStatisticsList[0].TotalPrice);
})
this.dataList.DiningList.forEach(x=>{
this.totalDinnerPrice+= parseFloat(x.DiningSummaryList[0].TotalPrice);
})
this.allTotal = (this.totalHotelPrice+this.totalTrafficPrice+this.totalScenicPrice+this.totalDinnerPrice).toFixed(2);
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
...@@ -223,6 +238,7 @@ export default { ...@@ -223,6 +238,7 @@ export default {
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.nav = res.data.data; this.nav = res.data.data;
console.log(this.nav,'navvvvvvv');
} else { } else {
this.Error(res.data.message) this.Error(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