拆分核验,数据稽核
parent
b0138bbbf3
commit
744122a98a
@ -0,0 +1,226 @@
|
||||
<!-- 稽核数据查看-->
|
||||
|
||||
<template>
|
||||
<div id="contain_query" style="width:100%;height: 100%;position: inherit">
|
||||
<div style="height:99%;width:100%;position:relative">
|
||||
<div style="height: 94%;width: 100%">
|
||||
<el-table :data="tableData" width="100%" id="table_el" :header-cell-style="{background:'#e9ecee',align:'center'}" border
|
||||
v-loading="tableLoading"
|
||||
>
|
||||
<el-table-column type="index" label="序号" :index="indexmethod" width="100px" align="center"/>
|
||||
<el-table-column prop="classdate" label="日期" :show-overflow-tooltip="true" :formatter="dateFormatter" width="150px" resizable align="center" />
|
||||
<el-table-column prop="id" label="PASSID" :show-overflow-tooltip="true" width="200px" resizable align="center" />
|
||||
<el-table-column prop="matchId" label="匹配数据PASSID" :show-overflow-tooltip="true" width="200px" resizable align="center" />
|
||||
<el-table-column prop="vehicleid" label="车牌号" :show-overflow-tooltip="true" width="220px" resizable align="center" />
|
||||
<el-table-column prop="vehicleidColor" label="车牌颜色" :show-overflow-tooltip="true" width="220px" resizable align="center" />
|
||||
<el-table-column prop="gpaFee" label="计费金额(元)" width="250px" resizable align="center" />
|
||||
<el-table-column prop="divFee" label="拆分金额(元)" width="250px" resizable align="center" />
|
||||
<el-table-column prop="vehicletype" label="车型" :show-overflow-tooltip="true" width="250px" resizable align="center" />
|
||||
<el-table-column prop="vehicleclass" label="车种" :show-overflow-tooltip="true" width="100px" resizable align="center" />
|
||||
<el-table-column prop="maname" label="处理人" :show-overflow-tooltip="true" width="180px" resizable align="center" />
|
||||
<el-table-column prop="createTime" label="处理时间" :show-overflow-tooltip="true" :formatter="dateFormatterSSS" width="200px" resizable align="center" />
|
||||
<el-table-column prop="datatype" label="数据类型" :show-overflow-tooltip="true" width="200px" resizable align="center" />
|
||||
<el-table-column prop="checkStatus" label="处理结果" :show-overflow-tooltip="true" width="200px" resizable align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div tyle="height: 5%;width: 100%">
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[20, 30,50,100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalCount"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
style="width: 90%;height:5%;padding: 0;position:relative;margin-top:10px;bottom: 0;font-size: x-small">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style >
|
||||
#table_el{
|
||||
height: 100% ;
|
||||
width: 100%;
|
||||
}
|
||||
#detail_dialog_fee{
|
||||
margin-top: 20px !important;
|
||||
width:80%;
|
||||
height: 75%;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<script >
|
||||
|
||||
import { ref} from "vue";
|
||||
import {exportExcleQueryMatch, getMatchListByPage} from "@/util/api/api";
|
||||
import tool from "@/util/tool";
|
||||
var _this;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
tableData: ref([]),
|
||||
tableLoading: false,
|
||||
params:{}
|
||||
|
||||
}
|
||||
},
|
||||
//props: ['params'],
|
||||
methods: {
|
||||
refreshQueryData(paramAll){
|
||||
this.params=paramAll;
|
||||
getQueryDataLists();
|
||||
},exportExcleQuery(paramAll){
|
||||
exportMatchData(paramAll);
|
||||
},handleSizeChange(val) {
|
||||
this.pageSize = val;
|
||||
this.isLoding = true;
|
||||
getQueryDataLists();
|
||||
},handleCurrentChange(val) {
|
||||
this.currentPage = val;
|
||||
this.isLoding = true;
|
||||
getQueryDataLists();
|
||||
},indexmethod(index){
|
||||
return index + this.pageSize * (this.currentPage -1)+1;
|
||||
}, dateFormatter(row, column, cellValue) {
|
||||
if (cellValue == null || cellValue == "" || cellValue == undefined) {
|
||||
return "";
|
||||
}
|
||||
//return `${date.toLocaleDateString()}`;
|
||||
return formatDate(cellValue, "YYYY-MM-DD");
|
||||
}, dateFormatterSSS(row, column, cellValue) {
|
||||
if (cellValue == null || cellValue == "" || cellValue == undefined) {
|
||||
return "";
|
||||
}
|
||||
return formatDate(cellValue, "YYYY-MM-DD HH:MM:SS");
|
||||
}, rowStyle(row, rowIndex) {
|
||||
if (this.doubleclikIndex === row.row.RN) {
|
||||
return {
|
||||
"background-color": "lightcyan",
|
||||
"cursor": "pointer"
|
||||
}
|
||||
}
|
||||
return {
|
||||
"cursor": "pointer"
|
||||
}
|
||||
}
|
||||
|
||||
}, components: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
_this = this;
|
||||
}
|
||||
}
|
||||
function getQueryDataLists(){
|
||||
_this.tableLoading=true;
|
||||
var paramsData=_this.params;
|
||||
paramsData.pageNum=_this.currentPage;
|
||||
paramsData.pageSize=_this.pageSize;
|
||||
paramsData.status="";
|
||||
getMatchListByPage(paramsData).then(res=>{
|
||||
_this.tableLoading=false;
|
||||
if(res.code<=0){
|
||||
return false;
|
||||
}else{
|
||||
debugger
|
||||
_this.totalCount=res.total;
|
||||
_this.tableData=res.records;
|
||||
_this.isLoding=false;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//日期格式修改
|
||||
|
||||
function formatDate(dateString,format) {
|
||||
const date = new Date(dateString);
|
||||
const year = date.getFullYear();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = date.getDate().toString().padStart(2, '0');
|
||||
|
||||
let hour=date.getHours();
|
||||
let minute=date.getMinutes();
|
||||
let second=date.getSeconds();
|
||||
if(hour<10){
|
||||
hour ="0"+hour;
|
||||
}
|
||||
if(minute<10){
|
||||
minute ="0"+minute;
|
||||
}
|
||||
if(second<10){
|
||||
second ="0"+second;
|
||||
}
|
||||
const milSecond=date.getMilliseconds();
|
||||
if(format=="YYYY-MM-DD"){
|
||||
return `${year}-${month}-${day}`;
|
||||
}else if(format=="YYYY-MM-DD HH:MM:SS"){
|
||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
|
||||
}else if(format=="YYYY-MM-DD HH:MM:SS:SSS"){
|
||||
return `${year}-${month}-${day} ${hour}:${minute}:${second}:${milSecond}`;
|
||||
}else if(format=="HH:MM:SS"){
|
||||
return `${hour}:${minute}:${second}:${milSecond}`;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
function getCurrentDateHour(){
|
||||
var date = new Date(); //获取今天日期
|
||||
const year = date.getFullYear();
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = date.getDate().toString().padStart(2, '0');
|
||||
let hour=date.getHours();
|
||||
let minute=date.getMinutes();
|
||||
let second=date.getSeconds();
|
||||
if(hour<10){
|
||||
hour ="0"+hour;
|
||||
}
|
||||
if(minute<10){
|
||||
minute ="0"+minute;
|
||||
}
|
||||
if(second<10){
|
||||
second ="0"+second;
|
||||
}
|
||||
// dateTemp = myDate.getFullYear()+"/"+(c)+"/"+myDate.getDate();
|
||||
return `${year}${month}${day}${hour}${minute}${second}`;
|
||||
}
|
||||
|
||||
function exportMatchData(paramsData) {
|
||||
exportExcleQueryMatch({paramsData: JSON.stringify(paramsData)}).then(res => {
|
||||
if (res.data != "") {
|
||||
//fileName:下载的文件名
|
||||
|
||||
var fileName = '稽核数据_' + tool.getCurrentDateHour(); //decodeURIComponent(res.headers["Content-Disposition"].split("=")[1])
|
||||
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel;charset=utf-8'});
|
||||
// 针对ie浏览器
|
||||
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
||||
window.navigator.msSaveOrOpenBlob(blob, fileName);
|
||||
} else {
|
||||
//非ie浏览器
|
||||
var downloadElement = document.createElement("a");
|
||||
var href = window.URL.createObjectURL(blob); //下载的url
|
||||
downloadElement.href = href;
|
||||
downloadElement.download = fileName; //下载后文件名
|
||||
document.body.appendChild(downloadElement);
|
||||
downloadElement.click(); //点击下载
|
||||
document.body.removeChild(downloadElement); //下载完成移除元素
|
||||
window.URL.revokeObjectURL(href); //释放blob对象
|
||||
}
|
||||
}
|
||||
//设置加载状态为false
|
||||
_this.tableLoading = false;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue