<template>
|
<el-card shadow="never" class="aui-card--fill">
|
<div class="mod-app">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form-item>
|
<span>时间:</span>
|
<el-date-picker
|
v-model="dataForm.from"
|
type="date"
|
:clearable="true"
|
value-format="yyyy-MM-dd"
|
placeholder="日期">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item>
|
<span>至</span>
|
</el-form-item>
|
<el-form-item>
|
<el-date-picker
|
v-model="dataForm.to"
|
type="date"
|
:clearable="true"
|
value-format="yyyy-MM-dd"
|
placeholder="日期">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item>
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
</el-form-item>
|
<el-form-item>
|
<el-button @click="exportExcel()">导出</el-button>
|
</el-form-item>
|
</el-form>
|
<el-table
|
ref="table"
|
id="listTable"
|
v-loading="dataListLoading"
|
:data="dataList"
|
border
|
style="width: 100%;"
|
show-summary
|
:summary-method="getSummaries">
|
<el-table-column type="index" header-align="center" align="center" min-width="50" label="序号"></el-table-column>
|
<el-table-column prop="lsh" header-align="center" align="center" label="流水号" min-width="250"></el-table-column>
|
<el-table-column prop="rq" header-align="center" align="center" label="日期" min-width="160"></el-table-column>
|
<!-- <el-table-column prop="rxlyName" header-align="center" align="center" label="入洗来源" min-width="250"></el-table-column> -->
|
<el-table-column header-align="center" align="center" label="内报量(吨)">
|
<el-table-column prop="nbdrl" header-align="center" align="center" label="当日" min-width="150">
|
<template slot-scope="scope">
|
<span style="color: red">{{scope.row.nbdrl}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="nbtzl" header-align="center" align="center" label="累计调整量" min-width="150"></el-table-column>
|
</el-table-column>
|
<el-table-column header-align="center" align="center" label="外报量(吨)">
|
<el-table-column prop="wbdrl" header-align="center" align="center" label="当日" min-width="150">
|
<template slot-scope="scope">
|
<span style="color: red">{{scope.row.wbdrl}}</span>
|
</template>
|
</el-table-column>
|
<el-table-column prop="wbtzl" header-align="center" align="center" label="累计调整量" min-width="150"></el-table-column>
|
</el-table-column>
|
<el-table-column show-overflow-tooltip prop="bz" header-align="center" align="center" label="备注" min-width="300"></el-table-column>
|
</el-table>
|
<el-pagination
|
:current-page="page"
|
:page-sizes="[10, 20, 50, 100]"
|
:page-size="limit"
|
:total="total"
|
layout="total, sizes, prev, pager, next, jumper"
|
@size-change="pageSizeChangeHandle"
|
@current-change="pageCurrentChangeHandle">
|
</el-pagination>
|
</div>
|
</el-card>
|
</template>
|
|
<script>
|
import mixinViewModule from '@/mixins/view-module'
|
import {exportByDom} from "@/utils/exportUtil";
|
import {getStartDate, getEndDate} from "@/utils/dateUtils";
|
export default {
|
mixins: [mixinViewModule],
|
data () {
|
return {
|
mixinViewModuleOptions: {
|
getDataListURL: '/iailab-iems-coal-proddisp/wash/to-wash/selectList',
|
getDataListIsPage: true
|
},
|
dataForm: {
|
from: getStartDate(),
|
to: getEndDate(),
|
}
|
}
|
},
|
components: {
|
},
|
created () {
|
if (this.mixinViewModuleOptions.createdIsNeed) {
|
this.query()
|
}
|
},
|
methods: {
|
getDataList: function () {
|
this.page = 1
|
this.query()
|
},
|
getSummaries(param) {
|
const { columns, data } = param;
|
const sums = [];
|
columns.forEach((column, index) => {
|
if (index === 0) {
|
sums[index] = '合计';
|
return;
|
}
|
if (index === 1 || index === 2 || index === 3 || index === 8) {
|
sums[index] = '';
|
return;
|
}
|
const values = data.map(item => Number(item[column.property]));
|
if (!values.every(value => isNaN(value))) {
|
sums[index] = values.reduce((prev, curr) => {
|
const value = Number(curr);
|
if (!isNaN(value)) {
|
return prev + curr;
|
} else {
|
return prev;
|
}
|
}, 0);
|
} else {
|
sums[index] = '';
|
}
|
});
|
|
return sums;
|
},
|
exportExcel () {
|
let dom = this.$refs.table
|
exportByDom(dom, undefined, '原煤入洗')
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
/deep/ .el-table__footer-wrapper tbody td,
|
.el-table__header-wrapper tbody td {
|
background-color: #e3f3ff !important;
|
}
|
/deep/ .el-table__footer-wrapper .is-leaf {
|
background-color: #e3f3ff !important;
|
}
|
/deep/ .el-table__fixed-footer-wrapper tbody td {
|
border-top: 1px solid #ebeef5;
|
background-color: #e3f3ff;
|
font-weight: bold;
|
color: #f50b0b;
|
text-align: center !important;
|
}
|
/deep/ .has-gutter tr td .cell {
|
text-align: center;
|
font-weight: bold;
|
color: blue;
|
}
|
</style>
|