Ver Fonte

修改bug

chenrui há 2 anos atrás
pai
commit
eb38a37f9c

+ 19 - 2
src/views/purchasingManagement/purchaseReturn/purchaseReturnDeatil.vue

@@ -143,7 +143,8 @@ import {
   sparePartsReturnDetailDelete,
   sparePartsReturnDetailSave,
   sparePartsReturnSubmit,
-  sparePartsReturnInfo
+  sparePartsReturnInfo,
+  sparePartsReturnDetailSaveBatch
 } from '@/api/sparePartsReturn'
 import { toFixedDecimal } from '@/libs/tools.js'
 export default {
@@ -343,7 +344,7 @@ export default {
         }
         ajax_data.push(obj)
       })
-      this.saveEdit(ajax_data)
+      this.saveMore(ajax_data)
     },
     saveEdit (params) {
       this.spinning = true
@@ -361,6 +362,22 @@ export default {
           this.isInster = false
         })
     },
+    saveMore (params) {
+      this.spinning = true
+      sparePartsReturnDetailSaveBatch(params)
+        .then(res => {
+          if (res.status == 200) {
+            this.getStatisticsData()
+            this.resetSearchForm(true)
+          }
+          this.isInster = false
+          this.spinning = false
+          this.addMoreLoading = false
+        })
+        .catch(err => {
+          this.isInster = false
+        })
+    },
     beforeSubmit () {
       if (this.chooseList.length > 0) {
         this.openDepartUserModal = true