Browse Source

bug修复

chenrui 4 years ago
parent
commit
8c1a235015
1 changed files with 10 additions and 2 deletions
  1. 10 2
      src/views/salesManagement/waitDispatch/edit.vue

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

@@ -243,9 +243,10 @@ export default {
       }
       const obj = []
       _this.selectedRows.map(item => {
-        obj.push(item.dispatchBillDetailSn)
+        if (_this.selectedRowKeys.indexOf(item.id) != -1) {
+          obj.push(item.dispatchBillDetailSn)
+        }
       })
-
       this.$confirm({
         title: '提示',
         content: '确认要批量删除吗?',
@@ -277,6 +278,13 @@ export default {
         if (res.status == 200) {
           _this.resetSearchForm(true)
           _this.$refs.partQuery.resetCurForm()
+          if (type == 1) { //  批量操作
+            _this.selectedRowKeys = []
+            _this.selectedRows = []
+          } else if (type == 0) { //  单条
+            const ind = _this.selectedRowKeys.findIndex(item => item == row.id)
+            _this.selectedRowKeys.splice(ind, 1)
+          }
           _this.$message.success(res.message)
         }
         _this.delLoading = false