Commit fc1a4b96 authored by denghr's avatar denghr

首页

parent cb430117
......@@ -50,7 +50,7 @@
<span v-if="scope.row.status==2">下架</span>
</template>
</el-table-column>
<el-table-column align="center" width="200" label="操作">
<el-table-column align="center" width="200" label="操作" fixed="right">
<template scope="scope">
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button>
......
......@@ -50,7 +50,7 @@
<span v-if="scope.row.status==2">下架</span>
</template>
</el-table-column>
<el-table-column align="center" width="200" label="操作">
<el-table-column align="center" width="200" label="操作" fixed="right">
<template scope="scope">
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button size="small" type="success" @click="handleDown(scope.row)" style="margin-left:0px" v-show="scope.row.status==1">下架</el-button>
......
......@@ -90,7 +90,7 @@
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="150">
<el-table-column align="center" label="操作" width="150" fixed="right">
<template scope="scope">
<el-button v-if="branchCompany_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button>
......
......@@ -69,19 +69,33 @@
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
</div>
<el-form label-width="100px" v-if="countTJ" style="margin-bottom:20px">
<el-row :gutter="20">
<el-col :span="2">.</el-col>
<el-col :span="5" v-for="(item, index) in countTJ" :key="item.id" >
<div class="grid-content bg-purple" style="padding:15px 0" v-if="item.travelStatus == 0 || item.travelStatus == 1 || item.travelStatus == 4 || item.travelStatus == 2">
<div class="text" style="font-size:22px;font-family:'Arial Negreta', 'Arial Normal', 'Arial';font-weight:700;color:#20A0FF;">{{item.total}}</div>
<div class="text" v-if="item.travelStatus == 0">今日收益(不含押金)(元)</div>
<div class="text" v-if="item.travelStatus == 4">订单总额(不含押金)(元)</div>
<div class="text" v-if="item.travelStatus == 1">未退还押金总额(元)</div>
<div class="text" v-if="item.travelStatus == 2">额外(取消损坏违章等)赔款(元)</div>
</div>
</el-col>
</el-row>
</el-form>
<el-form label-width="100px" v-if="countTJ">
<el-row :gutter="20">
<el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col>
<el-col :span="5" v-for="(item, index) in countTJ" :key="item.id">
<div class="grid-content bg-purple" v-if="item.travelStatus == 0 || item.travelStatus == 1 || item.travelStatus == 4 || item.travelStatus == 2">
<div class="text" style="color: #171413;">{{item.total}}</div>
<div class="text" v-if="item.travelStatus == 0">车辆总额(辆)</div>
<div class="text" v-if="item.travelStatus == 4">出行中车辆(辆)</div>
<div class="text" v-if="item.travelStatus == 1">空闲车辆(辆)</div>
<div class="text" v-if="item.travelStatus == 2">维修中车辆(辆)</div>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col>
<el-col :span="5" v-for="(item, index) in countTJ" :key="item.id">
<div class="grid-content bg-purple" style="padding:15px 0" v-if="item.travelStatus == 0 || item.travelStatus == 1 || item.travelStatus == 4 || item.travelStatus == 2">
<div class="text" style="color: #171413;">{{item.total}}</div>
<div class="text" v-if="item.travelStatus == 0">车辆总额(辆)</div>
<div class="text" v-if="item.travelStatus == 4">出行中车辆(辆)</div>
<div class="text" v-if="item.travelStatus == 1">空闲车辆(辆)</div>
<div class="text" v-if="item.travelStatus == 2">维修中车辆(辆)</div>
</div>
</el-col>
</el-row>
</el-form>
<!--车辆预警-->
<div class="marquee_box" v-if="marqueeList.length>0" @mouseenter="handelOver" @mouseleave="handelOut">
......@@ -91,7 +105,7 @@
</div>
<!--车辆排班-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
<div style="display: flex;">
<div style="display: flex;margin-bottom: 20px;">
<span class="tip-co bg-1"></span><span>租房车</span>
<span class="tip-co bg-5"></span><span>房车游</span>
<span class="tip-co bg-4"></span><span>展览</span>
......@@ -99,7 +113,7 @@
<span class="tip-co bg-7"></span><span>预约中</span>
<span class="tip-co bg-8"></span><span>禁用</span>
</div>
<div style="position: relative;padding: 10px;padding-left: 0;width: 100%;overflow-x:auto;" v-if="currentMonth">
<!-- <div style="position: relative;padding: 10px;padding-left: 0;width: 100%;overflow-x:auto;" v-if="currentMonth">
<div style="display: flex;">
<div class="day-title" style="min-width: 200px;max-width:200px;background: #eef1f6;">日期({{currentMonth}}~{{nextMonth}}月)</div>
<div class="day-title" style="background: #eef1f6;" v-for="item in tempDayList" :key="item.day" ><span>{{item.day}}</span></div>
......@@ -113,7 +127,6 @@
<div style="color: #bfcbd9;font-size: 14px;">{{item.vehicleModel?item.vehicleModel.name:''}}</div>
</div>
<div class="day-title flex-jca-fdc" style="padding: 0;" v-for="iitem in item.temp" :key="iitem.day" >
<!--@click="ii.bg?toShowDialog(item, iitem, ii):''"-->
<div v-for="ii in iitem.children" :key="ii.time" class="ii-day" :class="ii.bg" @click="toShowDialog(item, iitem, ii)">
<span v-if="ii.timeEtr=='00'" style="position: absolute;color: rgb(255, 255, 255);left: -18px;top: 60px;">{{ii.timeEtr}}</span>
<span v-else style="position: absolute;color: #fff;top: -17px;right: 0;">{{ii.timeEtr}}</span>
......@@ -121,7 +134,32 @@
</div>
</div>
</div>
</div>
</div> -->
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
style="width: 100%;cursor: pointer;" class="schedul-tb">
<el-table-column width="220" align="center" :label="firstTime">
<template scope="scope">
<div>
<div style="color: #bfcbd9;font-size: 14px;">
现在位置:{{scope.row.parkCompanyName}}
</div>
<div>{{scope.row.numberPlate}}<img src="../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div>
<div style="color: #bfcbd9;font-size: 14px;">{{scope.row.vehicleModel?scope.row.vehicleModel.name:''}}</div>
</div>
</template>
</el-table-column>
<el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day">
<template scope="scope">
<div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time">
<div v-for="ii in iitem.children" :key="ii.time" :data-ii="ii.time" :data-endhour="ii.endhour" class="ii-day" :class="ii.bg" @click="toShowDialog(scope.row, iitem, ii)">
<span v-if="ii.timeEtr == '00'" style="position: absolute;color: #fff;left: -20px;bottom: 0">{{ii.timeEtr}}</span>
<span v-else style="position: absolute;color: #fff;top: -24px;right: 0;">{{ii.timeEtr}}</span>
<span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
......@@ -149,6 +187,9 @@
flex-direction: column;
justify-content: space-around;
}
.schedul-tb .el-table .cell{
padding: 0;
}
.tip-co{
padding: 10px;
margin-right: 10px;
......@@ -177,8 +218,9 @@
background: #d7d7d7;
}
.ii-day{
height: 4.16%;
position: relative;
height: 3px;
width: 60px;
margin-left: -19px;
}
.day-title{
border-right:1px solid #bfcbd9;
......@@ -369,6 +411,7 @@
data() {
return {
animate: false,
firstTime: "",//排期表-第一个字段名称
marqueeList: [],
modalTitle: "创建",
BASE_API: process.env.BASE_API,
......@@ -385,6 +428,7 @@
list: null,
total: null,
listLoading: true,
endTime: "",//结束时间为0点时有值
listQuery: {
page: 1,
limit: 10,
......@@ -429,6 +473,7 @@
} else {
this.nextMonth = 1;
}
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")"
this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000);
getAll()
......@@ -464,10 +509,10 @@
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
if(!ii.bg){
//空白-可安排用车
// this.anpai = true;
// let arr = item.vehicleModel.keyword.split(",");
// item.vehicleModel.keyword = arr.join(" | ");
// this.currentItem = {item: item, iitem: iitem, ii: ii};
this.anpai = true;
let arr = item.vehicleModel.keyword.split(",");
item.vehicleModel.keyword = arr.join(" | ");
this.currentItem = {item: item, iitem: iitem, ii: ii};
} else {
if(ii.bookType == 6){
//保养
......@@ -847,6 +892,7 @@
setColor(){
let temp = [];
this.list.map(function(item){
let endTime = '';
item.temp.map(function(ttemp){
let children = [];
let tt = "";//yyyy-MM-dd hh:mm:ss
......@@ -878,6 +924,13 @@
if(iitem.bookEndDate == tt){
if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){
pp.timeEtr = h;
if(h == "00"){
let cc = new Date(tt);
console.log(cc);
let te = cc.getTime()-24*60*60;
endTime = timestamp2Date(te).substring(0, 13) +":00:00";
console.log(endTime);
}
}
pp.bg = "";
}
......@@ -888,32 +941,17 @@
ttemp.children = children
});
});
console.log(this.list);
},
/**
* tempDayList
**/
getTempDayList(){
let temp = [];
let list = this.list;
let currentMonth = getCurrentMonth();
for(let i = 0; i < 30; i++){
let t = [];
let tymd = getymdTimeByDay(i);
let children = [];
let tt = "";//yyyy-MM-dd hh:mm:ss
let h = "";
let bg = "";
for(let ii = 0; ii < 24; ii ++) {
if (ii < 10) {
h = "0" + ii;
tt = tymd + " 0" + ii + ":00:00";
} else {
tt = tymd + " " + ii + ":00:00";
h = ii;
}
children.push({time: tt, h: h, bg: bg});
}
temp.push({day: getTimeByDay(i), month: getMonth(i), children: children});
temp.push({day: getTimeByDay(i), month: getMonth(i), time: tymd});
}
this.tempDayList = temp;
},
......
......@@ -100,12 +100,12 @@
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单详情">
<el-table-column width="110" align="center" label="订单详情" fixed="right">
<template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleOrderDetail(scope.row)">订单详情</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="400">
<el-table-column align="center" label="操作" width="400" fixed="right">
<template scope="scope">
<el-button size="small" v-if="scope.row.status >=4" type="success" @click="handleHandoverOrderVehicle(scope.row)">交车记录</el-button>
<el-button size="small" v-if="scope.row.status == 6" type="success" @click="handleReturnOrderVehicle(scope.row)">还车记录</el-button>
......
......@@ -182,12 +182,12 @@
<span>{{scope.row.haveViolation?'是':'否'}}</span>
</template>
</el-table-column> -->
<el-table-column align="center" label="详情" width="100">
<el-table-column align="center" label="详情" width="100" fixed="right">
<template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleDetail(scope.row)">订单详情</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="250">
<el-table-column align="center" label="操作" width="250" fixed="right">
<template scope="scope">
<!-- <el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button> -->
<el-button size="small" type="success" v-if="scope.row.status==3" @click="illegalInquiry(scope.row)">违章记录</el-button>
......
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