瀏覽代碼

bug 修复

lilei 3 年之前
父節點
當前提交
96606a2385

+ 3 - 0
src/components/Table/index.js

@@ -148,6 +148,9 @@ export default {
     // 重置表格为空
     clearTable () {
       this.localLoading = false
+      this.needTotalList= []
+      this.selectedRows= []
+      this.selectedRowKeys= []
       this.localDataSource = []
       this.localPagination = Object.assign({}, {
         current: 1, pageSize: this.pageSize, total: 0

+ 2 - 0
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -237,6 +237,8 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 0
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -369,6 +369,8 @@ export default {
       })
       this.getProductType()
       this.getProductBrand()
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 0
src/views/productManagement/productLaunchAudit/list.vue

@@ -188,6 +188,8 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 0
src/views/productManagement/productOfflineAudit/list.vue

@@ -270,6 +270,8 @@ export default {
       })
       this.getProductBrand()
       this.getProductType()
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 0
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -270,6 +270,8 @@ export default {
       this.openModal = false
       this.openDetailModal = false
       this.itemSn = null
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 2 - 0
src/views/salesManagement/outboundOrder/list.vue

@@ -354,6 +354,8 @@ export default {
         _this.setTableH()
       })
       this.getArea('province')
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 5 - 9
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -156,6 +156,7 @@ export default {
               backStockQty: item.qty
             })
           })
+          console.log(obj)
           _this.submitCheck(obj)
         }
       })
@@ -185,10 +186,6 @@ export default {
         this.spinning = false
       })
     },
-    // 重置列表
-    resetForm () {
-      this.$refs.table.refresh(true)
-    },
     // 获取单据详细
     getOrderDetail () {
       salesReturnDetail({ sn: this.orderSn }).then(res => {
@@ -220,6 +217,8 @@ export default {
       })
       this.orderSn = this.$route.params.sn
       this.buyerSn = this.$route.params.buyerSn
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
       this.getOrderDetail()
     },
     setTableH () {
@@ -233,11 +232,8 @@ export default {
     }
   },
   activated () {
-    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
-    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.$refs.table.refresh(true)
-      this.pageInit()
-    }
+    this.$refs.table.refresh(true)
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {})

+ 3 - 0
src/views/salesManagement/waitDispatch/edit.vue

@@ -351,6 +351,9 @@ export default {
       })
     },
     pageInit () {
+      this.rowSelectionInfo = null
+      this.$refs.table.clearTable()
+      this.$refs.partQuery.clearTable()
       this.salesBillSn = this.$route.params.salesBillSn
       this.getOrderDetail()
       this.$refs.table.refresh(true)

+ 5 - 0
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -246,8 +246,13 @@ export default {
     pageInit (salesBillSn, detailData) {
       this.salesBillSn = salesBillSn
       this.detailData = detailData
+      this.$refs.table.clearSelected()
       this.resetSearchForm()
     },
+    clearTable () {
+      this.rowSelectionInfo = null
+      this.$refs.table.clearSelected()
+    },
     // 刷新当前页面
     resetCurForm () {
       this.$refs.table.clearSelected() // 清空表格选中项