Przeglądaj źródła

1、新增路由判断是否需要加锁和加锁单据类型
2、取消按钮加锁解锁,路由统一管理加锁和解锁

iggy 2 tygodni temu
rodzic
commit
288fd0d866

+ 28 - 88
JLHWEB/src/hooks/usePageRouter.ts

@@ -1,6 +1,5 @@
 import { inject, onMounted, onUnmounted } from "vue";
 import { useRoute, useRouter } from "vue-router";
-import { LockBill, UnLockBill } from "@/api/modules/common";
 
 /**
  * @description 路由器跳转封装
@@ -18,55 +17,24 @@ export const usePageRouter = () => {
    * @param path 路由地址
    * @param title K3显示的标题
    */
-  const pageOpen = (path: string, title?: string) => {
-    let pageid = window.location.href.split("pageid=")[1];
-    if (pageid) {
-      // let poststr = JSON.stringify({
-      //   pageid: pageid,
-      //   putdata: {
-      //     url: path,
-      //     title: getRouteTitle(path, title),
-      //     showType: "MainNewTabPage"
-      //   }
-      // });
-      // let _window = window as any;
-      // if (_window?.chrome?.webview) {
-      //   // 客户端
-      //   console.log("_window.chrome.webview.postMessage ", poststr, ";_window ", _window);
-      //   _window.chrome.webview.postMessage(poststr);
-      // } else if (window.top) {
-      //   // 浏览器
-      //   console.log("window.top.postMessage ", poststr, ";window ", window);
-      //   window.top.postMessage(poststr, "*");
-      // } else if (window.parent) {
-      //   // 一般不使用
-      //   console.log("window.parent.postMessage ", poststr, ";window ", window);
-      //   window.parent.postMessage(poststr, "*");
-      // } else {
-      //   // 一般不使用
-      //   console.log("window.postMessage ", poststr, ";window ", window);
-      //   window.postMessage(poststr, "*");
-      // }
+  const pageOpen = (
+    arg:
+      | string
+      | {
+          name: string;
+          params?: Record<string, any>;
+          query?: Record<string, any>;
+          replace?: boolean;
+        }
+  ) => {
+    if (typeof arg === "string") {
+      return router.push(arg);
     } else {
-      router.push(path);
+      const { name, params = {}, query = {} } = arg;
+      return router.push({ name, params, query });
     }
   };
 
-  const pageLockOpen = async (path: string, keyword: string, billid: number, billcode: string) => {
-    await LockBill({ keyword, billid, billcode });
-    router.push(path);
-  };
-
-  const pageLockRefresh = async (path: string, keyword: string, billid: number, billcode: string) => {
-    await LockBill({ keyword, billid, billcode });
-    router.replace(path);
-  };
-
-  const pageUnLockRefresh = async (path: string, keyword: string, billid: number, billcode: string) => {
-    await UnLockBill({ keyword, billid, billcode });
-    router.replace(path);
-  };
-
   /**
    * @description 页面关闭, 兼容:如果有pageid参数就postMessage给K3,由K3关闭
    * */
@@ -98,46 +66,21 @@ export const usePageRouter = () => {
    * @param path 路由地址
    * @param title K3显示的标题
    */
-  const pageRefresh = (path: string, title?: string) => {
-    let pageid = window.location.href.split("pageid=")[1];
-    if (pageid) {
-      // let poststr = JSON.stringify({
-      //   pageid: pageid,
-      //   putdata: {
-      //     url: path,
-      //     title: getRouteTitle(path, title),
-      //     showType: "InCurrentForm"
-      //   }
-      // });
-      // let _window = window as any;
-      // if (_window?.chrome?.webview) {
-      //   _window.chrome.webview.postMessage(poststr);
-      // } else {
-      //   window.top?.postMessage(poststr, "*");
-      // }
+  const pageRefresh = (
+    arg:
+      | string
+      | {
+          name: string;
+          params?: Record<string, any>;
+          query?: Record<string, any>;
+          replace?: boolean;
+        }
+  ) => {
+    if (typeof arg === "string") {
+      return router.replace(arg);
     } else {
-      router.replace(path);
-    }
-  };
-
-  /**
-   * @description 获取路由标题
-   * @param path 路由地址
-   * @param title 标题
-   */
-  const getRouteTitle = (path: string, title?: string) => {
-    if (title) return title;
-    const basePath = path.split("?")[0];
-    try {
-      const resolved = router.resolve(basePath);
-      if (resolved.matched.length === 0) return "";
-
-      // 获取最深层级的路由记录(支持嵌套路由)
-      const matchedRoute = resolved.matched[resolved.matched.length - 1];
-      return matchedRoute.meta?.title || "";
-    } catch (e) {
-      console.error("路由解析失败:", e);
-      return "";
+      const { name, params = {}, query = {} } = arg;
+      return router.replace({ name, params, query });
     }
   };
 
@@ -182,9 +125,6 @@ export const usePageRouter = () => {
     pageOpen,
     pageClose,
     pageRefresh,
-    pageLockOpen,
-    pageLockRefresh,
-    pageUnLockRefresh,
     useAutoMessageHandler
   };
 };

+ 34 - 7
JLHWEB/src/routers/index.ts

@@ -10,6 +10,7 @@ import { loading } from "@/utils/loading";
 
 import { useKeepAliveStore } from "@/stores/modules/keepAlive";
 import { storeToRefs } from "pinia";
+import { LockBill, UnLockBill } from "@/api/modules/common";
 
 /**
  * @description 📚 路由参数配置简介
@@ -41,10 +42,10 @@ router.beforeEach(async (to, from, next) => {
   const userStore = useUserStore();
   const authStore = useAuthStore();
 
-  const keepAliveStore = useKeepAliveStore();
-  const { keepAliveName } = storeToRefs(keepAliveStore);
+  // const keepAliveStore = useKeepAliveStore();
+  // const { keepAliveName } = storeToRefs(keepAliveStore);
 
-  console.log("keepAliveName :>> ", keepAliveName);
+  // console.log("keepAliveName :>> ", keepAliveName);
   console.log("to :>> ", to);
   console.log("from :>> ", from);
   // 1.NProgress 开始
@@ -85,15 +86,24 @@ router.beforeEach(async (to, from, next) => {
   // 7.存储 routerName 做按钮权限筛选
   authStore.setRouteName(to.name as string);
 
-  // 8.判断用户是否拥有权限,没有权限重定向到 403 页面
+  // 8.如果需要加锁的路由,进入时尝试加锁
+  if (to.meta.needLock && Number(to.params.id)) {
+    try {
+      await LockBill({ keyword: String(to.meta.billtype), billid: Number(to.params.id), billcode: String(to.params.code) });
+    } catch (err) {
+      return next(false);
+    }
+  }
+
+  // 9.判断用户是否拥有权限,没有权限重定向到 403 页面
   console.log("userStore.userInfo?.rsltFunids :>> ", to, userStore.userInfo?.rsltFunids);
   if (to.meta?.funid && userStore.userInfo?.rsltFunids && !userStore.userInfo?.rsltFunids.includes(Number(to.meta.funid))) {
     return next("/403");
   }
 
-  // 9.正常访问页面
+  // 10.正常访问页面
   next();
-  keepAliveStore.computedKeepAliveName(to, from);
+  // keepAliveStore.computedKeepAliveName(to, from);
 });
 
 /**
@@ -119,12 +129,29 @@ router.onError(error => {
 /**
  * @description 路由跳转结束
  * */
-router.afterEach(() => {
+router.afterEach(async (to, from) => {
   NProgress.done();
   if (window.existLoading) {
     // loading.hide();
     window.existLoading = false;
   }
+
+  // 2. 如果来源页面是需要加锁的,离开时解锁
+  if (from.meta.needLock && Number(from.params.id)) {
+    try {
+      await UnLockBill({
+        keyword: String(from.meta.billtype),
+        billid: Number(from.params.id),
+        billcode: String(from.params.code)
+      });
+    } catch (err) {
+      console.warn("解锁失败:", from.meta.billtype, from.params.id, err);
+    }
+  }
+
+  // 跳转完成后再更新 keepAlive
+  const keepAliveStore = useKeepAliveStore();
+  keepAliveStore.computedKeepAliveName(to, from);
 });
 
 export default router;

+ 2 - 0
JLHWEB/src/routers/modules/bednetQtuoteRouter.ts

@@ -94,6 +94,8 @@ export const bednetQtuoteRouter: Menu.MenuOptions[] = [
           isFull: false,
           isAffix: false,
           isKeepAlive: true,
+          needLock: true,
+          billtype: "BedNetQuote",
           funid: 62,
           activeMenu: "/bednetQuote"
         }

+ 2 - 0
JLHWEB/src/routers/modules/erpApiRouter.ts

@@ -92,6 +92,8 @@ export const erpApiRouter: Menu.MenuOptions[] = [
               isFull: false,
               isAffix: false,
               isKeepAlive: true,
+              needLock: true,
+              billtype: "MattressInterface",
               funid: 71,
               activeMenu: "/erpapi/mattressInterface"
             }

+ 2 - 0
JLHWEB/src/routers/modules/mattressQtuoteRouter.ts

@@ -94,6 +94,8 @@ export const mattressQtuoteRouter: Menu.MenuOptions[] = [
           isFull: false,
           isAffix: false,
           isKeepAlive: true,
+          needLock: true,
+          billtype: "MattressQuote",
           funid: 72,
           activeMenu: "/mattressQuote"
         }

+ 2 - 0
JLHWEB/src/routers/modules/softbedQuoteRouter.ts

@@ -62,6 +62,8 @@ export const softbedQuoteRouter: Menu.MenuOptions[] = [
           isFull: false,
           isAffix: false,
           isKeepAlive: true,
+          needLock: true,
+          billtype: "SoftBedQuote",
           funid: 152,
           activeMenu: "/softbedQuote"
         }

+ 8 - 0
JLHWEB/src/typings/global.d.ts

@@ -39,6 +39,14 @@ declare namespace Menu {
      * @description 是否以el-menu-item-group的形式渲染
      */
     isGroup?: boolean;
+    /**
+     * @description 页面是否需要加锁
+     */
+    needLock?: boolean;
+    /**
+     * @description 页面加锁类型
+     */
+    billtype?: string;
   }
 }
 

+ 7 - 8
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -110,7 +110,6 @@ import InsterMxDialog from "./components/insterMx.vue";
 import InsterPzDialog from "./components/insterPz.vue";
 import { SaveMattressAuditing } from "@/api/modules/quote";
 import { usePageRouter } from "@/hooks/usePageRouter";
-import { LockBill, UnLockBill } from "@/api/modules/common";
 
 interface detailProp {
   /**
@@ -181,6 +180,7 @@ const {
   CodeMxDialogRef
 } = useHooks(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+const { pageOpen, pageRefresh } = usePageRouter();
 
 const initParams = ref({ mattressid: 0 as Number });
 
@@ -688,11 +688,11 @@ const orderDefaultAction = [
       //   `/erpapi/mattressInterface/detail?id=${LjDetailRef.value?._mainData.mattressid}&code=${LjDetailRef.value?._mainData.mattresscode}`
       // );
       const _cur = mainData.value[0];
-      await UnLockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
-      router.push({
+      pageRefresh({
         name: "mattressInterfaceDetail",
         params: {
-          id: _cur.mattressid
+          id: _cur.mattressid,
+          code: _cur.mattresscode
         },
         query: {
           code: _cur.mattresscode
@@ -1280,14 +1280,13 @@ const orderDefaultAction = [
 const routeToEdit = async (type: any) => {
   console.log("routeToEdit mainData :>> ", mainData, route.fullPath);
   const _cur = mainData.value[0];
-
-  await LockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
   // router.replace(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
 
-  router.push({
+  pageOpen({
     name: "mattressInterfaceEditYw",
     params: {
-      id: _cur.mattressid
+      id: _cur.mattressid,
+      code: _cur.mattresscode
     },
     query: {
       code: _cur.mattresscode,

+ 17 - 4
JLHWEB/src/views/erpapi/mattressInterface/index.vue

@@ -44,7 +44,7 @@ import { detailAction } from "@/components/LjDetail/interface";
 import mittBus from "@/utils/mittBus";
 import { MittEnum } from "@/enums/mittEnum";
 import { getCurrentRecords } from "@/utils/index";
-import { LockBill } from "@/api/modules/common";
+import { usePageRouter } from "@/hooks/usePageRouter";
 
 const { t } = useI18n();
 const router = useRouter();
@@ -52,6 +52,7 @@ const globalStore = useGlobalStore();
 const { initParams, columns, toCreateMtrl, toCreateORDelMtrlPf, YWAudit, JSAudit, JS2Audit } = useHooks(t);
 // const { toExcelQuote } = useHooksCpQuote();
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+const { pageOpen } = usePageRouter();
 
 const dialogVisible = ref(false);
 const vxeTableRef = ref();
@@ -327,7 +328,6 @@ const routeToEdit = async type => {
   }
 
   const _cur = curRecords[curRecords.length - 1];
-  await LockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
   // router.push(`/erpapi/mattressInterface/${type}/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}&type=${type}`);
 
   try {
@@ -349,13 +349,26 @@ const routeToEdit = async type => {
     return false;
   }
 
-  router.push({
-    path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,
+  pageOpen({
+    name: "mattressInterfaceEditYw",
+    params: {
+      id: _cur.mattressid,
+      code: _cur.mattresscode
+    },
     query: {
       code: _cur.mattresscode,
       type: type
     }
   });
+
+  // router.push({
+  //   path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,
+  //   query: {
+  //     id: _cur.mattressid,
+  //     code: _cur.mattresscode,
+  //     type: type
+  //   }
+  // });
 };
 
 /**

+ 23 - 13
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -193,7 +193,7 @@ const {
 } = useHooks(t, props);
 
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
+const { pageRefresh } = usePageRouter();
 // const toast = useToast();
 
 // const orderStatus = ref("");
@@ -367,12 +367,17 @@ const orderDefaultAction: detailAction[] = [
           // router.replace(
           //   `/bednetQuote/detail?id=${LjDetailRef.value._mainData.bednetid}&code=${LjDetailRef.value._mainData.bednetcode}`
           // );
-          pageUnLockRefresh(
-            `/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`,
-            "BedNetQuote",
-            LjDetailRef.value._mainData.bednetid,
-            LjDetailRef.value._mainData.bednetcode
-          );
+          pageRefresh({
+            name: "bednetQuoteEdit",
+            params: {
+              id: LjDetailRef.value._mainData.bednetid,
+              code: LjDetailRef.value._mainData.bednetcode
+            },
+            query: {
+              id: LjDetailRef.value._mainData.bednetid,
+              code: LjDetailRef.value._mainData.bednetcode
+            }
+          });
         }
       }
     }
@@ -516,12 +521,17 @@ const orderDefaultAction: detailAction[] = [
     },
     clickFunc: item => {
       // tabRemove(route.fullPath);
-      pageLockRefresh(
-        `/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`,
-        "BedNetQuote",
-        LjDetailRef.value._mainData.bednetid,
-        LjDetailRef.value._mainData.bednetcode
-      );
+      pageRefresh({
+        name: "bednetQuoteEdit",
+        params: {
+          id: LjDetailRef.value._mainData.bednetid,
+          code: LjDetailRef.value._mainData.bednetcode
+        },
+        query: {
+          id: LjDetailRef.value._mainData.bednetid,
+          code: LjDetailRef.value._mainData.bednetcode
+        }
+      });
       // router.replace(`/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`);
     }
   }),

+ 23 - 13
JLHWEB/src/views/quote/mattressQuote/detail.vue

@@ -856,7 +856,7 @@ const router = useRouter();
 const globalStore = useGlobalStore();
 // const { isShowOriginFormulaMattress } = storeToRefs(globalStore);
 const ifcopy = ref(false);
-const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
+const { pageRefresh } = usePageRouter();
 
 const showOriginFormulaMattress = (value: any) => {
   globalStore.setGlobalState("isShowOriginFormulaMattress", Boolean(value));
@@ -2104,12 +2104,17 @@ const orderDefaultAction = [
         // router.replace(
         //   `/mattressQuote/detail?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`
         // );
-        pageUnLockRefresh(
-          `/mattressQuote/detail?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`,
-          "MattressQuote",
-          LjDetailRef.value._mainData.mattressid,
-          LjDetailRef.value._mainData.mattresscode
-        );
+        pageRefresh({
+          name: "mattressQuoteEdit",
+          params: {
+            id: LjDetailRef.value._mainData.mattressid,
+            code: LjDetailRef.value._mainData.mattresscode
+          },
+          query: {
+            id: LjDetailRef.value._mainData.mattressid,
+            code: LjDetailRef.value._mainData.mattresscode
+          }
+        });
       }
     }
   }),
@@ -2155,12 +2160,17 @@ const orderDefaultAction = [
       return "";
     },
     clickFunc: item => {
-      pageLockRefresh(
-        `/mattressQuote/edit?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`,
-        "MattressQuote",
-        LjDetailRef.value._mainData.mattressid,
-        LjDetailRef.value._mainData.mattresscode
-      );
+      pageRefresh({
+        name: "mattressQuoteEdit",
+        params: {
+          id: LjDetailRef.value._mainData.mattressid,
+          code: LjDetailRef.value._mainData.mattresscode
+        },
+        query: {
+          id: LjDetailRef.value._mainData.mattressid,
+          code: LjDetailRef.value._mainData.mattresscode
+        }
+      });
       // router.replace(
       //   `/mattressQuote/edit?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`
       // );

+ 16 - 5
JLHWEB/src/views/quote/mattressQuote/hooks/index.tsx

@@ -30,7 +30,7 @@ import ToastHistoryPrice from "@/components/ToastWidget/HistoryPrice/index.vue";
 import { useRouter } from "vue-router";
 import { useGlobalStore } from "@/stores/modules/global";
 import { storeToRefs } from "pinia";
-import { LockBill } from "@/api/modules/common";
+import { usePageRouter } from "@/hooks/usePageRouter";
 // import { title } from "process";
 
 interface defaultState {
@@ -6055,15 +6055,26 @@ export const useHooks = (t?: any) => {
       return false;
     }
 
-    await LockBill({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
-
-    router.push({
-      path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,
+    const { pageOpen } = usePageRouter();
+    pageOpen({
+      name: "mattressInterfaceEditYw",
+      params: {
+        id: _cur.mattressid,
+        code: _cur.mattresscode
+      },
       query: {
         code: _cur.mattresscode,
         type: type
       }
     });
+    // router.push({
+    //   path: `/erpapi/mattressInterface/edit/${_cur.mattressid}`,
+    //   query: {
+    //     id: _cur.mattressid,
+    //     code: _cur.mattresscode,
+    //     type: type
+    //   }
+    // });
   };
 
   /**

+ 12 - 7
JLHWEB/src/views/quote/mattressQuote/index.vue

@@ -150,7 +150,7 @@ const {
 const { toExcelQuote, toExcelQuoteNew } = useHooksCpQuote();
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
 const { userInfo } = useUserStore();
-const { pageLockRefresh, pageLockOpen } = usePageRouter();
+const { pageOpen } = usePageRouter();
 
 // const initParams = ref({});
 const dialogVisible = ref(false);
@@ -453,12 +453,17 @@ const action: detailAction[] = [
         return;
       }
 
-      pageLockOpen(
-        `/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`,
-        "MattressQuote",
-        _cur.mattressid,
-        _cur.mattresscode
-      );
+      pageOpen({
+        name: "mattressQuoteEdit",
+        params: {
+          id: _cur.mattressid,
+          code: _cur.mattresscode
+        },
+        query: {
+          id: _cur.mattressid,
+          code: _cur.mattresscode
+        }
+      });
       // router.push(`/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`);
     }
   }),

+ 24 - 15
JLHWEB/src/views/quote/softbedQuote/detail.vue

@@ -147,7 +147,7 @@ const {
   GetSoftBedFormulaMapper
 } = useHooks(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
+const { pageRefresh } = usePageRouter();
 
 const initParams = ref({ billid: 0 as Number });
 
@@ -276,18 +276,22 @@ const orderDefaultAction = [
     clickFunc: item => {
       if (route.path.indexOf("/new") > -1) {
         tabRemove(route.fullPath);
-        router.replace("/softbedQuote");
+        pageRefresh({ name: "softbedQuoteEdit" });
       } else {
         // router.replace(
         //   `/softbedQuote/detail?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
         // );
-
-        pageUnLockRefresh(
-          `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`,
-          "SoftBedQuote",
-          LjDetailRef.value._mainData.softbed_id,
-          LjDetailRef.value._mainData.softbed_code
-        );
+        pageRefresh({
+          name: "softbedQuoteEdit",
+          params: {
+            id: LjDetailRef.value._mainData.softbed_id,
+            code: LjDetailRef.value._mainData.softbed_code
+          },
+          query: {
+            id: LjDetailRef.value._mainData.softbed_id,
+            code: LjDetailRef.value._mainData.softbed_code
+          }
+        });
       }
     }
   }),
@@ -335,12 +339,17 @@ const orderDefaultAction = [
       return "";
     },
     clickFunc: item => {
-      pageLockRefresh(
-        `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`,
-        "SoftBedQuote",
-        LjDetailRef.value._mainData.softbed_id,
-        LjDetailRef.value._mainData.softbed_code
-      );
+      pageRefresh({
+        name: "softbedQuoteEdit",
+        params: {
+          id: LjDetailRef.value._mainData.softbed_id,
+          code: LjDetailRef.value._mainData.softbed_code
+        },
+        query: {
+          id: LjDetailRef.value._mainData.softbed_id,
+          code: LjDetailRef.value._mainData.softbed_code
+        }
+      });
       // router.replace(
       //   `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
       // );

+ 12 - 8
JLHWEB/src/views/quote/softbedQuote/index.vue

@@ -46,7 +46,7 @@ const globalStore = useGlobalStore();
 const { columns, orderStatus, VxeTableRef, initParams, onAudit, onCAudit, onDelete, onShowFormula } = useHooks(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
 const { userInfo } = useUserStore();
-const { pageLockOpen } = usePageRouter();
+const { pageOpen } = usePageRouter();
 
 const showHeadboard = ref(true);
 const showNightstand = ref(true);
@@ -144,13 +144,17 @@ const action: detailAction[] = [
         ElMessage.warning("单据已审核,不能修改");
         return;
       }
-
-      pageLockOpen(
-        `/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`,
-        "SoftBedQuote",
-        _cur.softbed_id,
-        _cur.softbed_code
-      );
+      pageOpen({
+        name: "softbedQuoteEdit",
+        params: {
+          id: _cur.softbed_id,
+          code: _cur.softbed_code
+        },
+        query: {
+          id: _cur.softbed_id,
+          code: _cur.softbed_code
+        }
+      });
       // router.push(`/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`);
     }
   }),