@@ -514,7 +514,18 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers | |||||
nWFProcessIBLL.DeleteEntity(processId); | nWFProcessIBLL.DeleteEntity(processId); | ||||
return Success("删除成功"); | return Success("删除成功"); | ||||
} | } | ||||
/// <summary> | |||||
/// 流程合同监控--作废 | |||||
/// </summary> | |||||
/// <param name="processId">流程进程主键</param> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult UpdateEnabledMark(string processId,string EnabledMark) | |||||
{ | |||||
nWFProcessIBLL.UpdateEnabledMark(processId, EnabledMark); | |||||
return Success("操作成功"); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 普通教师请假归档 | /// 普通教师请假归档 | ||||
/// </summary> | /// </summary> | ||||
@@ -2,9 +2,19 @@ | |||||
ViewBag.Title = "流程监控"; | ViewBag.Title = "流程监控"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout "> | |||||
<div id="lr_layout" class="lr-layout lr-layout-left-center"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle" style="padding-top:10px;"> | |||||
<div class="lr-layout-body"> | |||||
<ul class="lr-left-list" id="lr_left_list"> | |||||
<li data-value="1" class="lrlg">运行中</li> | |||||
<li data-value="4" class="lrlg">作废</li> | |||||
</ul> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle"> | |||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
@@ -23,10 +33,13 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i> <span class="lrlg">查看</span></a> | <a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i> <span class="lrlg">查看</span></a> | ||||
<a id="lr_del" class="btn btn-default"><i class="fa fa-plus"></i> <span class="lrlg">作废</span></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
<div class="lr-layout-body" id="gridtable"> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -10,11 +10,12 @@ var bootstrap = function ($, learun) { | |||||
//var categoryId = '0'; | //var categoryId = '0'; | ||||
var logbegin = ''; | var logbegin = ''; | ||||
var logend = ''; | var logend = ''; | ||||
var F_EnabledMark1 = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
$('#lr_verify').hide(); | $('#lr_verify').hide(); | ||||
//page.initleft(); | |||||
page.initleft(); | |||||
page.initGrid(); | page.initGrid(); | ||||
page.bind(); | page.bind(); | ||||
}, | }, | ||||
@@ -56,27 +57,64 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_eye').on('click', function () { | $('#lr_eye').on('click', function () { | ||||
page.eye(); | page.eye(); | ||||
}); | }); | ||||
// 作废 | |||||
$('#lr_del').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ProcessId'); | |||||
var F_EnabledMark1 = $('#gridtable').jfGridValue('F_EnabledMark1'); | |||||
var F_IsFinished = $('#gridtable').jfGridValue('F_IsFinished'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (F_IsFinished == 1) { | |||||
return learun.alert.warning("选中项已结束!"); | |||||
} else if (F_IsFinished == 0 && (F_EnabledMark1 == 4 || F_EnabledMark1 == 3)) { | |||||
return learun.alert.warning("选中项已作废!"); | |||||
} | |||||
learun.layerConfirm('是否确认作废该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/UpdateEnabledMark', { processId: keyValue, F_EnabledMark: 4 }, function (res) { | |||||
if (res.code == 200) { | |||||
page.refreshGirdData(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
initleft: function () { | |||||
$('#lr_left_list li').on('click', function () { | |||||
var $this = $(this); | |||||
var $parent = $this.parent(); | |||||
$parent.find('.active').removeClass('active'); | |||||
$this.addClass('active'); | |||||
F_EnabledMark1 = $this.attr('data-value'); | |||||
page.search(); | |||||
}); | |||||
}, | }, | ||||
//initleft: function () { | |||||
// $('#lr_left_list li').on('click', function () { | |||||
// var $this = $(this); | |||||
// var $parent = $this.parent(); | |||||
// $parent.find('.active').removeClass('active'); | |||||
// $this.addClass('active'); | |||||
// categoryId = $this.attr('data-value'); | |||||
// page.search(); | |||||
// }); | |||||
//}, | |||||
initGrid: function () { | initGrid: function () { | ||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetContractList', | url: top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetContractList', | ||||
headData: [ | headData: [ | ||||
{ label: '申报日期', name: 'F_ModifyDate', width: 200, align: "left" }, | |||||
{ label: '合同编号', name: 'LC_htbh', width: 150, align: "left" }, | { label: '合同编号', name: 'LC_htbh', width: 150, align: "left" }, | ||||
{ label: '合同名称', name: 'LC_htmc', width: 200, align: "left" }, | { label: '合同名称', name: 'LC_htmc', width: 200, align: "left" }, | ||||
{ label: '合同额(万元)', name: 'LC_htzje', width: 200, align: "left" }, | { label: '合同额(万元)', name: 'LC_htzje', width: 200, align: "left" }, | ||||
{ | { | ||||
label: '申报人', name: 'F_CreateUserName', width: 100, align: "left" , | |||||
label: '申报人', name: 'F_CreateUserName', width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||||
key: value, | |||||
keyId: 'f_userid', | |||||
callback: function (_data) { | |||||
callback(_data['f_realname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: '授权委托人', name: 'LC_sqwtr', width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | ||||
@@ -102,7 +140,33 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ label: '文本盖章份数', name: 'LC_gzfs', width: 80, align: "left" }, | { label: '文本盖章份数', name: 'LC_gzfs', width: 80, align: "left" }, | ||||
{ label: '申报日期', name: 'F_ModifyDate', width: 200, align: "left" } | |||||
{ | |||||
label: '状态', name: 'F_EnabledMark1', width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (row.F_IsFinished == 0) { | |||||
if (cellvalue == 1) { | |||||
//if (row.F_IsUrge == "1" && categoryId == '2') { | |||||
// return "<span class=\"label label-danger\">催办加急</span>"; | |||||
//} | |||||
return "<span class=\"label label-success\">运行中</span>"; | |||||
} else if (cellvalue == 2) { | |||||
return "<span class=\"label label-primary\">草稿</span>"; | |||||
} | |||||
else { | |||||
//4 | |||||
return "<span class=\"label label-danger\">作废</span>"; | |||||
} | |||||
} | |||||
else { | |||||
if (cellvalue == 4) { | |||||
return "<span class=\"label label-default\">终止</span>"; | |||||
} else { | |||||
return "<span class=\"label label-warning\">结束</span>"; | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'F_Id', | mainId: 'F_Id', | ||||
isPage: true, | isPage: true, | ||||
@@ -118,6 +182,11 @@ var bootstrap = function ($, learun) { | |||||
param.StartTime = logbegin; | param.StartTime = logbegin; | ||||
param.EndTime = logend; | param.EndTime = logend; | ||||
param.F_IsFinished = 0; | param.F_IsFinished = 0; | ||||
if (F_EnabledMark1 == 1) { | |||||
param.SqlParameter = " and b.F_EnabledMark=1"; | |||||
} else if (F_EnabledMark1 == 4) { | |||||
param.SqlParameter = " and (b.F_EnabledMark<>1 and b.F_EnabledMark<>2)"; | |||||
} | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
}, | }, | ||||
eye: function () { | eye: function () { | ||||
@@ -127,6 +196,9 @@ var bootstrap = function ($, learun) { | |||||
if (learun.checkrow(processId)) { | if (learun.checkrow(processId)) { | ||||
learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); | learun.frameTab.open({ F_ModuleId: 'monitor' + processId, F_FullName: '查看-' + title, F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/MonitorDetailsIndex?processId=' + processId }); | ||||
} | } | ||||
}, | |||||
refreshGirdData: function () { | |||||
page.search(); | |||||
} | } | ||||
}; | }; | ||||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
/// 日 期:2020-05-07 14:26 | /// 日 期:2020-05-07 14:26 | ||||
/// 描 述:流程合同 | /// 描 述:流程合同 | ||||
/// </summary> | /// </summary> | ||||
public class LC_hetongEntity | |||||
public class LC_hetongEntity | |||||
{ | { | ||||
#region 实体成员 | #region 实体成员 | ||||
/// <summary> | /// <summary> | ||||
@@ -231,6 +231,13 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
this.F_ModifyUserName = userInfo.realName; | this.F_ModifyUserName = userInfo.realName; | ||||
} | } | ||||
#endregion | #endregion | ||||
[NotMapped] | |||||
public string ProcessId { get; set; } | |||||
[NotMapped] | |||||
public string F_EnabledMark1 { get; set; } | |||||
[NotMapped] | |||||
public string F_IsFinished { get; set; } | |||||
} | } | ||||
} | } | ||||
@@ -109,7 +109,7 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append("SELECT b.F_Id as ProcessId, b.F_EnabledMark as F_EnabledMark1,b.F_IsFinished,t.* "); | |||||
strSql.Append(" FROM LC_hetong t left join adms7ultimate2.dbo.LR_NWF_Process b on t.lc_id=b.f_id where b.F_EnabledMark!=2 and F_IsChild=0 "); | strSql.Append(" FROM LC_hetong t left join adms7ultimate2.dbo.LR_NWF_Process b on t.lc_id=b.f_id where b.F_EnabledMark!=2 and F_IsChild=0 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -119,6 +119,10 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager | |||||
dp.Add("F_IsFinished", queryParam["F_IsFinished"].ToString(), DbType.String); | dp.Add("F_IsFinished", queryParam["F_IsFinished"].ToString(), DbType.String); | ||||
strSql.Append(" and b.F_IsFinished=@F_IsFinished "); | strSql.Append(" and b.F_IsFinished=@F_IsFinished "); | ||||
} | } | ||||
if (!queryParam["SqlParameter"].IsEmpty()) | |||||
{ | |||||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | ||||
@@ -191,6 +191,14 @@ namespace Learun.Application.WorkFlow | |||||
{ | { | ||||
nWFProcessSerive.DeleteEntity(processId); | nWFProcessSerive.DeleteEntity(processId); | ||||
} | } | ||||
/// <summary> | |||||
/// 作废 | |||||
/// </summary> | |||||
/// <param name="processId">流程进程主键</param> | |||||
public void UpdateEnabledMark(string processId, string EnabledMark) | |||||
{ | |||||
nWFProcessSerive.UpdateEnabledMark(processId, EnabledMark); | |||||
} | |||||
#endregion | #endregion | ||||
@@ -112,6 +112,12 @@ namespace Learun.Application.WorkFlow | |||||
/// </summary> | /// </summary> | ||||
/// <param name="processId">流程进程主键</param> | /// <param name="processId">流程进程主键</param> | ||||
void DeleteEntity(string processId); | void DeleteEntity(string processId); | ||||
/// <summary> | |||||
/// 作废 | |||||
/// </summary> | |||||
/// <param name="processId"></param> | |||||
/// <param name="EnabledMark"></param> | |||||
void UpdateEnabledMark(string processId, string EnabledMark); | |||||
#endregion | #endregion | ||||
#region 流程API | #region 流程API | ||||
@@ -1452,6 +1452,32 @@ namespace Learun.Application.WorkFlow | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="processId"></param> | |||||
/// <param name="EnabledMark"></param> | |||||
public void UpdateEnabledMark(string processId, string EnabledMark) | |||||
{ | |||||
try | |||||
{ | |||||
var entity= this.BaseRepository().FindEntity<NWFProcessEntity>(t => t.F_Id == processId); | |||||
entity.F_EnabledMark =Convert.ToInt32(EnabledMark) ; | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 删除流程进程所有信息(流程撤销) | /// 删除流程进程所有信息(流程撤销) | ||||
/// </summary> | /// </summary> | ||||