From 1c20c8231980a8d4b91688ff8641a06d3b2f68ab Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 14 十月 2025 16:34:22 +0800
Subject: [PATCH] 改bug

---
 admin/src/views/platform/components/PlatformQueuing.vue |  198 +++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 166 insertions(+), 32 deletions(-)

diff --git a/admin/src/views/platform/components/PlatformQueuing.vue b/admin/src/views/platform/components/PlatformQueuing.vue
index 592bbda..0a4c2ca 100644
--- a/admin/src/views/platform/components/PlatformQueuing.vue
+++ b/admin/src/views/platform/components/PlatformQueuing.vue
@@ -1,77 +1,174 @@
 <template>
-  <GlobalWindow
-    title="鏈堝彴鍙彿-xx鍙锋湀鍙�"
-    :visible.sync="isShowModal"
-    width="800px"
-    :confirm-working="subLoading"
-    @confirm="handleSub"
-  >
+  <GlobalWindow :title="callType == 1 ? '鍙彿鍏ュ洯-' + title : '鏈堝彴鍙彿-' + title" :visible.sync="isShowModal"
+    :showConfirm="false" width="800px">
     <div class="queuing_modal">
       <div class="df_ac mb20">
         <span>鎼滅储杞﹁締锛�</span>
-        <el-input
-          class="flex1 mr20"
-          v-model="param.aa"
-          placeholder="璇疯緭鍏ヨ溅鐗屽彿"
-        ></el-input>
-        <el-button type="primary">鏌ユ壘</el-button>
-        <el-button>閲嶇疆</el-button>
+        <el-input class="flex1 mr20" v-model="carCodeFront" placeholder="璇疯緭鍏ヨ溅鐗屽彿"></el-input>
+        <el-button type="primary" @click="getList">鏌ユ壘</el-button>
+        <el-button @click="reset">閲嶇疆</el-button>
       </div>
       <div class="list">
-        <div class="item">
+        <div class="item" v-for="item in dataList" :key="item.id">
           <div class="head df_sb">
-            <div class="plate">鐨朅12122</div>
-            <div class="status">宸茬鍒�</div>
+            <div v-if="item.carCodeFront" class="code">
+              <span>{{ item.carCodeFront.slice(0, 1) }}</span>
+              <span>{{ item.carCodeFront.slice(1, 2) }}</span>
+              <span>路</span>
+              <span>{{ item.carCodeFront.slice(2) }}</span>
+            </div>
+            <div class="status">{{ statusMap[item.status] }}</div>
           </div>
           <div class="info">
-            <div class="ite">
+            <div v-if="item.billCode" class="ite">
               <span>杩愯緭鍗曞彿锛�</span>
-              <span>12312</span>
+              <span>{{ item.billCode }}</span>
+            </div>
+            <div v-else class="ite">
+              <span>鍚堝悓鍗曞彿锛�</span>
+              <span>{{ item.contractNum }}</span>
             </div>
             <div class="ite">
               <span>椹鹃┒鍛橈細</span>
-              <span>12312</span>
+              <span>{{ item.driverName }}</span>
             </div>
             <div class="ite">
               <span>鎵嬫満鍙凤細</span>
-              <span>12312</span>
+              <span>{{ item.drivierPhone }}</span>
             </div>
             <div class="ite">
               <span>鎬昏繍杈撻噺锛�</span>
-              <span>12312</span>
+              <span>{{ item.totalNum || item.ioQty }}涓囨敮</span>
             </div>
-            <div class="ite" style="width: 66%">
+            <div v-if="item.billCode" class="ite" style="width: 66%">
               <span>杩愯緭鍏徃锛�</span>
-              <span>12312</span>
+              <span>{{ item.carrierName }}</span>
             </div>
           </div>
           <div class="footer df_sb">
-            <div class="detail">杩愬崟璇︽儏</div>
-            <el-button type="primary">鍙彿</el-button>
+            <div v-if="item.billCode" @click="handleDetail(item)" class="detail">杩愬崟璇︽儏</div>
+            <div v-else class="detail"  @click="subDetail(item)">棰勭害璇︽儏</div>
+            <div style="display: flex; align-items: center;">
+              <div style="margin-right: 15px; color: #207FF7; font-size: 13px; font-weight: 400;" v-if="item.signDate">
+                绛惧埌鏃堕棿锛歿{item.signDate.substring(5, 10)}} {{item.signDate.substring(11, 16)}}
+              </div>
+              <el-button v-preventReClick :loading="loadingCall" type="primary" @click="handleCall(item)">鍙彿</el-button>
+            </div>
           </div>
         </div>
       </div>
+      <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="pagination">
+      </pagination>
     </div>
+    <!--  -->
+    <WaybillDetail ref="WaybillDetailRef" v-if="isShowDetail" @success="getList" @close="isShowDetail = false" />
+    <DriverDetail v-if="isShowDriver" ref="DriverDetailRef" />
   </GlobalWindow>
 </template>
 
 <script>
 import GlobalWindow from '@/components/common/GlobalWindow'
