Commit cc9b0aee authored by 黄奎's avatar 黄奎

车辆统计修改

parent 1a4344c4
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.busInfo .bus_Notice { .busInfo .bus_Notice {
color: #e95252; color: #e95252;
margin: 20px 0; margin: 20px 0;
text-align: left;
} }
.busInfo .bus_Title { .busInfo .bus_Title {
...@@ -66,16 +67,12 @@ ...@@ -66,16 +67,12 @@
color: #ff4400; color: #ff4400;
} }
/* .busInfo .carPlanOne span { .BusinfoSpan {
display: inline-block; display: inline-block;
margin-right: 3px; margin-right: 3px;
margin:5px 4px 5px 0; margin: 5px 4px 5px 0;
} */
.BusinfoSpan{
display: inline-block;
margin-right: 3px;
margin:5px 4px 5px 0;
} }
.busInfo .carPlanOne .el-input .el-input__inner, .busInfo .carPlanOne .el-input .el-input__inner,
.el-select .el-input { .el-select .el-input {
height: 28px; height: 28px;
...@@ -123,16 +120,18 @@ ...@@ -123,16 +120,18 @@
.busAddbtn:hover i { .busAddbtn:hover i {
color: #e95252; color: #e95252;
} }
.carPlanOne .w320{
margin:5px 0; .carPlanOne .w320 {
margin: 5px 0;
} }
</style> </style>
<template> <template>
<div class="flexOne busInfo"> <div class="flexOne busInfo">
<div class="bus_Notice">注:此处不和任何团队行程做绑定,如需下载车配表,请在车辆绑定团队以后再行下载</div> <div class="bus_Notice">注:此处不和任何团队行程做绑定,如需下载车配表,请在车辆绑定团队以后再行下载</div>
<table class="singeRowTable"> <table class="singeRowTable">
<tr> <tr>
<td colspan="6">{{title}}</td> <td colspan="7" style="text-align:left;padding-left:5px;">{{title}}</td>
</tr> </tr>
<tr> <tr>
<th>进出点</th> <th>进出点</th>
...@@ -141,6 +140,7 @@ ...@@ -141,6 +140,7 @@
<th>领队</th> <th>领队</th>
<th>导游</th> <th>导游</th>
<th>团号</th> <th>团号</th>
<th>车辆类型</th>
</tr> </tr>
<tr> <tr>
<td>{{InOut}}</td> <td>{{InOut}}</td>
...@@ -151,6 +151,13 @@ ...@@ -151,6 +151,13 @@
<td> <td>
<p class="busInfoP" @click="goUrlT('TravelControlList',TCNUMS,'团控列表')">{{TCNUMS}}</p> <p class="busInfoP" @click="goUrlT('TravelControlList',TCNUMS,'团控列表')">{{TCNUMS}}</p>
</td> </td>
<td>
<el-select class="w150" placeholder="请选择" v-model="PostData.BusType">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id">
</el-option>
</el-select>
</td>
</tr> </tr>
</table> </table>
<div style="width: 100%; overflow-x: auto;margin-top:20px;" class="ownScrollbarStyle"> <div style="width: 100%; overflow-x: auto;margin-top:20px;" class="ownScrollbarStyle">
...@@ -201,11 +208,12 @@ ...@@ -201,11 +208,12 @@
:class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}" :class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(childItem.Id,index,subIndex);getBusPrice(subItem)">{{childItem.Name}}</span> @click="UseTypeClick(childItem.Id,index,subIndex);getBusPrice(subItem)">{{childItem.Name}}</span>
</span> </span>
<span style="width:30px;display:inline-block;" > <span style="width:30px;display:inline-block;">
<a v-if="subIndex>0" @click="DeleteSubItem(item,subIndex)" style="color:blue;cursor:pointer">删除</a> <a v-if="subIndex>0" @click="DeleteSubItem(item,subIndex)" style="color:blue;cursor:pointer">删除</a>
</span> </span>
<span style="display:inline-block;width:30px;margin-left:5px;"> <span style="display:inline-block;width:30px;margin-left:5px;">
<span class="busAddbtn" v-if="subIndex==item.DetailList.length-1" @click="AddSubItem(item)" style="margin-bottom:10px;"> <span class="busAddbtn" v-if="subIndex==item.DetailList.length-1" @click="AddSubItem(item)"
style="margin-bottom:10px;">
<i class="iconfont icon-img_haha"></i> <i class="iconfont icon-img_haha"></i>
</span> </span>
</span> </span>
...@@ -232,8 +240,8 @@ ...@@ -232,8 +240,8 @@
</td> </td>
<td> <td>
<div class="w180"> <div class="w180">
<el-select clearable class="w150" filterable placeholder="请选择" v-model="item.BusType" <el-select class="w150" filterable placeholder="请选择" v-model="item.BusType" :disabled="forbidInput"
:disabled="forbidInput" @change='getBusPrice(item)'> @change='getBusPrice(item)'>
<el-option :key="0" :value="0" label="请选择"></el-option> <el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id"> <el-option v-for="item in BusTypeList" :key="item.Id" :label="item.newName" :value="item.Id">
</el-option> </el-option>
...@@ -336,7 +344,7 @@ ...@@ -336,7 +344,7 @@
BusCode: "", BusCode: "",
DriverName: "", DriverName: "",
DriverTel: "", DriverTel: "",
BusType: "", BusType: 0,
CarrierNum: "", CarrierNum: "",
BusNum: "", BusNum: "",
StartDate: "", StartDate: "",
...@@ -459,56 +467,11 @@ ...@@ -459,56 +467,11 @@
getBusPrice(obj) { getBusPrice(obj) {
let money = 0 let money = 0
if (obj.BusType) { if (obj.BusType) {
let checkObj = this.BusTypeList.find(item => item.Id === obj.BusType) let checkObj = this.BusTypeList.find(item => item.Id === obj.BusType);
if (checkObj) { if (checkObj) {
if (obj.AirportPickUp == 0) { money = checkObj.AllDayPrice;
switch (obj.UseType) {
case 1:
money = checkObj.AllDayPrice
break;
case 2:
money = checkObj.HalfDayPrice
break;
case 3:
money = checkObj.HourPrice * obj.UseTime
break;
default:
money = 0
break;
}
} else if (obj.AirportPickUp == 1) {
switch (obj.UseType) {
case 1:
money = checkObj.AllDayPrice + checkObj.ReceivePrice
break;
case 2:
money = checkObj.HalfDayPrice + checkObj.ReceivePrice
break;
case 3:
money = checkObj.HourPrice * obj.UseTime + checkObj.ReceivePrice
break;
default:
money = checkObj.ReceivePrice
break;
}
} else {
switch (obj.UseType) {
case 1:
money = checkObj.AllDayPrice + checkObj.SendPrice
break;
case 2:
money = checkObj.HalfDayPrice + checkObj.SendPrice
break;
case 3:
money = checkObj.HourPrice * obj.UseTime + checkObj.SendPrice
break;
default:
money = checkObj.SendPrice
break;
}
} }
} obj.CostPrice = money;
obj.CostPrice = money
} }
}, },
AddSubItem(item) { AddSubItem(item) {
...@@ -519,9 +482,8 @@ ...@@ -519,9 +482,8 @@
AirportPickUp: 0 AirportPickUp: 0
}); });
}, },
DeleteSubItem(item,index) DeleteSubItem(item, index) {
{ item.DetailList.splice(index, 1);
item.DetailList.splice(index,1);
}, },
/*获取车辆类型列表*/ /*获取车辆类型列表*/
getBusTypeList() { getBusTypeList() {
...@@ -561,71 +523,36 @@ ...@@ -561,71 +523,36 @@
}, },
response => { response => {
if (response.data.resultCode == 1) { if (response.data.resultCode == 1) {
this.PlanTableData = response.data.data; this.PlanTableData = response.data.data.PlanList;
this.PlanTableData.forEach(x => { this.PlanTableData.forEach(x => {
if (x.BookGroup == '' || x.BookGroup == null) { if (x.BookGroup == '' || x.BookGroup == null) {
x.BookGroup = this.$route.query.NewCombinationNum; x.BookGroup = this.$route.query.NewCombinationNum;
} }
})
console.log(this.PlanTableData,'planTabledata');
}
},
null
);
},
/*保存车辆基本信息*/
SaveData() {
this.PostData.PlanList = this.PlanTableData;
this.PostData.CarrierNum = parseInt(this.PostData.CarrierNum);
this.PostData.UseDays = parseInt(this.PostData.UseDays);
this.disButton = true;
this.PostData.PlanList.forEach(x => {
if (x.CostPrice == "") {
x.CostPrice = 0;
}
}); });
if (this.PostData.PlanList.length > 0) { this.PostData=response.data.data;
this.PostData.PlanList.forEach((x, index) => {
x.AirportPickUp = 0;
if (index == 0) {
x.AirportPickUp = 1;
} else if (index == this.PostData.PlanList.length - 1) {
x.AirportPickUp = 2;
}
});
}
this.apipost(
"bus_post_Set",
this.PostData,
res => {
this.disButton = false;
if (res.data.resultCode == 1) {
this.Success("保存成功!");
this.goUrl("busManage");
} else {
this.Error(res.data.message);
} }
}, },
null null
); );
}, },
SaveList(type) { SaveList(type) {
this.PlanTableData.forEach(item => { this.PlanTableData.forEach(item => {
item.OrderState = type item.OrderState = type
}) })
this.apipost('bus_get_SetPlan', this.PlanTableData, res => { this.PostData.PlanList=this.PlanTableData;
this.apipost('bus_get_SetPlan', this.PostData, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success("保存成功!"); this.Success("保存成功!");
this.MsgBus.$emit('msg') this.MsgBus.$emit('msg')
this.getData(); this.createTableData();
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, err => {}) }, err => {})
}, },
//用车类型点击事件 //用车类型点击事件
UseTypeClick(value, index,subIndex) { UseTypeClick(value, index, subIndex) {
if (this.forbidInput == true) { if (this.forbidInput == true) {
return; return;
} }
...@@ -688,27 +615,6 @@ ...@@ -688,27 +615,6 @@
null null
); );
}, },
getData() {
this.apipost(
"bus_get_Get", {
ID: this.BusId
},
response => {
if (response.data.resultCode == 1) {
this.PostData = response.data.data;
if (this.PostData.PlanList.length > 0) {
this.PostData.PlanList.forEach((x, index) => {
if (index == this.PostData.PlanList.length - 1) {
x.AirportPickUp = 1;
}
});
}
this.PlanTableData = this.PostData.PlanList;
}
},
null
);
},
goUrl(path) { goUrl(path) {
this.$router.push({ this.$router.push({
path: path path: path
...@@ -724,21 +630,7 @@ ...@@ -724,21 +630,7 @@
} }
}) })
}, },
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.SaveData(addMsg);
} else {
return false;
}
});
},
resetForm(formName) {
//弹出框取消 初始化谈框内表单
this.$refs[formName].resetFields();
},
//计算总成本 //计算总成本
CalculatePrice() { CalculatePrice() {
var CoastPrice = this.$commonUtils.CaluJsonArraySum( var CoastPrice = this.$commonUtils.CaluJsonArraySum(
...@@ -766,17 +658,13 @@ ...@@ -766,17 +658,13 @@
this.GeAccommodationTypeList(); this.GeAccommodationTypeList();
this.BusId = this.$route.query.id; this.BusId = this.$route.query.id;
this.title = this.$route.query.title; this.title = this.$route.query.title;
this.TCNUMS = this.$route.query.TCNUMS, this.TCNUMS = this.$route.query.TCNUMS;
this.InOut = this.$route.query.InOut, this.InOut = this.$route.query.InOut;
this.RealityNum = this.$route.query.RealityNum, this.RealityNum = this.$route.query.RealityNum;
this.totalFlySeat = this.$route.query.TotalNumber + '/' + this.$route.query.RealityYSeatNum + '/' + this.totalFlySeat = this.$route.query.TotalNumber + '/' + this.$route.query.RealityYSeatNum + '/' + this.$route
this.$route.query.RealityESeatNum + '/' + this.$route.query.RealityFSeatNum .query.RealityESeatNum + '/' + this.$route.query.RealityFSeatNum;
this.LeaderName = this.$route.query.LeaderName, this.LeaderName = this.$route.query.LeaderName;
this.GuideName = this.$route.query.GuideName this.GuideName = this.$route.query.GuideName;
if (this.BusId > 0) {
this.getData();
}
this.parametersData.TCID = this.$route.query.TCID; this.parametersData.TCID = this.$route.query.TCID;
this.parametersData.StartDate = this.$route.query.StartDate; this.parametersData.StartDate = this.$route.query.StartDate;
this.parametersData.DayNum = this.$route.query.DayNum; this.parametersData.DayNum = this.$route.query.DayNum;
...@@ -788,4 +676,5 @@ ...@@ -788,4 +676,5 @@
this.getSupplierList(); this.getSupplierList();
} }
}; };
</script> </script>
...@@ -2,68 +2,56 @@ ...@@ -2,68 +2,56 @@
<div> <div>
<div class="query-box" style="border-bottom: none;"> <div class="query-box" style="border-bottom: none;">
<ul> <ul>
<!--<li><span><em>线路</em>
<el-select v-model="msg.LineId" filterable :placeholder="$t('pub.pleaseSel')" @change="getLineTeamList(msg.LineId)">
<el-option label="不限" value='-1'></el-option>
<el-option
v-for="item in LineList"
:label='item.LineName'
:value='item.LineID'
:key='item.LineID'>
</el-option>
</el-select>
</span>
</li>-->
<li><span><em>系列</em> <li><span><em>系列</em>
<el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')"> <el-select v-model="msg.LineteamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" value='-1'></el-option> <el-option label="不限" value='-1'></el-option>
<el-option <el-option v-for="item in LineTeamList" :label='item.LtName' :value='item.LtID' :key='item.LtID'>
v-for="item in LineTeamList"
:label='item.LtName'
:value='item.LtID'
:key='item.LtID'>
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>团号</em><el-input v-model='msg.TCNUM' ></el-input> <em>团号</em>
<el-input v-model='msg.TCNUM'></el-input>
</span> </span>
</li> </li>
<li><span><em>日期</em><el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker> <li><span><em>日期</em>
<el-date-picker v-model='msg.StartDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
- -
<el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker> <el-date-picker v-model='msg.EndDate' class='w135' value-format="yyyy-MM-dd" type="date"></el-date-picker>
</span> </span>
</li> </li>
<li><span><em>状态</em></span><el-select v-model='msg.PriceStatus'> <li><span><em>状态</em></span>
<el-select v-model='msg.PriceStatus'>
<el-option label='正常' value='0' key='0'></el-option> <el-option label='正常' value='0' key='0'></el-option>
<el-option label='取消' value='1' key='1'></el-option> <el-option label='取消' value='1' key='1'></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()"/> <input type="button" class="normalBtn" value="查询" @click="getList();resetPageIndex()" />
</li> </li>
</ul> </ul>
</div> </div>
<div class="mt10 fz14 color333 busIconStyle"> <div class="mt10 fz14 color333 busIconStyle">
车辆状态&nbsp;&nbsp;&nbsp;已确定:<span style="color:#4BCA81 ;"></span>未确定:<span style="color: #ff6600;">O</span>未分配:<span style="color:#E95252 ;">X</span> 车辆状态&nbsp;&nbsp;&nbsp;已确定:<span style="color:#4BCA81 ;"></span>未确定:<span
style="color: #ff6600;">O</span>未分配:<span style="color:#E95252 ;">X</span>
</div> </div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle"> <div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle">
<table border="0" cellspacing="1" cellpadding="0" class="busStatisticsTalbe" v-loading='loading'> <table border="0" cellspacing="1" cellpadding="0" class="busStatisticsTalbe" v-loading='loading'>
<tr> <tr>
<th width="150">序号</th> <th class="w100">序号</th>
<th width="120">出发地</th> <th width="110">出发地</th>
<th width="150">航班时间</th> <th width="150">航班时间</th>
<th width="150">公司团号</th> <th width="150">公司团号</th>
<th width="120">线路负责人</th> <th width="100">线路负责人</th>
<th width="80">进出点</th> <th width="70">进出点</th>
<th width="120">机位总数/(Y/E/F)</th> <th width="80">机位总数<br />(Y/E/F)</th>
<th width="80">领队</th> <th width="80">领队</th>
<th width="150">导游</th> <th width="80">导游</th>
<th width="150">车型</th> <th width="150">车型</th>
<th v-for='item in thLengthTitle'>{{item}}</th> <th width="100" v-for='item in thLengthTitle'>{{item}}</th>
<th width="150">车辆状态</th> <th width="150">车辆状态</th>
<th width="150">车费总计</th> <th width="150">车费总计</th>
<th width="80">配车天数</th> <th width="80">配车天数</th>
...@@ -74,14 +62,14 @@ ...@@ -74,14 +62,14 @@
<tr> <tr>
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'> <td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
<div class="w100">{{outItem.NewCombinationNum}}</div> <div class="w100">{{outItem.NewCombinationNum}}</div>
<!-- <div style="max-width: 100px; min-width: 50px; ">{{outindex+1}}</div>
<div v-if='outItem.StaticsReportList.length>1' class="w100">合团号:{{outItem.NewCombinationNum}}</div> -->
</td> </td>
<td><div class="w80"> <td>
<div class="w80">
{{item.StartCityNames}} {{item.StartCityNames}}
</div> </div>
</td> </td>
<td><div class="w120"> <td>
<div class="w120">
{{item.FlightDate}} {{item.FlightDate}}
<el-popover popper-class="busStatistics_tripDetails" width="550" trigger="click"> <el-popover popper-class="busStatistics_tripDetails" width="550" trigger="click">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
...@@ -96,7 +84,8 @@ ...@@ -96,7 +84,8 @@
<td class="_d_name _color_666"> <td class="_d_name _color_666">
<span v-if="din==0">{{$t('Airticket.Air_go')}}</span> <span v-if="din==0">{{$t('Airticket.Air_go')}}</span>
<span v-else-if="din==item.FlightList.length-1">{{$t('Airticket.Air_returnTrip')}}</span> <span v-else-if="din==item.FlightList.length-1">{{$t('Airticket.Air_returnTrip')}}</span>
<span v-else-if="din>0 && din!=item.FlightList.length-1">{{$t('Airticket.Air_transit')}}</span> <span
v-else-if="din>0 && din!=item.FlightList.length-1">{{$t('Airticket.Air_transit')}}</span>
</td> </td>
<td> <td>
<div>{{ds.Flight_number}}</div> <div>{{ds.Flight_number}}</div>
...@@ -113,25 +102,50 @@ ...@@ -113,25 +102,50 @@
<td>{{ds.StopoverName}}</td> <td>{{ds.StopoverName}}</td>
</tr> </tr>
</table> </table>
<el-button slot="reference" class="normalBtn mt5" style='height:24px; padding: 0 10px; background: #2AAEF2; border-color: #2AAEF2;'>详情</el-button> <el-button slot="reference" class="normalBtn mt5"
style='height:24px; padding: 0 10px; background: #2AAEF2; border-color: #2AAEF2;'>详情</el-button>
</el-popover> </el-popover>
</div></td> </div>
<td><div class="w120 link"> </td>
<td>
<div class="w120 link">
<p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.TCNUMS}}</p> <p @click="goUrlT('productQuery',item.TCNUMS,'产品查询')">{{item.TCNUMS}}</p>
</div></td> </div>
<td><div class="w120">{{item.CreateByName}}</div></td> </td>
<td><div class="w80">{{item.InOut}}</div></td> <td>
<td><div class="w120 link"> <div class="w80">{{item.CreateByName}}</div>
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}</p> </td>
</div></td> <td>
<td><div class="w80">{{item.LeaderName}}</div></td> <div class="w80">{{item.InOut}}</div>
<td><div class="w80">{{item.GuideName}}</div></td> </td>
<td><div class="w80">{{GetCheType(item.CommonReport.BusList)}}</div></td> <td>
<div class="w100 link">
<p @click="goUrlT('RegistrationList',item.TCIDS,'报名清单')">
{{item.TotalSeat}}/{{item.CommonReport.HouseStatistics.RealityYSeatNum}}/{{item.CommonReport.HouseStatistics.RealityESeatNum}}/{{item.CommonReport.HouseStatistics.RealityFSeatNum}}
</p>
</div>
</td>
<td>
<div class="w80">{{item.LeaderName}}</div>
</td>
<td>
<div class="w80">{{item.GuideName}}</div>
</td>
<td>
<div class="w80">{{item.CommonReport.BusList[0].MainBusTypeStr}} </div>
</td>
<td v-for="(x,ww) in item.CommonReport.BusList" style="vertical-align: top;"> <td v-for="(x,ww) in item.CommonReport.BusList" style="vertical-align: top;">
<div class="w150" > <div class="w100">
<p class="pDateStyle">{{x.PlanDateStr}}</p> <p class="pDateStyle">{{x.PlanDateStr}}</p>
<p class="pDateStyle" v-if="x.AirportPickUp==1&&ww==0">接机</p> <p class="pDateStyle" v-if="ww==0">
<p class="pDateStyle" v-else-if="x.AirportPickUp==2&&ww==item.CommonReport.BusList.length-1">送机</p> <template v-for="childItem in x.DetailList">
{{childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"接机"}}<br/>
</template>
</p>
<p class="pDateStyle" v-else-if="ww==item.CommonReport.BusList.length-1">
<template v-for="childItem in x.DetailList">
{{childItem.AirportPickUpStr!=""?childItem.AirportPickUpStr:"送机"}}<br/>
</template></p>
<p class="pDateStyle fbold fz16" v-else-if="x.AirportPickUp==0"> <p class="pDateStyle fbold fz16" v-else-if="x.AirportPickUp==0">
<span style="color: #E95252;" v-if="x.OrderState==-1">X</span> <span style="color: #E95252;" v-if="x.OrderState==-1">X</span>
<span style="color: #4BCA81;" v-else-if="x.OrderState>-1"></span> <span style="color: #4BCA81;" v-else-if="x.OrderState>-1"></span>
...@@ -139,18 +153,22 @@ ...@@ -139,18 +153,22 @@
</div> </div>
</td> </td>
<td v-for="is in item.isCha"></td> <td v-for="is in item.isCha"></td>
<td><div class="w80 fbold fz16"> <td>
<div class="w80 fbold fz16">
<span style="color: #E95252;" v-if="item.CommonReport.BusOrderState==-1">X</span> <span style="color: #E95252;" v-if="item.CommonReport.BusOrderState==-1">X</span>
<span style="color: #ff6600;" v-else-if="item.CommonReport.BusOrderState==0">O</span> <span style="color: #ff6600;" v-else-if="item.CommonReport.BusOrderState==0">O</span>
<span style="color: #4BCA81;" v-else-if="item.CommonReport.BusOrderState==1"></span></div></td> <span style="color: #4BCA81;" v-else-if="item.CommonReport.BusOrderState==1"></span></div>
</td>
<td> <td>
<div class="w150"> <div class="w150">
{{GetTotalPrice(item.CommonReport.BusList,item.CommonReport.HouseStatistics.RealityNum)}} {{GetTotalPrice(item.CommonReport.BusList,item.CommonReport.HouseStatistics.RealityNum)}}
</div> </div>
</td> </td>
<td><div class="w100"> <td>
<div class="w100">
{{GetPeiChe(item.CommonReport.BusList)}} {{GetPeiChe(item.CommonReport.BusList)}}
</div></td> </div>
</td>
<td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'> <td :rowspan="2*outItem.StaticsReportList.length" v-if='index==0'>
<div class="w100 link"> <div class="w100 link">
<span @click="goUrlX('BusInfo',item,outItem,'车配信息')">详情</span> <span @click="goUrlX('BusInfo',item,outItem,'车配信息')">详情</span>
...@@ -172,43 +190,43 @@ ...@@ -172,43 +190,43 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total></el-pagination> <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="total"></el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () { data() {
return { return {
loading:false, loading: false,
currentPage:1, currentPage: 1,
total:0, total: 0,
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 10,
SelectType:4, SelectType: 4,
LineId: 14, LineId: 14,
LineteamId: "-1", LineteamId: "-1",
StartDate:'', StartDate: '',
EndDate:'', EndDate: '',
PriceStatus:"0" PriceStatus: "0"
}, },
LineList: [], LineList: [],
LineTeamList: [], LineTeamList: [],
thLengthTitle:[], thLengthTitle: [],
list:[], list: [],
colspanTotal:0, colspanTotal: 0,
isCha:0, isCha: 0,
} }
}, },
methods: { methods: {
DownLoadFile(item,NewCombinationNum) { DownLoadFile(item, NewCombinationNum) {
console.log(item)
let msg = { let msg = {
TCIDS: item.TCIDS TCIDS: item.TCIDS
}; };
this.GetLocalFile("bus_get_NewDownLoadBusConfig", msg, "バス手配依頼書"+NewCombinationNum + ".xls"); this.GetLocalFile("bus_get_NewDownLoadBusConfig", msg, "バス手配依頼書" + NewCombinationNum + ".xls");
}, },
getLineList() { getLineList() {
this.apipost("line_post_GetAllList", {}, res => { this.apipost("line_post_GetAllList", {}, res => {
...@@ -219,57 +237,61 @@ export default { ...@@ -219,57 +237,61 @@ export default {
} }
}); });
}, },
GetTotalPrice(obj,PeopleNum){//车费总价 GetTotalPrice(obj, PeopleNum) { //车费总价
let totalPrice=0; let totalPrice = 0;
obj.forEach(busInfo => { obj.forEach(busInfo => {
if(busInfo.CostPrice!=undefined){ if (busInfo.CostPrice != undefined) {
totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; totalPrice += busInfo.CostPrice * (Number(busInfo.TransferNum) + 1) * PeopleNum;
// totalPrice+=parseFloat(busInfo.CostPrice);
} }
}); });
return totalPrice; return totalPrice;
}, },
GetPeiChe(obj){//配车信息 GetPeiChe(obj) { //配车信息
let jieji = "";
let jieji=""; let songji = "";
let songji=""; let allStr = "";
let DayNum=0; let DayNum = 0;
let newObj = []; obj.forEach((busInfo, index) => {
obj.forEach((x,index) => { if (index == 0) {
if (!x.isCha) { busInfo.DetailList.forEach(subItem => {
newObj.push(x); if (subItem.AirportPickUpStr != "") {
} jieji += subItem.AirportPickUpStr + ",";
}) } else {
obj.forEach((busInfo,index) => { jieji += "接机,";
if(busInfo.AirportPickUp==1&&index==0){
jieji=busInfo.AirportPickUpStr;
} }
else if(busInfo.AirportPickUp==2&&index==(obj.length-1)){
songji=busInfo.AirportPickUpStr; });
} else if (index == (obj.length - 1)) {
busInfo.DetailList.forEach(subItem => {
if (subItem.AirportPickUpStr != "") {
songji += subItem.AirportPickUpStr + ",";
} else {
songji += "送机,";
} }
if(busInfo.AirportPickUp==0){ });
if(busInfo.OrderState>-1){ } else {
DayNum+=1; if (busInfo.OrderState > -1) {
DayNum += 1;
} }
} }
}); });
if(parseInt(DayNum)>0){ if (parseInt(DayNum) > 0) {
jieji += "+"+DayNum+"天" allStr += jieji.substring(0, jieji.lastIndexOf(',')) + "+" + DayNum + "天"
} }
if(songji.length>0){ if (songji.length > 0) {
jieji += "+"+songji allStr += "+" + songji.substring(0, songji.lastIndexOf(','))
} }
return jieji; return allStr;
}, },
GetCheType(obj){//车型信息 GetCheType(obj) { //车型信息
let jieji=""; let jieji = "";
let DayNum = 0;
let DayNum=0; obj.forEach((busInfo, index) => {
obj.forEach((busInfo,index) => { if (busInfo.AirportPickUp == 0 && busInfo.OrderState > -1) {
if (jieji.length == 0) {
if(busInfo.AirportPickUp==0&&busInfo.OrderState>-1){ jieji = busInfo.ResultBusTypeStr
if(jieji.length==0) }
{jieji=busInfo.ResultBusTypeStr}
} }
}); });
return jieji; return jieji;
...@@ -278,8 +300,7 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; ...@@ -278,8 +300,7 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum;
getLineTeamList(lineId) { getLineTeamList(lineId) {
this.LineTeamList = []; this.LineTeamList = [];
this.apipost( this.apipost(
"team_post_GetList", "team_post_GetList", {
{
lineID: 14, lineID: 14,
isTOOP: 1 isTOOP: 1
}, },
...@@ -291,7 +312,7 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; ...@@ -291,7 +312,7 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum;
} }
); );
}, },
goUrlX(path, obj,outItem,title){ goUrlX(path, obj, outItem, title) {
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
...@@ -299,29 +320,54 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; ...@@ -299,29 +320,54 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum;
StartDate: obj.StartDateStr, StartDate: obj.StartDateStr,
DayNum: obj.DayNum, DayNum: obj.DayNum,
TotalNumber: obj.TotalSeat, //机位总数 TotalNumber: obj.TotalSeat, //机位总数
RealityYSeatNum:obj.CommonReport.HouseStatistics.RealityYSeatNum, RealityYSeatNum: obj.CommonReport.HouseStatistics.RealityYSeatNum,
RealityESeatNum:obj.CommonReport.HouseStatistics.RealityESeatNum, RealityESeatNum: obj.CommonReport.HouseStatistics.RealityESeatNum,
RealityFSeatNum:obj.CommonReport.HouseStatistics.RealityFSeatNum, RealityFSeatNum: obj.CommonReport.HouseStatistics.RealityFSeatNum,
LeaderName:obj.LeaderName, LeaderName: obj.LeaderName,
GuideName:obj.GuideName, GuideName: obj.GuideName,
NewCombinationNum: outItem.NewCombinationNum, NewCombinationNum: outItem.NewCombinationNum,
blank: 'y', blank: 'y',
title:obj.Titles, title: obj.Titles,
TCNUMS:obj.TCNUMS, TCNUMS: obj.TCNUMS,
InOut:obj.InOut, InOut: obj.InOut,
RealityNum:obj.CommonReport.HouseStatistics.RealityNum, RealityNum: obj.CommonReport.HouseStatistics.RealityNum,
tab: title tab: title
} }
}) })
}, },
goUrlR(path,obj,title){ goUrlR(path, obj, title) {
this.$router.push({ name:path,query:{"ID":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"ID": obj,
blank: 'y',
tab: title
}
})
}, },
goUrlT(path,obj,title){ goUrlT(path, obj, title) {
this.$router.push({ name:path,query:{"id":obj,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"id": obj,
blank: 'y',
tab: title
}
})
}, },
goUrl(path,obj,title){ goUrl(path, obj, title) {
this.$router.push({ name:path,query:{"id":obj.TCIDS,'TCNUM':obj.TCNUMS,'flightTotal':obj.TotalSeat,'GuestNum':obj.CommonReport.HouseStatistics.RealityNum,'NewCombinationNum':obj.NewCombinationNum,blank:'y',tab:title}}) this.$router.push({
name: path,
query: {
"id": obj.TCIDS,
'TCNUM': obj.TCNUMS,
'flightTotal': obj.TotalSeat,
'GuestNum': obj.CommonReport.HouseStatistics.RealityNum,
'NewCombinationNum': obj.NewCombinationNum,
blank: 'y',
tab: title
}
})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
...@@ -331,32 +377,31 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; ...@@ -331,32 +377,31 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum;
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1; this.currentPage = 1;
}, },
getList(){ getList() {
this.loading=true this.loading = true
this.apipost('dmcstatistics_post_GetUniteCombinationNumService',this.msg,res=>{ this.apipost('dmcstatistics_post_GetUniteCombinationNumService', this.msg, res => {
if(res.data.resultCode==1){ this.loading = false;
this.loading=false if (res.data.resultCode == 1) {
this.total=res.data.data.count this.total = res.data.data.count;
this.list=res.data.data.pageData.data this.list = res.data.data.pageData.data;
this.thLengthTitle=[] this.thLengthTitle = [];
this.colspanTotal=res.data.data.pageData.columnsCount+12 this.colspanTotal = res.data.data.pageData.columnsCount + 12;
for(let i=1;i<=res.data.data.pageData.columnsCount;i++){ for (let i = 1; i <= res.data.data.pageData.columnsCount; i++) {
this.thLengthTitle.push('第'+i+'天') this.thLengthTitle.push('第' + i + '天');
} }
this.list.forEach(outItem=>{ this.list.forEach(outItem => {
outItem.StaticsReportList.forEach(item=>{ outItem.StaticsReportList.forEach(item => {
if(item.CommonReport.BusList.length<res.data.data.pageData.columnsCount){ if (item.CommonReport.BusList.length < res.data.data.pageData.columnsCount) {
item.isCha=res.data.data.pageData.columnsCount-item.CommonReport.BusList.length item.isCha = res.data.data.pageData.columnsCount - item.CommonReport.BusList.length;
}else{ } else {
item.isCha = 0; item.isCha = 0;;
} }
}) })
}) })
}else{ } else {
this.loading=false this.$message.error(res.data.message);
this.$message.error(res.data.message)
} }
},err=>{}) }, err => {})
}, },
}, },
mounted() { mounted() {
...@@ -368,30 +413,107 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum; ...@@ -368,30 +413,107 @@ totalPrice+=busInfo.CostPrice*(Number(busInfo.TransferNum)+1)*PeopleNum;
"-" + "-" +
myDate.getDate(); myDate.getDate();
this.msg.StartDate = nowDate; this.msg.StartDate = nowDate;
this.getList() this.getList();
// this.getLineList() this.getLineTeamList();
this.getLineTeamList()
}, },
} }
</script>
</script>
<style> <style>
.splitTrCss td{background: #eee!important;} .splitTrCss td {
.busIconStyle>span{margin-right: 20px; font-weight: bold;} background: #eee !important;
.busStatisticsTalbe{ background: #ccc;} }
.busStatisticsTalbe tr th{background: #E6E6E6;height:40px; font-size: 12px; color: #333;}
.busStatisticsTalbe tr{background: #fff;text-align: center; height: 40px;} .busIconStyle>span {
.busStatisticsTalbe tr td{font-size: 12px;} margin-right: 20px;
.busStatisticsTalbe tr td .pDateStyle{border-bottom: 1px solid #ccc; min-height: 24px; line-height: 24px; margin-top: 0; box-sizing: content-box; padding: 0 10px;} font-weight: bold;
.busStatisticsTalbe tr td .pDateStyle:last-child{border-bottom: none;} }
.busStatisticsTalbe tr td .link p:hover{text-decoration: underline; cursor: pointer;}
.busStatisticsTalbe tr td .link span:hover{text-decoration: underline; cursor: pointer;} .busStatisticsTalbe {
.busStatistics_tripDetails {padding: 0; box-shadow: 0px 1px 3px 0px #dedede; max-height: 400px;overflow-y: auto;} background: #ccc;
.busStatistics_tripDetails .popper__arrow::after {border-bottom-color: #ededed !important;} }
.busStatistics_tripDetails table { padding: 10px 0 0 20px; background-color: #ededed; border-collapse: collapse; border: 1px solid #d2d2d2; font-size: 12px;}
.busStatistics_tripDetails table th { background-color: #ededed; padding: 5px;} .busStatisticsTalbe tr th {
.busStatistics_tripDetails table td { background-color: #ffffff; padding: 9px 15px;color: #333333;border: 1px solid #d2d2d2;} background: #E6E6E6;
.busStatistics_tripDetails table td._d_name {background-color: #ededed;} height: 40px;
.busStatistics_tripDetails table ._color_666 {color: #666666;} font-size: 12px;
.busStatistics_tripDetails table tr._color_666 th { padding: 9px 15px;} color: #333;
}
.busStatisticsTalbe tr {
background: #fff;
text-align: center;
height: 40px;
}
.busStatisticsTalbe tr td {
font-size: 12px;
}
.busStatisticsTalbe tr td .pDateStyle {
border-bottom: 1px solid #ccc;
min-height: 24px;
line-height: 24px;
margin-top: 0;
box-sizing: content-box;
padding: 0 10px;
}
.busStatisticsTalbe tr td .pDateStyle:last-child {
border-bottom: none;
}
.busStatisticsTalbe tr td .link p:hover {
text-decoration: underline;
cursor: pointer;
}
.busStatisticsTalbe tr td .link span:hover {
text-decoration: underline;
cursor: pointer;
}
.busStatistics_tripDetails {
padding: 0;
box-shadow: 0px 1px 3px 0px #dedede;
max-height: 400px;
overflow-y: auto;
}
.busStatistics_tripDetails .popper__arrow::after {
border-bottom-color: #ededed !important;
}
.busStatistics_tripDetails table {
padding: 10px 0 0 20px;
background-color: #ededed;
border-collapse: collapse;
border: 1px solid #d2d2d2;
font-size: 12px;
}
.busStatistics_tripDetails table th {
background-color: #ededed;
padding: 5px;
}
.busStatistics_tripDetails table td {
background-color: #ffffff;
padding: 9px 15px;
color: #333333;
border: 1px solid #d2d2d2;
}
.busStatistics_tripDetails table td._d_name {
background-color: #ededed;
}
.busStatistics_tripDetails table ._color_666 {
color: #666666;
}
.busStatistics_tripDetails table tr._color_666 th {
padding: 9px 15px;
}
</style> </style>
...@@ -703,10 +703,10 @@ ...@@ -703,10 +703,10 @@
}, },
datatype: "jsonP", datatype: "jsonP",
success: function (data) { success: function (data) {
//console.log("上传成功",data);
}, },
error: function () { error: function () {
//console.log("上传失败");
} }
}); });
if (allNum !== document.querySelectorAll(cName).length) { if (allNum !== document.querySelectorAll(cName).length) {
...@@ -903,7 +903,7 @@ ...@@ -903,7 +903,7 @@
} }
this.pdfLoading = false this.pdfLoading = false
}).catch(err => { }).catch(err => {
console.log(err)
}) })
}, },
ToWord: function (title, isPc) { ToWord: function (title, isPc) {
......
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