Browse Source

1、新增ILJTokenRequest,ILJLockRequest请求拦截接口
2、优化上锁,解锁逻辑

MY 2 weeks ago
parent
commit
b5ec6fe467

+ 0 - 37
JLHHJSvr/Com/CheckTableIsLock.cs

@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using JLHHJSvr.Com.Model;
-using LJLib.Net.SPI.Com;
-
-namespace JLHHJSvr.Com
-{
-    public sealed class CheckTableIsLockRequest : ILJRequest<CheckTableIsLockResponse>
-    {
-        public override string GetApiName()
-        {
-            return "CheckTableIsLock";
-        }
-        /// <summary>
-        /// 登录token
-        /// </summary>
-        public string token { get; set; }
-        /// <summary>
-        /// 单据关键字
-        /// </summary>
-        public string keyword { get; set; }
-        /// <summary>
-        /// 单据相关id
-        /// </summary>
-        public int billid { get; set; }
-        /// <summary>
-        /// 单据相关编码
-        /// </summary>
-        public string billcode { get; set; }
-    }
-
-    public sealed class CheckTableIsLockResponse : LJResponse
-    {
-    }
-}

+ 1 - 2
JLHHJSvr/Com/CreatMtrldef.cs

@@ -7,13 +7,12 @@ using LJLib.Net.SPI.Com;
 
 namespace JLHHJSvr.Com
 {
-    public sealed class CreatMtrldefRequest : ILJRequest<CreatMtrldefResponse>
+    public sealed class CreatMtrldefRequest : ILJTokenRequest<CreatMtrldefResponse>
     {
         public override string GetApiName()
         {
             return "CreatMtrldef";
         }
-        public string token { get; set; }
         public List<int> list { get; set; }
     }
 

+ 1 - 6
JLHHJSvr/Com/LockTable.cs

@@ -7,17 +7,12 @@ using LJLib.Net.SPI.Com;
 
 namespace JLHHJSvr.Com
 {
-    public sealed class LockTableRequest : ILJRequest<LockTableResponse>
+    public sealed class LockTableRequest : ILJLockRequest<LockTableResponse>
     {
         public override string GetApiName()
         {
             return "LockTable";
         }
-        /// <summary>
-        /// 登录token
-        /// </summary>
-        public string token { get; set; }
-        public List<u_lock_table> lockList { get; set; }
     }
 
     public sealed class LockTableResponse : LJResponse

+ 0 - 54
JLHHJSvr/Excutor/CheckTableIsLockExcutor.cs

@@ -1,54 +0,0 @@
-using System;
-using System.Data.SqlClient;
-using System.Linq;
-using System.Threading;
-using JLHHJSvr.BLL;
-using JLHHJSvr.Com;
-using JLHHJSvr.Com.Model;
-using JLHHJSvr.Helper;
-using JLHHJSvr.LJException;
-using LJLib.DAL.SQL;
-using LJLib.Net.SPI.Server;
-using LJLib.SQLEX;
-
-namespace JLHHJSvr.Excutor
-{
-    internal sealed class CheckTableIsLockExcutor : ExcutorBase<CheckTableIsLockRequest, CheckTableIsLockResponse>
-    {
-        protected override void ExcuteInternal(CheckTableIsLockRequest request, object state, CheckTableIsLockResponse rslt)
-        {
-            var tokendata = BllHelper.GetToken(request.token);
-            if (tokendata == null)
-            {
-                rslt.ErrMsg = "会话已经中断,请重新登录";
-                return;
-            }
-
-            if(string.IsNullOrEmpty(request.keyword))
-            {
-                rslt.ErrMsg = "传入的关键表名为空,请检查!";
-                return;
-            }
-
-            using (var con = GlobalVar.ConnectionString.NewSqlConnection())
-            using (var cmd = con.CreateCommand())
-            {
-                con.Open();
-
-                try
-                {
-                    var lockItem = LockHelper.CheckLockAll(cmd, request.keyword, request.billid,tokendata.username);
-
-                    if (lockItem.Code == LockCheckResultCode.LockedByOther) throw new LJCommonException(lockItem.log_msg);
-                    if(lockItem.Code == LockCheckResultCode.Success || lockItem.Code == LockCheckResultCode.Expired)
-                    {
-                        LockHelper.LockBill(cmd,request.keyword,request.billid,request.billcode,tokendata.username);
-                    }
-                }catch(Exception ex)
-                {
-                    rslt.ErrMsg = ex.Message;
-                }
-            }
-        }
-    }
-}

+ 4 - 1
JLHHJSvr/Excutor/CreatMtrldefExcutor.cs

@@ -39,6 +39,10 @@ namespace JLHHJSvr.Excutor
                 con.Open();
 
                 var toUpdate = new List<u_mattress>();
+                foreach(var mattressid in request.list)
+                {
+                    if (LockHelper.CheckIsLock(cmd, MattressHelper.BillKeyWord, mattressid, tokendata.username, out string arg_msg)) throw new LJCommonException(arg_msg);
+                }
 
                 foreach (var mattressid in request.list)
                 {
@@ -91,7 +95,6 @@ namespace JLHHJSvr.Excutor
                     {
                         foreach (var mattress in toUpdate.Where(m => m.erp_mtrlid > 0))
                         {
-                            if (LockHelper.CheckIsLock(cmd, MattressHelper.BillKeyWord, mattress.mattressid, tokendata.username, out string arg_msg)) throw new LJCommonException(arg_msg);
                             mattress.creatmtrl_flag = 1;
 
                             DbSqlHelper.Update(cmd, mattress, "erp_mtrlid, creatmtrl_flag, erp_mtrlcode");

+ 2 - 16
JLHHJSvr/Excutor/LockTableExcutor.cs

@@ -17,32 +17,18 @@ namespace JLHHJSvr.Excutor
     {
         protected override void ExcuteInternal(LockTableRequest request, object state, LockTableResponse rslt)
         {
-            var tokendata = BllHelper.GetToken(request.token);
-            if (tokendata == null)
-            {
-                rslt.ErrMsg = "会话已经中断,请重新登录";
-                return;
-            }
+            if (string.IsNullOrEmpty(request.keyword)) throw new LJCommonException("加锁单据关键字错误,请检查!");
 
             using (var con = GlobalVar.ConnectionString.NewSqlConnection())
             using (var cmd = con.CreateCommand())
             {
                 con.Open();
 
-                foreach(var bill in request.lockList)
-                {
-                    if (string.IsNullOrEmpty(bill.keyword)) throw new LJCommonException("加锁单据关键字错误,请检查!");
-                }
-
                 using (cmd.Transaction = con.BeginTransaction())
                 {
                     try
                     {
-                        foreach(var bill in request.lockList)
-                        {
-                            LockHelper.LockBill(cmd, bill.keyword, bill.billid, bill.billcode,tokendata.username);
-                        }
-
+                        LockHelper.LockBill(cmd, request.keyword, request.billid, request.billcode, BllHelper.GetToken(request.token).username);
                         cmd.Transaction.Commit();
                     }
                     catch (Exception e)

+ 2 - 5
JLHHJSvr/GlobalVar/GlobalVar.cs

@@ -252,7 +252,6 @@ namespace JLHHJSvr
                 excutorManager.AddMap("SaveBedNetInterface", typeof(SaveBedNetInterfaceRequest), new SaveBedNetInterfaceExcutor());// 床网接口清单补充审核撤审
                 excutorManager.AddMap("RefreshBedNetInterface", typeof(RefreshBedNetInterfaceRequest), new RefreshBedNetInterfaceExcutor());// 刷新床网配置清单
                 excutorManager.AddMap("RefreshBedNetInterfaceQd", typeof(RefreshBedNetInterfaceQdRequest), new RefreshBedNetInterfaceQdExcutor());// 刷新床网清单
-
                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                 excutorManager.AddMap("CopyConfigureCodeMxList", typeof(CopyConfigureCodeMxListRequest), new CopyConfigureCodeMxListExcutor()); // 复制部件选配项值
                 excutorManager.AddMap("SaveSoftBedQuote", typeof(SaveSoftBedQuoteRequest), new SaveSoftBedQuoteExcutor()); // 保存/修改软床报价
@@ -267,10 +266,8 @@ namespace JLHHJSvr
                 excutorManager.AddMap("SaveMattressSubSpecs", typeof(SaveMattressSubSpecsRequest), new SaveMattressSubSpecsExcutor()); // 获取软床报价换料后明细
                 excutorManager.AddMap("SaveSysPost", typeof(SaveSysPostRequest), new SaveSysPostExcutor()); // 发布公告
                 excutorManager.AddMap("DeleteSysPostMessage", typeof(DeleteSysPostMessageRequest), new DeleteSysPostMessageExcutor()); // 删除公告
-                excutorManager.AddMap("LockTable", typeof(LockTableRequest), new LockTableExcutor());
-                excutorManager.AddMap("UnLockTable", typeof(UnLockTableRequest), new UnLockTableExcutor());
-                excutorManager.AddMap("CheckTableIsLock", typeof(CheckTableIsLockRequest), new CheckTableIsLockExcutor());
-
+                excutorManager.AddMap("LockTable", typeof(LockTableRequest), new LockTableExcutor()); // 单据加锁
+                excutorManager.AddMap("UnLockTable", typeof(UnLockTableRequest), new UnLockTableExcutor()); // 单据解锁
                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                 //excutorManager.AddMap("AdminTestFunction", typeof(AdminTestFunctionRequest), new AdminTestFunctionExcutor());
             }

+ 31 - 5
JLHHJSvr/Helper/LockHelper.cs

@@ -12,11 +12,33 @@ using System.Threading.Tasks;
 using System.ComponentModel;
 using NPOI.SS.Formula;
 using System.Web.Configuration;
+using LJLib.Net.SPI.Com;
+using LJLib.SQLEX;
+using JLHHJSvr.Com;
 
 namespace JLHHJSvr.Helper
 {
     internal class LockHelper : HelperBase
     {
+        public static bool PreCheckBillLock<T>(ILJLockRequest<T> request, out string arg_msg)
+        where T : LJResponse, new()
+        {
+            arg_msg = string.Empty;
+            var tokendata = BllHelper.GetToken(request.token);
+
+            if (request.billid <= 0)
+            {
+                arg_msg = $"单据ID参数不合法({request.billid})";
+                return false;
+            }
+
+            using (var con = GlobalVar.ConnectionString.NewSqlConnection())
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+                return CheckIsLock(cmd, request.keyword, request.billid, tokendata.username, out arg_msg);
+            }
+        }
         /// <summary>
         /// 加锁单据
         /// </summary>
@@ -24,7 +46,7 @@ namespace JLHHJSvr.Helper
         /// <param name="billid"></param>
         public static void LockBill(SqlCommand cmd, string keyword, int billid, string billcode,string opemp, int lockMinutes = 30)
         {
-            return;
+            //return;
             try
             {
                 cmd.CommandText = "sp_lock_record";
@@ -60,7 +82,7 @@ namespace JLHHJSvr.Helper
         /// <param name="billid"></param>
         public static void UnLockBill(SqlCommand cmd, string keyword, int billid, string opemp, byte is_admin)
         {
-            return;
+            //return;
             try
             {
                 cmd.CommandText = "sp_unlock_record";
@@ -116,14 +138,14 @@ namespace JLHHJSvr.Helper
         public static bool CheckIsLock(SqlCommand cmd, string keyword, int billid, string opemp,out string arg_msg)
         {
             arg_msg = string.Empty;
-            return false;
+            //return false;
             var item = CheckLockAll(cmd, keyword, billid, opemp);
             if (item.Code == LockCheckResultCode.LockedByOther)
             {
                 arg_msg = item.log_msg;
                 return true;
             }
-            return !(item.Code == LockCheckResultCode.Success || item.Code == LockCheckResultCode.LockedBySelf);
+            return !(item.Code == LockCheckResultCode.Success || item.Code == LockCheckResultCode.LockedBySelf || item.Code == LockCheckResultCode.Expired);
         }
         /// <summary>
         /// DFS方式检查单据及依赖链上的锁
@@ -144,7 +166,11 @@ namespace JLHHJSvr.Helper
                 new Dictionary<string, object> { { "@keyword", keyword }, { "@billid", billid } },
                 mainLock, "keyword,billid,billcode,opemp,is_locked,lock_time,expire_time");
 
-            if (mainLock.expire_time < DateTime.Now) mainLock.Code = LockCheckResultCode.Expired;
+            if (mainLock.expire_time < DateTime.Now)
+            { 
+                mainLock.Code = LockCheckResultCode.Expired;
+                return mainLock;
+            }
             if (mainLock.is_locked == 1)
             {
                 mainLock.Code = mainLock.opemp.Equals(opemp) ? LockCheckResultCode.LockedBySelf : LockCheckResultCode.LockedByOther;

+ 2 - 0
JLHHJSvr/JLHHJSvr.csproj

@@ -513,6 +513,8 @@
     <Compile Include="LJLib.HttpServer\SimpleHttpServer.cs" />
     <Compile Include="LJLib.HttpServer\LJHttpProcessor.cs" />
     <Compile Include="LJLib.HttpServer\LJHttpServer.cs" />
+    <Compile Include="LJLib.Net.SPI.Com\ILJLockRequest.cs" />
+    <Compile Include="LJLib.Net.SPI.Com\ILJTokenRequest.cs" />
     <Compile Include="LJLib.Tools\psw_bczh3.cs" />
     <Compile Include="MIMEHelper\MIMEHelper.cs" />
     <Compile Include="JLHHJSvrConfig.cs">

+ 25 - 0
JLHHJSvr/LJLib.Net.SPI.Com/ILJLockRequest.cs

@@ -0,0 +1,25 @@
+using LJLib.Net.SPI.Com;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LJLib.Net.SPI.Com
+{
+    public abstract class ILJLockRequest<T> : ILJTokenRequest<T> where T : LJResponse
+    {
+        /// <summary>
+        /// 单据关键字
+        /// </summary>
+        public string keyword { get; set; }
+        /// <summary>
+        /// 单据相关id
+        /// </summary>
+        public int billid { get; set; }
+        /// <summary>
+        /// 单据相关编码
+        /// </summary>
+        public string billcode { get; set; }
+    }
+}

+ 14 - 0
JLHHJSvr/LJLib.Net.SPI.Com/ILJTokenRequest.cs

@@ -0,0 +1,14 @@
+using LJLib.Net.SPI.Com;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LJLib.Net.SPI.Com
+{
+    public abstract class ILJTokenRequest<T> : ILJRequest<T> where T : LJResponse
+    {
+        public string token { get; set; }
+    }
+}

+ 24 - 2
JLHHJSvr/LJLib.Net.SPI.Server/ExcutorBase.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Diagnostics;
 using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Helper;
 using LJLib.Net.SPI.Com;
 using Newtonsoft.Json;
 
@@ -17,7 +19,28 @@ namespace LJLib.Net.SPI.Server
     {
         protected abstract void ExcuteInternal(T1 request, object state, T2 rslt);
 
-        protected virtual bool PreHandle(T1 request, T2 rslt) { return true; }
+        protected virtual bool PreHandle(T1 request, T2 rslt) {
+            if(request is ILJTokenRequest<T2> request2)
+            {
+                var tokendata = BllHelper.GetToken(request2.token);
+                if (tokendata == null)
+                {
+                    rslt.ErrMsg = "会话已经中断,请重新登录";
+                    return false;
+                }
+                Trace.Write($"用户名: {tokendata.username}, 请求类型: {typeof(T1).Name},请求报文:\r\n{JsonConvert.SerializeObject(request2)}", "Request");
+
+                if (request is ILJLockRequest<T2> request3)
+                {
+                    if (LockHelper.PreCheckBillLock(request3, out string arg_msg))
+                    {
+                        rslt.ErrMsg = arg_msg;
+                        return false;
+                    }
+                }
+            }
+            return true; 
+        }
 
         public override LJResponse Excute(ILJRequest request, object state)
         {
@@ -25,7 +48,6 @@ namespace LJLib.Net.SPI.Server
             try
             {
                 T1 req = request as T1;
-                if (req != null && !"Login".Equals(req.GetApiName())) Trace.Write($"{typeof(T1).Name}请求报文:\r\n{JsonConvert.SerializeObject(req)}", "Request");
                 if (req == null)
                 {
                     rslt.ErrMsg = "request不能转换成类型" + typeof(T1).Name;

+ 3 - 1
JLHWEB/src/api/interface/index.ts

@@ -1059,7 +1059,9 @@ export namespace GenericApi {
     workgroupList: any[];
   }
   export interface ReqLockBill {
-    lockList: any[];
+    keyword: string;
+    billid: number;
+    billcode: string;
   }
   export interface ReqCheckLock {
     keyword: string;

+ 1 - 9
JLHWEB/src/api/modules/common.ts

@@ -144,12 +144,4 @@ export const LockBill = (params?: GenericApi.ReqLockBill) => {
  */
 export const UnLockBill = (params?: GenericApi.ReqLockBill) => {
   return http.post(PORT1 + `/UnLockTable`, params);
-};
-/**
- * @description 检查锁
- * @param params
- * @returns
- */
-export const CheckLock = (params?: GenericApi.ReqCheckLock) => {
-  return http.post(PORT1 + `/CheckTableIsLock`, params);
-};
+};

+ 13 - 7
JLHWEB/src/hooks/usePageRouter.ts

@@ -1,6 +1,6 @@
 import { inject, onMounted, onUnmounted } from "vue";
 import { useRoute, useRouter } from "vue-router";
-import { CheckLock } from "@/api/modules/common";
+import { LockBill, UnLockBill } from "@/api/modules/common";
 
 /**
  * @description 路由器跳转封装
@@ -52,13 +52,18 @@ export const usePageRouter = () => {
     }
   };
 
-  const pageCheckOpen = async (path: string, keyword: string, billid: number, billcode: string) => {
-    // await CheckLock({ keyword, billid, billcode });
+  const pageLockOpen = async (path: string, keyword: string, billid: number, billcode: string) => {
+    await LockBill({ keyword, billid, billcode });
     router.push(path);
   };
 
-  const pageCheckRefresh = async (path: string, keyword: string, billid: number, billcode: string) => {
-    // await CheckLock({ keyword, billid, billcode });
+  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);
   };
 
@@ -177,8 +182,9 @@ export const usePageRouter = () => {
     pageOpen,
     pageClose,
     pageRefresh,
-    pageCheckOpen,
-    pageCheckRefresh,
+    pageLockOpen,
+    pageLockRefresh,
+    pageUnLockRefresh,
     useAutoMessageHandler
   };
 };

+ 4 - 4
JLHWEB/src/views/erpapi/mattressInterface/detail.vue

@@ -110,7 +110,7 @@ import InsterMxDialog from "./components/insterMx.vue";
 import InsterPzDialog from "./components/insterPz.vue";
 import { SaveMattressAuditing } from "@/api/modules/quote";
 import { usePageRouter } from "@/hooks/usePageRouter";
-import { CheckLock } from "@/api/modules/common";
+import { LockBill, UnLockBill } from "@/api/modules/common";
 
 interface detailProp {
   /**
@@ -683,12 +683,12 @@ const orderDefaultAction = [
     limited: () => {
       return !orderStatus.value;
     },
-    clickFunc: item => {
+    clickFunc: async item => {
       // router.replace(
       //   `/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({
         name: "mattressInterfaceDetail",
         params: {
@@ -1281,7 +1281,7 @@ const routeToEdit = async (type: any) => {
   console.log("routeToEdit mainData :>> ", mainData, route.fullPath);
   const _cur = mainData.value[0];
 
-  await CheckLock({ keyword: "MattressInterface", billid: _cur.mattressid, billcode: _cur.mattresscode });
+  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({

+ 10 - 4
JLHWEB/src/views/quote/bednetQuote/detail.vue

@@ -193,7 +193,7 @@ const {
 } = useHooks(t, props);
 
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageCheckRefresh } = usePageRouter();
+const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
 // const toast = useToast();
 
 // const orderStatus = ref("");
@@ -364,8 +364,14 @@ const orderDefaultAction: detailAction[] = [
         if (route.path.indexOf("/new") > -1) {
           router.replace("/bednetQuote");
         } else {
-          router.replace(
-            `/bednetQuote/detail?id=${LjDetailRef.value._mainData.bednetid}&code=${LjDetailRef.value._mainData.bednetcode}`
+          // 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
           );
         }
       }
@@ -510,7 +516,7 @@ const orderDefaultAction: detailAction[] = [
     },
     clickFunc: item => {
       // tabRemove(route.fullPath);
-      pageCheckRefresh(
+      pageLockRefresh(
         `/bednetQuote/edit?id=${LjDetailRef.value._mainData.bednetid}`,
         "BedNetQuote",
         LjDetailRef.value._mainData.bednetid,

+ 2 - 2
JLHWEB/src/views/quote/bednetQuote/index.vue

@@ -120,7 +120,7 @@ const {
   dataCallback
 } = useHooks();
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageCheckRefresh, pageCheckOpen } = usePageRouter();
+const { pageLockRefresh, pageLockOpen } = usePageRouter();
 
 const dialogVisible = ref(false);
 // const vxeTableRef = ref();
@@ -263,7 +263,7 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(
+      pageLockOpen(
         `/bednetQuote/edit?id=${_cur.bednetid}&code=${_cur.bednetcode}`,
         "BedNetQuote",
         _cur.bednetid,

+ 10 - 4
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 { pageCheckRefresh } = usePageRouter();
+const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
 
 const showOriginFormulaMattress = (value: any) => {
   globalStore.setGlobalState("isShowOriginFormulaMattress", Boolean(value));
@@ -2101,8 +2101,14 @@ const orderDefaultAction = [
         tabRemove(route.fullPath);
         router.replace("/mattressQuote");
       } else {
-        router.replace(
-          `/mattressQuote/detail?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`
+        // 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
         );
       }
     }
@@ -2149,7 +2155,7 @@ const orderDefaultAction = [
       return "";
     },
     clickFunc: item => {
-      pageCheckRefresh(
+      pageLockRefresh(
         `/mattressQuote/edit?id=${LjDetailRef.value._mainData.mattressid}&code=${LjDetailRef.value._mainData.mattresscode}`,
         "MattressQuote",
         LjDetailRef.value._mainData.mattressid,

+ 2 - 2
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 { pageCheckRefresh, pageCheckOpen } = usePageRouter();
+const { pageLockRefresh, pageLockOpen } = usePageRouter();
 
 // const initParams = ref({});
 const dialogVisible = ref(false);
@@ -453,7 +453,7 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(
+      pageLockOpen(
         `/mattressQuote/edit?id=${_cur.mattressid}&code=${_cur.mattresscode}`,
         "MattressQuote",
         _cur.mattressid,

+ 11 - 4
JLHWEB/src/views/quote/softbedQuote/detail.vue

@@ -147,7 +147,7 @@ const {
   GetSoftBedFormulaMapper
 } = useHooks(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-const { pageCheckRefresh } = usePageRouter();
+const { pageLockRefresh, pageUnLockRefresh } = usePageRouter();
 
 const initParams = ref({ billid: 0 as Number });
 
@@ -278,8 +278,15 @@ const orderDefaultAction = [
         tabRemove(route.fullPath);
         router.replace("/softbedQuote");
       } else {
-        router.replace(
-          `/softbedQuote/detail?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
+        // 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
         );
       }
     }
@@ -328,7 +335,7 @@ const orderDefaultAction = [
       return "";
     },
     clickFunc: item => {
-      pageCheckRefresh(
+      pageLockRefresh(
         `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`,
         "SoftBedQuote",
         LjDetailRef.value._mainData.softbed_id,

+ 2 - 2
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 { pageCheckOpen } = usePageRouter();
+const { pageLockOpen } = usePageRouter();
 
 const showHeadboard = ref(true);
 const showNightstand = ref(true);
@@ -145,7 +145,7 @@ const action: detailAction[] = [
         return;
       }
 
-      pageCheckOpen(
+      pageLockOpen(
         `/softbedQuote/edit?id=${_cur.softbed_id}&code=${_cur.softbed_code}`,
         "SoftBedQuote",
         _cur.softbed_id,