wangzhuo 1 年間 前
コミット
266959fdc1

+ 14 - 0
src/api/landTransportation/index.js

@@ -184,6 +184,20 @@ export function fleetListTwo(data) {
         params:data
     })
 }
+
+export function fleetListS(data) {
+  return request({
+    url: '/api/blade-client/land-driver/driver-list?fleetId=' + data,
+    method: 'get'
+  })
+}
+
+export function fleetListT() {
+  return request({
+    url: '/api/blade-client/land-driver/driver-list',
+    method: 'get'
+  })
+}
 //获取省市区
 export function addressList(name) {
     return request({

+ 47 - 5
src/views/SpecialTrade/dispatchingCars/detailPage.vue

@@ -257,6 +257,17 @@
                 @saveColumn="saveColumnBoxTwo"
                 @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
                 @row-update="rowSaveWell">
+              <template slot-scope="{ row }" slot="driverName">
+                <el-select v-if="row.$cellEdit" v-model="row.driverName" placeholder="请选择" @change="driverChange(row)">
+                  <el-option
+                    v-for="item in driverIddata"
+                    :key="item.name"
+                    :label="item.name"
+                    :value="item.name">
+                  </el-option>
+                </el-select>
+                <span v-else>{{row.driverName}}</span>
+              </template>
                 <template slot="menuLeft" slot-scope="{size}">
                     <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
                                :disabled="batchDuling" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
@@ -692,6 +703,7 @@ import {gaude, location} from "@/api/gaude";
 import reportDialog from "@/components/report-dialog/main.vue";
 
 import { getAdminProfilesById } from "@/api/specialTrade/placeAnOrder/detailPage";
+import {fleetListS, fleetListT, fleetListTwo} from "../../../api/landTransportation";
 
 export default {
     components: {reportDialog},
@@ -705,6 +717,7 @@ export default {
     },
     data() {
         return {
+            driverIddata:[],
             // 揽货员list
             adminProfilesList: [],
             // 车队数据
@@ -996,7 +1009,19 @@ export default {
                         label: "cname",
                         value: "id",
                         res: "data.records"
-                    }
+                    },
+                      change: (data) => {
+
+                        if (JSON.parse(localStorage.getItem('saber-tenantId')).content == 119111) {
+                          fleetListS(data.row.fleetId).then(res => {
+                            this.driverIddata = res.data.data
+                          })
+                        } else {
+                          fleetListT().then(res => {
+                            this.driverIddata = res.data.data
+                          })
+                        }
+                      }
                 }, {
                     label: '车号',
                     width: 150,
@@ -1578,6 +1603,10 @@ export default {
                         label: "dictValue",
                         value: "dictKey"
                     },
+                }, {
+                  label: '备注',
+                  cell: true,
+                  prop: 'remark'
                 }
                 ]
             },
@@ -1686,7 +1715,11 @@ export default {
                             label: "dictValue",
                             value: "dictKey"
                         },
-                    },
+                    }, {
+                      label: '备注',
+                      cell: true,
+                      prop: 'remark'
+                    }
                 ]
             }
         };
@@ -2117,6 +2150,15 @@ export default {
                 }
             })
         },
+      driverChange(row) {
+        if (JSON.parse(localStorage.getItem('saber-tenantId')).content == 119111) {
+          this.driverIddata.forEach((driver) => {
+            if (driver.name === row.driverName) {
+              row.tel = driver.tel
+            }
+          })
+        }
+      },
         //刷新数据
         refreshData() {
             detailDelegationList({id: this.id, kind: '2'}).then(res => {
@@ -2211,9 +2253,9 @@ export default {
                     if (item.prop === 'plateNo') {
                         item.cell = true
                     }
-                    if (item.prop === 'driverName') {
-                        item.cell = true
-                    }
+                    // if (item.prop === 'driverName') {
+                    //     item.cell = true
+                    // }
                     if (item.prop === 'tel') {
                         item.cell = true
                     }

+ 10 - 1
src/views/SpecialTrade/motorcadeDriver/index.vue

@@ -107,7 +107,7 @@
                 @click="openTrack(row)">{{ row.plateNo }}</span>
         </template>
           <template slot-scope="{ row }" slot="driverId">
-              <el-select v-if="row.$cellEdit" v-model="row.driverId" placeholder="请选择">
+              <el-select v-if="row.$cellEdit" v-model="row.driverId" placeholder="请选择" @change="driverChange(row)">
                   <el-option
                       v-for="item in driverIddata"
                       :key="item.id"
@@ -809,6 +809,15 @@ export default {
         this.$refs.saveForm.resetForm()
       })
     },
+    driverChange(row) {
+      if (JSON.parse(localStorage.getItem('saber-tenantId')).content == 119111) {
+        this.driverIddata.forEach((driver) => {
+          if (driver.id === row.driverId) {
+            row.tel = driver.tel
+          }
+        })
+      }
+    },
     //变更信息
     changeFleetT(row, index) {
       let data = [{