瀏覽代碼

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();
+          }
         }
       },
     },