From 807ac15417cd717f69e936933300319240995969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=86=B0=E5=86=B0?= <437394478@qq.com> Date: Thu, 30 Jul 2026 17:46:14 +0800 Subject: [PATCH] =?UTF-8?q?feature:=E7=BB=AD=E4=BD=9C=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=BA=94=E5=BD=93=E6=9C=89=E8=A7=92=E8=89=B2=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpWeb/App_Data/FunctionRight.xml | 3 ++- YLErpWeb/Common/UserInfoRight.cs | 7 ++++++- YLErpWeb/Controllers/SwapTrade2Controller.cs | 4 ++++ YLErpWeb/Views/SwapTrade2/header.cshtml | 5 ++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/YLErpWeb/App_Data/FunctionRight.xml b/YLErpWeb/App_Data/FunctionRight.xml index 3d23be45..397e458d 100644 --- a/YLErpWeb/App_Data/FunctionRight.xml +++ b/YLErpWeb/App_Data/FunctionRight.xml @@ -12,6 +12,7 @@ + @@ -254,4 +255,4 @@ - \ No newline at end of file + diff --git a/YLErpWeb/Common/UserInfoRight.cs b/YLErpWeb/Common/UserInfoRight.cs index bc15c964..5db38dd8 100644 --- a/YLErpWeb/Common/UserInfoRight.cs +++ b/YLErpWeb/Common/UserInfoRight.cs @@ -406,6 +406,11 @@ namespace YLErp.Web /// public bool 交易管理_交易新增 => HasRight("交易管理-交易新增"); + /// + /// 交易管理-交易续做 + /// + public bool 交易管理_交易续做 => HasRight("交易管理-交易续做"); + /// /// 交易管理-交易编辑 /// @@ -712,4 +717,4 @@ namespace YLErp.Web public bool 发送证券报告 => HasRight("监管报告-发送证券报告"); } -} \ No newline at end of file +} diff --git a/YLErpWeb/Controllers/SwapTrade2Controller.cs b/YLErpWeb/Controllers/SwapTrade2Controller.cs index b0115d2f..c8c78e65 100644 --- a/YLErpWeb/Controllers/SwapTrade2Controller.cs +++ b/YLErpWeb/Controllers/SwapTrade2Controller.cs @@ -48,6 +48,10 @@ namespace YLErp.Web.Controllers public ActionResult TradeEdit(string enid, string renewEnid = null, bool isUseApproval = false) { ViewBag.isUseApproval = isUseApproval; + if (!string.IsNullOrWhiteSpace(renewEnid) && !CurUser.交易管理_交易续做) + { + return ShowError("没有续做交易权限"); + } // The new/renew flow uses the literal "0" to indicate that no trade exists yet. var intid = enid == "0" ? 0 : DecryptInt(enid); trade r = null; diff --git a/YLErpWeb/Views/SwapTrade2/header.cshtml b/YLErpWeb/Views/SwapTrade2/header.cshtml index d6706aff..333c8915 100644 --- a/YLErpWeb/Views/SwapTrade2/header.cshtml +++ b/YLErpWeb/Views/SwapTrade2/header.cshtml @@ -157,7 +157,10 @@ { @MyControls.Btn("收益结算", string.Format("unWindLongShortSwap('{0}')", tradeModel.EncryptId)) } - @MyControls.Btn("续做", string.Format("renewTrade('{0}')", tradeModel.EncryptId)) + @if (CurUser.交易管理_交易续做) + { + @MyControls.Btn("续作", string.Format("renewTrade('{0}')", tradeModel.EncryptId)) + } }