ソースを参照

1、修复修改已上锁单据仍然会添加修改页问题

MY 1 週間 前
コミット
8c5ee4df8e
1 ファイル変更3 行追加0 行削除
  1. 3 0
      JLHWEB/src/routers/index.ts

+ 3 - 0
JLHWEB/src/routers/index.ts

@@ -91,6 +91,7 @@ router.beforeEach(async (to, from, next) => {
     try {
       await LockBill({ keyword: String(to.meta.billtype), billid: Number(to.query.id), billcode: String(to.query.code) });
     } catch (err) {
+      to.meta.aborted = true;
       return next(false);
     }
   }
@@ -149,6 +150,8 @@ router.afterEach(async (to, from) => {
     }
   }
 
+  if (to.meta.aborted) return;
+
   // 跳转完成后再更新 keepAlive
   const keepAliveStore = useKeepAliveStore();
   keepAliveStore.computedKeepAliveName(to, from);