| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <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-button label="0">å½å¤©</el-radio-button> |
| | | <el-radio-button label="6">è¿7天</el-radio-button> |
| | | <el-radio-button label="29">è¿30天</el-radio-button> |
| | | </el-radio-group> |
| | | </template> |
| | | </QueryForm> |
| | | <div class="pt16"> |
| | | <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-column type="index" label="åºå·" width="70" show-overflow-tooltip /> |
| | | <el-table-column prop="billCode" label="è¿åå·/ååå·" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span>{{ scope.row.billCode || scope.row.contractNum }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="totalNum" label="æ»ä½ä¸é(䏿¯)" min-width="100" show-overflow-tooltip /> --> |
| | | <el-table-column prop="carCodeFront" label="车çå·" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="carCodeBack" label="çµåéç¶æ" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span class="red" v-if="scope.row.billCode && scope.row.lockStatus == 0">æªä¸é</span> |
| | | <span class="red" v-if="scope.row.billCode && scope.row.lockStatus == 1">é¨åä¸é</span> |
| | | <span v-if="scope.row.billCode && scope.row.lockStatus == 2">å
¨é¨ä¸é</span> |
| | | <span v-if="!scope.row.billCode">-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="carrierName" label="è¿è¾å
¬å¸" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="driverName" label="驾驶å" min-width="120" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span>{{ scope.row.driverName }} {{ scope.row.drivierPhone }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="drivierPhone" label="èç³»æ¹å¼" min-width="100" show-overflow-tooltip /> --> |
| | | |
| | | <el-table-column prop="doneDate" label="ä½ä¸å®ææ¶é´" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column prop="workTime" label="ææç¶æ" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <span v-if="scope.row.status == 9 || scope.row.status == 10">å·²ææ</span> |
| | | <span class="red" v-if="scope.row.status == 6">æªææ</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="outUserName" label="æä½å" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="outHkdate" label="æä½æ¶é´" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="150" show-overflow-tooltip /> |
| | | <el-table-column label="æä½" align="center" fixed="right" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="scope"> |
| | | <el-button v-if="scope.row.status == 6" type="text" v-permissions="['business:platformbooks:detail']" |
| | | @click="handleAuth(scope.row)">ç¦»åææ</el-button> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | <!-- --> |
| | | <!-- --> |
| | | <DriverDetail v-if="isShowDriver" ref="DriverDetailRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | import { platformJobPage, platformJobExport, platformPowerLevel } from '@/api' |
| | | import { statusMap } from '../config' |
| | | import DriverDetail from "@/views/task/driverDetail" |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadFaceImg from '@/components/common/UploadFaceImg' |
| | | import { Message } from 'element-ui' |
| | | import dayjs from 'dayjs' |
| | | import BaseComputHeight from "@/components/base/BaseComputHeight" |
| | | export default { |
| | | extends: BaseComputHeight, |
| | | components: { |
| | | Pagination, |
| | | QueryForm, |
| | | DriverDetail, |
| | | GlobalWindow, |
| | | UploadFaceImg |
| | | }, |
| | | data() { |
| | | return { |
| | | statusMap, |
| | | isShowDriver: false, |
| | | exLoading: false, |
| | | loading: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | filters: { |
| | | selDate: [], |
| | | fastdate: 0, |
| | | beginDoneDateStart: '', |
| | | beginDoneDateEnd: '' |
| | | }, |
| | | list: [], |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | filed: 'contractNum', |
| | | type: 'input', |
| | | label: 'ååå·' |
| | | }, |
| | | { |
| | | filed: 'billCode', |
| | | type: 'input', |
| | | label: 'è¿åå·' |
| | | }, |
| | | { |
| | | filed: 'carCodeFront', |
| | | type: 'input', |
| | | label: '车çå·' |
| | | }, |
| | | { |
| | | filed: 'driverName', |
| | | type: 'input', |
| | | label: '驾驶å' |
| | | }, |
| | | { |
| | | filed: 'queryStatusForPower', |
| | | type: 'select', |
| | | label: 'ææç¶æ', |
| | | options: [ |
| | | { value: '9,10', label: 'å·²ææ' }, |
| | | { value: '6', label: 'æªææ' } |
| | | ] |
| | | }, |
| | | // { |
| | | // filed: 'selDate', |
| | | // type: 'datetimerange', |
| | | // label: 'ä½ä¸å®ææ¶é´æç´¢', |
| | | // pickerOptions: {} |
| | | // }, |
| | | { |
| | | filed1: 'beginDoneDateStart', |
| | | filed2: 'beginDoneDateEnd', |
| | | type: 'datetime', |
| | | label: 'ä½ä¸å®ææ¶é´æç´¢' |
| | | }, |
| | | { |
| | | type: 'slot', |
| | | filed: 'fastdate', |
| | | label: '' |
| | | } |
| | | ], |
| | | online: true |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.changeRadio('0') |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | changeRadio(day) { |
| | | const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59'] |
| | | this.filters.beginDoneDateStart = arr[0] |
| | | this.filters.beginDoneDateEnd = arr[1] |
| | | this.getList(1) |
| | | }, |
| | | changeForm(str) { |
| | | if (str === 'selDate') { |
| | | this.$set(this.filters, 'fastdate', null) |
| | | this.getList() |
| | | } |
| | | }, |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | platformJobPage({ |
| | | model: { |
| | | ...filters, |
| | | queryStatus: '6,9,10,2,3,4' |
| | | }, |
| | | sorts: [{ direction: 'DESC', property: 'DONE_DATE' }], |
| | | capacity: pagination.pageSize, |
| | | page: page || pagination.page, |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | | this.list.forEach(item => { |
| | | item.inTypeTemp = item.inType == 0 ? 'æ´æç' : 'ä»¶ç' |
| | | item.taskOrigin = 'WMSè·å' |
| | | }) |
| | | this.pagination.total = res.total || 0 |
| | | }, () => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleAuth(row) { |
| | | this.$prompt('夿³¨', 'ç¦»åææ', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | }).then(({ value }) => { |
| | | platformPowerLevel({ jobId: row.id, remark: value }).then(res => { |
| | | Message.success('ç¦»åæææå') |
| | | this.getList() |
| | | }) |
| | | }) |
| | | }, |
| | | handleEx() { |
| | | this.$dialog.exportConfirm('确认导åºåï¼') |
| | | .then(() => { |
| | | this.exLoading = true |
| | | platformJobExport({ |
| | | page: this.pagination.page, |
| | | capacity: 1000000, |
| | | queryStatus: '6,9,10,2,3,4', |
| | | model: this.filters |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.exLoading = false |
| | | }) |
| | | }) |
| | | }, |
| | | clear() { |
| | | this.pagination.page = 1 |
| | | this.filters = { |
| | | selDate: [], |
| | | } |
| | | this.getList() |
| | | }, |
| | | handleDetail(row) { |
| | | this.isShowDriver = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DriverDetailRef.id = row.id |
| | | this.$refs.DriverDetailRef.type = 6 |
| | | this.$refs.DriverDetailRef.getDetail() |
| | | this.$refs.DriverDetailRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .param_title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #000000; |
| | | margin-bottom: 15px; |
| | | } |
| | | </style> |