可以正常审核

This commit is contained in:
yubaolee 2017-02-04 17:53:22 +08:00
parent adcdea2cf8
commit 39ce179b49
6 changed files with 176 additions and 268 deletions

View File

@ -65,8 +65,9 @@ namespace OpenAuth.App
{
wfruntime = new WF_Runtime(wfRuntimeInitModel);
}
var user = AuthUtil.GetCurrentUser();
#region
WFProcessInstance.ActivityId = wfruntime.runtimeModel.nextNodeId;
WFProcessInstance.ActivityType = wfruntime.GetStatus();//-1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束
@ -75,6 +76,8 @@ namespace OpenAuth.App
WFProcessInstance.SchemeType = WFSchemeInfo.SchemeType;
WFProcessInstance.FrmType = WFSchemeInfo.FrmType;
WFProcessInstance.EnabledMark = 1;//正式运行
WFProcessInstance.CreateUserId = user.User.Id.ToString();
WFProcessInstance.CreateUserName = user.User.Account;
WFProcessInstance.MakerList =(wfruntime.GetStatus() != 4 ? GetMakerList(wfruntime) : "");//当前节点可执行的人信息
WFProcessInstance.IsFinish = (wfruntime.GetStatus() == 4 ? 1 : 0);
#endregion
@ -95,7 +98,7 @@ namespace OpenAuth.App
#region
WFProcessOperationHistory processOperationHistoryEntity = new WFProcessOperationHistory();
processOperationHistoryEntity.Content = "【创建】" + "todo"+ "创建了一个流程进程【" + WFProcessInstance.Code + "/" + WFProcessInstance.CustomName + "】";
processOperationHistoryEntity.Content = "【创建】" + user.User.Name + "创建了一个流程进程【" + WFProcessInstance.Code + "/" + WFProcessInstance.CustomName + "】";
#endregion
#region
@ -456,17 +459,20 @@ namespace OpenAuth.App
WFProcessInstance.ActivityId = wfruntime.runtimeModel.nextNodeId;
WFProcessInstance.ActivityType = wfruntime.runtimeModel.nextNodeType;//-1无法运行,0会签开始,1会签结束,2一般节点,4流程运行结束
WFProcessInstance.ActivityName = wfruntime.runtimeModel.nextNode.name;
WFProcessInstance.MakerList = (wfruntime.runtimeModel.nextNodeType == 4 ? GetMakerList(wfruntime) : "");//当前节点可执行的人信息
WFProcessInstance.MakerList = wfruntime.runtimeModel.nextNodeType == 4 ?"":GetMakerList(wfruntime);//当前节点可执行的人信息
WFProcessInstance.IsFinish = (wfruntime.runtimeModel.nextNodeType == 4 ? 1 : 0);
#region
processTransitionHistoryEntity = new WFProcessTransitionHistory();
processTransitionHistoryEntity.FromNodeId = wfruntime.runtimeModel.currentNodeId;
processTransitionHistoryEntity.FromNodeName = wfruntime.runtimeModel.currentNode.name.Value;
processTransitionHistoryEntity.FromNodeType = wfruntime.runtimeModel.currentNodeType;
processTransitionHistoryEntity.ToNodeId = wfruntime.runtimeModel.nextNodeId;
processTransitionHistoryEntity.ToNodeName = wfruntime.runtimeModel.nextNode.name.Value;
processTransitionHistoryEntity.ToNodeType = wfruntime.runtimeModel.nextNodeType;
processTransitionHistoryEntity.TransitionSate = 0;
processTransitionHistoryEntity = new WFProcessTransitionHistory
{
FromNodeId = wfruntime.runtimeModel.currentNodeId,
FromNodeName = wfruntime.runtimeModel.currentNode.name.Value,
FromNodeType = wfruntime.runtimeModel.currentNodeType,
ToNodeId = wfruntime.runtimeModel.nextNodeId,
ToNodeName = wfruntime.runtimeModel.nextNode.name.Value,
ToNodeType = wfruntime.runtimeModel.nextNodeType,
TransitionSate = 0
};
processTransitionHistoryEntity.IsFinish = (processTransitionHistoryEntity.ToNodeType == 4 ? 1 : 0);
#endregion

View File

