ソースを参照

【注释】 activated 钩子

Howie 3 年 前
コミット
088d95eaa1

+ 0 - 8
src/views/basic_data/material/material_list.vue

@@ -223,14 +223,6 @@ export default {
       },
     };
   },
-    activated() {
-    // 页面重回
-    console.log(545);
-},
-deactivated() {
-    // 页面离开
-      console.log(777878);
-},
   methods: {
     hanleDetail(id) {
       getMaterialDetail({ id }).then((res) => {

+ 50 - 25
src/views/finance/standbook_list.vue

@@ -453,36 +453,61 @@ export default {
       }
     });
   },
-  activated() {
+  // activated() {
 
-    // 钱包余额页跳转过来
-    if (this.$route.query && this.$route.query.status){
+  //   // 钱包余额页跳转过来
+  //   if (this.$route.query && this.$route.query.status){
 
-      this.bill = this.$route.query.status
-      this.changeFn(this.bill)
-      //只有是从A进到B页面才执行
-        // 将要执行的逻辑
-        this.isShow = true;
-        this.isDisabled = true;
-        this.searchForm.customerId = this.$route.query.customerId;
-        this.changeFn(this.$route.query.customerId);
-        this.getDataList({
-          pageSize: this.pageSize,
-          pageNum: this.currentPage,
-          type: this.bill,
-          customerName: this.$route.query.customerName,
-          customerNumber: this.$route.query.customerNumber,
-        });
-        this.getAmountList({
-          type: this.bill,
-          customerName: this.$route.query.customerName,
-          customerNumber: this.$route.query.customerNumber,
-        });
-    }
+  //     this.bill = this.$route.query.status
+  //     this.changeFn(this.bill)
+  //     //只有是从A进到B页面才执行
+  //       // 将要执行的逻辑
+  //       this.isShow = true;
+  //       this.isDisabled = true;
+  //       this.searchForm.customerId = this.$route.query.customerId;
+  //       this.changeFn(this.$route.query.customerId);
+  //       this.getDataList({
+  //         pageSize: this.pageSize,
+  //         pageNum: this.currentPage,
+  //         type: this.bill,
+  //         customerName: this.$route.query.customerName,
+  //         customerNumber: this.$route.query.customerNumber,
+  //       });
+  //       this.getAmountList({
+  //         type: this.bill,
+  //         customerName: this.$route.query.customerName,
+  //         customerNumber: this.$route.query.customerNumber,
+  //       });
+  //   }
 
-  },
+  // },
   created() {
 
+
+    if (this.$route.query && this.$route.query.status){
+
+this.bill = this.$route.query.status
+this.changeFn(this.bill)
+//只有是从A进到B页面才执行
+  // 将要执行的逻辑
+  this.isShow = true;
+  this.isDisabled = true;
+  this.searchForm.customerId = this.$route.query.customerId;
+  this.changeFn(this.$route.query.customerId);
+  this.getDataList({
+    pageSize: this.pageSize,
+    pageNum: this.currentPage,
+    type: this.bill,
+    customerName: this.$route.query.customerName,
+    customerNumber: this.$route.query.customerNumber,
+  });
+  this.getAmountList({
+    type: this.bill,
+    customerName: this.$route.query.customerName,
+    customerNumber: this.$route.query.customerNumber,
+  });
+}
+
     // console.log(
 
     //   this.customerId,

+ 10 - 4
src/views/supply/apply/apply_list.vue

@@ -450,16 +450,22 @@ export default {
     this.getSalesmanList();
     this.getList();
     this.getCategoryList();
-  },
-  activated() {
-      this.isShow = false
+    this.isShow = false
   if (this.$route.query && this.$route.query.isShow) {
     this.isShow = this.$route.query.isShow
 
       this.toReturnForm()
   }
+  },
+//   activated() {
+//       this.isShow = false
+//   if (this.$route.query && this.$route.query.isShow) {
+//     this.isShow = this.$route.query.isShow
+
+//       this.toReturnForm()
+//   }
 
-},
+// },
   methods: {
     // 获取业务员列表
     getSalesmanList() {

+ 5 - 1
src/views/supply/apply/components/apply_detail.vue

@@ -279,10 +279,14 @@ export default {
 
   created() {
     this.getDetail();
+ 
   },
-  activated(){
+  mounted() {
     this.initPrint()
   },
+  // activated(){
+  //   this.initPrint()
+  // },
   methods: {
     initPrint(){
       hiprint.init({

+ 3 - 3
src/views/supply/apply/components/engin_detail.vue

@@ -331,9 +331,9 @@ export default {
   mounted() {
     this.initPrint()
   },
-  activated(){
-    this.initPrint()
-  },
+  // activated(){
+  //   this.initPrint()
+  // },
   methods: {
     // 返回列表
     goBack() {

+ 8 - 3
src/views/supply/apply/engin_list.vue

@@ -469,15 +469,20 @@ export default {
     this.getSalesmanList();
     this.getList();
     this.getCategoryList();
-  },
-  activated() {
-    // keepAlice  activated 主要是从发货单汇总调用退货申请按钮
     this.isShow = false
     if(this.$route.query && this.$route.query.isShow){
       this.isShow = this.$route.query.isShow
         this.toReturnForm()
     }
   },
+  // activated() {
+  //   // keepAlice  activated 主要是从发货单汇总调用退货申请按钮
+  //   this.isShow = false
+  //   if(this.$route.query && this.$route.query.isShow){
+  //     this.isShow = this.$route.query.isShow
+  //       this.toReturnForm()
+  //   }
+  // },
   methods: {
     // 获取业务员列表
     getSalesmanList() {

+ 4 - 1
src/views/supply/deliver/components/commerce_detail.vue

@@ -285,7 +285,10 @@ export default {
       return type
     }
   },
-  activated(){
+  // activated(){
+  //   this.initPrint()
+  // },
+  mounted() {
     this.initPrint()
   },
   created() {

+ 4 - 1
src/views/supply/deliver/components/deliver_detail.vue

@@ -287,7 +287,10 @@ export default {
       return type
     }
   },
-  activated(){
+  // activated(){
+  //   this.initPrint()
+  // },
+  mounted() {
     this.initPrint()
   },
   created() {

+ 4 - 1
src/views/supply/deliver/components/home_detail.vue

@@ -286,7 +286,10 @@ export default {
       return type
     }
   },
-  activated(){
+  // activated(){
+  //   this.initPrint()
+  // },
+  mounted() {
     this.initPrint()
   },
   created() {

+ 4 - 1
src/views/supply/deliver/sum_list.vue

@@ -500,7 +500,10 @@ export default {
     this.getCategoryList();
     this.getList();
   },
-  activated() {
+  // activated() {
+  //   this.initPrint()
+  // },
+  mounted() {
     this.initPrint()
   },
   methods: {

+ 4 - 1
src/views/supply/pickup/check.vue

@@ -369,7 +369,10 @@ export default {
     // this.getDealerList()
     this.getWarehouseList()
   },
-  activated(){
+  // activated(){
+  //   this.initPrint()
+  // },
+  mounted() {
     this.initPrint()
   },
   methods: {