gjy 3 anni fa
parent
commit
580e50d5de

+ 3 - 1
src/api/V2/taskspost/index.js

@@ -39,4 +39,6 @@ export const API_GET_OUT_MOVELOOK = '/inOutWarehouseTask/getInOutWarehouseTaskRe
 //运输任务状态修改
 //运输任务状态修改
 export const API_POST_OUT_STATES = '/tranTaskInfo/api/editStatus'
 export const API_POST_OUT_STATES = '/tranTaskInfo/api/editStatus'
 //移库任务状态修改
 //移库任务状态修改
-export const API_POST_OUT_MOVESTATES = '/inOutWarehouseTask/api/editStatus'
+export const API_POST_OUT_MOVESTATES = '/inOutWarehouseTask/api/editStatus'
+// 删除运输阶段
+export const API_POST_DEL_HAULAGE_STAGE= '/tranProcessInfo/api/deleteTranProcess'

+ 5 - 2
src/model/tasksport/index.js

@@ -21,7 +21,8 @@ import {
     API_POST_INOUTWAREHOUSETASK,
     API_POST_INOUTWAREHOUSETASK,
     API_GET_OUT_MOVELOOK,
     API_GET_OUT_MOVELOOK,
     API_POST_OUT_STATES,
     API_POST_OUT_STATES,
-    API_POST_OUT_MOVESTATES
+    API_POST_OUT_MOVESTATES,
+    API_POST_DEL_HAULAGE_STAGE
 } from '@/api/V2/taskspost'
 } from '@/api/V2/taskspost'
 //运输任务列表
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -62,4 +63,6 @@ export const moveLook = appRx.get(API_GET_OUT_MOVELOOK, errorCatcher, errorHandl
 //运输任务状态修改
 //运输任务状态修改
 export const states = appRx.post(API_POST_OUT_STATES, errorCatcher, errorHandle, filter)
 export const states = appRx.post(API_POST_OUT_STATES, errorCatcher, errorHandle, filter)
 //移库任务状态修改
 //移库任务状态修改
-export const movestates = appRx.post(API_POST_OUT_MOVESTATES, errorCatcher, errorHandle, filter)
+export const movestates = appRx.post(API_POST_OUT_MOVESTATES, errorCatcher, errorHandle, filter)
+//删除运输阶段
+export const delhaulagestage = appRx.post(API_POST_DEL_HAULAGE_STAGE, errorCatcher, errorHandle, filter)

+ 24 - 4
src/views/taskManagement/tranManagementTransportEdit.vue

@@ -214,7 +214,7 @@
             width="22"
             width="22"
             height="22"
             height="22"
             class="del"
             class="del"
-            @click="del(index)"
+            @click="del(index,item)"
             src="../../../public/img/del.png"
             src="../../../public/img/del.png"
             alt=""
             alt=""
           />
           />
@@ -378,6 +378,7 @@ import {
   getwarehousename,
   getwarehousename,
   xialaNo,
   xialaNo,
   examinetran,
   examinetran,
+  delhaulagestage
 } from '@/model/tasksport/index'
 } from '@/model/tasksport/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -661,10 +662,29 @@ export default {
       })
       })
       this.number++
       this.number++
     },
     },
-    del(index) {
-      if (this.deptBudgetList.tranProcessInfoList.length > 1) {
-        this.deptBudgetList.tranProcessInfoList.splice(index, 1)
+    del(index,row) {
+      console.log(row)
+      if(row.id){
+        this.$confirm('任务阶段删除后不可恢复,是否确定删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+        delhaulagestage({id:row.id}).toPromise()
+            .then((response) => {
+              this.$message.success('删除成功')
+              if (this.deptBudgetList.tranProcessInfoList.length > 1) {
+                this.deptBudgetList.tranProcessInfoList.splice(index, 1)
+              }
+            })
+        })
+      }else{
+        if (this.deptBudgetList.tranProcessInfoList.length > 1) {
+          this.deptBudgetList.tranProcessInfoList.splice(index, 1)
+        }
       }
       }
+      
     },
     },
     handleChange(value) {
     handleChange(value) {
       this.selectedOptions = value
       this.selectedOptions = value

+ 1 - 1
vue.config.js

@@ -145,7 +145,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.121:8090/',
-        target: 'http://192.168.1.116:8090/',
+        target: 'http://192.168.1.120:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://product-server.winsea.com/',