gjy %!s(int64=3) %!d(string=hai) anos
pai
achega
fa4803b821

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -98,6 +98,8 @@ export const API_GET_TURNAROUND_XIALA = '/turnInfo/getPositionAndGoodsName'
 export const API_get_goodsName_All = '/commonSysParameter/getInfo'
 //退回
 export const API_SEND_BACK ='/warehouseInOutInfo/returnWarehouse'
+//删除
+export const API_DELETE_WAREHOUSE ='/warehouseInOutInfo/api/deleteWarehouse'
 
 
 

+ 4 - 1
src/model/warehouse/index.js

@@ -47,7 +47,8 @@ import {
     API_POST_TURNAROUND_ADD,
     API_GET_TURNAROUND_XIALA,
     API_get_goodsName_All,
-    API_SEND_BACK
+    API_SEND_BACK,
+    API_DELETE_WAREHOUSE
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -145,5 +146,7 @@ export const turnAroundXiaLa = appRx.get(API_GET_TURNAROUND_XIALA,errorCatcher,
 export const turnAroundGoodsNameAll = appRx.get(API_get_goodsName_All,errorCatcher, errorHandle, filter)
 //退回
 export const sendback = appRx.post(API_SEND_BACK,errorCatcher, errorHandle, filter)
+//删除
+export const postdeletewarehouse = appRx.post(API_DELETE_WAREHOUSE,errorCatcher, errorHandle, filter)
 
 

+ 21 - 1
src/views/warehouse/warehouseManagementNoWeight.vue

@@ -90,6 +90,11 @@
           " class="putstorage" @click="exchange(scope.row)">
                   换仓
                 </ws-button>
+                <el-button v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.huan`
+          "  type="danger" class="putstorage" @click="deletewarehousefunction(scope.row)">
+                  删除
+                </el-button>
                 <!-- <el-button @click="print(scope.row)"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button > -->
 
                 <!-- <div class="record" @click="edits(scope.row)">编辑</div>
@@ -132,7 +137,8 @@
     completeList,
     getPrintInfo,
     getbinnumber,
-    addstorageputList
+    addstorageputList,
+    postdeletewarehouse
     // deletewarehouse,
     // warehouseName,
     // addstorageputList,
@@ -229,6 +235,20 @@
       this.showType = this.isShow
     },
     methods: {
+      deletewarehousefunction(row){
+        postdeletewarehouse({id:row.id}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+							this.getList(
+              this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType
+            )
+						})
+      },
       handleClose(){
         this.dialogVisible=false
       },