@ -3,17 +3,139 @@
ViewBag.Title = "审核流程";
Layout = "~/Views/Shared/_FlowForm.cshtml";
}
<style>
body {
overflow: hidden;
}
.app_preview .item_row {
background-color: #fff;
}
.app_layout .item_field_label {
background-color: #fff;
}
.FlowPanelall {
width: 800px;
float: left;
}
.FlowInfoPanel {
float: right;
width: 300px;
height: 659px;
z-index: 1000;
background: rgba(0,0,0,0.01);
padding: 10px;
border-left: 1px solid #ccc;
}
.form .formTitle {
text-align: left;
padding-left: 5px;
}
.form .formTitle font {
right: auto !important;
margin-left: 5px;
}
.formValue input, .formValue textarea {
border-radius: 5px;
}
input, textarea {
background: #fff !important;
}
</style>
<div class="FlowPanelall">
<ul class="nav nav-tabs">
<li class="active"><a href="#frmtab" data-toggle="tab">表单信息</a></li>
<li><a href="#FlowPanel" data-toggle="tab">流程信息</a></li>
</ul>
<div class="tab-content">
<div id="frmtab" class="tab-pane active" style="overflow-y:auto;">
<div id="frmpreview" class="app_layout app_preview">
</div>
</div>
<div id="FlowPanel" class="tab-pane">
</div>
</div>
</div>
<div class="FlowInfoPanel" id="VerificationInfo">
<div style="color:#9f9f9f;padding-bottom:15px;padding-left:5px;"><i style="padding-right:5px;" class="fa fa-info-circle"></i><span>在此填写内容,提交审核</span></div>
<table class="form">
<tr>
<td class="formTitle">申请人员</td>
</tr>
<tr>
<td class="formValue">
<input id="Createusername" disabled type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
<input id="Createuserid" style="display: none" />
</td>
</tr>
<tr>
<td class="formTitle">申请备注</td>
</tr>
<tr>
<td class="formValue">
<textarea id="Description" disabled class="form-control" style="height:50px;"></textarea>
</td>
</tr>
<tr>
<td class="formTitle">审核人员<font face="宋体">*</font></td>
</tr>
<tr>
<td class="formValue">
<input id="VerificationUser" value="@AuthUtil.GetUserName()" disabled type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</td>
</tr>
<tr>
<td class="formTitle">审核结果<font face="宋体">*</font></td>
</tr>
<tr>
<td class="formValue">
<div class="rdio rdio-color_a"><input name="VerificationFinally" id="VerificationFinally1" value="1" type="radio" /><label for="VerificationFinally1">同意</label></div>
<div class="rdio rdio-color_f"><input name="VerificationFinally" id="VerificationFinally2" value="2" type="radio" /><label for="VerificationFinally2">不同意</label></div>
<div class="rdio rdio-color_c"><input name="VerificationFinally" id="VerificationFinally3" value="3" type="radio" /><label for="VerificationFinally3">驳回</label></div>
</td>
</tr>
<tr class="NodeRejectStep" style="display:none">
<td class="formTitle">驳回步骤<font face="宋体">*</font></td>
</tr>
<tr class="NodeRejectStep" style="display:none">
<td class="formValue">
<div id="NodeRejectStep" type="select" class="ui-select"></div>
</td>
</tr>
<tr>
<td class="formTitle">审核意见</td>
</tr>
<tr>
<td class="formValue">
<textarea id="VerificationOpinion" class="form-control"></textarea>
</td>
</tr>
</table>
<div style="padding:5px;">
<a id="btn_Submission" class="btn btn-success btn-block"><i class="fa fa-check-circle"></i>&nbsp;提交审核</a>
</div>
</div>
<script>
var processSchemeId = request('processSchemeId');
var activityId = request('activityId');
var processInstanceId = request('processInstanceId');
var createusername = decodeURI(request('createusername'));
var createuserid = decodeURI(request('createuserid'));
var description = decodeURI(request('description'));
$(function () {
var schemeContent;
$('#Createusername').val(createusername);
$('#Createuserid').val(createuserid);
$('#Description').val(description);
$('#frmtab').height($.windowHeight()-40);
$('#frmtab').height($.windowHeight() - 40);
$('#VerificationOpinion').height($.windowHeight() - 360);
$.SetForm({
url: "../../FlowManage/FlowProcess/GetProcessSchemeEntityByNodeId",
@ -25,8 +147,8 @@
tablecotent: schemeContent.Frm.FrmContent
});
$('#FlowPanel').flowdesign({
width: $(window).width()-298,
height: $(window).height()-42,
width: $(window).width() - 298,
height: $(window).height() - 42,
flowcontent: schemeContent.Flow,
haveTool: false,
isprocessing: true,
@ -46,16 +168,13 @@
height: "300px",
});
var _node = "";
for (var i in schemeContent.Flow.nodes)
{
if (schemeContent.Flow.nodes[i].id == activityId)
{
for (var i in schemeContent.Flow.nodes) {
if (schemeContent.Flow.nodes[i].id == activityId) {
_node = schemeContent.Flow.nodes[i];
break;
}
}
if (_node.setInfo != undefined && _node.setInfo.NodeRejectType == "3")
{
if (_node.setInfo != undefined && _node.setInfo.NodeRejectType == "3") {
$('input[name = "VerificationFinally"]').click(function () {
var _value = $(this).val();
var _height = $.windowHeight() - 360;
@ -78,9 +197,8 @@
return false;
}
var _verificationFinally = $('input[name = VerificationFinally]:checked').val();
if (_verificationFinally == undefined)
{
dialogTop("请选择审核结果","error");
if (_verificationFinally == undefined) {
dialogTop("请选择审核结果", "error");
return false;
}
var _postdata = $("#VerificationInfo").GetWebControls();
@ -99,120 +217,7 @@
dialogClose();
}
})
});
});
</script>
<div class="FlowPanelall">
<ul class="nav nav-tabs">
<li class="active"><a href="#frmtab" data-toggle="tab">表单信息</a></li>
<li><a href="#FlowPanel" data-toggle="tab">流程信息</a></li>
</ul>
<div class="tab-content">
<div id="frmtab" class="tab-pane active" style="overflow-y:auto;">
<div id="frmpreview" class="app_layout app_preview">
</div>
</div>
<div id="FlowPanel" class="tab-pane">
</div>
</div>
</div>
<div class="FlowInfoPanel" id="VerificationInfo">
<div style="color:#9f9f9f;padding-bottom:15px;padding-left:5px;"><i style="padding-right:5px;" class="fa fa-info-circle"></i><span>在此填写内容,提交审核</span></div>
<table class="form">
<tr>
<td class="formTitle">申请人员</td>
</tr>
<tr>
<td class="formValue">
<input id="Createusername" disabled type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</td>
</tr>
<tr>
<td class="formTitle">申请备注</td>
</tr>
<tr>
<td class="formValue">
<textarea id="Description" disabled class="form-control" style="height:50px;"></textarea>
</td>
</tr>
<tr>
<td class="formTitle">审核人员<font face="宋体">*</font></td>
</tr>
<tr>
<td class="formValue">
<input id="VerificationUser" value="@AuthUtil.GetUserName()" disabled type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</td>
</tr>
<tr>
<td class="formTitle">审核结果<font face="宋体">*</font></td>
</tr>
<tr>
<td class="formValue">
<div class="rdio rdio-color_a"><input name="VerificationFinally" id="VerificationFinally1" value="1" type="radio" /><label for="VerificationFinally1">同意</label></div>
<div class="rdio rdio-color_f"><input name="VerificationFinally" id="VerificationFinally2" value="2" type="radio" /><label for="VerificationFinally2">不同意</label></div>
<div class="rdio rdio-color_c"><input name="VerificationFinally" id="VerificationFinally3" value="3" type="radio" /><label for="VerificationFinally3">驳回</label></div>
</td>
</tr>
<tr class="NodeRejectStep" style="display:none">
<td class="formTitle">驳回步骤<font face="宋体">*</font></td>
</tr>
<tr class="NodeRejectStep" style="display:none">
<td class="formValue">
<div id="NodeRejectStep" type="select" class="ui-select"></div>
</td>
</tr>
<tr>
<td class="formTitle">审核意见</td>
</tr>
<tr>
<td class="formValue">
<textarea id="VerificationOpinion" class="form-control" ></textarea>
</td>
</tr>
</table>
<div style="padding:5px;">
<a id="btn_Submission" class="btn btn-success btn-block"><i class="fa fa-check-circle"></i>&nbsp;提交审核</a>
</div>
</div>
<style>
body {
overflow: hidden;
}
.app_preview .item_row {
background-color: #fff;
}
.app_layout .item_field_label {
background-color: #fff;
}
.FlowPanelall {
width:800px;
float:left;
}
.FlowInfoPanel {
float:right;
width:300px;
height:659px;
z-index:1000;
background:rgba(0,0,0,0.01);
padding:10px;
border-left:1px solid #ccc;
}
.form .formTitle {
text-align: left;
padding-left: 5px;
}
.form .formTitle font {
right: auto!important;
margin-left:5px;
}
.formValue input,.formValue textarea{
border-radius: 5px;
}
input, textarea {
background: #fff!important;
}
</style>

View File

@ -132,9 +132,6 @@ function addInstance() {
area: ['1200px', '700px'], //宽高
maxmin: true, //开启最大化最小化按钮
content: '/FlowManage/FlowLaunch/FlowProcessNewForm?keyValue=' + selected.Id,
end: function () {
list.reload();
}
});
}

