Browse Source

Merge branch 'deploy_0804' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into deploy_0804

chenrui 3 năm trước cách đây
mục cha
commit
be66872213

+ 12 - 8
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -518,20 +518,24 @@ export default {
         window.frames['printf'].focus()
         window.frames['printf'].print()
       }
+    },
+    pageInit () {
+      this.getDetail()
+      this.getWarehouseList()
+      if (!this.disabled) {
+        this.resetSearchForm()
+      }
+      if (!this.chooseDisabled) {
+        this.chooseResetSearchForm()
+      }
     }
   },
   mounted () {
-    this.getDetail()
-    this.getWarehouseList()
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.getWarehouseList()
-        vm.resetSearchForm()
-        vm.chooseResetSearchForm()
-      }
+      vm.pageInit()
     })
   }
 }

+ 14 - 12
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -506,24 +506,26 @@ export default {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
+    },
+    pageInit () {
+      this.getDetail()
+      this.getWarehouseList()
+      this.getProductBrand()
+      this.getProductType()
+      if (!this.disabled) {
+        this.resetSearchForm()
+      }
+      if (!this.chooseDisabled) {
+        this.chooseResetSearchForm()
+      }
     }
   },
   mounted () {
-    this.getDetail()
-    this.getWarehouseList()
-    this.getProductBrand()
-    this.getProductType()
+    this.pageInit()
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.getWarehouseList()
-        vm.getProductBrand()
-        vm.getProductType()
-        vm.resetSearchForm()
-        vm.chooseResetSearchForm()
-      }
+      vm.pageInit()
     })
   }
 }