Browse Source

批量取消

lilei 4 years ago
parent
commit
8de482ec82
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/views/salesManagement/waitDispatch/edit.vue

+ 12 - 2
src/views/salesManagement/waitDispatch/edit.vue

@@ -110,7 +110,7 @@
 import { STable, VSelect } from '@/components'
 import queryPart from './queryPart.vue'
 import { salesDetailBySn } from '@/api/sales'
-import { salesDetailDispatchByOneKey, insertBatchOfWaitDispatch } from '@/api/salesDetail'
+import { salesDetailDispatchByOneKey, insertBatchOfWaitDispatch, salesDetailUpdateCancelQty } from '@/api/salesDetail'
 import EditableCell from '@/views/common/editInput.js'
 import { deleteBatch, pushDown, queryCount, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
 export default {
@@ -277,8 +277,18 @@ export default {
       })
     },
     // 批量取消产品
-    cancelProduct (row) {
+    cancelProduct (list) {
       // 防止多次添加产品
+      this.$message.loading('正在批量取消产品...', 1)
+      this.isInster = true
+      salesDetailUpdateCancelQty(list).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+          this.$refs.partQuery.resetCurForm()
+          this.$message.success(res.message, 2.5)
+        }
+        this.isInster = false
+      })
     },
     // 一键下推
     oneDispatch () {