Commit 85ff72ad authored by rencs's avatar rencs

9.11 营收统计(部分)首页统计

parent be01414f
...@@ -107,3 +107,20 @@ export function update_store(id, query) { ...@@ -107,3 +107,20 @@ export function update_store(id, query) {
data: query, data: query,
}); });
} }
//营收统计列表
export function revenue_sum_list(query) {
return fetch({
url: "/api/order/admin/wallet/selectList",
method: "get",
params: query,
});
}
//营收统计合计
export function revenue_sum_count(query) {
return fetch({
url: "/api/order/admin/wallet/sumAmount",
method: "get",
params: query,
});
}
...@@ -41,7 +41,7 @@ export function cancleBook(obj) { ...@@ -41,7 +41,7 @@ export function cancleBook(obj) {
return fetch({ return fetch({
url: '/vehicle/vehicleInfo/unbook/4employee', url: '/vehicle/vehicleInfo/unbook/4employee',
method: 'delete', method: 'delete',
data:obj data: obj
}); });
} }
...@@ -87,6 +87,15 @@ export function orderStatistics(type) { ...@@ -87,6 +87,15 @@ export function orderStatistics(type) {
method: 'get', method: 'get',
}); });
} }
/**
* 首页统计
*/
export function getIndexAllcounts() {
return fetch({
url: '/api/order/background/statistics/indexOrder',
method: 'get',
});
}
/** /**
...@@ -102,12 +111,12 @@ export function getUpkeepAll() { ...@@ -102,12 +111,12 @@ export function getUpkeepAll() {
//获取旅游路线 //获取旅游路线
export function getTourList(param) { export function getTourList(param) {
if(param){ if (param) {
return fetch({ return fetch({
url: '/api/tour/verfication/getList?'+param, url: '/api/tour/verfication/getList?' + param,
method: 'get', method: 'get',
}); });
}else{ } else {
return fetch({ return fetch({
url: '/api/tour/verfication/getList', url: '/api/tour/verfication/getList',
method: 'get', method: 'get',
...@@ -118,7 +127,7 @@ export function getTourList(param) { ...@@ -118,7 +127,7 @@ export function getTourList(param) {
//获取核销路线id信息 //获取核销路线id信息
export function getTourInfor(id) { export function getTourInfor(id) {
return fetch({ return fetch({
url: '/api/tour/verfication/info/'+id, url: '/api/tour/verfication/info/' + id,
method: 'get', method: 'get',
}); });
} }
<template> <template>
<div class="app-container calendar-list-container" v-loading.body="showLoadingBody"> <div class="app-container calendar-list-container" v-loading.body="showLoadingBody">
<div > <div>
<div class="statisticsBox"> <div class="statisticsBox">
<!-- <div class="statisticsItem"> <!-- <div class="statisticsItem">
<div class="colorbg1"></div> <div class="colorbg1"></div>
<div class="detail"> <div class="detail">
<div class="detail-title">今日收益(不含押金)</div> <div class="detail-title">今日收益(不含押金)</div>
<div class="detail-money">¥ 6,666,66</div> <div class="detail-money">¥ 6,666,66</div>
</div> </div>
</div> --> </div>-->
<div class="statisticsItem"> <div class="statisticsItem">
<div class="colorbg2"></div> <div class="colorbg2"></div>
<div class="detail"> <div class="detail">
<!-- (不含押金)--> <!-- (不含押金)-->
<div class="detail-title">订单总额</div> <div class="detail-title">本日新增订单总额</div>
<div class="detail-money">{{totalGmv|NumFormat}}</div> <div class="detail-money">{{currDayOrderAmount|NumFormat}}</div>
</div>
</div> </div>
<div class="statisticsItem"> </div>
<div class="colorbg3"></div> <div class="statisticsItem">
<div class="detail"> <div class="colorbg1"></div>
<div class="detail-title">未退还押金总额</div> <div class="detail">
<div class="detail-money">{{totalSecurityDeposit|NumFormat}}</div> <div class="detail-title">本日新增订单数</div>
</div> <div class="detail-money">{{currDayOrderNum|NumFormat}}</div>
</div> </div>
<div class="statisticsItem"> </div>
<div class="colorbg4"></div> <div class="statisticsItem">
<div class="detail"> <div class="colorbg4"></div>
<div class="detail-title">额外赔款(取消损坏违章等)</div> <div class="detail">
<div class="detail-money">{{peichang|NumFormat}}</div> <div class="detail-title">今日需出车订单数</div>
</div> <div class="detail-money">{{currDayToLiftVehicleNum|NumFormat}}</div>
</div>
</div>
<div class="statisticsItem">
<div class="colorbg5"></div>
<div class="detail">
<div class="detail-title">今日需收车订单数</div>
<div class="detail-money">{{currDayToReturnVehicleNum|NumFormat}}</div>
</div> </div>
</div>
<div class="statisticsItem">
<div class="colorbg3"></div>
<div class="detail">
<div class="detail-title">违章待处理订单数</div>
<div class="detail-money">{{toDealTrafficPay|NumFormat}}</div>
</div>
</div>
</div> </div>
<div class="carDetail"> <div class="carDetail">
<div class="carDetailBoxTitle">车辆概况</div> <div class="carDetailBoxTitle">车辆概况</div>
<div class="carDetailBox"> <div class="carDetailBox">
<div class="carDetailItem" v-for="(item, index) in countTJ" :key="item.id"> <div class="carDetailItem" v-for="(item, index) in countTJ" :key="item.id">
<div class="detail-num"><span style="position: relative;">{{item.total}}<span class="unit"></span></span></div> <div class="detail-num">
<span style="position: relative;">
{{item.total}}
<span class="unit"></span>
</span>
</div>
<div class="carDetail-title" v-if="item.travelStatus == 0">车辆总额</div> <div class="carDetail-title" v-if="item.travelStatus == 0">车辆总额</div>
<div class="carDetail-title" v-if="item.travelStatus == 4">出行中</div> <div class="carDetail-title" v-if="item.travelStatus == 4">出行中</div>
<div class="carDetail-title" v-if="item.travelStatus == 1">空闲</div> <div class="carDetail-title" v-if="item.travelStatus == 1">空闲</div>
...@@ -48,62 +67,125 @@ ...@@ -48,62 +67,125 @@
<!--车辆预警--> <!--车辆预警-->
<div class="carEarlyWarning"> <div class="carEarlyWarning">
<div class="carEarlyWarningTitle">车辆预警</div> <div class="carEarlyWarningTitle">车辆预警</div>
<div class="marquee_box" v-if="marqueeList.length>0" @mouseenter="handelOver" @mouseleave="handelOut"> <div
class="marquee_box"
v-if="marqueeList.length>0"
@mouseenter="handelOver"
@mouseleave="handelOut"
>
<ul class="marquee_list" :class="{marquee_top:animate}"> <ul class="marquee_list" :class="{marquee_top:animate}">
<li v-for="(item,index) in marqueeList" ><i class="el-icon-warning" :class="item.color" style="padding-left:30px;padding-right:20px"></i>{{item.msg}} <span style="text-decoration:underline">立即处理</span></li> <li v-for="(item,index) in marqueeList">
<i
class="el-icon-warning"
:class="item.color"
style="padding-left:30px;padding-right:20px"
></i>
{{item.msg}}
<span style="text-decoration:underline">立即处理</span>
</li>
</ul> </ul>
</div> </div>
</div> </div>
<!--车辆排班--> <!--车辆排班-->
<div class="carEarlyWarning" style="padding-bottom:30px"> <div class="carEarlyWarning" style="padding-bottom:30px">
<div class="carEarlyWarningTitle" style="display: flex;justify-content: space-between;margin-bottom:20px"> <div
class="carEarlyWarningTitle"
style="display: flex;justify-content: space-between;margin-bottom:20px"
>
<div style="flex:1">车辆排班</div> <div style="flex:1">车辆排班</div>
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他--> <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
<div style="color: rgb(87, 81, 96);font-family: 微软雅黑;font-weight: 400;font-style: normal;font-size: 14px;"> <div
<span class="tip-co bg-1"></span><span>租房车/客户用车</span> style="color: rgb(87, 81, 96);font-family: 微软雅黑;font-weight: 400;font-style: normal;font-size: 14px;"
<span class="tip-co bg-5"></span><span>房车游</span> >
<span class="tip-co bg-4"></span><span>展览</span> <span class="tip-co bg-1"></span>
<span class="tip-co bg-6"></span><span>保养/维修</span> <span>租房车/客户用车</span>
<span class="tip-co bg-10"></span><span>其他</span> <span class="tip-co bg-5"></span>
<span class="tip-co bg-7"></span><span>预约中</span> <span>房车游</span>
<span class="tip-co bg-8"></span><span>禁用</span> <span class="tip-co bg-4"></span>
<span>展览</span>
<span class="tip-co bg-6"></span>
<span>保养/维修</span>
<span class="tip-co bg-10"></span>
<span>其他</span>
<span class="tip-co bg-7"></span>
<span>预约中</span>
<span class="tip-co bg-8"></span>
<span>禁用</span>
</div> </div>
</div> </div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row <el-table
style="width: 100%;cursor: pointer;" class="schedul-tb"> :key="tableKey"
<el-table-column width="220" align="center" :label="firstTime" fixed> :data="list"
<template slot-scope="scope"> v-loading.body="listLoading"
<div> border
<div style="color: #bfcbd9;font-size: 14px;"> fit
现在位置:{{scope.row.parkCompanyName}} highlight-current-row
style="width: 100%;cursor: pointer;"
class="schedul-tb"
>
<el-table-column width="220" align="center" :label="firstTime" fixed>
<template slot-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>
<div>{{scope.row.numberPlate}}<img src="../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div> </template>
<div style="color: #bfcbd9;font-size: 14px;">{{scope.row.vehicleModel?scope.row.vehicleModel.name:''}}</div> </el-table-column>
</div> <el-table-column
</template> width="60"
</el-table-column> align="center"
<el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day"> :label="item.day"
<template slot-scope="scope"> v-for="item in tempDayList"
<div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time"> :key="item.day"
<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> <template slot-scope="scope">
<span v-else style="position: relative;color: #fff;top: -24px;right: -20px;">{{ii.timeEtr}}</span> <div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time">
<span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span> <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: relative;color: #fff;top: -24px;right: -20px;"
>{{ii.timeEtr}}</span>
<span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span>
</div>
</div> </div>
</div> </template>
</template> </el-table-column>
</el-table-column> </el-table>
</el-table> <div v-show="!listLoading" class="pagination-container">
<div v-show="!listLoading" class="pagination-container"> <el-pagination
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" @size-change="handleSizeChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" @current-change="handleCurrentChange"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> :current-page.sync="listQuery.page"
</div> :page-sizes="[10,20,30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div>
</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>
...@@ -125,895 +207,1184 @@ ...@@ -125,895 +207,1184 @@
</div> </div>
</div> </div>
</div> </div>
</div> --> </div>-->
</div> </div>
<!--保养弹框--> <!--保养弹框-->
<vehicleMaintenanceModal v-if="baoyang" :currentItem="currentItem" v-on:baoyangDialogEvent = "baoyangDialogEvent"></vehicleMaintenanceModal> <vehicleMaintenanceModal
v-if="baoyang"
:currentItem="currentItem"
v-on:baoyangDialogEvent="baoyangDialogEvent"
></vehicleMaintenanceModal>
<!--展览、预定用车弹框--> <!--展览、预定用车弹框-->
<vehicleExhibitionModal v-if="zhanlan" :currentItem="currentItem" v-on:zhanlanDialogEvent = "zhanlanDialogEvent"></vehicleExhibitionModal> <vehicleExhibitionModal
v-if="zhanlan"
:currentItem="currentItem"
v-on:zhanlanDialogEvent="zhanlanDialogEvent"
></vehicleExhibitionModal>
<!--安排用车弹框--> <!--安排用车弹框-->
<vehiclePlanModal v-if="anpai" :currentItem="currentItem" v-on:anpaiDialogEvent = "anpaiDialogEvent"></vehiclePlanModal> <vehiclePlanModal
v-if="anpai"
:currentItem="currentItem"
v-on:anpaiDialogEvent="anpaiDialogEvent"
></vehiclePlanModal>
<!--租车详情弹框--> <!--租车详情弹框-->
<!--rentOrder--> <!--rentOrder-->
<rentOrderDetailModal :form="rentOrderInfo" :rentCostDetail="rentCostDetail" v-if="rentOrder" v-on:rentOrderDetailDialogEvent="rentOrderDetailDialogEvent"></rentOrderDetailModal> <rentOrderDetailModal
:form="rentOrderInfo"
:rentCostDetail="rentCostDetail"
v-if="rentOrder"
v-on:rentOrderDetailDialogEvent="rentOrderDetailDialogEvent"
></rentOrderDetailModal>
<!--旅游订单详情--> <!--旅游订单详情-->
<tourOrderDetailModal :tourRow="tourRow" v-if="tourDialogVisible" v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal> <tourOrderDetailModal
:tourRow="tourRow"
v-if="tourDialogVisible"
v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"
></tourOrderDetailModal>
<!--禁用弹框--> <!--禁用弹框-->
<disableModal v-if="jinyong" :currentItem="currentItem" v-on:jinyongDialogEvent = "jinyongDialogEvent"></disableModal> <disableModal
v-if="jinyong"
:currentItem="currentItem"
v-on:jinyongDialogEvent="jinyongDialogEvent"
></disableModal>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.app-container{background-color: rgba(245, 245, 245, 1);} .app-container {
.statisticsBox{width: 100%;display: flex;justify-content: space-between;margin-bottom: 40px;} background-color: rgba(245, 245, 245, 1);
.statisticsItem{flex: 1;background-color: #fff;-moz-box-shadow:1px 1px 3px #ccc; -webkit-box-shadow:1px 1px 3px #ccc; box-shadow:1px 1px 3px #ccc;border-radius: 4px;max-width: calc(33.3% - 40px)} }
.colorbg1{width: 100%;height: 6px;border-radius: 4px 4px 0 0;background:-webkit-linear-gradient(left, #1c9fff, #70d1fc);background:-o-linear-gradient(right, #1c9fff, #70d1fc);background:-moz-linear-gradient(right, #1c9fff, #70d1fc);background:linear-gradient(to right, #1c9fff, #70d1fc);} .statisticsBox {
.colorbg2{width: 100%;height: 6px;border-radius: 4px 4px 0 0;background:-webkit-linear-gradient(left, #1f51fc, #70a0fc);background:-o-linear-gradient(right, #1f51fc, #70a0fc);background:-moz-linear-gradient(right, #1f51fc, #70a0fc);background:linear-gradient(to right, #1f51fc, #70a0fc);} width: 100%;
.colorbg3{width: 100%;height: 6px;border-radius: 4px 4px 0 0;background:-webkit-linear-gradient(left, #fc201f, #fb6b5b);background:-o-linear-gradient(right, #fc201f, #fb6b5b);background:-moz-linear-gradient(right, #fc201f, #fb6b5b);background:linear-gradient(to right, #fc201f, #fb6b5b);} display: flex;
.colorbg4{width: 100%;height: 6px;border-radius: 4px 4px 0 0;background:-webkit-linear-gradient(left, #ff6a05, #ffc671);background:-o-linear-gradient(right, #ff6a05, #ffc671);background:-moz-linear-gradient(right, #ff6a05, #ffc671);background:linear-gradient(to right, #ff6a05, #ffc671);} justify-content: space-between;
.statisticsItem .detail{width: 100%;background: #fff;padding: 40px;border-radius: 0 0 4px 4px;} margin-bottom: 40px;
.detail-title{font-size: 16px;color: rgb(107, 107, 107); font-family: 微软雅黑;font-weight: 400;font-style: normal;padding-bottom: 10px} }
.detail-money{font-family: 'Arial Normal', 'Arial';font-weight: 400;font-style: normal;font-size: 28px;color: #000000;} .statisticsItem {
.carDetail{width: 100%;margin-bottom: 40px;padding: 0 20px;-moz-box-shadow:1px 1px 3px #ccc; -webkit-box-shadow:1px 1px 3px #ccc; box-shadow:1px 1px 3px #ccc;border-radius: 4px;background: #fff;} margin: 10px;
.carDetailBox{width: 100%;display: flex;justify-content: space-between;padding: 30px 0 15px 0} justify-content: center;
.carDetailItem{flex: 1;background-color: #fff;text-align: center;border-right: 1px solid rgba(240, 240, 240, 1);} flex: 1;
.carDetailBox .carDetailItem:last-child{border-right: none;} background-color: #fff;
.carDetailBoxTitle{display: block;font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑;font-weight: 700;font-style: normal;font-size: 18px;color: rgb(81, 81, 81);padding: 20px 0;border-bottom: 1px solid rgba(240, 240, 240, 1);} -moz-box-shadow: 1px 1px 3px #ccc;
.detail-num{font-family: 'Arial Normal', 'Arial';font-weight: 400;font-style: normal;font-size: 28px;color: #000000;padding-top: 20px;} -webkit-box-shadow: 1px 1px 3px #ccc;
.detail-num .unit{position: absolute;font-family: 微软雅黑;font-weight: 400;font-style: normal;color: rgb(107, 107, 107);font-size: 13px;right: -20px;} box-shadow: 1px 1px 3px #ccc;
.carDetail-title{ font-family: 微软雅黑;font-weight: 400;font-style: normal;font-size: 18px;color: rgb(78, 75, 86);padding: 10px 0 20px 0;} border-radius: 4px;
.carEarlyWarning{width: 100%;margin-bottom: 40px;padding: 0 20px;-moz-box-shadow:1px 1px 3px #ccc; -webkit-box-shadow:1px 1px 3px #ccc; box-shadow:1px 1px 3px #ccc;border-radius: 4px;background: #fff;} max-width: calc(33.3% - 40px);
.carEarlyWarningTitle{display: block;font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑;font-weight: 700;font-style: normal;font-size: 18px;color: rgb(81, 81, 81);padding: 20px 0;border-bottom: 1px solid rgba(240, 240, 240, 1);} }
.flex-jca-fdc{ .colorbg1 {
display: flex !important; width: 100%;
flex-direction: column; height: 6px;
justify-content: space-around; border-radius: 4px 4px 0 0;
} background: -webkit-linear-gradient(left, #1c9fff, #70d1fc);
.schedul-tb .el-table .cell{ background: -o-linear-gradient(right, #1c9fff, #70d1fc);
padding: 0; background: -moz-linear-gradient(right, #1c9fff, #70d1fc);
} background: linear-gradient(to right, #1c9fff, #70d1fc);
.tip-co{ }
padding: 0 15px; .colorbg2 {
margin-right: 10px; width: 100%;
margin-left: 20px; height: 6px;
} border-radius: 4px 4px 0 0;
.tip-co:first-child{ background: -webkit-linear-gradient(left, #1f51fc, #70a0fc);
margin-left: 0; background: -o-linear-gradient(right, #1f51fc, #70a0fc);
} background: -moz-linear-gradient(right, #1f51fc, #70a0fc);
/* 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他 */ background: linear-gradient(to right, #1f51fc, #70a0fc);
.bg-1{ }
background: #20a0ff; .colorbg3 {
} width: 100%;
.bg-9{ height: 6px;
background: #20a0ff; border-radius: 4px 4px 0 0;
} background: -webkit-linear-gradient(left, #fc201f, #fb6b5b);
.bg-5{ background: -o-linear-gradient(right, #fc201f, #fb6b5b);
background: #6633cc; background: -moz-linear-gradient(right, #fc201f, #fb6b5b);
} background: linear-gradient(to right, #fc201f, #fb6b5b);
.bg-4{ }
background: #00cc66; .colorbg5 {
} width: 100%;
.bg-3{ height: 6px;
background: #ff6633; border-radius: 4px 4px 0 0;
} background: -webkit-linear-gradient(left, #ffea00, #fff480);
.bg-6{ background: -o-linear-gradient(right, #ffea00, #fff480);
background: #ff6633; background: -moz-linear-gradient(right, #ffea00, #fff480);
} background: linear-gradient(to right, #ffea00, #fff480);
.bg-7{ }
background: #ffcc00; .colorbg4 {
} width: 100%;
.bg-8{ height: 6px;
background: #868686; border-radius: 4px 4px 0 0;
} background: -webkit-linear-gradient(left, #ff6a05, #ffc671);
.bg-10{ background: -o-linear-gradient(right, #ff6a05, #ffc671);
background: #ff6699; background: -moz-linear-gradient(right, #ff6a05, #ffc671);
} background: linear-gradient(to right, #ff6a05, #ffc671);
.ii-day{ }
height: 3px; .statisticsItem .detail {
width: 60px; width: 100%;
margin-left: -19px; background: #fff;
} padding: 40px 20px;
.day-title{ border-radius: 0 0 4px 4px;
border-right:1px solid #bfcbd9; }
border-bottom:1px solid #bfcbd9; .detail-title {
padding: 10px; font-size: 16px;
min-width: 45px; color: rgb(107, 107, 107);
max-width: 45px; font-family: 微软雅黑;
display: inline-block; font-weight: 400;
cursor: pointer; font-style: normal;
} padding-bottom: 10px;
.v-list{ display: flex;
padding: 10px; align-items: center;
min-width: 200px; justify-content: center;
max-width: 200px; }
border-bottom:1px solid #bfcbd9; .detail-money {
border-right:1px solid #bfcbd9; font-family: "Arial Normal", "Arial";
} font-weight: 400;
.zzui-broadcast-window{ font-style: normal;
height: 180px !important; display: flex;
background: #ccc; align-items: center;
} justify-content: center;
.el-col { font-size: 28px;
border-radius: 4px; color: #000000;
} flex-wrap: nowrap;
.bg-purple-dark { white-space: nowrap;
background: #99a9bf; }
} .carDetail {
.bg-purple { width: 100%;
background: #eef1f6; margin-bottom: 40px;
} padding: 0 20px;
.bg-purple-light { -moz-box-shadow: 1px 1px 3px #ccc;
background: #e5e9f2; -webkit-box-shadow: 1px 1px 3px #ccc;
} box-shadow: 1px 1px 3px #ccc;
.grid-content { border-radius: 4px;
border-radius: 4px; background: #fff;
min-height: 36px; }
} .carDetailBox {
.grid-content .text{ width: 100%;
text-align: center; display: flex;
line-height: 35px; justify-content: space-between;
} padding: 30px 0 15px 0;
.row-bg { }
padding: 10px 0; .carDetailItem {
background-color: #f9fafc; flex: 1;
} background-color: #fff;
.marquee { text-align: center;
width: 100%; border-right: 1px solid rgba(240, 240, 240, 1);
}
.carDetailBox .carDetailItem:last-child {
border-right: none;
}
.carDetailBoxTitle {
display: block;
font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑;
font-weight: 700;
font-style: normal;
font-size: 18px;
color: rgb(81, 81, 81);
padding: 20px 0;
border-bottom: 1px solid rgba(240, 240, 240, 1);
}
.detail-num {
font-family: "Arial Normal", "Arial";
font-weight: 400;
font-style: normal;
font-size: 28px;
color: #000000;
padding-top: 20px;
}
.detail-num .unit {
position: absolute;
font-family: 微软雅黑;
font-weight: 400;
font-style: normal;
color: rgb(107, 107, 107);
font-size: 13px;
right: -20px;
}
.carDetail-title {
font-family: 微软雅黑;
font-weight: 400;
font-style: normal;
font-size: 18px;
color: rgb(78, 75, 86);
padding: 10px 0 20px 0;
}
.carEarlyWarning {
width: 100%;
margin-bottom: 40px;
padding: 0 20px;
-moz-box-shadow: 1px 1px 3px #ccc;
-webkit-box-shadow: 1px 1px 3px #ccc;
box-shadow: 1px 1px 3px #ccc;
border-radius: 4px;
background: #fff;
}
.carEarlyWarningTitle {
display: block;
font-family: "微软雅黑 Bold", "微软雅黑 Regular", 微软雅黑;
font-weight: 700;
font-style: normal;
font-size: 18px;
color: rgb(81, 81, 81);
padding: 20px 0;
border-bottom: 1px solid rgba(240, 240, 240, 1);
}
.flex-jca-fdc {
display: flex !important;
flex-direction: column;
justify-content: space-around;
}
.schedul-tb .el-table .cell {
padding: 0;
}
.tip-co {
padding: 0 15px;
margin-right: 10px;
margin-left: 20px;
}
.tip-co:first-child {
margin-left: 0;
}
/* 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他 */
.bg-1 {
background: #20a0ff;
}
.bg-9 {
background: #20a0ff;
}
.bg-5 {
background: #6633cc;
}
.bg-4 {
background: #00cc66;
}
.bg-3 {
background: #ff6633;
}
.bg-6 {
background: #ff6633;
}
.bg-7 {
background: #ffcc00;
}
.bg-8 {
background: #868686;
}
.bg-10 {
background: #ff6699;
}
.ii-day {
height: 3px;
width: 60px;
margin-left: -19px;
}
.day-title {
border-right: 1px solid #bfcbd9;
border-bottom: 1px solid #bfcbd9;
padding: 10px;
min-width: 45px;
max-width: 45px;
display: inline-block;
cursor: pointer;
}
.v-list {
padding: 10px;
min-width: 200px;
max-width: 200px;
border-bottom: 1px solid #bfcbd9;
border-right: 1px solid #bfcbd9;
}
.zzui-broadcast-window {
height: 180px !important;
background: #ccc;
}
.el-col {
border-radius: 4px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #eef1f6;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
min-height: 36px;
}
.grid-content .text {
text-align: center;
line-height: 35px;
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
.marquee {
width: 100%;
height: 50px; height: 50px;
align-items: center; align-items: center;
color: #3a3a3a; color: #3a3a3a;
background-color: white; background-color: white;
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
} }
.marquee_title { .marquee_title {
padding: 0 20px; padding: 0 20px;
height: 21px; height: 21px;
font-size: 14px; font-size: 14px;
border-right: 1px solid #d8d8d8; border-right: 1px solid #d8d8d8;
align-items: center; align-items: center;
} }
.marquee_box { .marquee_box {
display: block; display: block;
position: relative; position: relative;
width: 100%; width: 100%;
height: 145px; height: 145px;
overflow: hidden; overflow: hidden;
margin: 0; margin: 0;
background: #fff; background: #fff;
} }
.marquee_list { .marquee_list {
display: block; display: block;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
padding-left: 0px; padding-left: 0px;
} }
.marquee_top { .marquee_top {
transition: all 0.5s; transition: all 0.5s;
} }
.marquee_list li { .marquee_list li {
height: 31px; height: 31px;
line-height: 31px; line-height: 31px;
font-size: 14px; font-size: 14px;
list-style-type:none; list-style-type: none;
color: rgb(87, 81, 96); color: rgb(87, 81, 96);
font-family: 微软雅黑; font-family: 微软雅黑;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-size: 14px; font-size: 14px;
} }
.marquee_list li span { .marquee_list li span {
padding: 0 2px; padding: 0 2px;
} }
.warn-1{ .warn-1 {
color: #1c9fff; color: #1c9fff;
} }
.warn-2{ .warn-2 {
color: #20a0ff; color: #20a0ff;
} }
.warn-3{ .warn-3 {
color: #ff9900; color: #ff9900;
} }
</style> </style>
<script> <script>
import 'static/css/uploadImg.css';// 引入图片上传组件对话框 import "static/css/uploadImg.css"; // 引入图片上传组件对话框
import vehicleMaintenanceModal from './vehicleMaintenanceModal';//车辆保养弹框 import vehicleMaintenanceModal from "./vehicleMaintenanceModal"; //车辆保养弹框
import vehicleExhibitionModal from './vehicleExhibitionModal';//车辆展览弹框 import vehicleExhibitionModal from "./vehicleExhibitionModal"; //车辆展览弹框
import vehiclePlanModal from './vehiclePlanModal';//安排用车 import vehiclePlanModal from "./vehiclePlanModal"; //安排用车
import rentOrderDetailModal from "../order/modal/rentOrderDetailModal";//租车订单详情 import rentOrderDetailModal from "../order/modal/rentOrderDetailModal"; //租车订单详情
import tourOrderDetailModal from "../order/modal/tourOrderDetailModal";//房车游订单详情 import tourOrderDetailModal from "../order/modal/tourOrderDetailModal"; //房车游订单详情
import disableModal from "./disableModal";//禁用弹框 import disableModal from "./disableModal"; //禁用弹框
import { import { getSysRegionByIds } from "api/vehicle/vehicleInfo/";
getSysRegionByIds import { getAllZone } from "api/base_info/constant/";
} from 'api/vehicle/vehicleInfo/'; import { getAllCompany, getAll } from "api/base_info/branch_company/";
import { import { getAllBranchCompanyByZoneId } from "api/order/rentVehicle";
getAllZone import { formatDate } from "utils/dateFormattor";
} from 'api/base_info/constant/';
import {
getAllCompany,
getAll
} from 'api/base_info/branch_company/';
import {
getAllBranchCompanyByZoneId
} from 'api/order/rentVehicle';
import {
formatDate
} from 'utils/dateFormattor';
import { import {
toEast8Date, toEast8Date,
deepCopyDate, deepCopyDate,
newEast8Date, newEast8Date,
convertDate2Str, convertDate2Str,
timestamp2Date, timestamp2Date,
getTimeByDay, getTimeByDay,
getCurrentMonth, getCurrentMonth,
getMonth, getMonth,
getymdTimeByDay, getymdTimeByDay,
getCurrentYearMonth getCurrentYearMonth,
} from 'utils/dateUtils'; } from "utils/dateUtils";
import rsCode from '../../utils/rsCode'; import rsCode from "../../utils/rsCode";
import {mapGetters} from 'vuex'; import { mapGetters } from "vuex";
import { import { getToken } from "utils/auth";
getToken import {
} from 'utils/auth'; getVehiclePlanList,
import { getVehicleOrderDetail,
getVehiclePlanList, orderStatistics,
getVehicleOrderDetail, getIndexAllcounts,
orderStatistics } from "api/vehicle/vehicleSchedulManage";
} from 'api/vehicle/vehicleSchedulManage'; import Element1 from "../admin/menu/components/element";
import Element1 from "../admin/menu/components/element"; import ElRow from "element-ui/packages/row/src/row";
import ElRow from "element-ui/packages/row/src/row"; import ElCol from "element-ui/packages/col/src/col";
import ElCol from "element-ui/packages/col/src/col";
export default { export default {
name: 'vehicleSchedulManage', name: "vehicleSchedulManage",
components: { components: {
ElCol, ElCol,
ElRow, ElRow,
Element1, Element1,
vehicleExhibitionModal, vehicleExhibitionModal,
vehicleMaintenanceModal, vehicleMaintenanceModal,
vehiclePlanModal, vehiclePlanModal,
rentOrderDetailModal, rentOrderDetailModal,
tourOrderDetailModal, tourOrderDetailModal,
disableModal disableModal,
}, },
data() { data() {
return { return {
animate: false, animate: false,
firstTime: "",//排期表-第一个字段名称 firstTime: "", //排期表-第一个字段名称
marqueeList: [], marqueeList: [],
modalTitle: "创建", modalTitle: "创建",
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
oneCampsiteDialogVisible: false,//添加、编辑弹框 oneCampsiteDialogVisible: false, //添加、编辑弹框
showLoadingBody: false, showLoadingBody: false,
countTJ: undefined,//车辆概况 countTJ: undefined, //车辆概况
form: { form: {
tagNames:"",//标签 tagNames: "", //标签
name: undefined,//旅游名称 name: undefined, //旅游名称
saleCount: undefined,//销量 saleCount: undefined, //销量
stock: undefined,//总数量 stock: undefined, //总数量
status: undefined, status: undefined,
}, },
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
endTime: "",//结束时间为0点时有值 endTime: "", //结束时间为0点时有值
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
parkBranchCompanyId: undefined,//停靠分公司id parkBranchCompanyId: undefined, //停靠分公司id
parkBranchCompanyName: undefined,//停靠分公司名称 parkBranchCompanyName: undefined, //停靠分公司名称
subordinateBranch: undefined,//所属分公司 subordinateBranch: undefined, //所属分公司
subordinateBranchName: undefined,//所属分公司名称 subordinateBranchName: undefined, //所属分公司名称
zoneId: undefined,//所属片区 zoneId: undefined, //所属片区
startTime: undefined, startTime: undefined,
endTime:undefined, endTime: undefined,
status: undefined,//车辆状态 status: undefined, //车辆状态
}, },
inline: true, inline: true,
mar: null,//滚屏 mar: null, //滚屏
textMap: { textMap: {
update: '编辑', update: "编辑",
create: '创建' create: "创建",
}, },
tableKey: 0, tableKey: 0,
tempDayList: [],//日期 tempDayList: [], //日期
currentMonth: undefined,//当前月份 currentMonth: undefined, //当前月份
nextMonth: undefined,//下月 nextMonth: undefined, //下月
allBranchCompany: [],//所有分公司列表 allBranchCompany: [], //所有分公司列表
baoyang: false,//保养弹框, baoyang: false, //保养弹框,
zhanlan: false,//展览弹框 zhanlan: false, //展览弹框
rentOrder: false,//租车订单详情 rentOrder: false, //租车订单详情
anpai: false,//安排用车弹框 anpai: false, //安排用车弹框
jinyong: false,//禁用弹框 jinyong: false, //禁用弹框
currentItem: {},//待操作数据 currentItem: {}, //待操作数据
rentOrderInfo: {},//租车订单详情 rentOrderInfo: {}, //租车订单详情
rentCostDetail: {},//租车订单费用明细 rentCostDetail: {}, //租车订单费用明细
tourDialogVisible: false,//旅游订单弹框 tourDialogVisible: false, //旅游订单弹框
tourRow: {},//旅游订单详情-当前行 tourRow: {}, //旅游订单详情-当前行
totalGmv:0, totalGmv: 0,
totalSecurityDeposit:0, totalSecurityDeposit: 0,
peichang:0, peichang: 0,
} currDayOrderAmount: undefined,
}, currDayOrderNum: undefined,
created() { currDayToLiftVehicleNum: undefined,
this.getList(); currDayToReturnVehicleNum: undefined,
this.getOrderStatistics(); toDealTrafficPay: undefined,
let currentMonth = getCurrentMonth(); };
this.currentMonth = parseInt(currentMonth); },
if(this.currentMonth < 12){ created() {
this.nextMonth = this.currentMonth + 1; this.getList();
// this.getOrderStatistics();
this.getindexCounts();
let currentMonth = getCurrentMonth();
this.currentMonth = parseInt(currentMonth);
if (this.currentMonth < 12) {
this.nextMonth = this.currentMonth + 1;
} else {
this.nextMonth = 1;
}
this.firstTime = "日期(" + this.currentMonth + "~" + this.nextMonth + ")";
this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000);
getAll().then((response) => {
this.allCompaniesArr = response.data;
});
getAllCompany((codeAndBranchCompany) => {
this.allCompanies = codeAndBranchCompany;
});
},
filters: {
NumFormat: function (value) {
if (!value) return "0.00";
var intPart = Number(value) | 0; //获取整数部分
var intPartFormat = intPart
.toString()
.replace(/(\d)(?=(?:\d{3})+$)/g, "$1,"); //将整数部分逢三一断
var floatPart = ".00"; //预定义小数部分
var value2Array = String(value).split(".");
//=2表示数据有小数位
if (value2Array.length == 2) {
floatPart = value2Array[1].toString(); //拿到小数部分
if (floatPart.length == 1) {
//补0,实际上用不着
return intPartFormat + "." + floatPart + "0";
} else {
return intPartFormat + "." + floatPart;
}
} else { } else {
this.nextMonth = 1; return intPartFormat + floatPart;
} }
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")" },
this.getTempDayList(); },
this.mar = setInterval(this.showMarquee, 2000); computed: {
getAll() ...mapGetters(["elements", "vehicleStatus"]),
.then(response => { //获取大区列表
this.allCompaniesArr = response.data; getAllZoneList() {
}) this.allZoneArr = getAllZone();
getAllCompany(codeAndBranchCompany => { return getAllZone();
this.allCompanies = codeAndBranchCompany; },
},
methods: {
getindexCounts() {
var that = this;
getIndexAllcounts().then((res) => {
if (res.status == 200) {
that.currDayOrderAmount = res.data.currDayOrderAmount;
that.currDayOrderNum = res.data.currDayOrderNum;
that.currDayToLiftVehicleNum = res.data.currDayToLiftVehicleNum;
that.currDayToReturnVehicleNum = res.data.currDayToReturnVehicleNum;
that.toDealTrafficPay = res.data.toDealTrafficPay;
// that.totalGmv = res.data.totalOrders;
// that.totalSecurityDeposit = res.data.totalOutstandingDeposit;
// that.peichang = res.data.additionalIndemnity;
} else {
this.$notify({
title: "失败",
message: "操作失败!",
type: "error",
duration: 2000,
});
}
}); });
}, },
filters: { getOrderStatistics() {
NumFormat: function (value) { var that = this;
if(!value) return '0.00'; orderStatistics(4).then((res) => {
var intPart = Number(value)|0; //获取整数部分 if (res.status == 200) {
var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断 that.totalGmv = res.data.totalOrders;
var floatPart = ".00"; //预定义小数部分 that.totalSecurityDeposit = res.data.totalOutstandingDeposit;
var value2Array = String(value).split("."); that.peichang = res.data.additionalIndemnity;
//=2表示数据有小数位
if(value2Array.length == 2) {
floatPart = value2Array[1].toString(); //拿到小数部分
if(floatPart.length == 1) { //补0,实际上用不着
return intPartFormat + "." + floatPart + '0';
} else {
return intPartFormat + "." + floatPart;
}
} else { } else {
return intPartFormat + floatPart; this.$notify({
title: "失败",
message: "操作失败!",
type: "error",
duration: 2000,
});
} }
} });
}, },
computed: { /**
...mapGetters([ * 旅游订单详情弹框关闭
'elements', * */
'vehicleStatus' tourOrderDetailDialogEvent(e) {
]), this.tourDialogVisible = false;
//获取大区列表
getAllZoneList(){
this.allZoneArr = getAllZone();
return getAllZone();
},
}, },
methods: { /**
getOrderStatistics(){ * 点击事件
var that = this; * */
orderStatistics(4).then(res => { toShowDialog(item, iitem, ii) {
if (res.status == 200) { // <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
that.totalGmv = res.data.totalOrders; if (!ii.bg) {
that.totalSecurityDeposit = res.data.totalOutstandingDeposit; //空白-可安排用车
that.peichang = res.data.additionalIndemnity; // this.anpai = true;
} else { // let arr = item.vehicleModel.keyword.split(",");
this.$notify({ // item.vehicleModel.keyword = arr.join(" | ");
title: '失败', // this.currentItem = {item: item, iitem: iitem, ii: ii};
message: '操作失败!', } else {
type: 'error', if (ii.vehicleBookRecord.status == 1) {
duration: 2000 //审核中的显示预约弹框
}); this.zhanlan = true;
} this.currentItem = {
}); item: item,
}, iitem: iitem,
/** ii: ii,
* 旅游订单详情弹框关闭 title: "预定用车",
* */ };
tourOrderDetailDialogEvent(e){
this.tourDialogVisible = false;
},
/**
* 点击事件
* */
toShowDialog(item, iitem, ii){
// <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用、9、客户用车、10、其他-->
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};
} else { } else {
if(ii.vehicleBookRecord.status == 1){//审核中的显示预约弹框 if (ii.bookType == 6) {
this.zhanlan = true; //保养
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车"}; this.baoyang = true;
}else{ this.currentItem = { item: item, iitem: iitem, ii: ii };
if(ii.bookType == 6){ } else if (ii.bookType == 3) {
//保养 //维修
this.baoyang = true; this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii}; this.currentItem = {
} else if(ii.bookType == 3){ item: item,
//维修 iitem: iitem,
this.zhanlan = true; ii: ii,
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "维修",upkeepName:'维修'}; title: "维修",
} else if(ii.bookType == 4){ upkeepName: "维修",
//展览 };
this.zhanlan = true; } else if (ii.bookType == 4) {
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "展览用车",upkeepName:'展览'}; //展览
} else if(ii.bookType == 7){ this.zhanlan = true;
this.zhanlan = true; this.currentItem = {
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "预定用车",upkeepName:'预定'}; item: item,
} else if(ii.bookType == 1){ iitem: iitem,
if(!ii.vehicleBookRecord.orderNo){ ii: ii,
this.$notify({ title: "展览用车",
title: '警告', upkeepName: "展览",
message: '订单号缺失', };
type: 'warning', } else if (ii.bookType == 7) {
duration: 2000 this.zhanlan = true;
}); this.currentItem = {
return false; item: item,
} else{ iitem: iitem,
this.getOneVechi(ii.vehicleBookRecord.orderNo); ii: ii,
} title: "预定用车",
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "租车订单"}; upkeepName: "预定",
} else if(ii.bookType == 9){ };
this.zhanlan = true; } else if (ii.bookType == 1) {
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "客户用车",upkeepName:'客户用车'}; if (!ii.vehicleBookRecord.orderNo) {
} else if(ii.bookType == 5) { this.$notify({
//房车游订单详情 title: "警告",
this.zhanlan = true; message: "订单号缺失",
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "房车游",upkeepName:'房车游'}; type: "warning",
// if(!ii.vehicleBookRecord.orderNo){ duration: 2000,
// this.$notify({ });
// title: '警告', return false;
// message: '订单号缺失', } else {
// type: 'warning', this.getOneVechi(ii.vehicleBookRecord.orderNo);
// duration: 2000
// });
// return false;
// }else{
// this.tourRow = {no: ii.vehicleBookRecord.orderNo};
// this.tourDialogVisible = true
// }
} else if(ii.bookType == 8) {
//禁用
this.jinyong = true;
this.currentItem = {item: item, iitem: iitem, ii: ii, title: "禁用"};
} else if(ii.bookType == 10) {
this.zhanlan = true;
this.currentItem = {item: item, iitem: iitem, ii: ii,title: "其他",upkeepName:'其他'};
} }
this.currentItem = {
item: item,
iitem: iitem,
ii: ii,
title: "租车订单",
};
} else if (ii.bookType == 9) {
this.zhanlan = true;
this.currentItem = {
item: item,
iitem: iitem,
ii: ii,
title: "客户用车",
upkeepName: "客户用车",
};
} else if (ii.bookType == 5) {
//房车游订单详情
this.zhanlan = true;
this.currentItem = {
item: item,
iitem: iitem,
ii: ii,
title: "房车游",
upkeepName: "房车游",
};
// if(!ii.vehicleBookRecord.orderNo){
// this.$notify({
// title: '警告',
// message: '订单号缺失',
// type: 'warning',
// duration: 2000
// });
// return false;
// }else{
// this.tourRow = {no: ii.vehicleBookRecord.orderNo};
// this.tourDialogVisible = true
// }
} else if (ii.bookType == 8) {
//禁用
this.jinyong = true;
this.currentItem = {
item: item,
iitem: iitem,
ii: ii,
title: "禁用",
};
} else if (ii.bookType == 10) {
this.zhanlan = true;
this.currentItem = {
item: item,
iitem: iitem,
ii: ii,
title: "其他",
upkeepName: "其他",
};
} }
} }
}, }
/** },
* 根据订单号获取订单详情 /**
* */ * 根据订单号获取订单详情
getOneVechi: function(orderNo) { * */
let params = { getOneVechi: function (orderNo) {
orderNo: orderNo let params = {
}; orderNo: orderNo,
getVehicleOrderDetail(params).then(res => { };
if (res.status == 200) { getVehicleOrderDetail(params).then((res) => {
let a = res.data; if (res.status == 200) {
let vehicleUserLicenses = {}; let a = res.data;
// if (a.status == 5) { let vehicleUserLicenses = {};
// vehicleUserLicenses = { // if (a.status == 5) {
// name: a.orderVehicleCrosstownDto.licenseName, // vehicleUserLicenses = {
// phone: a.orderVehicleCrosstownDto.licensePhone, // name: a.orderVehicleCrosstownDto.licenseName,
// idCard: a.orderVehicleCrosstownDto.licenseIdCard // phone: a.orderVehicleCrosstownDto.licensePhone,
// }; // idCard: a.orderVehicleCrosstownDto.licenseIdCard
// } else { // };
// if (a.vehicleUserLicenses.length > 0) { // } else {
// vehicleUserLicenses = a.vehicleUserLicenses[0]; // if (a.vehicleUserLicenses.length > 0) {
// } // vehicleUserLicenses = a.vehicleUserLicenses[0];
// } // }
a.orderRentVehicleDetail.startTime = timestamp2Date(a.orderRentVehicleDetail.startTime); // }
a.orderRentVehicleDetail.endTime = timestamp2Date(a.orderRentVehicleDetail.endTime); a.orderRentVehicleDetail.startTime = timestamp2Date(
let arr = a.picture ? a.picture.split(",") : []; a.orderRentVehicleDetail.startTime
a.picture = arr.length > 0 ? arr[0] : ""; );
a.payTime = timestamp2Date(a.payTime); a.orderRentVehicleDetail.endTime = timestamp2Date(
this.rentOrderInfo = a; a.orderRentVehicleDetail.endTime
);
let arr = a.picture ? a.picture.split(",") : [];
a.picture = arr.length > 0 ? arr[0] : "";
a.payTime = timestamp2Date(a.payTime);
this.rentOrderInfo = a;
this.costDetail = JSON.parse(this.rentOrderInfo.orderRentVehicleDetail.costDetail); this.costDetail = JSON.parse(
var cost = ''; this.rentOrderInfo.orderRentVehicleDetail.costDetail
this.costDetail.children.map(function(a) { );
cost += a.key + ":" +a.detail+" "; var cost = "";
}); this.costDetail.children.map(function (a) {
this.rentCostDetail = cost; cost += a.key + ":" + a.detail + " ";
if(this.rentOrderInfo.orderRentVehicleDetail.driverType==1) { });
this.serviceCost = this.rentOrderInfo.orderRentVehicleDetail.dayNum * 600 this.rentCostDetail = cost;
} if (this.rentOrderInfo.orderRentVehicleDetail.driverType == 1) {
this.rentOrder = true; this.serviceCost =
} else { this.rentOrderInfo.orderRentVehicleDetail.dayNum * 600;
this.$notify({
title: '失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
} }
}); this.rentOrder = true;
}, } else {
/** this.$notify({
* 关闭保养弹框后逻辑处理 title: "失败",
* */ message: "操作失败!",
baoyangDialogEvent(e){ type: "error",
this.baoyang = false; duration: 2000,
if(e){//关闭编辑 });
//编辑成功-重新加载列表
this.getList();
} }
}, });
/** },
* 关闭展览弹框后逻辑处理 /**
* */ * 关闭保养弹框后逻辑处理
zhanlanDialogEvent(e){ * */
this.zhanlan = false; baoyangDialogEvent(e) {
if(e){//关闭编辑 this.baoyang = false;
//编辑成功-重新加载列表 if (e) {
this.getList(); //关闭编辑
//编辑成功-重新加载列表
this.getList();
}
},
/**
* 关闭展览弹框后逻辑处理
* */
zhanlanDialogEvent(e) {
this.zhanlan = false;
if (e) {
//关闭编辑
//编辑成功-重新加载列表
this.getList();
}
},
/**
* 禁用弹框关闭后逻辑处理
* */
jinyongDialogEvent(e) {
this.jinyong = false;
if (e) {
//关闭编辑
//编辑成功-重新加载列表
this.getList();
}
},
/**
* 安排用车弹框关闭逻辑处理
* */
anpaiDialogEvent(e) {
this.anpai = false;
if (e) {
//关闭编辑
//编辑成功-重新加载列表
this.getList();
}
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e) {
this.rentOrder = false;
},
/**
* 根据片区id获取分公司列表
* */
getProvinceRegions(item) {
this.listQuery.zoneId = item;
this.listQuery.subordinateBranch = undefined;
getAllBranchCompanyByZoneId({ zoneId: item }).then((response) => {
this.allBranchCompany = response.data;
});
},
/**
* 选择分公司
* */
getAllBranchCompanyChange(item) {
this.listQuery.subordinateBranch = item;
},
/**
* 鼠标移入
* */
handelOver() {
clearInterval(this.mar);
},
/**
* 鼠标移出
* */
handelOut() {
this.mar = setInterval(this.showMarquee, 2000);
},
/**
* 立即处理
* */
toVehicleWarningMsg() {
this.$router.push({ path: "/vehicle/vehicleWarningMsg" });
},
showMarquee: function () {
this.animate = true;
setTimeout(() => {
this.marqueeList.push(this.marqueeList[0]);
this.marqueeList.shift();
this.animate = false;
}, 1000);
},
getAllVehicleStatus: function () {
return this.vehicleStatus;
},
/**
* 所属分公司
* */
handleSelectSubordinate(item) {
if (item.value == "无") {
this.listQuery.subordinateBranch = undefined;
this.listQuery.subordinateBranchName = "无";
} else {
this.listQuery.subordinateBranch = item.id;
this.listQuery.subordinateBranchName = item.name;
}
},
/**
* 停靠分公司
* */
handleSelectPark(item) {
if (item.value == "无") {
this.listQuery.parkBranchCompanyId = undefined;
this.listQuery.parkBranchCompanyName = "无";
} else {
this.listQuery.parkBranchCompanyId = item.id;
this.listQuery.parkBranchCompanyName = item.name;
}
},
querySearch(queryString, cb) {
let selectArry = [];
let iitem = {
value: "无",
name: "无",
};
selectArry.push(iitem);
this.allCompaniesArr.map(function (item) {
item.value = item.name;
selectArry.push(item);
});
this.selectArry = selectArry;
var results = queryString
? selectArry.filter(this.createFilter(queryString))
: selectArry;
// 调用 callback 返回建议列表的数据
cb(results);
},
createFilter(queryString) {
return (restaurant) => {
return restaurant.name.indexOf(queryString.toLowerCase()) != -1;
};
},
/**
* 获取列表
* */
getList() {
let _this = this;
this.listLoading = true;
if (
this.listQuery.startTime &&
typeof this.listQuery.startTime == "object"
) {
this.listQuery.startTime = this.listQuery.startTime.getTime();
}
if (this.listQuery.endTime && typeof this.listQuery.endTime == "object") {
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
getVehiclePlanList(this.listQuery).then((response) => {
this.countTJ = response.data.vehicleCountVos;
let totalCountRs = undefined;
let listRs = undefined;
if (
!this.$utils.isEmpty(response.data.vehicleAndModelInfoVo) &&
this.$utils.isInteger(response.data.vehicleAndModelInfoVo.totalCount)
) {
listRs = response.data.vehicleAndModelInfoVo.data;
totalCountRs = response.data.vehicleAndModelInfoVo.totalCount;
listRs.map(function (item) {
item.visible2 = false;
item.crtTimeStr = timestamp2Date(item.crtTime);
if (item.storeTypeName) {
item.storeTypeName = item.storeTypeName.join("|");
}
// 解析开始时间-结束时间
// item.vehicleBookRecord.map(function (iitem) {
// let bookStartDate = iitem.bookStartDate.substring(0,10);
// let bookEndDate = iitem.bookEndDate.substring(0,10);
// iitem.startHourList = ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"];
// if(iitem.startHour){
// for(let i = 0; i < iitem.startHour.length;i++){
// iitem.startHourList[i] = iitem.startHour[i]
// }
// }
// iitem.startHourList = iitem.startHourList?iitem.startHourList.reverse(): ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"];
// let flag = false;//开始时间标识,查找第一个1
// let flagE = false;//结束时间标识,查找第一个0
// let sStart = "00";//开始时间
// let sEnd= "00";//结束时间
// iitem.startHourList.map(function(ic, index){
// let c = index +1;
// if(ic == 1 && !flag){
// if(c<10){
// sStart = "0"+c;
// } else {
// sStart = c
// }
// flag = true;
// }
// });
// if(iitem.endHour){
// if(iitem.endHour.length>=10){
// sEnd = iitem.endHour.length;
// } else {
// sEnd = "0" + iitem.endHour.length;
// }
// }
// iitem.bookStartDate = iitem.bookStartDate.substring(0,10) + " " +sStart + ":00:00";
// iitem.bookEndDate = iitem.bookEndDate.substring(0,10) + " " +sEnd + ":00:00";
// });
// item.temp = _this.getDayList(item);//获取车辆30天排期
item.temp = _this.getMonthDayList(item); //获取车辆30天排期
});
} }
}, if (!this.$utils.isEmpty(response.data.vehicleWarningMsgs)) {
/** response.data.vehicleWarningMsgs.map(function (ii) {
* 禁用弹框关闭后逻辑处理 ii.color = "warn-" + ii.colorType;
* */ });
jinyongDialogEvent(e){ this.marqueeList = response.data.vehicleWarningMsgs;
this.jinyong = false;
if(e){//关闭编辑
//编辑成功-重新加载列表
this.getList();
} }
}, this.listLoading = false;
/** this.list = listRs;
* 安排用车弹框关闭逻辑处理 //渲染颜色
* */ this.setColor();
anpaiDialogEvent(e){ this.total = totalCountRs;
this.anpai = false; });
if(e){//关闭编辑 },
//编辑成功-重新加载列表 handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate((valid) => {
if (valid) {
this.getList(); this.getList();
}
},
/**
* 租车订单详情弹框关闭
* */
rentOrderDetailDialogEvent(e){
this.rentOrder = false;
},
/**
* 根据片区id获取分公司列表
* */
getProvinceRegions(item) {
this.listQuery.zoneId = item;
this.listQuery.subordinateBranch = undefined;
getAllBranchCompanyByZoneId({zoneId: item})
.then(response => {
this.allBranchCompany = response.data;
})
},
/**
* 选择分公司
* */
getAllBranchCompanyChange(item) {
this.listQuery.subordinateBranch = item
},
/**
* 鼠标移入
* */
handelOver(){
clearInterval(this.mar);
},
/**
* 鼠标移出
* */
handelOut(){
this.mar = setInterval(this.showMarquee, 2000);
},
/**
* 立即处理
* */
toVehicleWarningMsg(){
this.$router.push({path: '/vehicle/vehicleWarningMsg'});
},
showMarquee: function() {
this.animate = true;
setTimeout(() => {
this.marqueeList.push(this.marqueeList[0]);
this.marqueeList.shift();
this.animate = false;
}, 1000);
},
getAllVehicleStatus: function () {
return this.vehicleStatus;
},
/**
* 所属分公司
* */
handleSelectSubordinate(item){
if(item.value == "无"){
this.listQuery.subordinateBranch = undefined;
this.listQuery.subordinateBranchName = "无";
} else { } else {
this.listQuery.subordinateBranch = item.id; return false;
this.listQuery.subordinateBranchName = item.name;
} }
}, });
/** },
* 停靠分公司 handleSizeChange(val) {
* */ this.listQuery.limit = val;
handleSelectPark(item){ this.getList();
if(item.value == "无"){ },
this.listQuery.parkBranchCompanyId = undefined; handleCurrentChange(val) {
this.listQuery.parkBranchCompanyName = "无"; this.listQuery.page = val;
} else { this.getList();
this.listQuery.parkBranchCompanyId = item.id; },
this.listQuery.parkBranchCompanyName = item.name; /**
} * 获取未来30天日历表
}, * */
querySearch(queryString, cb) { getMonthDayList(item) {
let selectArry = []; let temp = [];
let iitem = { let list = this.list;
value: "无", for (let i = 0; i < 30; i++) {
name: "无" let t = [];
}; let tymd = getymdTimeByDay(i);
selectArry.push(iitem); temp.push({ day: getTimeByDay(i), month: getMonth(i), time: tymd });
this.allCompaniesArr.map(function(item){ }
item.value = item.name; return temp;
selectArry.push(item); },
}); /**
this.selectArry = selectArry; * 渲染颜色
var results = queryString ? selectArry.filter(this.createFilter(queryString)) : selectArry; * */
// 调用 callback 返回建议列表的数据 getDayList(item) {
cb(results); let temp = [];
}, let list = this.list;
createFilter(queryString) { for (let i = 0; i < 30; i++) {
return (restaurant) => { let t = [];
return (restaurant.name.indexOf(queryString.toLowerCase()) != -1); let tymd = getymdTimeByDay(i);
}; let children = [];
}, let tt = ""; //yyyy-MM-dd hh:mm:ss
/** let h = "";
* 获取列表
* */ let bookType = undefined; //当前车辆状态
getList() { let vehicleBookRecord = {}; //车辆排班信息
let _this = this; for (let ii = 0; ii < 24; ii++) {
this.listLoading = true; if (ii < 10) {
if(this.listQuery.startTime && (typeof this.listQuery.startTime == "object")){ h = "0" + ii;
this.listQuery.startTime = this.listQuery.startTime.getTime(); tt = tymd + " 0" + ii + ":00:00";
}
if(this.listQuery.endTime && (typeof this.listQuery.endTime == "object")){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
getVehiclePlanList(this.listQuery).then(response => {
this.countTJ = response.data.vehicleCountVos;
let totalCountRs = undefined;
let listRs = undefined;
if (!this.$utils.isEmpty(response.data.vehicleAndModelInfoVo) && this.$utils.isInteger(response.data.vehicleAndModelInfoVo.totalCount)) {
listRs = response.data.vehicleAndModelInfoVo.data;
totalCountRs = response.data.vehicleAndModelInfoVo.totalCount;
listRs.map(function(item){
item.visible2 = false;
item.crtTimeStr = timestamp2Date(item.crtTime);
if(item.storeTypeName){
item.storeTypeName = item.storeTypeName.join("|");
}
// 解析开始时间-结束时间
// item.vehicleBookRecord.map(function (iitem) {
// let bookStartDate = iitem.bookStartDate.substring(0,10);
// let bookEndDate = iitem.bookEndDate.substring(0,10);
// iitem.startHourList = ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"];
// if(iitem.startHour){
// for(let i = 0; i < iitem.startHour.length;i++){
// iitem.startHourList[i] = iitem.startHour[i]
// }
// }
// iitem.startHourList = iitem.startHourList?iitem.startHourList.reverse(): ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"];
// let flag = false;//开始时间标识,查找第一个1
// let flagE = false;//结束时间标识,查找第一个0
// let sStart = "00";//开始时间
// let sEnd= "00";//结束时间
// iitem.startHourList.map(function(ic, index){
// let c = index +1;
// if(ic == 1 && !flag){
// if(c<10){
// sStart = "0"+c;
// } else {
// sStart = c
// }
// flag = true;
// }
// });
// if(iitem.endHour){
// if(iitem.endHour.length>=10){
// sEnd = iitem.endHour.length;
// } else {
// sEnd = "0" + iitem.endHour.length;
// }
// }
// iitem.bookStartDate = iitem.bookStartDate.substring(0,10) + " " +sStart + ":00:00";
// iitem.bookEndDate = iitem.bookEndDate.substring(0,10) + " " +sEnd + ":00:00";
// });
// item.temp = _this.getDayList(item);//获取车辆30天排期
item.temp = _this.getMonthDayList(item);//获取车辆30天排期
});
}
if (!this.$utils.isEmpty(response.data.vehicleWarningMsgs)) {
response.data.vehicleWarningMsgs.map(function(ii){
ii.color = "warn-" + ii.colorType;
});
this.marqueeList = response.data.vehicleWarningMsgs;
}
this.listLoading = false;
this.list = listRs;
//渲染颜色
this.setColor();
this.total = totalCountRs;
})
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else { } else {
return false; tt = tymd + " " + ii + ":00:00";
h = ii;
} }
}); let bg = ""; //背景色
}, let pp = {};
handleSizeChange(val) { pp.time = tt;
this.listQuery.limit = val; pp.h = h;
this.getList(); item.vehicleBookRecord.map(function (iitem) {
}, if (iitem.bookStartDate <= tt && iitem.bookEndDate >= tt) {
handleCurrentChange(val) { // <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
this.listQuery.page = val; if (
this.getList(); iitem.bookStartDate == tt &&
}, (iitem.bookType == 1 ||
/** iitem.bookType == 5 ||
* 获取未来30天日历表 iitem.bookType == 4) &&
* */ iitem.status == 2
getMonthDayList(item){ ) {
let temp = []; //租车、旅游、展览显示起止时间
let list = this.list; pp.timeStr = h;
for(let i = 0; i < 30; i++){ }
let t = []; if (iitem.status == 1) {
let tymd = getymdTimeByDay(i); //审核中
temp.push({day: getTimeByDay(i), month: getMonth(i), time: tymd}); pp.bg = "bg-7";
} else {
pp.bg = "bg-" + iitem.bookType;
}
pp.vehicleBookRecord = iitem;
pp.bookType = iitem.bookType;
if (iitem.bookEndDate == tt && iitem.status == 2) {
if (
iitem.bookType == 1 ||
iitem.bookType == 5 ||
iitem.bookType == 4
) {
pp.timeEtr = h;
}
pp.bg = "";
}
}
});
children.push(pp);
} }
return temp; temp.push({
}, day: getTimeByDay(i),
/** month: getMonth(i),
* 渲染颜色 children: children,
* */ });
getDayList(item){ }
let temp = []; return temp;
let list = this.list; },
for(let i = 0; i < 30; i++){ /**
let t = []; * 获取日期数组
let tymd = getymdTimeByDay(i); * */
setColor() {
let temp = [];
this.list.map(function (item) {
let endTime = "";
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
let h = ""; let h = "";
let bookType = undefined;//当前车辆状态 let bookType = undefined; //当前车辆状态
let vehicleBookRecord = {};//车辆排班信息 let vehicleBookRecord = {}; //车辆排班信息
for(let ii = 0; ii < 24; ii ++) { for (let ii = 0; ii < 24; ii++) {
if (ii < 10) { if (ii < 10) {
h = "0" + ii; h = "0" + ii;
tt = tymd + " 0" + ii + ":00:00"; tt = ttemp.time + " 0" + ii + ":00:00";
} else { } else {
tt = tymd + " " + ii + ":00:00"; tt = ttemp.time + " " + ii + ":00:00";
h = ii; h = ii;
} }
let bg = "";//背景色 let bg = ""; //背景色
let pp = {}; let pp = {};
pp.time = tt; pp.time = tt;
pp.h = h; pp.h = h;
item.vehicleBookRecord.map(function (iitem) { item.vehicleBookRecord.map(function (iitem) {
if (iitem.bookStartDate <= tt && iitem.bookEndDate >=tt) { if (iitem.bookStartDate <= tt && iitem.bookEndDate >= tt) {
// <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用--> // <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
if(iitem.bookStartDate == tt && (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4) && iitem.status == 2){//租车、旅游、展览显示起止时间 if (
pp.timeStr = h; iitem.bookStartDate == tt &&
} (iitem.bookType == 1 ||
if(iitem.status == 1){ iitem.bookType == 5 ||
//审核中 iitem.bookType == 4) &&
pp.bg = "bg-7"; iitem.status == 2
} else { ) {
pp.bg = "bg-"+ iitem.bookType; //租车、旅游、展览显示起止时间
}
pp.vehicleBookRecord = iitem;
pp.bookType = iitem.bookType;
if(iitem.bookEndDate == tt && iitem.status == 2){
if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){
pp.timeEtr = h;
}
pp.bg = "";
}
}
});
children.push(pp);
}
temp.push({day: getTimeByDay(i), month: getMonth(i), children: children});
}
return temp;
},
/**
* 获取日期数组
* */
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
let h = "";
let bookType = undefined;//当前车辆状态
let vehicleBookRecord = {};//车辆排班信息
for(let ii = 0; ii < 24; ii ++) {
if (ii < 10) {
h = "0" + ii;
tt = ttemp.time + " 0" + ii + ":00:00";
} else {
tt = ttemp.time + " " + ii + ":00:00";
h = ii;
}
let bg = "";//背景色
let pp = {};
pp.time =tt;
pp.h = h;
item.vehicleBookRecord.map(function (iitem) {
if (iitem.bookStartDate <= tt && iitem.bookEndDate >=tt) {
// <!--bookType 2-分公司使用、1-租车、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
if(iitem.bookStartDate == tt && (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4) && iitem.status == 2){//租车、旅游、展览显示起止时间
pp.timeStr = h; pp.timeStr = h;
} }
if(iitem.status == 1){ if (iitem.status == 1) {
//审核中 //审核中
pp.bg = "bg-7"; pp.bg = "bg-7";
} else { } else {
pp.bg = "bg-"+ iitem.bookType; pp.bg = "bg-" + iitem.bookType;
} }
pp.vehicleBookRecord = iitem; pp.vehicleBookRecord = iitem;
pp.bookType = iitem.bookType; pp.bookType = iitem.bookType;
if(iitem.bookEndDate == tt && iitem.status == 2){ if (iitem.bookEndDate == tt && iitem.status == 2) {
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"){ if (h == "00") {
let cc = new Date(tt); let cc = new Date(tt);
console.log(cc); console.log(cc);
let te = cc.getTime()-24*60*60; let te = cc.getTime() - 24 * 60 * 60;
endTime = timestamp2Date(te).substring(0, 13) +":00:00"; endTime = timestamp2Date(te).substring(0, 13) + ":00:00";
console.log(endTime); console.log(endTime);
} }
} }
...@@ -1022,31 +1393,37 @@ ...@@ -1022,31 +1393,37 @@
} }
}); });
children.push(pp); children.push(pp);
} }
ttemp.children = children ttemp.children = children;
});
}); });
console.log(this.list); });
}, console.log(this.list);
/** },
* tempDayList /**
**/ * tempDayList
getTempDayList(){ **/
let temp = []; getTempDayList() {
for(let i = 0; i < 30; i++){ let temp = [];
let t = []; for (let i = 0; i < 30; i++) {
let tymd = getymdTimeByDay(i); let t = [];
temp.push({day: getTimeByDay(i), month: getMonth(i), time: tymd}); let tymd = getymdTimeByDay(i);
} temp.push({ day: getTimeByDay(i), month: getMonth(i), time: tymd });
this.tempDayList = temp;
},
/**
* 排版记录
*/
toVehicleRecords(item){
let selectedMonth = getCurrentYearMonth();
this.$router.push({path: '/vehicle/vehicleRecords?selectedMonth='+selectedMonth+"&numberPlate="+item.numberPlate});
} }
} this.tempDayList = temp;
} },
/**
* 排版记录
*/
toVehicleRecords(item) {
let selectedMonth = getCurrentYearMonth();
this.$router.push({
path:
"/vehicle/vehicleRecords?selectedMonth=" +
selectedMonth +
"&numberPlate=" +
item.numberPlate,
});
},
},
};
</script> </script>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="80px"> <el-form ref="queryForm" :inline="inline" :model="listQuery" label-width="80px">
<el-row> <el-row>
<el-form-item label="所属公司"> <el-form-item label="所属公司">
<el-select v-model="listQuery.corporationId" placeholder="请选择"> <el-select v-model="listQuery.branchId" placeholder="请选择">
<el-option label="全部" :key="undefined" :value="undefined"></el-option> <el-option label="全部" :key="undefined" :value="undefined"></el-option>
<el-option <el-option
v-for="val in companys_list" v-for="val in companys_list"
...@@ -45,35 +45,41 @@ ...@@ -45,35 +45,41 @@
<div class="label_box"> <div class="label_box">
<div class="label_item top_color_bule"> <div class="label_item top_color_bule">
<p class="money_p"> <p class="money_p">
<span></span>1,000,000.00 <span></span>
{{all_amount}}
</p> </p>
<p class="money_label">总营收金额</p> <p class="money_label">总营收金额</p>
</div> </div>
<div class="label_item top_color_bule2"> <div class="label_item top_color_bule2">
<p class="money_p"> <p class="money_p">
<span></span>1,000,000.00 <span></span>
{{orderAmount}}
</p> </p>
<p class="money_label">订单&服务营收</p> <p class="money_label">订单&服务营收</p>
</div> </div>
<div class="label_item top_color_origin"> <div class="label_item top_color_origin">
<p class="money_p"> <p class="money_p">
<span></span>1,000,000.00 <span></span>
{{otherAmount}}
</p> </p>
<p class="money_label">额外赔偿(违约金等)</p> <p class="money_label">额外赔偿(违约金等)</p>
</div> </div>
<div class="label_item top_color_yellow"> <div class="label_item top_color_yellow">
<p class="money_p"> <p class="money_p">
<span></span>1,000,000.00 <span></span>
{{withdrawals}}
</p> </p>
<p class="money_label">已提现金额</p> <p class="money_label">已提现金额</p>
</div> </div>
<div class="label_item top_color_red"> <div class="label_item top_color_red">
<p class="money_p"> <p class="money_p">
<span></span>1,000,000.00 <span></span>
{{balance}}
</p> </p>
<p class="money_label"> <p class="money_label">
可提现金额, 可提现金额,
<a>立即提现 ></a> <a @click="company_withdraw" v-show="elements['company_with']">立即提现 ></a>
<a @click="mendian_withdraw" v-show="elements['store_with']">立即提现 ></a>
</p> </p>
</div> </div>
</div> </div>
...@@ -85,13 +91,15 @@ ...@@ -85,13 +91,15 @@
<el-date-picker <el-date-picker
type="date" type="date"
placeholder="开始时间" placeholder="开始时间"
v-model="listQuery.daystart" v-model="startTime"
format="yyyy-MM-dd"
style="width: 40%;" style="width: 40%;"
></el-date-picker>&nbsp; ></el-date-picker>&nbsp;
<el-date-picker <el-date-picker
type="date" type="date"
placeholder="结束时间" placeholder="结束时间"
v-model="listQuery.dayend" v-model="endTime"
format="yyyy-MM-dd"
style="width: 40%;" style="width: 40%;"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
...@@ -100,20 +108,13 @@ ...@@ -100,20 +108,13 @@
</div> </div>
</div> </div>
<el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%;"> <el-table :key="tableKey" :data="list" border fit highlight-current-row style="width: 100%;">
<el-table-column align="center" label="公司名称" prop="name"></el-table-column> <el-table-column align="center" label="类型" prop="typeName"></el-table-column>
<el-table-column align="center" label="联系人/电话"> <el-table-column align="center" label="订单号/提现号" prop="cono"></el-table-column>
<template slot-scope="{row}"> <el-table-column align="center" label="收支说明" prop="sourceName"></el-table-column>
<span>{{row.contact}}/{{row.mobile}}</span> <el-table-column align="center" label="所属公司" prop="branchName"></el-table-column>
</template> <el-table-column align="center" label="所属门店" prop="companyName"></el-table-column>
</el-table-column> <el-table-column align="center" label="金额" prop="amount"></el-table-column>
<el-table-column align="center" label="法人姓名" prop="legalPerson"></el-table-column> <el-table-column align="center" label="剩余金额" prop="samount"></el-table-column>
<el-table-column align="center" label="法人身份证" prop="legalIdNumber"></el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="{row}">
<el-button type="text" @click="withdraw(row)">提现</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination <el-pagination
...@@ -127,6 +128,44 @@ ...@@ -127,6 +128,44 @@
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
<el-dialog title="公司提现" :visible.sync="c_w_dialog" width="40%" @close="c_w_dialog=false">
<el-form>
<div style="display:flex;justify-content: space-between;">
<el-col :span="10">
<el-form-item label="银行账号">
<el-input style="width:70%"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="全部提现">
<el-switch active-color="#13ce66" inactive-color="#ff4949"></el-switch>
</el-form-item>
</el-col>
</div>
<el-table></el-table>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="c_w_dialog = false">取 消</el-button>
<el-button type="primary">确 定</el-button>
</span>
</el-dialog>
<el-dialog title="门店提现" :visible.sync="m_w_dialog" width="30%" @close="m_w_dialog=false">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="剩余金额">
<el-input style="width:60%"></el-input>
</el-form-item>
<el-form-item label="提现金额">
<el-input style="width:60%"></el-input>
</el-form-item>
<el-form-item label="银行账号">
<el-input style="width:60%"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="m_w_dialog = false">取 消</el-button>
<el-button type="primary">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -154,7 +193,12 @@ import Element1 from "../admin/menu/components/element"; ...@@ -154,7 +193,12 @@ import Element1 from "../admin/menu/components/element";
import ElRow from "element-ui/packages/row/src/row"; import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col"; import ElCol from "element-ui/packages/col/src/col";
import { getToken } from "utils/auth"; import { getToken } from "utils/auth";
import { company_all_list, branchCompany_all_list } from "api/company.js"; import {
company_all_list,
branchCompany_all_list,
revenue_sum_list,
revenue_sum_count,
} from "api/company.js";
export default { export default {
name: "carApplyList", name: "carApplyList",
...@@ -171,19 +215,28 @@ export default { ...@@ -171,19 +215,28 @@ export default {
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
startTime: undefined,
endTime: undefined,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
companyId: undefined, companyId: undefined,
corporationId: undefined, branchId: undefined,
daystart: "", startTime: undefined,
dayend: "", endTime: undefined,
}, },
inline: true, inline: true,
tableKey: 0, tableKey: 0,
btn_disable: null, btn_disable: null,
companys_list: [], companys_list: [],
branchCompany_list: [], branchCompany_list: [],
c_w_dialog: false,
m_w_dialog: false,
balance: undefined,
orderAmount: undefined,
otherAmount: undefined,
withdrawals: undefined,
all_amount: undefined,
}; };
}, },
created() { created() {
...@@ -223,10 +276,25 @@ export default { ...@@ -223,10 +276,25 @@ export default {
* */ * */
getList() { getList() {
this.listLoading = true; this.listLoading = true;
company_list(this.listQuery).then((response) => { if (this.startTime) {
console.log(response); this.listQuery.startTime = Date.parse(this.startTime);
}
if (this.endTime) {
this.listQuery.endTime = Date.parse(this.endTime);
}
revenue_sum_count(this.listQuery).then((res) => {
this.balance = res.data.balance;
this.orderAmount = res.data.orderAmount;
this.otherAmount = res.data.otherAmount;
this.withdrawals = res.data.withdrawals;
this.all_amount = (
Number(res.data.otherAmount) + Number(res.data.orderAmount)
).toFixed(2);
});
revenue_sum_list(this.listQuery).then((response) => {
let totalCountRs = undefined; let totalCountRs = undefined;
let listRs = undefined; let listRs = undefined;
if ( if (
!this.$utils.isEmpty(response.data.data) && !this.$utils.isEmpty(response.data.data) &&
this.$utils.isInteger(response.data.totalCount) this.$utils.isInteger(response.data.totalCount)
...@@ -236,6 +304,7 @@ export default { ...@@ -236,6 +304,7 @@ export default {
} }
this.listLoading = false; this.listLoading = false;
this.list = listRs; this.list = listRs;
console.log(response.data.data);
this.total = totalCountRs; this.total = totalCountRs;
}); });
}, },
...@@ -254,10 +323,12 @@ export default { ...@@ -254,10 +323,12 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
companyId: undefined, companyId: undefined,
corporationId: undefined, branchId: undefined,
daystart: "", startTime: undefined,
dayend: "", endTime: undefined,
}; };
this.startTime = undefined;
this.endTime = undefined;
this.getList(); this.getList();
}, },
handleSizeChange(val) { handleSizeChange(val) {
...@@ -268,6 +339,12 @@ export default { ...@@ -268,6 +339,12 @@ export default {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
}, },
company_withdraw() {
this.c_w_dialog = true;
},
mendian_withdraw() {
this.m_w_dialog = true;
},
}, },
}; };
</script> </script>
...@@ -337,9 +414,7 @@ export default { ...@@ -337,9 +414,7 @@ export default {
color: rgba(189, 189, 189, 1); color: rgba(189, 189, 189, 1);
font-size: 14px; font-size: 14px;
a { a {
&:first-child { color: blue;
color: blue;
}
} }
} }
.label_filter { .label_filter {
......
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