lilei 2 роки тому
батько
коміт
80565ac802

+ 15 - 11
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -157,7 +157,8 @@ export default {
       openModal: false,
       localDataSource: [],
       nowPrintType: '', //  当前打印类型
-      openExcelModal: false
+      openExcelModal: false,
+      fromRouter: null
     }
   },
   computed: {
@@ -185,15 +186,16 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      if (this.$route.params.type == 'pushOrder') { // 下推
-        this.$router.push({ path: '/salesManagement/pushOrderManagement/list', query: { closeLastOldTab: true } })
-      } else if (this.$route.params.type == 'examineVerify') { // 备货审核
-        this.$router.push({ path: '/salesManagement/examineVerify/list', query: { closeLastOldTab: true } })
-      } else if (this.$route.params.type == 'financialCollection') { // 财务收款
-        this.$router.push({ path: '/financialManagement/financialCollection/list', query: { closeLastOldTab: true } })
-      } else if (this.$route.params.type == 'salesCollection') { // 销售收款
-        this.$router.push({ path: '/salesManagement/salesCollection/list', query: { closeLastOldTab: true } })
-      }
+      // if (this.$route.params.type == 'pushOrder') { // 下推
+      //   this.$router.push({ path: '/salesManagement/pushOrderManagement/list', query: { closeLastOldTab: true } })
+      // } else if (this.$route.params.type == 'examineVerify') { // 备货审核
+      //   this.$router.push({ path: '/salesManagement/examineVerify/list', query: { closeLastOldTab: true } })
+      // } else if (this.$route.params.type == 'financialCollection') { // 财务收款
+      //   this.$router.push({ path: '/financialManagement/financialCollection/list', query: { closeLastOldTab: true } })
+      // } else if (this.$route.params.type == 'salesCollection') { // 销售收款
+      //   this.$router.push({ path: '/salesManagement/salesCollection/list', query: { closeLastOldTab: true } })
+      // }
+      this.$router.push({ name: this.fromRouter ? this.fromRouter.name : 'pushOrderManagementList' })
     },
     //  详情
     getDetail () {
@@ -252,7 +254,9 @@ export default {
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      vm.fromRouter = from
+    })
   }
 }
 </script>

+ 15 - 11
src/views/salesManagement/salesQuery/detail.vue

@@ -258,7 +258,8 @@ export default {
       auditInfo: null,
       spinningAudit: false,
       outStockStr: '', // 缺货产品信息说明
-      auditText: null
+      auditText: null,
+      fromRouter: null
     }
   },
   computed: {
@@ -312,15 +313,16 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      if (this.$route.params.type == 'pushOrder') { // 下推
-        this.$router.push({ path: '/salesManagement/pushOrderManagement/list', query: { closeLastOldTab: true } })
-      } else if (this.$route.params.type == 'financialCollection') { // 财务收款
-        this.$router.push({ path: '/financialManagement/financialCollection/list', query: { closeLastOldTab: true } })
-      } else if (this.$route.params.type == 'salesCollection') { // 销售收款
-        this.$router.push({ path: '/salesManagement/salesCollection/list', query: { closeLastOldTab: true } })
-      } else {
-        this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
-      }
+      // if (this.$route.params.type == 'pushOrder') { // 下推
+      //   this.$router.push({ path: '/salesManagement/pushOrderManagement/list', query: { closeLastOldTab: true } })
+      // } else if (this.$route.params.type == 'financialCollection') { // 财务收款
+      //   this.$router.push({ path: '/financialManagement/financialCollection/list', query: { closeLastOldTab: true } })
+      // } else if (this.$route.params.type == 'salesCollection') { // 销售收款
+      //   this.$router.push({ path: '/salesManagement/salesCollection/list', query: { closeLastOldTab: true } })
+      // } else {
+      //   this.$router.push({ path: '/salesManagement/salesQuery/list', query: { closeLastOldTab: true } })
+      // }
+      this.$router.push({ name: this.fromRouter ? this.fromRouter.name : 'salesQueryList' })
     },
     // 编辑
     handleEdit () {
@@ -430,7 +432,9 @@ export default {
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      vm.fromRouter = from
+    })
   }
 }
 </script>