2024-06-26 16:52:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-08-06 14:30:41 +00:00
|
|
|
<new-bg>
|
|
|
|
|
<flex-col>
|
|
|
|
|
<system-title show-back custom-title="厂区车辆台账" />
|
|
|
|
|
<ModuleContent padding="0px 20px 20px">
|
|
|
|
|
|
|
|
|
|
<div style="height: 144px;width: 100%;">
|
|
|
|
|
<ModuleContent2 bg bg-str :border="false">
|
|
|
|
|
<butgroup2 style="height: 100%;">
|
|
|
|
|
<ModuleContent2 bg bg-color border>
|
|
|
|
|
<miaoshu title="运输车辆" :value="headCount.t1" color="rgba(42, 207, 255, 1)"></miaoshu>
|
|
|
|
|
</ModuleContent2>
|
|
|
|
|
|
|
|
|
|
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
|
|
|
|
|
<miaoshu title="国Ⅵ输车辆" :value="headCount.t2" color="rgba(255, 171, 87, 1)"></miaoshu>
|
|
|
|
|
</ModuleContent2>
|
|
|
|
|
|
|
|
|
|
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
|
|
|
|
|
<miaoshu title="非道路工程机械" :value="headCount.t3" color="rgba(122, 175, 255, 1)"></miaoshu>
|
|
|
|
|
</ModuleContent2>
|
|
|
|
|
|
|
|
|
|
<ModuleContent2 bg bg-color border style="margin-left: 16px;">
|
|
|
|
|
<miaoshu title="燃油运输车辆" :value="headCount.t4" color="rgba(76, 243, 129, 1)"></miaoshu>
|
|
|
|
|
</ModuleContent2>
|
|
|
|
|
</butgroup2>
|
|
|
|
|
</ModuleContent2>
|
|
|
|
|
</div>
|
2024-06-26 16:52:06 +00:00
|
|
|
|
|
|
|
|
<a-divider />
|
2024-08-06 14:30:41 +00:00
|
|
|
<CustomTable
|
2024-06-26 16:52:06 +00:00
|
|
|
hide-search
|
2024-08-05 16:17:35 +00:00
|
|
|
hide-action
|
2024-06-26 16:52:06 +00:00
|
|
|
:columns="columns"
|
|
|
|
|
:api-conf="apiConf"
|
|
|
|
|
:form-items="formItems"
|
|
|
|
|
@edit="editHandler"
|
|
|
|
|
>
|
|
|
|
|
<template slot="search-button" slot-scope="{ search }">
|
|
|
|
|
<a-button type="primary" @click="exportList(search)">导出历史数据</a-button>
|
2024-08-06 14:30:41 +00:00
|
|
|
<Split height="10"></Split>
|
2024-06-26 16:52:06 +00:00
|
|
|
</template>
|
2024-08-06 14:30:41 +00:00
|
|
|
</CustomTable>
|
|
|
|
|
</ModuleContent>
|
|
|
|
|
</flex-col>
|
|
|
|
|
</new-bg>
|
|
|
|
|
|
2024-06-26 16:52:06 +00:00
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import Curd from "../../components/smallCommon/Curd.vue";
|
|
|
|
|
import moment from 'moment'
|
2024-08-06 14:30:41 +00:00
|
|
|
import SystemTitle from "../../components/smallCommon/SystemTitle.vue";
|
|
|
|
|
import NewBg from "../../components/NewBg.vue";
|
|
|
|
|
import FlexCol from "../../components/FlexCol.vue";
|
|
|
|
|
import ModuleContent from "../../components/ModuleContent.vue";
|
|
|
|
|
import CustomTable from "../../components/smallCommon/CustomTable.vue";
|
|
|
|
|
import Miaoshu from "../../components/smallCommon/miaoshu.vue";
|
|
|
|
|
import ModuleContent2 from "../../components/smallCommon/ModuleContent2.vue";
|
|
|
|
|
import Butgroup2 from "../../components/smallCommon/butgroup2.vue";
|
|
|
|
|
import Split from "../../components/smallCommon/Split.vue";
|
2024-06-26 16:52:06 +00:00
|
|
|
export default {
|
|
|
|
|
name: "user",
|
|
|
|
|
components: {
|
2024-08-06 14:30:41 +00:00
|
|
|
Split,
|
|
|
|
|
Butgroup2, ModuleContent2, Miaoshu,
|
|
|
|
|
CustomTable,
|
|
|
|
|
ModuleContent,
|
|
|
|
|
FlexCol, NewBg, SystemTitle,
|
2024-06-26 16:52:06 +00:00
|
|
|
Curd
|
|
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
2024-08-05 16:17:35 +00:00
|
|
|
headCount: {},
|
2024-06-26 16:52:06 +00:00
|
|
|
isEdit: false,
|
|
|
|
|
roles: [],
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'outTime',
|
|
|
|
|
key: 'outTime',
|
|
|
|
|
title: '日期'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'carNum',
|
|
|
|
|
key: 'carNum',
|
|
|
|
|
title: '车牌号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'carModel',
|
|
|
|
|
key: 'carModel',
|
|
|
|
|
title: '车型'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'newCar',
|
|
|
|
|
key: 'newCar',
|
|
|
|
|
title: '新能源',
|
|
|
|
|
customRender (text) {
|
|
|
|
|
if (text) return '是'
|
|
|
|
|
return '否'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'emissions',
|
|
|
|
|
key: 'emissions',
|
2024-08-05 16:17:35 +00:00
|
|
|
title: '燃油车标准'
|
2024-06-26 16:52:06 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
dataIndex: 'createDateTime',
|
|
|
|
|
key: 'createDateTime',
|
|
|
|
|
title: '出厂日期'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
apiConf: {
|
|
|
|
|
listApi: { api: '/api/Ledger/list', method: 'get' },
|
2024-08-05 16:17:35 +00:00
|
|
|
addApi: {api: '/api/Ledger/add', method: 'post',}
|
2024-06-26 16:52:06 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
formItems () {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
type: 'dateRange',
|
|
|
|
|
key: 'time',
|
|
|
|
|
label: '日期',
|
|
|
|
|
isSearch: true,
|
2024-08-05 16:17:35 +00:00
|
|
|
hide: true,
|
2024-06-26 16:52:06 +00:00
|
|
|
placeholder: ['请选择开始日期', '请选择结束日期'],
|
|
|
|
|
rules: [
|
|
|
|
|
{ required: true, message: '请选择时间范围' }
|
|
|
|
|
],
|
|
|
|
|
fields: ['startTime', 'endTime']
|
2024-08-05 16:17:35 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'date',
|
|
|
|
|
key: 'outTime',
|
|
|
|
|
label: '日期',
|
|
|
|
|
placeholder: '请选择日期'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'input',
|
|
|
|
|
key: 'carNum',
|
|
|
|
|
label: '车牌号',
|
|
|
|
|
placeholder: '请输入车牌号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'input',
|
|
|
|
|
key: 'carModel',
|
|
|
|
|
label: '车型',
|
|
|
|
|
placeholder: '请输入车型'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'select',
|
|
|
|
|
key: 'newCar',
|
|
|
|
|
label: '新能源',
|
|
|
|
|
placeholder: '是否新能源',
|
|
|
|
|
children: [
|
|
|
|
|
{ label: '是', value: '是' },
|
|
|
|
|
{ label: '否', value: '否' },
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'select',
|
|
|
|
|
key: 'emissions',
|
|
|
|
|
label: '燃油车标准',
|
|
|
|
|
placeholder: '',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'date',
|
|
|
|
|
key: 'createDateTime',
|
|
|
|
|
label: '出厂日期',
|
|
|
|
|
placeholder: '',
|
2024-06-26 16:52:06 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2024-08-06 14:30:41 +00:00
|
|
|
this.$get('/api/Ledger/HeaderCount').then(({data}) => {
|
2024-08-05 16:17:35 +00:00
|
|
|
this.headCount = data || {}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
2024-06-26 16:52:06 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
2024-08-05 16:17:35 +00:00
|
|
|
add () {
|
|
|
|
|
|
|
|
|
|
},
|
2024-06-26 16:52:06 +00:00
|
|
|
editHandler (isEdit) {
|
|
|
|
|
this.isEdit = isEdit
|
|
|
|
|
},
|
|
|
|
|
exportList ({ time }) {
|
|
|
|
|
const [ start, end ] = time
|
|
|
|
|
const fmt = 'YYYY-MM-DD'
|
|
|
|
|
window.open(`http://101.43.201.20:5000/api/Ledger/export?start=${moment(start).format(fmt)}&end=${moment(end).format(fmt)}`, '_blank')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
|
|
|
|
|
</style>
|