Explorar o código

添加陆运跟踪新增提箱按钮

caojunjie %!s(int64=3) %!d(string=hai) anos
pai
achega
54e1edb785

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

@@ -128,6 +128,14 @@ export function arrival(data) {
         params:data
     })
 }
+//确认提箱箱信息
+export function borrow(data) {
+    return request({
+        url: '/api/blade-land/order-item/borrow',
+        method: 'get',
+        params:data
+    })
+}
 //获取车队司机信息
 export function fleetList() {
     return request({

+ 25 - 1
src/views/landTransportation/driver/index.vue

@@ -125,6 +125,13 @@
           <el-button
               size="small"
               type="text"
+              @click="suitcase(row, index)"
+              v-if="row.status === 6"
+          >提箱
+          </el-button>
+          <el-button
+              size="small"
+              type="text"
               @click="annexOpen(row, index)"
           >附 件
           </el-button>
@@ -164,7 +171,7 @@ import {
   acceptanceCollection,
   acceptanceDispatchCollection,
   confirmCompletion,
-  fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached, arrival
+  fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached, arrival,borrow
 } from "@/api/landTransportation";
 
 export default {
@@ -685,6 +692,23 @@ export default {
         });
       }
     },
+    suitcase(row){
+      this.$confirm('是否确定提箱', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        borrow({id: row.id}).then(res => {
+          this.$message.success('操作成功');
+          this.onLoad(this.page)
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      });
+    },
     confirmArrival(row) {
       this.$confirm('是否确定到厂', '提示', {
         confirmButtonText: '确定',