Commit ed593201 authored by 吴春's avatar 吴春

1

parent af8e3d8f
<style scoped>
.busStatisticsTalbe {
table-layout: fixed;
}
.busStatisticsTalbe thead tr th {
position: sticky;
top: 0;
z-index: 10;
}
</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>
<el-table-column fixed prop="CarNo" label="车牌号" width="150">
</el-table-column>
<el-table-column fixed prop="CarName" label="车型" width="150">
</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>
</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>
</template>
</template>
</el-table-column>
<template v-if="OrderList&&OrderList.length>0">
<el-table-column v-for='(item,index) in OrderList[0].DayList' :label="item.UseDateStr" :key='index'
min-width="300">
<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="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.StartCity}}
</template>
</template>
</template>
</div>
</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="child in childItem.OrderList">
<template v-for="childs in child.nowOrderDayCalendar">
<template v-if="item.UseDateStr==childs.UseDateStr">
{{ childs.EndCity}}
</template>
</template>
</template>
</div>
</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="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>
</template>
</template>
</div>
</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="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>
</template>
</template>
</div>
</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">
<div 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>
</template>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
</template>
</el-table>
</div>
</template>
<script>
export default {
props: ["OrderList", "pagesTitle", 'loading', 'headerList'],
data() {
return {};
},
watch: {
pagesTitle(val, oldval) {
},
OrderList: {
handler(val, oldVal) {},
},
},
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");
},
},
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>* {
visibility: initial !important;
}
</style>
......@@ -44,7 +44,7 @@
</div>
<div style="width: 100%; overflow-x: auto;padding-bottom: 10px; margin-top: 10px; " class="ownScrollbarStyle"
:style="{height: boxHeight + 'px'}">
<OrderList :pagesTitle="Title" :OrderList="DataList" :ColsCount="ColsCount" :loading="loading"
<OrderList :pagesTitle="Title" :OrderList="DataList" :loading="loading"
@success="msg.pageIndex=1,GetList()">
</OrderList>
</div>
......@@ -54,7 +54,7 @@
</template>
<script>
import OrderList from './BookAcar/components/JapanOrderList';
import OrderList from './BookAcar/components/JapanMonthRunList';
export default {
data() {
......@@ -71,7 +71,7 @@
IsFinish: "0",
TCNUM: ""
},
Title: '印象车行-运行统计表',
Title: '印象车行-运行统计表',
queryCommonData: {
CustomerList: [],
},
......@@ -107,12 +107,22 @@
},
getList() {
this.loading = true
this.apipost('JapanCar_get_GetJapanOrderStatisticsPageList', this.msg, res => {
this.apipost('JapanCar_get_GetJapanOrderCarRunPage', this.msg, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.ColsCount = res.data.data.MaxUseDay;
this.total = res.data.data.pmodel.count;
this.DataList = res.data.data.pmodel.pageData;
// this.ColsCount = res.data.data.MaxUseDay;
// this.total = res.data.data.pmodel.count;
this.DataList = res.data.data.pageData;
for(let i =0;i<this.DataList.length;i++){
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 =
// }
}
} else {
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