diff --git a/OpenAuth.Mvc/BllScripts/goodsApply.js b/OpenAuth.Mvc/BllScripts/goodsApply.js index 5e8470eb..501dd678 100644 --- a/OpenAuth.Mvc/BllScripts/goodsApply.js +++ b/OpenAuth.Mvc/BllScripts/goodsApply.js @@ -161,13 +161,22 @@ function detail() { if (selected == null) { return; } - $(this).dialog({ + BJUI.dialog({ id: 'detailDlg', url: '/GoodsApplies/Detail?id=' + selected.Id, title: '进度详情', width: 800, - height:600 + height: 600, + mask:true }); + $(document) + .on('bjui.beforeCloseDialog', + function(e) { + var $dialog = $(e.target); + if ($dialog.id == "detailDlg") { + list.reload(); + } + }); } function add() { diff --git a/OpenAuth.Mvc/BllScripts/processDetail.js b/OpenAuth.Mvc/BllScripts/processDetail.js index 8744ea4c..93e42aea 100644 --- a/OpenAuth.Mvc/BllScripts/processDetail.js +++ b/OpenAuth.Mvc/BllScripts/processDetail.js @@ -39,9 +39,8 @@ $(function () { $(".btn-cmd") .on("click", function () { //执行命令 $.post("/GoodsApplies/ExeCmd?id=" +$("#processId").val() +"&cmd=" +$(this).val() , - { name: "John", time: "2pm" }, function (data) { - console.log("Data Loaded: " + data); + BJUI.dialog('refresh', 'detailDlg'); }); }); }); diff --git a/OpenAuth.Mvc/Controllers/GoodsAppliesController.cs b/OpenAuth.Mvc/Controllers/GoodsAppliesController.cs index 4cb1ccf6..1e0edbdf 100644 --- a/OpenAuth.Mvc/Controllers/GoodsAppliesController.cs +++ b/OpenAuth.Mvc/Controllers/GoodsAppliesController.cs @@ -65,6 +65,9 @@ namespace OpenAuth.Mvc.Controllers return View(); } + /// + /// 删除申请 + /// public string Delete(Guid id) { try @@ -81,6 +84,9 @@ namespace OpenAuth.Mvc.Controllers return JsonHelper.Instance.Serialize(BjuiResponse); } + /// + /// 执行命令 + /// [HttpPost] public string ExeCmd(Guid id, string cmd) { @@ -125,7 +131,10 @@ namespace OpenAuth.Mvc.Controllers foreach (var workflowCommand in commands) //去除相同的 { if (result.Count(c => c.Key == workflowCommand.CommandName) == 0) - result.Add(new CommandModel() { Key = workflowCommand.CommandName, Value = workflowCommand.LocalizedName, Classifier = workflowCommand.Classifier }); + result.Add(new CommandModel { + Key = workflowCommand.CommandName, + Value = workflowCommand.LocalizedName, + Classifier = workflowCommand.Classifier }); } return result.ToArray(); } diff --git a/OpenAuth.Mvc/Views/GoodsApplies/Detail.cshtml b/OpenAuth.Mvc/Views/GoodsApplies/Detail.cshtml index ff39b7f2..4fe73957 100644 --- a/OpenAuth.Mvc/Views/GoodsApplies/Detail.cshtml +++ b/OpenAuth.Mvc/Views/GoodsApplies/Detail.cshtml @@ -3,9 +3,7 @@ } @model OpenAuth.App.ViewModel.GoodsApplyVM - - @@ -13,7 +11,6 @@ -
@Model.Name