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)) + } }