mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-07-16 07:59:54 +08:00
流程审核
This commit is contained in:
parent
f0f32036f9
commit
957f0beda8
@ -21,11 +21,17 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
|
||||
#region 视图
|
||||
|
||||
public ActionResult Add()
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public ActionResult Index()
|
||||
|
||||
/// <summary>
|
||||
/// 审核流程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult VerificationForm()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
@ -0,0 +1,218 @@
|
||||
@using OpenAuth.App.SSO
|
||||
@{
|
||||
ViewBag.Title = "审核流程";
|
||||
Layout = "~/Views/Shared/_FlowForm.cshtml";
|
||||
}
|
||||
<script>
|
||||
var processSchemeId = request('processSchemeId');
|
||||
var activityId = request('activityId');
|
||||
var processInstanceId = request('processInstanceId');
|
||||
var createusername = decodeURI(request('createusername'));
|
||||
var description = decodeURI(request('description'));
|
||||
$(function () {
|
||||
var schemeContent;
|
||||
$('#Createusername').val(createusername);
|
||||
$('#Description').val(description);
|
||||
$('#frmtab').height($.windowHeight()-40);
|
||||
$('#VerificationOpinion').height($.windowHeight() - 360);
|
||||
$.SetForm({
|
||||
url: "../../FlowManage/FlowProcess/GetProcessSchemeEntityByNodeId",
|
||||
param: { keyValue: processSchemeId, nodeId: activityId },
|
||||
success: function (data) {
|
||||
schemeContent = JSON.parse(JSON.parse(data.SchemeContent).SchemeContent);
|
||||
frmdata = JSON.parse(JSON.parse(data.SchemeContent).frmData);
|
||||
$('#frmpreview').frmPreview({
|
||||
tablecotent: schemeContent.Frm.FrmContent
|
||||
});
|
||||
$('#FlowPanel').flowdesign({
|
||||
width: $(window).width()-298,
|
||||
height: $(window).height()-42,
|
||||
flowcontent: schemeContent.Flow,
|
||||
haveTool: false,
|
||||
isprocessing: true,
|
||||
activityId: activityId,
|
||||
nodeData: schemeContent.Flow.nodes
|
||||
});
|
||||
$('#frmpreview').frmSetData(frmdata);
|
||||
$('#frmpreview').find('input,select,textarea,.ui-select').attr('disabled', 'disabled');
|
||||
|
||||
//驳回到某一步
|
||||
$("#NodeRejectStep").ComboBox({
|
||||
data: schemeContent.Flow.nodes,
|
||||
id: "id",
|
||||
text: "name",
|
||||
description: "==请选择==",
|
||||
allowSearch: true,
|
||||
height: "300px",
|
||||
});
|
||||
var _node = "";
|
||||
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")
|
||||
{
|
||||
$('input[name = "VerificationFinally"]').click(function () {
|
||||
var _value = $(this).val();
|
||||
var _height = $.windowHeight() - 360;
|
||||
var _height1 = _height - 55;
|
||||
if (_value == "3") {
|
||||
$(".NodeRejectStep").show();
|
||||
$("#VerificationOpinion").height(_height1);
|
||||
}
|
||||
else {
|
||||
$(".NodeRejectStep").hide();
|
||||
$("#VerificationOpinion").height(_height);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn_Submission').click(function () {
|
||||
if (!$('#VerificationInfo').Validform()) {
|
||||
return false;
|
||||
}
|
||||
var _verificationFinally = $('input[name = VerificationFinally]:checked').val();
|
||||
if (_verificationFinally == undefined)
|
||||
{
|
||||
dialogTop("请选择审核结果","error");
|
||||
return false;
|
||||
}
|
||||
var _postdata = $("#VerificationInfo").GetWebControls();
|
||||
|
||||
delete _postdata["VerificationFinally1"];
|
||||
delete _postdata["VerificationFinally2"];
|
||||
delete _postdata["VerificationFinally3"];
|
||||
|
||||
_postdata["VerificationFinally"] = _verificationFinally;
|
||||
$.ConfirmAjax({
|
||||
msg: "请确认是否要【提交审核】流程?",
|
||||
url: "../../FlowManage/FlowProcess/VerificationProcess",
|
||||
param: { processId: processInstanceId, verificationData: JSON.stringify(_postdata) },
|
||||
success: function (data) {
|
||||
$.currentIframe().callBack();
|
||||
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> 提交审核</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>
|
@ -1,67 +0,0 @@
|
||||
@{
|
||||
ViewBag.Title = "查看流程进度";
|
||||
Layout = "~/Views/Shared/_FlowForm.cshtml";
|
||||
}
|
||||
<script>
|
||||
var processSchemeId = request('processSchemeId');
|
||||
var ActivityId = request('activityId');
|
||||
$(function () {
|
||||
var schemeContent;
|
||||
$.SetForm({
|
||||
url: "../../FlowManage/FlowProcess/GetProcessSchemeJson",
|
||||
param: { keyValue: processSchemeId },
|
||||
success: function (data) {
|
||||
schemeContent = JSON.parse(JSON.parse(data.SchemeContent).SchemeContent);
|
||||
frmdata = JSON.parse(JSON.parse(data.SchemeContent).frmData);
|
||||
|
||||
$('#frmpreview').frmPreview({
|
||||
tablecotent: schemeContent.Frm.FrmContent,
|
||||
width:1080
|
||||
});
|
||||
$('#FlowPanel').flowdesign({
|
||||
width: $(window).width()+3,
|
||||
height: $(window).height()-42,
|
||||
flowcontent: schemeContent.Flow,
|
||||
haveTool: false,
|
||||
isprocessing: true,
|
||||
activityId: ActivityId,
|
||||
nodeData: schemeContent.Flow.nodes
|
||||
});
|
||||
|
||||
$('#frmpreview').frmSetData(frmdata);
|
||||
$('#frmpreview').find('input,select,textarea,.ui-select').attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#FlowPanel" data-toggle="tab">流程信息</a></li>
|
||||
<li><a href="#frmpreview" data-toggle="tab">表单信息</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div id="FlowPanel" class="tab-pane active">
|
||||
</div>
|
||||
<div id="frmpreview" class="tab-pane app_layout app_preview">
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
body {
|
||||
overflow:hidden;
|
||||
}
|
||||
.app_preview {
|
||||
height:620px;
|
||||
}
|
||||
.app_preview .item_field_value {
|
||||
width:964px;
|
||||
}
|
||||
.app_preview .item_row {
|
||||
background-color: #fff;
|
||||
}
|
||||
.app_layout .item_field_label {
|
||||
background-color: #fff;
|
||||
}
|
||||
input, textarea {
|
||||
background: #fff!important;
|
||||
}
|
||||
</style>
|
@ -61,6 +61,11 @@ function MainGrid() {
|
||||
index: "ActivityId",
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
name: "CreateUserId",
|
||||
index: "CreateUserId",
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
index: "Code",
|
||||
name: "Code",
|
||||
@ -69,7 +74,7 @@ function MainGrid() {
|
||||
{
|
||||
index: "CustomName",
|
||||
name: "CustomName",
|
||||
label: "流程名称"
|
||||
label: "申请标题"
|
||||
},
|
||||
{
|
||||
index: "ActivityName",
|
||||
@ -166,6 +171,30 @@ function detail() {
|
||||
});
|
||||
}
|
||||
|
||||
//审核
|
||||
function verificationForm() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: selected.Name,
|
||||
skin: "layui-layer-rim", //加上边框
|
||||
area: ["1200px", "700px"], //宽高
|
||||
content: "/FlowManage/FlowInstances/VerificationForm?processSchemeId="
|
||||
+ selected.ProcessSchemeId + "&activityId="
|
||||
+ selected.ActivityId + "&createusername="
|
||||
+ selected.CreateUserId + "&description="
|
||||
+selected.Description,
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
end: function() {
|
||||
list.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function add() {
|
||||
editDlg.add();
|
||||
}
|
||||
|
@ -1466,11 +1466,11 @@
|
||||
<Content Include="Content\styles\fonts\FontAwesome.otf" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowMyProcess\Index.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowMyProcess\ProcessAgainNewForm.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowMyProcess\ProcessLookForm.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowInstances\ProcessLookForm.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowLaunch\FlowProcessNewForm.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowLaunch\Index.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowDesign\PreviewIndex.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\FlowInstances\VerificationForm.cshtml" />
|
||||
<None Include="Properties\PublishProfiles\default.pubxml" />
|
||||
<None Include="Views\Error\NoAccess.cshtml" />
|
||||
<Content Include="Views\Home\git.cshtml" />
|
||||
|
Loading…
Reference in New Issue
Block a user