From c3aaf28f7316cce12eec007a9f85a96cbcddeec2 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期三, 07 五月 2025 10:34:20 +0800 Subject: [PATCH] 最新版本541200007 --- admin/src/views/platform/index.vue | 116 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 85 insertions(+), 31 deletions(-) diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue index 6be4435..ff9dd46 100644 --- a/admin/src/views/platform/index.vue +++ b/admin/src/views/platform/index.vue @@ -1,5 +1,5 @@ <template> - <div class="main_app"> + <div class="main_app" style="overflow-y: auto;height: calc(100% - 100px);"> <div class="mb20 main_header"> <div class="platgroup_tabs"> <div class="tab" :class="{ active: activeGroup.id === item.id }" @click="platgroupClick(item)" @@ -62,45 +62,47 @@ </div> </div> <div class="line"> - <div v-if="task.type == 4" class="ite"> - <span>鍚堝悓鍗曞彿锛�</span> - <span>{{ task.contractNum }}</span> - </div> - <div v-else class="ite"> + <div v-if="task.billCode" style="width: 40%;" class="ite"> <span>杩愯緭鍗曞彿锛�</span> <span>{{ task.billCode }}</span> </div> - <div class="ite siji"> - <span>椹鹃┒鍛橈細</span> - <span>{{ task.driverName }}</span> + <div v-else class="ite" style="width: 40%;"> + <span>鍚堝悓鍗曞彿锛�</span> + <span>{{ task.contractNum }}</span> </div> - <div class="ite phone"> + <div class="ite jiashi"> + <span>椹鹃┒鍛橈細</span> + <span>{{ task.driverName }} {{ task.drivierPhone }}</span> + </div> + <!-- <div class="ite phone"> <span>鎵嬫満鍙凤細</span> <span>{{ task.drivierPhone }}</span> - </div> - <div class="ite"> + </div> --> + <div class="ite" style="width: 40%"> <span>鎬昏繍杈撻噺锛�</span> - <span>{{ task.totalNum }}涓囨敮</span> + <span>{{ task.totalNum || task.ioQty }}涓囨敮</span> </div> - <div v-if="task.type != 4" class="ite" style="width: 66.6%"> + <div v-if="task.billCode" class="ite" style="width: 60%"> <span>杩愯緭鍏徃锛�</span> <span>{{ task.carrierName }}</span> </div> - <div class="ite"></div> + <!-- <div class="ite"></div> --> </div> <div class="line"> - <div v-if="task.type != 4" class="left"> - <span class="primaryColor pointer" @click="handleDetail(task)">杩愬崟璇︽儏</span> + <div class="left"> + <span v-if="task.billCode" class="primaryColor pointer" @click="handleDetail(task)">杩愬崟璇︽儏</span> + <span v-else class="primaryColor pointer" @click="subDetail(task)">棰勭害璇︽儏</span> </div> - <div v-else></div> <div class="right"> <el-button v-if="task.status == 5" plain @click="handleErr(task)">寮傚父鎸傝捣</el-button> + <el-button v-if="task.status == 8" plain @click="restore(task)">鎭㈠浣滀笟</el-button> <el-button v-if="task.status == 5 || task.status == 8" plain @click="handleTransform(item, task)">杞Щ鏈堝彴</el-button> <el-button v-if="task.status == 4" plain @click="handlePass(task)">杩囧彿</el-button> - <el-button v-if="task.status == 5 || task.status == 8" type="primary" - @click="handleFinish(task)">浣滀笟瀹屾垚</el-button> - <el-button v-if="task.status == 4" type="primary" @click="handleWork(task)">寮�濮嬩綔涓�</el-button> + <el-button v-preventReClick :loading="loadingFinish" v-if="task.status == 5 || task.status == 8" + type="primary" @click="handleFinish(task)">浣滀笟瀹屾垚</el-button> + <el-button v-preventReClick :loading="loadingOpen" v-if="task.status == 4" type="primary" + @click="handleWork(task)">寮�濮嬩綔涓�</el-button> </div> </div> </div> @@ -135,6 +137,7 @@ <PlatformQueuing ref="PlatformQueuingRef" v-if="isShowQueuing" @success="getPlatGroupList" @close="isShowQueuing = false" /> <WaybillDetail ref="WaybillDetailRef" v-if="isShowDetail" @success="getList" @close="isShowDetail = false" /> + <DriverDetail v-if="isShowDriver" ref="DriverDetailRef" /> <el-dialog title="杞Щ鏈堝彴" :visible.sync="isShowTransform" width="500px" style="margin-top: 12vh"> <div class="df_ac"> <span>閫夋嫨杞Щ鍒扮殑鏈堝彴锛�</span> @@ -145,7 +148,7 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="isShowTransform = false">鍙栨秷</el-button> - <el-button type="primary" @click="transformSub">纭畾</el-button> + <el-button v-preventReClick type="primary" @click="transformSub">纭畾</el-button> </span> </el-dialog> </div> @@ -161,20 +164,23 @@ platformMove, updUserPlatformConfig, - listByGroupId + listByGroupId, + restoreWork } from '@/api' import PlatformQueuing from './components/PlatformQueuing.vue' import WaybillDetail from './components/WaybillDetail.vue' +import DriverDetail from "@/views/task/driverDetail.vue" import GlobalWindow from '@/components/common/GlobalWindow' import dayjs from 'dayjs' import duration from 'dayjs/plugin/duration' -import { Message } from 'element-ui' +import { Loading, Message } from 'element-ui' import { statusMap } from './config' dayjs.extend(duration) export default { components: { PlatformQueuing, WaybillDetail, + DriverDetail, GlobalWindow }, data() { @@ -194,28 +200,49 @@ setParam: {}, isShowDetail: false, // 杩愬崟璇︽儏 + isShowDriver: false, // 棰勭害璇︽儏 detail: {}, isShowQueuing: false, - timer: null + timer: null, + timer2: null, + + loadingOpen: false, + loadingFinish: false, } }, created() { - setInterval(() => { + this.timer2 = setInterval(() => { this.getPlatGroupList() }, 1000 * 20) this.getPlatGroupList() }, + beforeDestroy() { + if (this.timer2) { + clearInterval(this.timer2) + } + if (this.timer) { + clearInterval(this.timer) + } + }, methods: { handleWork(item) { + this.loadingOpen = true platformBeginWork({ jobId: item.id }).then(res => { + this.loadingOpen = false Message.success('宸插紑濮嬩綔涓�') this.getPlatGroupList() + }, () => { + this.loadingOpen = false }) }, handleFinish(item) { + this.loadingFinish = true platformFinishWork({ jobId: item.id }).then(res => { + this.loadingFinish = false Message.success('瀹屾垚浣滀笟') this.getPlatGroupList() + }, () => { + this.loadingFinish = false }) }, handleTransform(item, task) { @@ -251,6 +278,18 @@ }).then(() => { platformErr({ jobId: item.id }).then(ress => { Message.success('寮傚父鎸傝捣鎴愬姛') + this.getPlatGroupList() + }) + }) + }, + restore(item) { + this.$confirm('鎮ㄧ‘璁よ瀵硅浠诲姟杩涜鎭㈠浣滀笟鍚�', '娓╅Θ鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + restoreWork({ jobId: item.id }).then(ress => { + Message.success('鎭㈠浣滀笟鎴愬姛') this.getPlatGroupList() }) }) @@ -298,7 +337,7 @@ if (item.newStartDate) { const timeNum = time.getTime() - new Date(item.newStartDate).getTime() if (timeNum > 3600000) { - item.startDateTemp = dayjs.duration(timeNum).format('H灏忔椂m鍒唖s绉�') + item.startDateTemp = dayjs.duration(timeNum).format('H灏忔椂m鍒唖绉�') } else { item.startDateTemp = dayjs.duration(timeNum).format('m鍒唖绉�') } @@ -314,9 +353,24 @@ this.$nextTick(() => { this.$refs.PlatformQueuingRef.isShowModal = true this.$refs.PlatformQueuingRef.callType = callType + this.$refs.PlatformQueuingRef.carCodeFront = '' + this.$refs.PlatformQueuingRef.pagination = { + total: 0, + pageSize: 10, + page: 1 + } this.$refs.PlatformQueuingRef.activePlat = { ...item } this.$refs.PlatformQueuingRef.getList() this.$refs.PlatformQueuingRef.title = item.name + }) + }, + subDetail(row) { + this.isShowDriver = true + this.$nextTick(() => { + this.$refs.DriverDetailRef.id = row.bookId + this.$refs.DriverDetailRef.type = 6 + this.$refs.DriverDetailRef.getDetail() + this.$refs.DriverDetailRef.isShowModal = true }) }, handleDetail(row) { @@ -380,7 +434,7 @@ @import "@/assets/style/variables.scss"; .platform_list { - width: 100%; + width: calc(100% - 20px); .item { /* padding: 16px 24px; */ @@ -467,12 +521,12 @@ margin-bottom: 6px; .ite { - width: 33.3%; + width: 50%; margin-top: 8px; } - .siji { - width: 29%; + .jiashi { + width: 60%; } .phone { -- Gitblit v1.9.3