@@ -66,7 +66,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult ReadForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -253,9 +257,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// 查阅 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
@@ -1,43 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "收文报告"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">标题</div> | |||
<input id="DisTitle" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<input id="DisOffice" type="text" class="form-control" /> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i> 提交</a> | |||
<a id="lr_Read" class="btn btn-default"><i class="fa fa-print"></i> 查阅</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/Index.js") |
@@ -1,104 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-06-01 11:49 | |||
* 描 述:收文报告 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | |||
headData: [ | |||
//{ | |||
// label: "标题", name: "DisTitle", width: 400, align: "center", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'Dispatch', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" }, | |||
{ label: "字", name: "DisWork", width: 150, align: "center" }, | |||
{ label: "号", name: "DisMark", width: 150, align: "center" }, | |||
{ label: "份数", name: "Copies", width: 100, align: "center" }, | |||
{ label: "年", name: "DisYear", width: 100, align: "center" }, | |||
{ label: "月", name: "DisMonth", width: 100, align: "center" }, | |||
{ label: "日", name: "DisDay", width: 100, align: "center" }, | |||
{ label: "事由", name: "Reasons", width: 500, align: "center" }, | |||
//{ label: "呈送意见", name: "Render", width: 200, align: "center" }, | |||
//{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" }, | |||
//{ | |||
// label: "收文单位", name: "DisOffice", width: 200, align: "center", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'DisOffice', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ | |||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 0) { | |||
return '<span class=\"label label-warning\">草稿</span>'; | |||
} if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">审批通过</span>'; | |||
} | |||
} | |||
} | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.WorkName = 1; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: 'Dispatch',// 填写流程对应模板编号 | |||
//schemeCode: 'DBSW',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -40,10 +40,6 @@ var bootstrap = function ($, learun) { | |||
page.search(); | |||
}); | |||
} | |||
//if (res) { | |||
// processId = learun.newGuid(); | |||
// res = top[id].save(processId, refreshGirdData); | |||
//} | |||
return res; | |||
} | |||
}); | |||
@@ -78,6 +74,29 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//查阅 | |||
$('#lr_Read').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var FlowNo = $('#gridtable').jfGridValue('FlowNo'); | |||
if (FlowNo != 2) { | |||
learun.alert.warning("当前项目不能查阅!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查阅', | |||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/ReadForm?keyValue=' + keyValue, | |||
width: 800, | |||
height: 380, | |||
callBack: function (id) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function (res) { | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -45,41 +45,6 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
}); | |||
//查阅 | |||
$('#lr_Read').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var FlowNo = $('#gridtable').jfGridValue('FlowNo'); | |||
if (FlowNo ==0) { | |||
learun.alert.warning("当前项目未提交,请先提交!"); | |||
return; | |||
} | |||
top.layer.open({ | |||
id: 'FileList', | |||
//type: 2, | |||
title: '查看', | |||
area: ['1000px', '600px'], | |||
btn: ['保存','关闭'], | |||
skin: 'lr-layer', | |||
success: function (layero, index) { | |||
top['FileList'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); | |||
//判断查阅状态 | |||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function () { | |||
// refreshGirdData(); | |||
}); | |||
}, | |||
yes: function (index) { | |||
var flag = top['FileList'].acceptClick(refreshGirdData); | |||
if (flag) { | |||
learun.layerClose('', index); | |||
} | |||
}, | |||
end: function () { | |||
top['FileList'] = null; | |||
} | |||
}); | |||
} | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -92,7 +57,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&WorkName=' + 2 + '&DisOffice=' + 2, | |||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 380, | |||
callBack: function (id) { | |||
@@ -110,6 +75,29 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//查阅 | |||
$('#lr_Read').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var FlowNo = $('#gridtable').jfGridValue('FlowNo'); | |||
if (FlowNo != 2) { | |||
learun.alert.warning("当前项目不能查阅!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查阅', | |||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/ReadForm?keyValue=' + keyValue, | |||
width: 800, | |||
height: 380, | |||
callBack: function (id) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue }, function (res) { | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -8,9 +8,9 @@ | |||
<div id="DisTitle" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Dispatch"> | |||
<div class="lr-form-item-title">来文单位<font face="宋体">*</font></div> | |||
<input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="lr-form-item-title">来文单位<font face="宋体">*</font></div> | |||
<input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="Dispatch"> | |||
<div class="lr-form-item-title">字<font face="宋体">*</font></div> | |||
<input id="DisWork" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
@@ -43,7 +43,7 @@ | |||
<div class="lr-form-item-title">附 件</div> | |||
<div id="AttachmentName"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Dispatch" hidden="hidden"> | |||
<div class="col-xs-4 lr-form-item" data-table="Dispatch" hidden="hidden"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="DisOffice" readonly="readonly"></div> | |||
</div> | |||
@@ -63,13 +63,13 @@ | |||
onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RenderDate').trigger('change'); } })" | |||
isvalid="yes" checkexpession="NotNull" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; "> | |||
<div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | |||
<div class="lr-form-item-title">流程</div> | |||
<input id="FlowNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; "> | |||
<div class="col-xs-6 lr-form-item" data-table="Dispatch" style="display: none; "> | |||
<div class="lr-form-item-title">关联流程</div> | |||
<input id="processId" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/FormView.js") | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/ReadForm.js") |
@@ -84,7 +84,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
else { | |||
if (id == 'Dispatch' && data[id]) { | |||
//keyValue = data[id].Id; | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
@@ -109,18 +109,12 @@ var bootstrap = function ($, learun) { | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
if (!!callBack) { | |||
var res = { | |||
code: 200 | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
callBack(res, i); | |||
} | |||
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(res, i); | |||
// } | |||
//}); | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -940,8 +940,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ClassInfo\FormType.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\ReadForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\CheckForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\IndexXF.cshtml" /> | |||
@@ -7242,7 +7242,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSubsideManage\CheckIndex.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\CheckIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Dispatch\ReadForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -144,5 +144,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="DisId">关联主键</param> | |||
/// <param name="Name">用户名</param> | |||
public void Repetition(string DisId) | |||
{ | |||
try | |||
{ | |||
dispatchAuditService.Repetition(DisId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -51,5 +51,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void SaveEntity(string keyValue, DispatchAuditEntity entity); | |||
#endregion | |||
/// <summary> | |||
/// 判断重复 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
void Repetition(string DisId); | |||
} | |||
} |
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -25,7 +26,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
public DispatchAuditService() | |||
{ | |||
fieldSql=@" | |||
fieldSql = @" | |||
t.Id, | |||
t.DisId, | |||
t.AuditTime, | |||
@@ -41,7 +42,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="queryJson">条件参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DispatchAuditEntity> GetList( string queryJson ) | |||
public IEnumerable<DispatchAuditEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
@@ -134,7 +135,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<DispatchAuditEntity>(t=>t.Id== keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<DispatchAuditEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -184,5 +185,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 查询数据 | |||
/// </summary> | |||
/// <param name="DisId"></param> | |||
/// <param name="Name"></param> | |||
public void Repetition(string DisId) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(DisId)) | |||
{ | |||
this.BaseRepository("CollegeMIS").FindList<DispatchAuditEntity>().Where(o => o.DisId == DisId); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |