瀏覽代碼

出库记录 退回功能完成

zhongtianhaoyuan 3 年之前
父節點
當前提交
32173094c0

+ 3 - 0
src/api/V2/outboundManagement/index.js

@@ -40,3 +40,6 @@ export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks
 export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
 // 换仓
 export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
+// 退回
+export const API_POST_GO_BACK = `/weighingManagement/api/outWeightReturn`
+

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

@@ -22,7 +22,8 @@ import {
     API_POST_COLLECTION_MONEY,
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
     API_POST_NEW_SUBMIT,
-    API_POST_CHANE_NO
+    API_POST_CHANE_NO,
+    API_POST_GO_BACK
 }   from '@/api/V2/outboundManagement'
 
   //质检列表
@@ -66,4 +67,6 @@ export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatche
 //新检斤保存
 export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
 // 换仓
-export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)
+// 退回
+export const goBack = appRx.post(API_POST_GO_BACK, errorCatcher, errorHandle, filter)

+ 15 - 1
src/views/outboundManagement/weighingManagementrecord.vue

@@ -76,6 +76,7 @@
           <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
             v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
              <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
+             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="returnBack(scope.row)" v-if="scope.row.status == '已称毛重'">退回</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -132,7 +133,8 @@
     selectWarehouseSelf,
     delelteWeighing,
     getweighing,
-    changeNo
+    changeNo,
+    goBack
   } from '@/model/outboundManagement/index'
   import {
     EventBus
@@ -183,6 +185,18 @@
       this.showType = this.isShow
     },
     methods: {
+      returnBack(item){   
+          goBack({id:item.id}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '退回成功',
+                })
+                this.getList()
+						}) .catch(() => {
+            return false
+          })
+      },
        binNumberChange(e){
         this.binNumber = e
         for(let i = 0 ; i < this.binnumberList.length ; i++){