-import { getPlatform, PlatformEdit, PlatformDel } from '@/api'
+import Pagination from '@/components/common/Pagination'
+import { platformCallList, platformCallNumber, platformInPark } from '@/api'
+import { statusMap } from '../config'
+import { Message } from 'element-ui'
+import WaybillDetail from './WaybillDetail.vue'
+import DriverDetail from "@/views/task/driverDetail.vue"
 export default {
   components: {
-    GlobalWindow
+    GlobalWindow,
+    Pagination,
+    WaybillDetail,
+    DriverDetail
   },
-  data () {
+  data() {
     return {
+      statusMap,
       isShowModal: false,
       subLoading: false,
-      param: {}
+      pagination: {
+        total: 0,
+        pageSize: 10,
+        page: 1
+      },
+      carCodeFront: '',
+      title: '',
+      callType: '1',
+      activePlat: {},
+      dataList: [],
+      isShowDetail: false, // 杩愬崟璇︽儏
+      isShowDriver: false, // 棰勭害璇︽儏
+      loadingCall: false
 
     }
   },
   methods: {
-    handleSub () {
+    handleCall(item) {
+      const { activePlat, callType } = this
+      this.loadingCall = true
+      if (callType == 1) { // 鍏ュ洯鍙彿
+        platformInPark({
+          jobId: item.id,
+          platformId: activePlat.id
+        }).then(() => {
+          this.loadingCall = false
+          Message.success('鍙彿鎴愬姛')
+          this.$emit('success')
+          this.getList()
+        },() => {this.loadingCall = false})
+      } else {
+        this.loadingCall = true
+        platformCallNumber({ platformId: activePlat.id, jobId: item.id }).then(res => {
+          this.loadingCall = false
+          Message.success('鍙彿鎴愬姛')
+          this.$emit('success')
+          this.getList()
+        },()=> {this.loadingCall = false})
+      }
+    },
+    subDetail(row) {
+      this.isShowDriver = true
+      this.$nextTick(() => {
+        this.$refs.DriverDetailRef.id = row.bookId
+        this.$refs.DriverDetailRef.type = row.objType
+        this.$refs.DriverDetailRef.getDetail()
+        this.$refs.DriverDetailRef.isShowModal = true
+      })
+    },
+    handleDetail(row) {
+      this.isShowDetail = true
+      this.$nextTick(() => {
+        this.$refs.WaybillDetailRef.isShowModal = true
+        this.$refs.WaybillDetailRef.id = row.id
+        this.$refs.WaybillDetailRef.getDetail()
+      })
+    },
+    getList() {
+      const { activePlat, pagination, carCodeFront, callType } = this
+      platformCallList({
+        model: { callType, platformId: activePlat.id, carCodeFront },
+        page: pagination.page,
+        capacity: pagination.pageSize
+      }).then(res => {
+        this.dataList = res.records
+        this.pagination.total = res.total
+      })
+    },
+    reset() {
+      this.carCodeFront = ''
+      this.pagination.page = 1
+      this.pagination.pageSize = 10
+      this.getList()
+    },
+    handleSizeChange(e) {
+      this.pagination.pageSize = e
+      this.getList(1)
+    },
+    handlePageChange(e) {
+      this.pagination.page = e
+      this.getList()
+    },
+    handleSub() {
       const { param } = this
       this.subLoading = true
       PlatformEdit({
@@ -84,7 +181,7 @@
       }, () => {
         this.subLoading = false
       })
-    },
+    }
   }
 
 }
@@ -92,8 +189,12 @@
 
 <style lang="scss" scoped>
 @import "@/assets/style/variables.scss";
+.table-pagination {
+  bottom: 0px !important;
+}
 .queuing_modal {
   padding: 10px 30px;
+
   .list {
     .item {
       background: #f4fafb;
@@ -101,8 +202,10 @@
       border: 1px solid #dfe2e8;
       margin-bottom: 10px;
       padding: 16px;
+
       .head {
         margin-bottom: 15px;
+
         .plate {
           width: 90px;
           text-align: center;
@@ -113,16 +216,45 @@
           border: 1px solid #279baa;
           background-color: #fff;
         }
+
         .status {
           color: $primaryColor;
         }
+
+        .code {
+          display: flex;
+          font-weight: 600;
+          height: 30px;
+          line-height: 30px;
+          font-size: 15px;
+          color: #111111;
+          background-color: #fff;
+          border-radius: 4px;
+          border: 1px solid $primaryColor;
+          padding-right: 4px;
+
+          span {
+            &:nth-of-type(1) {
+              background: $primaryColor;
+              padding: 0 8px;
+              color: #fff;
+            }
+
+            &:nth-of-type(2) {
+              padding-left: 4px;
+            }
+          }
+        }
       }
+
       .info {
         display: flex;
         flex-wrap: wrap;
+
         .ite {
           width: 33.3%;
           margin-bottom: 8px;
+
           span {
             &:nth-child(1) {
               color: #666666;
@@ -130,9 +262,11 @@
           }
         }
       }
+
       .footer {
         .detail {
           color: $primaryColor;
+          cursor: pointer;
         }
       }
     }

--
Gitblit v1.9.3