|  |  | 
 |  |  |       <el-button :loading="exLoading" @click="handleEx" | 
 |  |  |         v-permissions="['business:platformbooks:exportExcel']">导出</el-button> | 
 |  |  |     </div> | 
 |  |  |     <el-table class="mb20" v-loading="loading" :data="list" stripe> | 
 |  |  |     <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe> | 
 |  |  |       <el-table-column prop="contractNum" label="合同单号" min-width="100" show-overflow-tooltip /> | 
 |  |  |       <el-table-column prop="inReason" label="入园原因" min-width="100" show-overflow-tooltip /> | 
 |  |  |       <el-table-column prop="totalNum" label="总作业量(万支)" min-width="100" show-overflow-tooltip /> | 
 |  |  | 
 |  |  |         <template v-slot="scope"> | 
 |  |  |           <el-button type="text" v-permissions="['business:platformbooks:detail']" | 
 |  |  |             @click="handleDetail(scope.row)">预约详情</el-button> | 
 |  |  |           <el-button  type="text" class="red" v-permissions="['business:platformjob:delete']" @click="handleDel(scope.row)">删除</el-button> | 
 |  |  |           <el-button type="text" class="red" v-permissions="['business:platformbooks:delete']" | 
 |  |  |             @click="handleDel(scope.row)">删除</el-button> | 
 |  |  |         </template> | 
 |  |  |       </el-table-column> | 
 |  |  |     </el-table> | 
 |  |  | 
 |  |  | import Pagination from '@/components/common/Pagination' | 
 |  |  | import QueryForm from '@/components/common/QueryForm' | 
 |  |  | import { platformBooksPage, platformReasonList, platformBooksApply, platformBooksExport } from '@/api' | 
 |  |  | import { checkSurplusNum } from '@/api/platform/platform' | 
 |  |  | import DriverDetail from "@/views/task/driverDetail" | 
 |  |  | import { checkSurplusNum, deletebooksById } from '@/api/platform/platform' | 
 |  |  | import DriverDetail from '@/views/task/driverDetail' | 
 |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
 |  |  | import UploadAvatarImage from '@/components/common/UploadAvatarImage' | 
 |  |  | import { Message } from 'element-ui' | 
 |  |  | import dayjs from 'dayjs' | 
 |  |  | import BaseComputHeight from "@/components/base/BaseComputHeight" | 
 |  |  | export default { | 
 |  |  |   extends: BaseComputHeight, | 
 |  |  |   components: { | 
 |  |  |     Pagination, | 
 |  |  |     QueryForm, | 
 |  |  | 
 |  |  |         total: 0 | 
 |  |  |       }, | 
 |  |  |       filters: { | 
 |  |  |         selDate: [], | 
 |  |  |         arriveDateStart: '', | 
 |  |  |         arriveDateEnd: '', | 
 |  |  |         fastdate: 0 | 
 |  |  |       }, | 
 |  |  |       list: [], | 
 |  |  | 
 |  |  |         reasonId: [{ required: true, message: '请选择', trigger: 'blur' }], | 
 |  |  |         arriveDate: [{ required: true, message: '请选择', trigger: 'blur' }], | 
 |  |  |         inType: [{ required: true, message: '请选择', trigger: 'blur' }], | 
 |  |  |         driverName: [{ required: true, message: '请选择', trigger: 'blur' }], | 
 |  |  |         driverName: [{ required: true, message: '请选择', trigger: 'blur' }] | 
 |  |  |       }, | 
 |  |  |       queryFormConfig: { | 
 |  |  |         formItems: [ | 
 |  |  | 
 |  |  |               { value: 1, label: '审批中' }, | 
 |  |  |               { value: 2, label: '审批通过' }, | 
 |  |  |               { value: 3, label: '审批驳回' }, | 
 |  |  |               { value: 4, label: '已取消' }, | 
 |  |  |               { value: 4, label: '已取消' } | 
 |  |  |             ] | 
 |  |  |           }, | 
 |  |  |           { | 
 |  |  |             filed: 'selDate', | 
 |  |  |             type: 'datetimerange', | 
 |  |  |             label: '操作时间', | 
 |  |  |             pickerOptions: {} | 
 |  |  |             filed1: 'arriveDateStart', | 
 |  |  |             filed2: 'arriveDateEnd', | 
 |  |  |             type: 'datetime', | 
 |  |  |             label: '操作时间' | 
 |  |  |           }, | 
 |  |  |           { | 
 |  |  |             type: 'slot', | 
 |  |  | 
 |  |  |   }, | 
 |  |  |   created() { | 
 |  |  |     this.changeRadio('0') | 
 |  |  |     this.getList() | 
 |  |  |     // this.getList() | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     checkSurplus() { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     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.arriveDateStart = arr[0] | 
 |  |  |       this.filters.arriveDateEnd = arr[1] | 
 |  |  |       this.getList(1) | 
 |  |  |     }, | 
 |  |  |     changeForm(str) { | 
 |  |  |       if (str === 'selDate') { | 
 |  |  |         this.$set(this.filters, 'fastdate', null) | 
 |  |  |         this.getList() | 
 |  |  |       if (this.filters.arriveDateStart > this.filters.arriveDateEnd) { | 
 |  |  |         this.filters.arriveDateStart = this.filters.arriveDateEnd | 
 |  |  |         return this.$message.error('开始时间不能大于结束时间') | 
 |  |  |       } | 
 |  |  |       this.getList() | 
 |  |  |     }, | 
 |  |  |     getList(page) { | 
 |  |  |       const { pagination, filters } = this | 
 |  |  |       this.loading = true | 
 |  |  |       platformBooksPage({ | 
 |  |  |         model: { | 
 |  |  |           ...filters, | 
 |  |  |           arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
 |  |  |           arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, | 
 |  |  |           ...filters | 
 |  |  |         }, | 
 |  |  |         capacity: pagination.pageSize, | 
 |  |  |         page: page || pagination.page, | 
 |  |  |         page: page || pagination.page | 
 |  |  |       }).then(res => { | 
 |  |  |         this.loading = false | 
 |  |  |         this.list = res.records || [] | 
 |  |  | 
 |  |  |             page: this.pagination.page, | 
 |  |  |             capacity: 1000000, | 
 |  |  |             model: { | 
 |  |  |               ...filters, | 
 |  |  |               arriveDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
 |  |  |               arriveDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, | 
 |  |  |             }, | 
 |  |  |               ...filters | 
 |  |  |             } | 
 |  |  |           }) | 
 |  |  |             .then(response => { | 
 |  |  |               this.download(response) | 
 |  |  | 
 |  |  |         }) | 
 |  |  |     }, | 
 |  |  |     onSubmit() { | 
 |  |  |       this.$refs['ruleForm'].validate((valid) => { | 
 |  |  |       this.$refs.ruleForm.validate((valid) => { | 
 |  |  |         const param = this.param | 
 |  |  |         param.inReason = this.reasonList.find(item => param.reasonId == item.id).reason | 
 |  |  |         if (valid) { | 
 |  |  | 
 |  |  |         inType: 0 | 
 |  |  |       } | 
 |  |  |       this.$nextTick(() => { | 
 |  |  |         this.$refs['ruleForm'].clearValidate() | 
 |  |  |         this.$refs.ruleForm.clearValidate() | 
 |  |  |       }) | 
 |  |  |       this.$set(this.param, 'arriveDate', dayjs().format('YYYY-MM-DD HH:mm:ss')) | 
 |  |  |       this.getplatformReason() | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     clear() { | 
 |  |  |       this.pagination.page = 1 | 
 |  |  |       this.filters = { | 
 |  |  |         selDate: [], | 
 |  |  |         fastdate: 0, | 
 |  |  |       } | 
 |  |  |       this.changeRadio('0') | 
 |  |  |       this.filters = {} | 
 |  |  |       this.getList() | 
 |  |  |       // this.changeRadio('0') | 
 |  |  |     }, | 
 |  |  |     handleDetail(row) { | 
 |  |  |       this.isShowDriver = true | 
 |  |  | 
 |  |  |         this.$refs.DriverDetailRef.isShowModal = true | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     handleDel() { }, | 
 |  |  |     handleDel(row) { | 
 |  |  |       this.$confirm('确定删除该记录吗, 是否继续?', '提示', { | 
 |  |  |         confirmButtonText: '确定', | 
 |  |  |         cancelButtonText: '取消', | 
 |  |  |         type: 'warning' | 
 |  |  |       }).then(() => { | 
 |  |  |         deletebooksById(row.id) | 
 |  |  |           .then(res => { | 
 |  |  |             this.$message.success('操作成功') | 
 |  |  |             this.page = 1 | 
 |  |  |             this.getList() | 
 |  |  |           }) | 
 |  |  |       }).catch(() => { | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     handleSizeChange(capacity) { | 
 |  |  |       this.pagination.pageSize = capacity | 
 |  |  |       this.getList() | 
 |  |  |       this.getList(1) | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } |