Commit 86095ce4 authored by youjie's avatar youjie

车统计表

parent 2c8a2e6a
......@@ -1096,7 +1096,7 @@
</template>
</template>
</el-table-column>
<el-table-column :label="$t('tips.jiaoyifangshi')">
<el-table-column :label="$t('tips.jiaoyifangshi')" min-width="200">
<template slot-scope="scope">
<div class="_number">
<template v-if="scope.row.TradeWayList&&scope.row.TradeWayList.length>0">
......
......@@ -8,31 +8,92 @@
top: 0;
z-index: 10;
}
.CustomerListDriverBox{
width: 100%;
height: 100%;
}
.CustomerListDriver{
width: 100%;
height: 35px;
line-height: 35px;
border-bottom: 1px solid #eee;
}
.CustomerListDriver:last-child{
border: 0;
}
/deep/.japanorder .el-table .cell{
padding-left: 0 !important;
padding-right: 0 !important;
height: 100%;
display: flex;
flex-direction: column;
}
/deep/.japanorder .el-table th{
padding: 0 5px;
line-height: 35px;
}
/deep/.el-table .el-table__cell{
padding: 0;
}
.text-p-xs{
padding: 0 5px;
}
.text-center{
/* text-align: center; */
}
/deep/.japanorder .el-table .el-table__fixed-right{
height:auto !important;
bottom:10px !important;
}
/deep/.japanorder .el-table .el-table__fixed{
height:auto !important;
bottom:10px !important;
}
</style>
<template>
<div class="japanorder">
<el-table :data="OrderList" style="width: 100%" height="250">
<el-table-column fixed prop="SupplierName" label="车公司" width="150"> </el-table-column>
<div class="japanorder" v-if="OrderList.length>0">
<el-table ref="mytableJap" :data="OrderList" style="width: 100%"
:loading="loading" :height="tableHeight" key="index">
<el-table-column fixed prop="SupplierName" label="车公司" width="150">
<template slot-scope="scope">
<div class="text-p-xs">{{scope.row.SupplierName}}</div>
</template>
</el-table-column>
<el-table-column fixed prop="CarNo" label="车牌号" width="150">
<template slot-scope="scope">
<div class="text-p-xs">{{scope.row.CarNo}}</div>
</template>
</el-table-column>
<el-table-column fixed prop="CarName" label="车型" width="150">
<template slot-scope="scope">
<div class="text-p-xs">{{scope.row.CarName}}</div>
</template>
</el-table-column>
<el-table-column fixed prop="CustomerName" label="使用单位" width="150">
<template slot-scope="scope">
<template v-for="(item,index) in scope.row.CustomerList">
{{item.CustomerName}}
</template>
<div class="CustomerListDriverBox">
<div
class="text-p-xs CustomerListDriver"
:style="{'height':item.OrderList.length*35+'px','line-height':item.OrderList.length*35+'px'}"
v-for="(item,index) in scope.row.CustomerList"
>
{{item.CustomerName?item.CustomerName:'-'}}
</div>
</div>
</template>
</el-table-column>
<el-table-column fixed prop="DriverName" label="司机" width="80">
<template slot-scope="scope">
<template v-for="(item,index) in scope.row.CustomerList">
<template v-for="(items,indexs) in item.OrderList">
{{items.DriverName}}
<template v-for="(item,index) in scope.row.CustomerList">
<div
class="text-p-xs CustomerListDriver"
v-for="(items,indexs) in item.OrderList"
>
{{items.DriverName}}
</div>
</template>
</template>
</template>
</el-table-column>
<template v-if="OrderList&&OrderList.length>0">
......@@ -41,82 +102,85 @@
<el-table-column label="开始时间">
<template slot-scope="scope">
<template v-if="scope.row.CustomerList.length>0">
<div v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.StartCity}}
</template>
<div
class="text-p-xs text-center CustomerListDriver"
v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.StartCity}}
</div>
</template>
</template>
</div>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="结束时间">
<template slot-scope="scope">
<template v-if="scope.row.CustomerList.length>0">
<div v-for="(childItem,index) in scope.row.CustomerList">
<template class="text-p-xs" v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.EndCity}}
</template>
<div
class="text-p-xs text-center CustomerListDriver"
v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.EndCity}}
</div>
</template>
</template>
</div>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="接机">
<template slot-scope="scope">
<template v-if="scope.row.CustomerList.length>0">
<div v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.UseState>0&&childs.UseState==1?'√':''}}
</template>
<div
class="text-p-xs text-center CustomerListDriver"
v-if="item.UseDateStr==childs.UseDateStr">
{{childs.UseState&&childs.UseState==1?'√':''}}
</div>
</template>
</template>
</div>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="送机">
<template slot-scope="scope">
<template v-if="scope.row.CustomerList.length>0">
<div v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr.UseDateStr==childs.UseDateStr">
{{ childs.UseState>0&&childs.UseState==2?'√':''}}
</template>
<div
class="text-p-xs text-center CustomerListDriver"
v-if="item.UseDateStr==childs.UseDateStr">
{{childs.UseState&&childs.UseState==2?'√':''}}
</div>
</template>
</template>
</div>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="包车">
<el-table-column label="一日游">
<template slot-scope="scope">
<template v-if="scope.row.CustomerList.length>0">
<div v-for="(childItem,index) in scope.row.CustomerList">
<div v-for="child in childItem.OrderList">
<template v-for="(childItem,index) in scope.row.CustomerList">
<template v-for="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.UseState>0&&(childs.UseState==3||childs.UseState==4)?'√':''}}
</template>
<div
class="text-p-xs text-center CustomerListDriver"
v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.UseState&&(childs.UseState==3||childs.UseState==4)?'√':' '}}
</div>
</template>
</div>
</div>
</template>
</template>
</template>
</template>
</el-table-column>
......@@ -127,29 +191,36 @@
</template>
<script>
export default {
props: ["OrderList", "pagesTitle", 'loading', 'headerList'],
props: ["OrderList", "pagesTitle", 'loading', 'headerList','tableHeight'],
data() {
return {};
},
watch: {
pagesTitle(val, oldval) {
},
tableHeight: {
handler(val, oldVal) {
},
deep: false,
immediate: true,
},
OrderList: {
handler(val, oldVal) {},
handler(val, oldVal) {
let _this = this
setTimeout(() => {
_this.$nextTick(() => {
_this.$refs.mytableJap.doLayout();
})
}, 300)
},
deep: true,
immediate: false,
},
},
methods: {
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 40;
if (h < 110) {
return;
}
//设置table的行高
// this.tableHeight = h;
},
success() {
this.close();
this.$emit("success");
......@@ -157,19 +228,15 @@
},
mounted() {
//自适应高度调节
this.com_onresize();
window.onresize = () => {
this.com_onresize();
};
},
};
</script>
<style scope="this api replaced by slot-scope in 2.5.0+">
.japanorder .el-table .el-table__cell.is-hidden>* {
/* .japanorder .el-table .el-table__cell.is-hidden>* {
visibility: initial !important;
}
} */
</style>
......@@ -42,12 +42,13 @@
车辆状态&nbsp;&nbsp;&nbsp;确定:<span style="color:#4BCA81 ;"></span>暂定:<span style="color: #ff6600;">O</span>未操作:<span
style="color:#E95252 ;">X</span>
</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"
:style="{height: boxHeight + 'px'}">
<OrderList :pagesTitle="Title" :OrderList="DataList" :loading="loading"
@success="msg.pageIndex=1,GetList()">
</OrderList>
</div>
</div> -->
<OrderList v-if="DataList.length>0" :pagesTitle="Title" :OrderList="DataList" :loading="loading"
:tableHeight="tableHeight" @success="msg.pageIndex=1,GetList()">
</OrderList>
<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>
......@@ -59,6 +60,7 @@
export default {
data() {
return {
tableHeight: 0,
loading: false,
currentPage: 1,
total: 0,
......@@ -84,6 +86,16 @@
OrderList
},
methods: {
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 100;
if (h < 110) {
return;
}
//设置table的行高
this.tableHeight = h;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
......@@ -117,10 +129,10 @@
let x = this.DataList[i]
// for(let j =0;i<x.CustomerList.length;j++){
// for(let j =0;i<x.OrderList.length;j++){
// let UseDateStr =
// let UseDateStr =
// }
// let UseDateStr =
// let UseDateStr =
// }
}
} else {
......@@ -145,6 +157,10 @@
this.offsetwidth = width;
this.getCustomerList();
this.getList();
this.com_onresize();
window.onresize = () => {
this.com_onresize();
}
},
}
......
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