View File

@ -1,5 +1,5 @@
//左边分类导航树
var ztree = function() {
var ztree = function () {
var nodes = [
{
name: "流程处理",
@ -14,7 +14,7 @@ var ztree = function() {
var setting = {
view: { selectedMulti: false },
callback: {
onClick: function(event, treeId, treeNode) {
onClick: function (event, treeId, treeNode) {
list.reload(treeNode.value);
}
}
@ -23,13 +23,13 @@ var ztree = function() {
zTreeObj.expandAll(true);
}();
var selectScheme = function(val) {
var selectScheme = function (val) {
$("#WorkflowName").empty();
$.getJSON("/workflowschemas/Load",
function(data) {
function (data) {
$.each(data.rows,
function(i, n) {
$("#WorkflowName").append("<option value='" + this.Code + "' v-bind:value='"+this.Code+"'>" + this.Code + "</option>");
function (i, n) {
$("#WorkflowName").append("<option value='" + this.Code + "' v-bind:value='" + this.Code + "'>" + this.Code + "</option>");
});
if (val != undefined) {
@ -66,16 +66,23 @@ function MainGrid() {
index: "CreateUserId",
hidden: true
},
{
index: "Code",
name: "Code",
label: "流程编号"
},
{
index: "CustomName",
name: "CustomName",
label: "申请标题"
},
{
name: "CreateUserName",
index: "CreateUserName",
label: "申请人"
},
{
index: "ActivityName",
name: "ActivityName",
@ -98,11 +105,11 @@ function MainGrid() {
multiselect: true,
multiboxonly: true,
loadComplete: function() {
loadComplete: function () {
var table = this;
setTimeout(function() {
updatePagerIcons(table);
},
setTimeout(function () {
updatePagerIcons(table);
},
0);
}
})
@ -116,7 +123,7 @@ function MainGrid() {
search: false
});
this.reload = function(id) {
this.reload = function (id) {
if (id != undefined) selectedId = id;
this.maingrid.jqGrid("setGridParam", { url: url + selectedId })
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
@ -135,21 +142,13 @@ var vm = new Vue({
function del() {
list.del("Id",
"/FlowInstances/Delete",
function() {
function () {
list.reload();
ztree.reload();
});
}
//自定义的编辑按钮
function edit() {
var selected = list.getSelectedObj();
if (selected == null) {
return;
}
editDlg.update(selected);
}
//进度详情
function detail() {
@ -163,9 +162,9 @@ function detail() {
title: selected.Name,
skin: "layui-layer-rim", //加上边框
area: ["800px", "600px"], //宽高
content: "/FlowManage/FlowInstances/ProcessLookForm?processSchemeId=" + selected.ProcessSchemeId + "&activityId="+selected.ActivityId,
content: "/FlowManage/FlowInstances/ProcessLookForm?processSchemeId=" + selected.ProcessSchemeId + "&activityId=" + selected.ActivityId,
maxmin: true, //开启最大化最小化按钮
end: function() {
end: function () {
list.reload();
}
});
@ -185,22 +184,23 @@ function verificationForm() {
area: ["1200px", "700px"], //宽高
content: "/FlowManage/FlowInstances/VerificationForm?processSchemeId="
+ selected.ProcessSchemeId + "&activityId="
+ selected.ActivityId + "&createusername="
+ selected.CreateUserId + "&description="
+selected.Description,
+ selected.ActivityId + "&processInstanceId="
+ selected.Id + "&createuserid="
+ selected.CreateUserId + "&createusername=" + selected.CreateUserName + "&description="
+ selected.Description,
maxmin: true, //开启最大化最小化按钮
end: function() {
end: function () {
list.reload();
}
});
}
function add() {
editDlg.add();
layer.msg('请在流程设计列表中发起流程!');
}
function refresh() {
list.reload();
}

View File

@ -171,7 +171,6 @@
<Compile Include="WebCtrls\AjaxResult.cs" />
<Compile Include="WebCtrls\GridTree\TreeGridEntity.cs" />
<Compile Include="WebCtrls\GridTree\TreeGridJson.cs" />
<Compile Include="WebCtrls\Grid\GridColumnModel.cs" />
<Compile Include="WebCtrls\Pagination.cs" />
<Compile Include="WebCtrls\Tree\TreeEntity.cs" />
<Compile Include="WebCtrls\Tree\TreeJson.cs" />

View File

@ -1,99 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LeaRun.Util.WebControl
{
/// <summary>
/// 表头属性模型
/// </summary>
public class GridColumnModel
{
/// <summary>
/// 定义表格单元格非表头的对齐方式可取值left, center, right
/// </summary>
public string align { get; set; }
/// <summary>
/// 此属性用于定义列的类名当有多个类名时用空格间隔例如“class1 class2”。在表格的CSS中有一个预定义的类ui-ellipsis用于定义特定的行
/// </summary>
public string classes { get; set; }
/// <summary>
/// 日期格式,可用/-和.。作为间隔符。y、Y、yyyy用于4位年YY、yy用于2位的月d、dd用于日期
/// </summary>
public string datefmt { get; set; }
/// <summary>
/// 搜索字段的缺省值,此参数只用于自定义搜索是的初始值。
/// </summary>
public string defval { get; set; }
/// <summary>
/// 定义字段是否可编辑,用于单元格编辑、行编辑和表单模式
/// </summary>
public bool editable { get; set; }
/// <summary>
/// 根据edittype 参数定义可用的值数组
/// </summary>
public string[] editoptions { get; set; }
/// <summary>
/// 设置可编辑字段的补充规则
/// </summary>
public string[] editrules { get; set; }
/// <summary>
/// 定义行编辑和表单模式的编辑类型可以是text、textarea、select、checkbox、 password、button、image和file。
/// </summary>
public string edittype { get; set; }
/// <summary>
/// 定义表单编辑的各种选项
/// </summary>
public string[] formoptions { get; set; }
/// <summary>
/// 定义初始化时,列是否隐藏。
/// </summary>
public string hidden { get; set; }
/// <summary>
/// 通过sidx参数设置排序时的索引名。
/// </summary>
public string index { get; set; }
/// <summary>
/// 当colNames数组为空时定义此列的标题。若colNames数组和此属性都为空标题为该列的name属性值。
/// </summary>
public string label { get; set; }
/// <summary>
/// 设置列在表格中的唯一名称此属性是必须的。或者使用保留字subgrid、cb和rn.
/// </summary>
public string name { get; set; }
/// <summary>
/// 定义是否可变列宽
/// </summary>
public bool resizable { get; set; }
/// <summary>
/// 定义是否可以排序
/// </summary>
public string sortable { get; set; }
/// <summary>
/// 当datatype为local时用于定义排序列类型。可取int/integer整数、float/number/currency小数、date日期、text文本
/// </summary>
public string sorttype { get; set; }
/// <summary>
/// 当设置为false时鼠标滑向单元格时不显示title属性
/// </summary>
public bool title { get; set; }
/// <summary>
/// 设置列的初始宽度可用pixels和百分比
/// </summary>
public int width { get; set; }
/// <summary>
/// 自定义格式化
/// </summary>
public string formatter { get; set; }
/// <summary>
/// 排序码
/// </summary>
public int? SortCode { get; set; }
/// <summary>
/// 有效
/// </summary>
public int? Enabled { get; set; }
}
}