소스 검색

WMS 页面优化-出、入库申请--新增详情页

乐菲 1 개월 전
부모
커밋
6fe37359cc
1개의 변경된 파일9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      src/views/rtkwms/inrequest/InRequestForm.vue

+ 9 - 4
src/views/rtkwms/inrequest/InRequestForm.vue

@@ -445,10 +445,15 @@ export default {
     "$route.query.id": {
       immediate: true,
       handler(newId) {
-        if (newId) {
-          this.initData(newId);
-        } else {
-          this.reset();
+        // 只有当前路由路径包含'/inStorageManage/in-request/InRequestForm'时才处理,避免标签跳转时错误调用API
+        if (
+          this.$route.path.includes("/inStorageManage/in-request/InRequestForm")
+        ) {
+          if (newId) {
+            this.initData(newId);
+          } else {
+            this.reset();
+          }
         }
       },
     },