|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="main_app"> | 
|---|
|  |  |  | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)" @clear="clear"> | 
|---|
|  |  |  | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @changeForm='changeForm' @handleQuery="getList(1)" | 
|---|
|  |  |  | @clear="clear"> | 
|---|
|  |  |  | <template #fastdate> | 
|---|
|  |  |  | <el-radio-group | 
|---|
|  |  |  | v-model="filters.fastdate" | 
|---|
|  |  |  | size="small" | 
|---|
|  |  |  | @input="changeRadio" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-radio-group v-model="filters.fastdate" size="small" @input="changeRadio"> | 
|---|
|  |  |  | <el-radio-button label="0">当天</el-radio-button> | 
|---|
|  |  |  | <el-radio-button label="6">近7天</el-radio-button> | 
|---|
|  |  |  | <el-radio-button label="29">近30天</el-radio-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </QueryForm> | 
|---|
|  |  |  | <div class="pt16"> | 
|---|
|  |  |  | <el-button :loading="exLoading" @click="handleEx" v-permissions="['business:platformjob:exportExcel']">导出</el-button> | 
|---|
|  |  |  | <el-button :loading="exLoading" @click="handleEx" | 
|---|
|  |  |  | v-permissions="['business:platformjob:exportExcel']">导出</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-table :height="tableHeightNew"   v-loading="loading" :data="list" stripe> | 
|---|
|  |  |  | <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe> | 
|---|
|  |  |  | <el-table-column prop="billCode" label="运单号" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="totalNum" label="总作业量(万支)" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="carCodeFront" label="车牌前照号" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import QueryForm from '@/components/common/QueryForm' | 
|---|
|  |  |  | import { platformJobPage,  platformJobExport,platformJobDel } from '@/api' | 
|---|
|  |  |  | import { platformJobPage, platformJobExport, platformJobDel } from '@/api' | 
|---|
|  |  |  | import { statusMap } from '../config' | 
|---|
|  |  |  | import DriverDetail from "@/views/task/driverDetail" | 
|---|
|  |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
|---|
|  |  |  | 
|---|
|  |  |  | import { Message } from 'element-ui' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | import duration from 'dayjs/plugin/duration' | 
|---|
|  |  |  | import BasePage from '@/components/base/BasePage' | 
|---|
|  |  |  | dayjs.extend(duration); | 
|---|
|  |  |  | dayjs.extend(duration) | 
|---|
|  |  |  | import BaseComputHeight from "@/components/base/BaseComputHeight" | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | extends: BasePage, | 
|---|
|  |  |  | extends: BaseComputHeight, | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | Pagination, | 
|---|
|  |  |  | QueryForm, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | filters: { | 
|---|
|  |  |  | selDate: [], | 
|---|
|  |  |  | fastdate: 0 | 
|---|
|  |  |  | fastdate: 0, | 
|---|
|  |  |  | beginWorkDateStart: '', | 
|---|
|  |  |  | beginWorkDateEnd: '' | 
|---|
|  |  |  | // beginDoneDateEnd: '' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | list: [], | 
|---|
|  |  |  | queryFormConfig: { | 
|---|
|  |  |  | formItems: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | { | 
|---|
|  |  |  | filed: 'billCode', | 
|---|
|  |  |  | type: 'input', | 
|---|
|  |  |  | label: '运单号' | 
|---|
|  |  |  | 
|---|
|  |  |  | label: '驾驶员' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | filed: 'selDate', | 
|---|
|  |  |  | type: 'datetimerange', | 
|---|
|  |  |  | label: '', | 
|---|
|  |  |  | pickerOptions: {} | 
|---|
|  |  |  | filed1: 'beginWorkDateStart', | 
|---|
|  |  |  | filed2: 'beginWorkDateEnd', | 
|---|
|  |  |  | type: 'datetime', | 
|---|
|  |  |  | label: '作业时间' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | type: 'slot', | 
|---|
|  |  |  | filed: 'fastdate', | 
|---|
|  |  |  | label: '作业时间' | 
|---|
|  |  |  | filed: 'fastdate' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | online: true | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | changeRadio (day) { | 
|---|
|  |  |  | changeRadio(day) { | 
|---|
|  |  |  | const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59'] | 
|---|
|  |  |  | this.$set(this.filters, 'selDate', arr) | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | this.filters.beginWorkDateEnd = arr[1] | 
|---|
|  |  |  | this.filters.beginWorkDateStart = arr[0] | 
|---|
|  |  |  | this.getList(1) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeForm (str) { | 
|---|
|  |  |  | if (str === 'selDate') { | 
|---|
|  |  |  | this.$set(this.filters, 'fastdate', null) | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | changeForm(str) { | 
|---|
|  |  |  | if(this.filters.beginWorkDateStart> this.filters.beginWorkDateEnd ){ | 
|---|
|  |  |  | this.filters.beginWorkDateEnd = this.filters.beginWorkDateEnd | 
|---|
|  |  |  | return this.$message.error('开始时间不能大于结束时间') | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getList(page) { | 
|---|
|  |  |  | const { pagination, filters } = this | 
|---|
|  |  |  | 
|---|
|  |  |  | model: { | 
|---|
|  |  |  | ...filters, | 
|---|
|  |  |  | jobType: '0', | 
|---|
|  |  |  | createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
|---|
|  |  |  | createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | sorts: [{ direction: 'DESC', property: 'create_date' }], | 
|---|
|  |  |  | capacity: pagination.pageSize, | 
|---|
|  |  |  | 
|---|
|  |  |  | this.list.forEach(item => { | 
|---|
|  |  |  | item.inTypeTemp = item.inType == 0 ? '整托盘' : '件烟' | 
|---|
|  |  |  | item.taskOrigin = 'WMS获取' | 
|---|
|  |  |  | if(item.workTime && item.workTime>=24*60*60 ){ | 
|---|
|  |  |  | item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒'); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒'); | 
|---|
|  |  |  | if (item.workTime && item.workTime >= 24 * 60 * 60) { | 
|---|
|  |  |  | item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒') | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒') | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.pagination.total = res.total || 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | model: { | 
|---|
|  |  |  | ...filters, | 
|---|
|  |  |  | jobType: 0, | 
|---|
|  |  |  | createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
|---|
|  |  |  | createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | sorts: [{ direction: 'DESC', property: 'create_date' }], | 
|---|
|  |  |  | capacity: 10000, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleSizeChange(capacity) { | 
|---|
|  |  |  | this.pagination.pageSize = capacity | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | this.getList(1) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|