瀏覽代碼

前端刷新问题 sdy

zhongtianhaoyuan 3 年之前
父節點
當前提交
f3f822edcd

+ 8 - 3
src/views/houseSelfCollect/inspectionManagement.vue

@@ -144,7 +144,7 @@ export default {
     }
   },
   activated() {
-    this.getList()
+    this.selectWarehouse()
   },
   methods: {
     find() {
@@ -214,8 +214,8 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
-      selectWarehouseSelf({
+    selectWarehouse(){
+       selectWarehouseSelf({
         compId: sessionStorage.getItem('ws-pf_compId'),
         personCharge: sessionStorage.getItem('ws-pf_staffName'),
       })
@@ -237,9 +237,14 @@ export default {
             this.warehouseNo =  this.warehouseList[0].No
             this.cangid =  this.warehouseList[0].id
             this.purchasePriceList =  this.warehouseList[0].purchasePriceList
+            this.getList()
           }
         })
 
+    },
+    getList() {
+     
+
       getinspectList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,

+ 9 - 7
src/views/houseSelfCollect/weighingManagement.vue

@@ -159,7 +159,8 @@ export default {
     }
   },
   activated() {
-    this.getList()
+    this.selectWarehouse()
+   
   },
   methods: {
     print(row) {
@@ -223,7 +224,7 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
+    selectWarehouse(){
       selectWarehouseSelf({
         compId: sessionStorage.getItem('ws-pf_compId'),
         personCharge: sessionStorage.getItem('ws-pf_staffName'),
@@ -241,8 +242,12 @@ export default {
           this.warehouseName = this.warehouseList[0].value
           this.warehouseId = this.warehouseList[0].warehouseId
           this.purchasePriceList = this.warehouseList[0].warehouseList
+         this.getList()
+          
         })
-      getweighingList({
+    },
+    getList() {
+          getweighingList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
@@ -251,16 +256,13 @@ export default {
       })
         .toPromise()
         .then((response) => {
-          // this.$notify.success({
-          //   title: '成功',
-          //   message: '删除成功',
-          // })
           this.weighingList = response.records
           this.deptBudgetTotal = response.total
         })
         .catch((response) => {
           // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
         })
+      
     },
   },
 }