Commit fc1a4b96 authored by denghr's avatar denghr

首页

parent cb430117
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<span v-if="scope.row.status==2">下架</span> <span v-if="scope.row.status==2">下架</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="200" label="操作"> <el-table-column align="center" width="200" label="操作" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <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> <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 @@ ...@@ -50,7 +50,7 @@
<span v-if="scope.row.status==2">下架</span> <span v-if="scope.row.status==2">下架</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" width="200" label="操作"> <el-table-column align="center" width="200" label="操作" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button size="small" type="primary" @click="handleUpdate(scope.row)">编辑</el-button> <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> <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 @@ ...@@ -90,7 +90,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="150"> <el-table-column align="center" label="操作" width="150" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button v-if="branchCompany_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑 <el-button v-if="branchCompany_btn_edit" size="small" type="success" @click="handleUpdate(scope.row)">编辑
</el-button> </el-button>
......
...@@ -69,11 +69,25 @@ ...@@ -69,11 +69,25 @@
</el-form> </el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
</div> </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-form label-width="100px" v-if="countTJ">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="2"><el-form-item label="车辆概况"></el-form-item></el-col> <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"> <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="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" style="color: #171413;">{{item.total}}</div>
<div class="text" v-if="item.travelStatus == 0">车辆总额(辆)</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 == 4">出行中车辆(辆)</div>
...@@ -91,7 +105,7 @@ ...@@ -91,7 +105,7 @@
</div> </div>
<!--车辆排班--> <!--车辆排班-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用--> <!--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-1"></span><span>租房车</span>
<span class="tip-co bg-5"></span><span>房车游</span> <span class="tip-co bg-5"></span><span>房车游</span>
<span class="tip-co bg-4"></span><span>展览</span> <span class="tip-co bg-4"></span><span>展览</span>
...@@ -99,7 +113,7 @@ ...@@ -99,7 +113,7 @@
<span class="tip-co bg-7"></span><span>预约中</span> <span class="tip-co bg-7"></span><span>预约中</span>
<span class="tip-co bg-8"></span><span>禁用</span> <span class="tip-co bg-8"></span><span>禁用</span>
</div> </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 style="display: flex;">
<div class="day-title" style="min-width: 200px;max-width:200px;background: #eef1f6;">日期({{currentMonth}}~{{nextMonth}}月)</div> <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> <div class="day-title" style="background: #eef1f6;" v-for="item in tempDayList" :key="item.day" ><span>{{item.day}}</span></div>
...@@ -113,7 +127,6 @@ ...@@ -113,7 +127,6 @@
<div style="color: #bfcbd9;font-size: 14px;">{{item.vehicleModel?item.vehicleModel.name:''}}</div> <div style="color: #bfcbd9;font-size: 14px;">{{item.vehicleModel?item.vehicleModel.name:''}}</div>
</div> </div>
<div class="day-title flex-jca-fdc" style="padding: 0;" v-for="iitem in item.temp" :key="iitem.day" > <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)"> <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-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> <span v-else style="position: absolute;color: #fff;top: -17px;right: 0;">{{ii.timeEtr}}</span>
...@@ -121,7 +134,32 @@ ...@@ -121,7 +134,32 @@
</div> </div>
</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> </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"> <div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" :current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
...@@ -149,6 +187,9 @@ ...@@ -149,6 +187,9 @@
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
} }
.schedul-tb .el-table .cell{
padding: 0;
}
.tip-co{ .tip-co{
padding: 10px; padding: 10px;
margin-right: 10px; margin-right: 10px;
...@@ -177,8 +218,9 @@ ...@@ -177,8 +218,9 @@
background: #d7d7d7; background: #d7d7d7;
} }
.ii-day{ .ii-day{
height: 4.16%; height: 3px;
position: relative; width: 60px;
margin-left: -19px;
} }
.day-title{ .day-title{
border-right:1px solid #bfcbd9; border-right:1px solid #bfcbd9;
...@@ -369,6 +411,7 @@ ...@@ -369,6 +411,7 @@
data() { data() {
return { return {
animate: false, animate: false,
firstTime: "",//排期表-第一个字段名称
marqueeList: [], marqueeList: [],
modalTitle: "创建", modalTitle: "创建",
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
...@@ -385,6 +428,7 @@ ...@@ -385,6 +428,7 @@
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
endTime: "",//结束时间为0点时有值
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
...@@ -429,6 +473,7 @@ ...@@ -429,6 +473,7 @@
} else { } else {
this.nextMonth = 1; this.nextMonth = 1;
} }
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")"
this.getTempDayList(); this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000); this.mar = setInterval(this.showMarquee, 2000);
getAll() getAll()
...@@ -464,10 +509,10 @@ ...@@ -464,10 +509,10 @@
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用--> // <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
if(!ii.bg){ if(!ii.bg){
//空白-可安排用车 //空白-可安排用车
// this.anpai = true; this.anpai = true;
// let arr = item.vehicleModel.keyword.split(","); let arr = item.vehicleModel.keyword.split(",");
// item.vehicleModel.keyword = arr.join(" | "); item.vehicleModel.keyword = arr.join(" | ");
// this.currentItem = {item: item, iitem: iitem, ii: ii}; this.currentItem = {item: item, iitem: iitem, ii: ii};
} else { } else {
if(ii.bookType == 6){ if(ii.bookType == 6){
//保养 //保养
...@@ -847,6 +892,7 @@ ...@@ -847,6 +892,7 @@
setColor(){ setColor(){
let temp = []; let temp = [];
this.list.map(function(item){ this.list.map(function(item){
let endTime = '';
item.temp.map(function(ttemp){ item.temp.map(function(ttemp){
let children = []; let children = [];
let tt = "";//yyyy-MM-dd hh:mm:ss let tt = "";//yyyy-MM-dd hh:mm:ss
...@@ -878,6 +924,13 @@ ...@@ -878,6 +924,13 @@
if(iitem.bookEndDate == tt){ if(iitem.bookEndDate == tt){
if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){ if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){
pp.timeEtr = h; 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 = ""; pp.bg = "";
} }
...@@ -888,32 +941,17 @@ ...@@ -888,32 +941,17 @@
ttemp.children = children ttemp.children = children
}); });
}); });
console.log(this.list);
}, },
/** /**
* tempDayList * tempDayList
**/ **/
getTempDayList(){ getTempDayList(){
let temp = []; let temp = [];
let list = this.list;
let currentMonth = getCurrentMonth();
for(let i = 0; i < 30; i++){ for(let i = 0; i < 30; i++){
let t = []; let t = [];
let tymd = getymdTimeByDay(i); let tymd = getymdTimeByDay(i);
let children = []; temp.push({day: getTimeByDay(i), month: getMonth(i), time: tymd});
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});
} }
this.tempDayList = temp; this.tempDayList = temp;
}, },
......
...@@ -100,12 +100,12 @@ ...@@ -100,12 +100,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="订单详情"> <el-table-column width="110" align="center" label="订单详情" fixed="right">
<template scope="scope"> <template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleOrderDetail(scope.row)">订单详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleOrderDetail(scope.row)">订单详情</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="400"> <el-table-column align="center" label="操作" width="400" fixed="right">
<template scope="scope"> <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 >=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> <el-button size="small" v-if="scope.row.status == 6" type="success" @click="handleReturnOrderVehicle(scope.row)">还车记录</el-button>
......
...@@ -182,12 +182,12 @@ ...@@ -182,12 +182,12 @@
<span>{{scope.row.haveViolation?'是':'否'}}</span> <span>{{scope.row.haveViolation?'是':'否'}}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column align="center" label="详情" width="100"> <el-table-column align="center" label="详情" width="100" fixed="right">
<template scope="scope"> <template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleDetail(scope.row)">订单详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleDetail(scope.row)">订单详情</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="250"> <el-table-column align="center" label="操作" width="250" fixed="right">
<template scope="scope"> <template scope="scope">
<!-- <el-button size="small" type="success" @click="handleBookInfo(scope.row)">预订信息</el-button> --> <!-- <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> <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