Commit a0b216c0 authored by 黄奎's avatar 黄奎

新增行程用车统计

parent 21120e37
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
@clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth"> @clear="getCarList(),getList()" @change="getCarList(),getList()" :disabled="!isHaveAuth">
<el-option label="永樂車行(東京)" :value="1248" :key="1248"> <el-option label="永樂車行(東京)" :value="1248" :key="1248">
</el-option> </el-option>
<el-option label="永樂車行(大阪)" :value="1256" :key="1256" v> <el-option label="永樂車行(大阪)" :value="1256" :key="1256">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
......
<style scoped>
.tripPlanTab {
border-collapse: collapse;
border-radius: 5px;
table-layout: fixed;
background: white;
}
.tripPlanTab tr th {
border: 1px solid#d2d2d2;
text-align: center;
padding-left: 1px;
padding-right: 1px;
min-width: 55px;
height: 29px;
position: sticky;
top: 0;
z-index: 10;
background: #E6E6E6;
}
.tripPlanTab tr td {
border: 1px solid #d2d2d2;
text-align: center;
padding-left: 1px;
padding-right: 1px;
height: 28px;
line-height: 28px;
}
</style>
<template>
<div>
<div class="query-box" style="border-bottom: none;">
<ul>
<li><span><em>{{$t('pub.date')}}</em>
<el-date-picker v-model="msg.MonthStr" type="month" placeholder="选择月" format="yyyy-MM" @change="getList()"
value-format="yyyy-MM">
</el-date-picker>
</span>
</li>
<li>
<span><em>公司</em>
<el-select v-model="msg.QBranchId" filterable :placeholder="$t('pub.pleaseSel')" clearable
@clear="getList()" @change="getList()">
<el-option v-for="(item,index) in BranchList" :label="item.BName" :value="item.Id" :key="index">
</el-option>
</el-select>
</span>
</li>
<li>
<input type="button" class="normalBtn" :value="$t('pub.searchBtn')" @click="getList()" />
</li>
</ul>
</div>
<div style="width: 98%; overflow-x: hidden;padding-bottom: 50px; " :style="{height: boxHeight + 'px'}"
class="ownScrollbarStyle" v-loading="loading">
<table class="tripPlanTab" v-if="dataList&&dataList.length>0">
<thead>
<tr>
<template v-if="headerList&&headerList.length>0">
<template v-for="(hItem,hIndex) in headerList">
<th :key="`h_`+hIndex">
{{hItem.DayStr}}
<span style="display: block;">{{hItem.WeekStr}}</span>
</th>
</template>
</template>
</tr>
</thead>
<tbody v-for="(item,index) in dataList" :key="`d_`+index">
<tr :key="`d1_`+index">
<template v-for="(subItem,subIndex) in item">
<td :key="`d1_`+index+`s1_`+subIndex">
<template v-if="subItem.TCID>0">
<font>
<template v-if="subItem.AirportPickUp==1">
</template>
<template v-else-if="subItem.AirportPickUp==2">
</template>
<template v-else-if="subItem.UseType==1">
</template>
<template v-else-if="subItem.UseType==2">
半天
</template>
<template v-else-if="subItem.UseType==3">
小时
</template>
<template v-else>
X
</template>
</font>
</template>
</td>
</template>
</tr>
<tr :key="`d2_`+index">
<template v-for="(subItem,subIndex) in item">
<template v-if="subItem.TCID>0">
<td v-if="subItem.DayNum==1" :colspan="subItem.ColumnNum>1? subItem.ColumnNum:0"
:key="`d2_`+index+`s2_`+subIndex">
<el-tooltip :content="subItem.TCNUM+`(`+subItem.TCID+`),用车时间:`+subItem.StartDate+`至`+subItem.EndDate">
<font style="cursor:pointer;color:blue;text-decoration: underline" @click="gotoTeam(subItem)">
<template v-if="subItem.DMCNum && subItem.DMCNum!=''">
{{subItem.DMCNum}}
</template>
<template v-else>
{{subItem.TCNUM}}
</template>
</font>
</el-tooltip>
</td>
</template>
<template v-else>
<td :key="`d2_`+index+`s2_`+subIndex">
</td>
</template>
</template>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
msg: {
MonthStr: "",
QBranchId: "", //出团公司
},
headerList: [], //表头
dataList: [],
boxHeight: 0,
BranchList: [],
}
},
components: {},
methods: {
//初始化公司
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id,
};
this.apipost(
"admin_get_BranchGetList",
msg,
(res) => {
if (res.data.resultCode == 1) {
this.BranchList = res.data.data;
}
}
);
},
//跳转到团队详情
gotoTeam(item) {
var path = "TravelControlList";
if (item.TeamType == 1) {
path = "TravelControlListSale";
} else if (item.TeamType == 2) {
path = "oneDayTrip";
} else if (item.TeamType == 4) {
path = "TravelTeam";
} else {
path = "TravelControlList";
}
this.$router.push({
name: path,
query: {
id: item.TCID,
tcmun: item.TCNUM,
blank: "y",
tab: "团控列表",
},
});
},
getList() {
this.loading = true;
this.dataList = [];
this.headerList = [];
this.apipost('travel_post_GetJourneyCarPlanList', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data.DayList;
this.headerList = res.data.data.HeaderList;
} else {
this.Error(res.data.message);
}
})
},
},
mounted() {
let myDate = new Date();
let yearStr = myDate.getFullYear();
let monthStr = parseInt(myDate.getMonth() + 1);
this.msg.MonthStr = yearStr + "-" + (monthStr < 10 ? '0' + monthStr : monthStr);
let height = window.innerHeight - 65 - 55;
this.boxHeight = height;
this.getCompanyList();
this.getList();
},
}
</script>
...@@ -2216,6 +2216,14 @@ export default { ...@@ -2216,6 +2216,14 @@ export default {
title: '日本车行预订统计表' title: '日本车行预订统计表'
}, },
}, },
{
path: '/JourneyTripPlan', //行程用车计划表
name: 'JourneyTripPlan',
component: resolve => require(['@/components/busManagement/JourneyTripPlan'], resolve),
meta: {
title: '行程用车计划表'
},
},
{ {
path: '/JapanBusMonthFStatistics', //用車單統計(財務單據) path: '/JapanBusMonthFStatistics', //用車單統計(財務單據)
name: 'JapanBusMonthFStatistics', name: 'JapanBusMonthFStatistics',
......
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