浏览代码

bug 修复

lilei 3 年之前
父节点
当前提交
5e9cd9237b
共有 1 个文件被更改,包括 9 次插入12 次删除
  1. 9 12
      src/views/allocationManagement/transferOut/edit.vue

+ 9 - 12
src/views/allocationManagement/transferOut/edit.vue

@@ -397,6 +397,7 @@ export default {
           this.$message.success(res.message)
           if (isRefresh != 'noRefresh') {
             this.$refs.table.refresh()
+            this.getDetailCount()
           }
           this.$refs.chooseTable.refresh()
           this.spinning = false
@@ -415,27 +416,17 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
-            _this.spinning = true
             allocateBillDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-                _this.$refs.chooseTable.refresh()
-                _this.spinning = false
-              } else {
-                _this.spinning = false
+                _this.refashPage()
               }
             })
           } else { //  单个删除
-            _this.spinning = true
             allocateBillDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
-                _this.$refs.chooseTable.refresh()
-                _this.spinning = false
-              } else {
-                _this.spinning = false
+                _this.refashPage()
               }
             })
           }
@@ -550,6 +541,12 @@ export default {
         window.frames['printftoe'].print()
       }
     },
+    // 刷新当前页面
+    refashPage () {
+      this.$refs.table.refresh()
+      this.$refs.chooseTable.refresh()
+      this.getDetailCount()
+    },
     pageInit () {
       if (!this.spinning) {
         this.getDetail()