You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

499 lines
16 KiB
Vue

<!--排名数据与计费列表 -->
<template>
<div class="top_div_rank">
<el-form :inline="true" :model="formInline" :label-position="right" class="demo-form-inline" style="width:100%;height: 100%">
<el-form-item label="日期:" class="s_el_row">
<el-date-picker
v-model="rpTime"
type="datetimerange"
range-separator="To"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
<el-form-item label="分公司名称:" class="s_el_row" style="width:13%">
<el-select v-model="subcomno" @change="changesubcomnoValue" filterable placeholder="请选择..." clearable="true" style="width:100%;height:100%;border-color: gainsboro">
<el-option
v-for="item in subcomDatas"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="路段名称:" class="s_el_row" style="width:12%">
<el-select v-model="roadno" @change="changeroadValue" filterable placeholder="请选择..." clearable style="width:100%;height:100%;border-color: gainsboro">
<el-option
v-for="item in roadDatas"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="收费站:" class="s_el_row" style="width:10%">
<el-select v-model="stano" filterable placeholder="请选择..." style="width:100%;height:100%;border-color: gainsboro" clearable>
<el-option
v-for="item in staDatas"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" style="width:8%;margin-right:5px" class="s_el_row">
<div style="display:flex;text-align: left; height:100%; position: relative;margin:0;padding:0">
<el-button type="primary" style="margin-top: 0px;" @click="search" class="query_button" size="default" :icon="searchButton">查询</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div class="contain-div_rank">
<div class="middle-div_rank">
<div class="middle-div-left_rank">
<el-row style="padding-bottom: 10px;" type="flex" justify="center" align="middle">
<el-col :span="12">
<el-select v-model="divStatus"
placeholder="请选择拆分状态"
size="large"
clearable="true"
filterable="true"
@change="changeRank"
style="width:100%">
<el-option
v-for="item in divStatusList"
:key="item.VALUE"
:label="item.LABEL"
:value="item.VALUE"
/>
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;justify-content: center;align-items: center">排名数</el-col>
<el-col :span="9">
<el-input-number v-model="rankNum" @change="changeRankData" :min="1" label=""></el-input-number>
</el-col>
</el-row>
<el-table :data="rankdata" :header-cell-style="{background:'rgb(201,198,198)',align:'center'}" height="95%" border v-loading="tableloading"
@row-dblclick="showDivDetial">
<el-table-column type="index" label="排名" align="center" width="80px"/>
<el-table-column prop="tollintervalidname" label="计费单元" :show-overflow-tooltip="true" width="230px" resizable align="center" />
<el-table-column prop="tollintervalid" label="计费单元id" v-if="false" />
<el-table-column prop="fee" label="计费金额(元)" :show-overflow-tooltip="true" width="200px" resizable align="center" />
</el-table>
</div>
<div class="middle-div-right_rank">
<div class="hz-div_rank">
<el-row style="padding-bottom: 20px;position: relative;border-bottom: #c9c6c6 solid">
<el-col :span="6">
<i style="font-size: 15px">车流量{{carCount}} </i>
</el-col>
<el-col :span="6">
<i style="font-size: 15px">计费金额{{feeTotal}} </i>
</el-col>
<el-col :span="6" v-if="false">
<i style="font-size: 15px">应收金额{{payfeeTotal}} </i>
</el-col>
<el-col :span="6">
<i style="font-size: 15px">拆分金额{{divfeeTotal}} </i>
</el-col>
</el-row>
<el-row style="padding-bottom:10px;position: relative;">
<el-col :span="24">
<el-radio-group v-model="vehicleclassText" @change="changeData">
<el-radio label="KC">客车</el-radio>
<el-radio label="HC">货车</el-radio>
<el-radio label="JM">减免车</el-radio>
</el-radio-group>
</el-col>
</el-row >
<el-row style="padding-bottom:15px;position: relative;border-bottom: #c9c6c6 solid">
<el-col :span="6" >
<i style="font-size: 15px">车流量{{typecarCount}} </i>
</el-col>
<el-col :span="6" >
<i style="font-size: 15px">计费金额{{typefeeTotal}} </i>
</el-col>
<el-col :span="6" v-if="false">
<i style="font-size: 15px">应收金额{{typepayfeeTotal}} </i>
</el-col>
<el-col :span="6">
<i style="font-size: 15px">拆分金额{{typedivfeeTotal}} </i>
</el-col>
</el-row>
</div>
<div class="dt-div_rank">
<!-- <mapvue ref="map" :begindate="begindate" :enddate="enddate"></mapvue>-->
<div style="height: 8%;width: 100%;position:relative">
<el-form :inline="true" :label-position="right" style="width:100%;height: 100%;margin-top: 10px">
<el-form-item label="名称:">
<el-input :model-value="queryfeename"/>
</el-form-item>
<el-form-item label="" style="width:8%;margin-right:5px" class="s_el_row">
<div style="display:flex;text-align: left; height:100%; position: relative;margin:0;padding:0">
<el-button type="primary" style="margin-top: 0px;" @click="searchFee" class="query_button" size="default" :icon="searchButton">查询</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div style="height: 85%;width: 100%;position:relative">
<el-table :data="tableDataDetail" height="100%" :header-cell-style="{background:'rgb(213,216,217)',align:'center'}" border v-loading="tableloading"
@row-dblclick="showDivDetial">
<el-table-column type="index" label="序号" align="center" width="100px"/>
<el-table-column prop="tollintervalid" label="计费单元id" v-if="tableDisable" align="center" />
<el-table-column prop="tollintervalidname" label="计费单元" align="center" width="260px"/>
<el-table-column prop="subcomname" label="分公司" align="center" width="220px"/>
<el-table-column prop="roadname" label="路段" align="center" width="200px"/>
<el-table-column prop="staname" label="收费站" align="center" width="200px"/>
<el-table-column prop="length" label="计费单元长度(米)" align="center" width="200px"/>
</el-table>
</div>
<div style="height: 5%;width: 100%;position:relative">
<!-- 分页 -->
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNum"
:page-sizes="[15, 30,50,100]"
:page-size="pageSize"
:total="totalCount"
layout="total, sizes, prev, pager, next, jumper"
style="width: 90%;height:100%;position:inherit;margin-top:5px;font-size: x-small">
</el-pagination>
</div>
</div>
</div>
</div>
</div>
<el-dialog :title="feeunitTitleMain"
v-model="feeDetailShow"
width="80%"
top="0.5%"
style="height: 50%"
:close-on-click-modal="clickDialog">
<feeStatDetail :key="new Date().getTime()" :begindate="begindate" :enddate="enddate" :divStatus="divStatus" :tollvalid="tollvalid"></feeStatDetail>
</el-dialog>
</template>
<style >
html{
height: 98% !important;
width: 100% !important;
}
body{
height: 100% !important;
width: 99% !important;
}
#app{
height: 100% !important;
width: 100% !important;
}
.contain-div_rank{
height: 95%;
width: 100%;
}
.top_div_rank{
height: 5%;
width: 100%;
border-bottom: #c9c6c6 solid;
top: 0;
/*z-index: 1000; /* 确保它在其他内容之上 */
}
.middle-div_rank{
height: 95%;
width: 100%;
display: flex;
border-top: #c9c6c6 solid;
}
.middle-div-left_rank{
height: 100%;
width: 30%;
border-right: #c9c6c6 solid;
}
.middle-div-right_rank{
height: 100%;
width: 70%;
}
.hz-div_rank{
height: 15%;
width: 100%;
}
.dt-div_rank{
height: 85%;
width: 100%;
}
</style>
<script >
import {
Search
} from '@element-plus/icons-vue'
import {getSelectList, getRankList, getHzData, getFeeunitListByPage} from "@/util/api/api";
import feeStatDetail from '@/views/dev/detail/feeStatDetail.vue'
var _this;
export default {
name: "checkEcharts",
data() {
return {
pageSize: 20,
pageNum:1,
totalCount:0,
tableDataDetail: [],
tableDisable:false,
tableloading:false,
rpTime:"",
searchButton:Search,
clickDialog:false,
divStatus:"",
selectedText:"",
divStatusList:[],
rankList:[{"VALUE":1,"LABEL":"10"},{"VALUE":2,"LABEL":"20"},{"VALUE":3,"LABEL":"30"}],
carCount:"0",
feeTotal:"0",
payfeeTotal:"0",
divfeeTotal:"0",
typecarCount:"0",
typefeeTotal:"0",
typepayfeeTotal:"0",
typedivfeeTotal:"0",
begindate:"",
enddate:"",
rankdata:[],
rankNum:10,
vehicleclassText:"KC",
feeunitTitleMain:"",
feeDetailShow:false,
tollvalid:"",
subcomDatas: [],
roadDatas: [],
staDatas: [],
subcomno: "",
roadno: "",
stano: "",
queryfeename:""
}
},
methods: {
handleSizeChange(val) {
this.pageSize = val;
this.tableloading=true;
getFeeunitlist();
},handleCurrentChange(val) {
this.pageNum = val;
this.tableloading=true;
getFeeunitlist();
},
search() {//查询
if(this.rpTime){
this.begindate=this.rpTime[0];
this.enddate=this.rpTime[1];
this.tableloading=true;
}else{
alert("请选择日期");
return ;
}
var params={
"pageNum":1,
"pageSize":10,
"queryStartTime":this.begindate,
"queryEndTime":this.enddate,
"status":this.divStatus,
"subcomno":this.subcomno,
"roadno":this.roadno,
"stano":this.stano
}
getRankList(params).then(res=>{
this.rankdata=res.records
this.tableloading=false;
})
this.getAllFeeData();
getFeeunitlist();
},changeRank(vale){
this.tableloading=true;
this.divStatus=vale;
const selectedItem = this.divStatusList.find(item => item.VALUE === value);
this.selectedText = selectedItem ? selectedItem.LABEL : '';
var params={
"pageNum":1,
"pageSize":(this.rankNum===null||this.rankNum==='')?10:this.rankNum,
"queryStartTime":this.begindate,
"queryEndTime":this.enddate,
"status":this.divStatus,
"subcomno":this.subcomno,
"roadno":this.roadno,
"stano":this.stano
}
getRankList(params).then(res=>{
this.rankdata=res.records
this.tableloading=false;
})
},changeRankData(vale){
this.tableloading=true;
var params={
"pageNum":1,
"pageSize":vale,
"queryStartTime":this.begindate,
"queryEndTime":this.enddate,
"status":this.divStatus,
"subcomno":this.subcomno,
"roadno":this.roadno,
"stano":this.stano
}
getRankList(params).then(res=>{
this.rankdata=res.records
this.tableloading=false;
})
},changeData(lablev){
this.vehicleclassText=lablev;
var params={
"queryStartTime":this.begindate,
"queryEndTime":this.enddate,
"subcomno":this.subcomno,
"roadno":this.roadno,
"stano":this.stano
}
params.vehicleclassText=lablev;
getHzData(params).then(res=>{
this.typecarCount=res.carcount;
this.typefeeTotal=res.feeTotal;
this.typepayfeeTotal=res.payfeeTotal;
this.typedivfeeTotal=res.divfeeTotal;
});
},searchFee(){
getFeeunitlist();
},showDivDetial(row,column,e){
if(row.length){
this.selectedText="";
}
this.feeunitTitleMain=row.tollintervalidname + (this.selectedText===""?"":"("+this.selectedText+")");
this.feeDetailShow=true;
this.tollvalid=row.tollintervalid;
},getAllFeeData(){
var params={
"queryStartTime":this.begindate,
"queryEndTime":this.enddate,
"subcomno":this.subcomno,
"roadno":this.roadno,
"stano":this.stano
}
getHzData(params).then(res=>{
this.carCount=res.carcount;
this.feeTotal=res.feeTotal;
this.payfeeTotal=res.payfeeTotal;
this.divfeeTotal=res.divfeeTotal;
});
params.vehicleclassText=this.vehicleclassText;
getHzData(params).then(res=>{
this.typecarCount=res.carcount;
this.typefeeTotal=res.feeTotal;
this.typepayfeeTotal=res.payfeeTotal;
this.typedivfeeTotal=res.divfeeTotal;
});
}, changesubcomnoValue() {
this.stano="";
this.roadno="";
getRoadlist();
getStalist();
}, changeroadValue() {
this.stano="";
getStalist();
}
},
components: {
feeStatDetail
},
mounted() {
_this=this;
getsubcomlist();
getRoadlist();
getStalist();
let selectType={
"selectType":"DIVSTATUS"
}
getSelectList(selectType).then(res=>{
this.divStatus=1;
if(res.code>0){
this.divStatusList=res.data;
}
})
}
}
function getsubcomlist() {
let staParams = {
"subcomno": _this.subcomno,
"roadno": _this.roadno,
"selectType": "SUBCOM"
}
getSelectList(staParams).then(
res => {
if (res.data) {
_this.subcomDatas = res.data
} else {
_this.subcomDatas = [{}];
}
}
)
}
function getRoadlist() {
let staParams = {
"subcomno": _this.subcomno,
"roadno": _this.roadno,
"selectType": "ROAD"
}
getSelectList(staParams).then(
res => {
if (res.data) {
_this.roadDatas = res.data
} else {
_this.roadDatas = [{}];
}
}
);
}
function getStalist() {
let staParams = {
"subcomno": _this.subcomno,
"roadno": _this.roadno,
"selectType": "STANO"
}
getSelectList(staParams).then(
res => {
if (res.data) {
_this.staDatas = res.data
} else {
_this.staDatas = [{}];
}
}
)
}
function getFeeunitlist() {
_this.tableloading=true;
let staParams = {
"subcomno": _this.subcomno,
"roadno": _this.roadno,
"stano": _this.stano,
"tollintervalidname":_this.queryfeename
}
getFeeunitListByPage(staParams).then(
res => {
if (res.data) {
_this.tableDataDetail=res.records;
_this.tableloading=false;
_this.totalCount=res.total;
}
}
)
}
function getCurrentDate(){
var myDate = new Date(); //获取今天日期
myDate.setDate(myDate.getDate() - 1);
// dateTemp = myDate.getFullYear()+"/"+(c)+"/"+myDate.getDate();
return myDate.getFullYear()+"-"+((myDate.getMonth()+1) >9?(myDate.getMonth()+1):"0"+(myDate.getMonth()+1))+"-"+(myDate.getDate() >9?myDate.getDate():"0"+myDate.getDate());
}
</script>