Browse Source

保存 有权限查阅的用户

添加查阅功能等
master
edy 3 years ago
parent
commit
5cc322f2f6
18 changed files with 779 additions and 144 deletions
  1. +50
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs
  2. +9
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml
  4. +20
    -50
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml
  6. +20
    -50
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js
  7. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml
  8. +13
    -23
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.js
  10. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadIndex.cshtml
  11. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadIndex.js
  12. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.cshtml
  13. +216
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.css
  14. +247
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.js
  15. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  16. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchBLL.cs
  17. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchEntity.cs
  18. +7
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs

+ 50
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs View File

@@ -8,6 +8,7 @@ using System.Collections.Generic;
using Learun.Application.WorkFlow;
using Learun.Application.Base.SystemModule;
using System.Linq;
using DocumentFormat.OpenXml.EMMA;
using Learun.Application.Organization;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
@@ -46,6 +47,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View("IndexXF");
}

public ActionResult ReadIndex()
{
return View();
}

/// <summary>
/// 表单页
/// <summary>
@@ -71,6 +78,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}


[HttpGet]
public ActionResult SelectForm()
{
return View();
}

#endregion

#region 获取数据
@@ -265,27 +280,35 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View(dispatchEntity);
}

#region 查阅
/// <summary>
/// 查阅
/// </summary>
/// <param name="keyValue"></param>
/// <param name="reader"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Read(string keyValue)
public ActionResult Read(string keyValue, string reader)
{
DispatchAuditEntity entityaudit = new DispatchAuditEntity();
var userInfo = LoginUserInfo.Get();
var Model = dispatchAuditIBLL.Repetition(keyValue, userInfo.realName);
if (Model != null)
string userIds = userInfo.userId;
if (reader.Contains(userIds))
{
int i = 1;
}

var model = dispatchAuditIBLL.Repetition(keyValue, userInfo.realName);
if (model != null)
{
return Fail("请勿重复批阅!");
}
else
{
var dispatchEntity = dispatchIBLL.GetDispatchEntity(keyValue);
var PrintList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).Select(x => x.F_CreateUserName);
if (PrintList.Contains(userInfo.realName))
var printList = nWFTaskIBLL.GetLogList(dispatchEntity.processId).Select(x => x.F_CreateUserName);
if (printList.Contains(userInfo.realName))
{
return Fail("请勿重复批阅!");
}
@@ -301,5 +324,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
#endregion

#region 设置传阅人
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SetRead(string objectId, string userIds)
{
var model = dispatchIBLL.GetDispatchEntity(objectId);
if (!string.IsNullOrEmpty(model.Reader))
{
return Fail("请勿重复设置传阅人!");
}
else
{
model.Reader = userIds;
dispatchIBLL.SaveEntity(objectId, model);
return Success("设置成功!");
}
}
#endregion

#endregion

}
}

+ 9
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml View File

@@ -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" />
@@ -47,12 +47,12 @@
<div class="lr-form-item-title">收文单位</div>
<div id="DisOffice" readonly="readonly"></div>
</div>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; " >
<div class="lr-form-item-title">呈送时间</div>
<input id="RenderDate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
</div>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; ">
<div class="lr-form-item-title">呈送时间</div>
<input id="RenderDate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
</div>
@*<div class="col-xs-12 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">呈送意见</div>
<textarea id="Render" class="form-control" style="height:100px;"></textarea>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml View File

@@ -31,7 +31,7 @@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp; 提交</a>
<a id="lr_Read" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;查阅</a>
<a id="lr_setread" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;设置传阅</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 20
- 50
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js View File

@@ -74,29 +74,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 != 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');
@@ -152,24 +129,31 @@ var bootstrap = function ($, learun) {
});
}
});
// 添加传阅人
$('#lr_setread').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var loginInfo = learun.clientdata.get(['userinfo']);
console.log(loginInfo);
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '添加传阅人员',
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/SelectForm?objectId=' + keyValue + '&companyId=' + loginInfo.F_CompanyId + '&departmentId=' + loginInfo.F_DepartmentId + '&category=1',
width: 800,
height: 520,
callBack: function (id) {
return top[id].acceptClick();
}
});
}
});
},
// 初始化列表
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);
// }
// });
// }
//},
headData:
[
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" },
{ label: "字", name: "DisWork", width: 150, align: "center" },
{ label: "号", name: "DisMark", width: 150, align: "center" },
@@ -178,20 +162,6 @@ var bootstrap = function ($, learun) {
{ 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) {


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml View File

@@ -31,7 +31,7 @@
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp; 提交</a>
<a id="lr_Read" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp; 查阅</a>
<a id="lr_setread" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置传阅</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 20
- 50
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js View File

@@ -75,29 +75,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 != 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');
@@ -153,24 +130,31 @@ var bootstrap = function ($, learun) {
});
}
});
// 添加传阅人
$('#lr_setread').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var loginInfo = learun.clientdata.get(['userinfo']);
console.log(loginInfo);
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '添加传阅人员',
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/SelectForm?objectId=' + keyValue + '&companyId=' + loginInfo.F_CompanyId + '&departmentId=' + loginInfo.F_DepartmentId + '&category=1',
width: 800,
height: 520,
callBack: function (id) {
return top[id].acceptClick();
}
});
}
});
},
// 初始化列表
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);
// }
// });
// }
//},
headData:
[
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" },
{ label: "字", name: "DisWork", width: 150, align: "center" },
{ label: "号", name: "DisMark", width: 150, align: "center" },
@@ -179,20 +163,6 @@ var bootstrap = function ($, learun) {
{ 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) {


+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml View File

@@ -340,8 +340,6 @@
$('#lr_print').on('click', function () {
$('#content').jqprint();
});

console.log(sss);
</script>
</body>


+ 13
- 23
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.cshtml View File

@@ -9,35 +9,35 @@
</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" />
<input id="DisFrom" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</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" />
<input id="DisWork" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">号<font face="宋体">*</font></div>
<input id="DisMark" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
<input id="DisMark" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">份数<font face="宋体">*</font></div>
<input id="Copies" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
<input id="Copies" type="text" class="form-control" isvalid="yes" checkexpession="Num" readonly="readonly" />
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">年<font face="宋体">*</font></div>
<input id="DisYear" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
<input id="DisYear" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">月<font face="宋体">*</font></div>
<input id="DisMonth" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
<input id="DisMonth" type="text" class="form-control" isvalid="yes" checkexpession="Num" readonly="readonly" />
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">日<font face="宋体">*</font></div>
<input id="DisDay" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
<input id="DisDay" type="text" class="form-control" isvalid="yes" checkexpession="Num" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">事&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;由</div>
<textarea id="Reasons" class="form-control" style="height:100px;"></textarea>
<textarea id="Reasons" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件</div>
@@ -47,22 +47,12 @@
<div class="lr-form-item-title">收文单位</div>
<div id="DisOffice" readonly="readonly"></div>
</div>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; " >
<div class="lr-form-item-title">呈送时间</div>
<input id="RenderDate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
</div>
@*<div class="col-xs-12 lr-form-item" data-table="Dispatch">
<div class="lr-form-item-title">呈送意见</div>
<textarea id="Render" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-4 lr-form-item" data-table="Dispatch">
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Dispatch" style="display: none; ">
<div class="lr-form-item-title">呈送时间</div>
<input id="RenderDate" type="text" autocomplete="off" class="form-control lr-input-wdatepicker"
onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RenderDate').trigger('change'); } })"
isvalid="yes" checkexpession="NotNull" />
</div>*@
<input id="RenderDate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
</div>
<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" />


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadForm.js View File

@@ -44,6 +44,7 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#WorkName').lrDataItemSelect({ code: 'Dispatch' });
$('#AttachmentName').lrUploader();
$('#DisOffice').lrDataItemSelect({ code: 'DisOffice' });
if (DisOffice == "1") {


+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadIndex.cshtml View File

@@ -0,0 +1,34 @@
@{
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>
<div id="WorkName"></div>
</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_read" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查阅</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/ReadIndex.js")

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/ReadIndex.js View File

@@ -0,0 +1,121 @@
/* * 版 本 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);
}, 100, 400);
$('#WorkName').lrDataItemSelect({ code: 'Dispatch' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
//查阅
$('#lr_read').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var reader = $('#gridtable').jfGridValue('Reader');
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 +'&reader='+reader,
width: 800,
height: 380,
callBack: function (id) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/Read', { keyValue: keyValue ,reader: reader }, function (res) {
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList',
headData: [
{
label: "来源",name: "WorkName",width: 300,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: 300, align: "center" },
{ label: "字", name: "DisWork", width: 100, align: "center" },
{ label: "号", name: "DisMark", width: 100, 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: 400, align: "center" },
{ label: "传阅人员", name: "Reader", width: 100, align: "center",hidden:true},
//{ label: "呈送意见", name: "Render", width: 200, align: "center" },
//{ label: "呈送时间", name: "RenderDate", width: 100, align: "center" },
//{
{
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();
}

+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.cshtml View File

@@ -0,0 +1,26 @@
@{
ViewBag.Title = "成员添加";
Layout = "~/Views/Shared/_Form.cshtml";
}
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/Dispatch/SelectForm.css")
<div class="form-warp">
<div class="form-warp-left">
<div id="company_select" class="company-select"></div>
<div id="department_tree" class="department-tree"></div>
</div>
<div class="form-warp-main">
<div class="user-search">
<input id="txt_keyword" type="text" class="form-control" placeholder="请输入要查询关键字">
<span class="input-query" title="Search"><i class="fa fa-search"></i></span>
<div class="user-selected-btn" id="user_selected_btn">已选人员</div>
</div>
<div class="user-list" id="user_list_warp"><div id="user_list"></div></div>
</div>
<div class="form-warp-right" id="form_warp_right">
<div class="form-warp-right-title">已选人员<span class="form-warp-right-close" id="user_selected_btn_close" title="关闭"></span></div>
<div class="selected-user-list-warp" id="selected_user_list_warp">
<div id="selected_user_list"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/SelectForm.js")

+ 216
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.css View File

@@ -0,0 +1,216 @@
.form-warp {
position:relative;
width:100%;
height:100%;
padding-left:200px;
}
.form-warp-left {
position:absolute;
left:0;
top:0;
width:200px;
height:100%;
padding-top:28px;
}
.company-select {
position:absolute;
top:0;
left:0;
height:28px;
width:100%;
border:1px solid #ddd;
border-top:0px;
border-left:0px;
}
.learun-select.learun-select-focus {
border: 1px solid #ddd;
border-top:0px;
border-left:0px;
}
.learun-select-placeholder {
padding-left:15px;
}
.learun-select-option {
border:0px;
border-bottom:1px solid #ddd;
}


.department-tree {
position:relative;
height:100%;
width:100%;
border-right:1px solid #ddd;
}
.form-warp-main {
position:relative;
height:100%;
width:100%;
padding-top:28px;

}
.user-search {
position:absolute;
top:0;
left:0;
width:100%;
height:28px;
border-bottom:1px solid #ddd;
}
.user-list {
position:relative;
height:100%;
width:100%;
}

.card-box {
position:relative;
float: left;
width: 185px;
height: 60px;
border: 1px solid #ccc;
background-color: #fff;
border-radius: 3px;
margin: 10px 0 0 10px;
padding-left:65px;
padding-top:4px;
overflow: hidden;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
-khtml-user-select: none;
user-select: none;
cursor: pointer;
}
.card-box.active {
border: 2px solid #ff5d5b;
background: url(/Content/images/selected_red.png) right top no-repeat;
}
.card-box-img {
position: absolute;
left:0;
top:0;
width: 59px;
height: 58px;
line-height:58px;
padding-left:9px;
background-color: #ebebeb;
border-right: 1px solid #ccc;
}
.card-box-img img {
border-radius: 45px;
}
.card-box-content p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin:0;
}
.form-warp-right {
position:absolute;
top:0;
right:-180px;
height:100%;
width:180px;
border-left:1px solid #ddd;
padding-top:28px;
background-color:#fff;
z-index:10;
}
.form-warp-right-close {
position: absolute;
top: 7px;
right: 4px;
width: 12px;
height: 13px;
display: block;
background: url(/Content/images/tab_close.png) no-repeat;
cursor:pointer;
}
.form-warp-right-close:hover {
background-position: 0 -12px;
}

.form-warp-right-title {
position:absolute;
top:0;
left:0;
height:28px;
line-height:27px;
padding-left:10px;
width:100%;
border-bottom:1px solid #ddd;
padding-right:80px;
}
.selected-user-list-warp {
position:relative;
height:100%;
width:100%;
}

.user-selected-box {
position:relative;
width:160px;
height:44px;
border:1px solid #ccc;
border-radius:4px;
margin:auto;
margin-top:10px;
padding:5px 0 0 10px;
}
.user-selected-box p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin:0;
}

.user-reomve {
position: absolute;
top: 2px;
right: 2px;
width: 12px;
height: 13px;
display: block;
background: url(/Content/images/tab_close.png) no-repeat;
cursor:pointer;
}
.user-reomve:hover {
background-position: 0 -12px;
}


.user-selected-btn {
position:absolute;
top:0;
right:0;
height:100%;
width:80px;
line-height:27px;
text-align:center;
border-left:1px solid #ddd;
cursor:pointer;

background-color:#eee;
color:#666;
}
.user-selected-btn:hover {
color:#333;
}

.form-control {
border:0px;
height:100%;

}
.input-query {
position: absolute;
right: 86px;
top: 2px;
color: #ccc;
font-size: 16px;
cursor: pointer;
}



+ 247
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/SelectForm.js View File

@@ -0,0 +1,247 @@
/*
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.04.18
* 描 述:成员添加
*/
var objectId = request('objectId');
//var category = request('category');

var companyId = request('companyId');
var departmentId = request('departmentId');

var acceptClick;
var bootstrap = function ($, learun) {
"use strict";


var userlist = {};
var userlistselected = [];
var userlistselectedobj = {};

// 渲染用户列表
function renderUserlist(list) {
var $warp = $('<div></div>');
for (var i = 0, l = list.length; i < l; i++) {
var item = list[i];
var active = "";
var imgName = "UserCard02.png";
if (item.F_Gender == 0) {
imgName = "UserCard01.png";
}
if (userlistselected.indexOf(item.F_UserId) != -1) {
active = "active";
}
var _cardbox = "";
_cardbox += '<div class="card-box ' + active + '" data-value="' + item.F_UserId + '" >';
_cardbox += ' <div class="card-box-img">';
_cardbox += ' <img src="' + top.$.rootUrl + '/Content/images/' + imgName + '" />';
_cardbox += ' </div>';
_cardbox += ' <div class="card-box-content">';
_cardbox += ' <p>账户:' + item.F_Account + '</p>';
_cardbox += ' <p>姓名:' + item.F_RealName + '</p>';
_cardbox += ' <p>部门:<span data-id="' + item.F_DepartmentId + '"></span></p>';
_cardbox += ' </div>';
_cardbox += '</div>';
var $cardbox = $(_cardbox);
$cardbox[0].userinfo = item;
$warp.append($cardbox);
learun.clientdata.getAsync('department', {
key: item.F_DepartmentId,
callback: function (_data, op) {
$warp.find('[data-id="' + op.key + '"]').text(_data.name);
}
});
}
$warp.find('.card-box').on('click', function () {
var $this = $(this);
var userid = $this.attr('data-value');
if ($this.hasClass('active')) {
$this.removeClass('active');
removeUser(userid);
userlistselected.splice(userlistselected.indexOf(userid), 1);

}
else {
$this.addClass('active');
userlistselectedobj[userid] = $this[0].userinfo;
userlistselected.push(userid);
addUser($this[0].userinfo);
}
});

$('#user_list').html($warp);
};

function addUser(useritem) {
var $warp = $('#selected_user_list');
var _html = '<div class="user-selected-box" data-value="' + useritem.F_UserId + '" >';
_html += '<p><span data-id="' + useritem.F_CompanyId + '"></span></p>';
_html += '<p><span data-id="' + useritem.F_DepartmentId + '"></span>【' + useritem.F_RealName + '】</p>';
_html += '<span class="user-reomve" title="移除选中人员"></span>';
_html += '</div>';
$warp.append(_html);
learun.clientdata.getAsync('department', {
key: useritem.F_DepartmentId,
callback: function (_data, op) {
$warp.find('[data-id="' + op.key + '"]').text(_data.name);
}
});
learun.clientdata.getAsync('company', {
key: useritem.F_CompanyId,
callback: function (_data, op) {
$warp.find('[data-id="' + op.key + '"]').text(_data.name);
}
});
};
function removeUser(userid) {
var $warp = $('#selected_user_list');
$warp.find('[data-value="' + userid + '"]').remove();
};

var page = {
init: function () {
page.bind();
page.initData();
},
bind: function () {
// 部门
$('#department_tree').lrtree({
nodeClick: function (item) {
departmentId = item.id;
if (!!userlist[item.id]) {
renderUserlist(userlist[item.id]);
}
else {
learun.httpAsync('GET', top.$.rootUrl + '/LR_OrganizationModule/User/GetList', { companyId: companyId, departmentId: departmentId }, function (data) {
userlist[item.id] = data || [];
renderUserlist(userlist[item.id]);
});
}
}
});
// 公司
$('#company_select').lrCompanySelect({ isLocal: true }).bind('change', function () {
companyId = $(this).lrselectGet();
$('#department_tree').lrtreeSet('refresh', {
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
// 访问数据接口参数
param: { companyId: companyId },
});
});
// 已选人员按钮
$('#user_selected_btn').on('click', function () {
$('#form_warp_right').animate({ right: '0px' }, 300);
});
$('#user_selected_btn_close').on('click', function () {
$('#form_warp_right').animate({ right: '-180px' }, 300);
});
// 搜索
$("#txt_keyword").keydown(function (event) {
if (event.keyCode == 13) {
var keyword = $(this).val();
if (keyword != "") {
learun.httpAsync('GET', top.$.rootUrl + '/LR_OrganizationModule/User/GetList', { companyId: companyId, keyword: keyword }, function (data) {
renderUserlist(data || []);
});
}
else {
var data = userlist[departmentId] || [];
renderUserlist(data);
}
}
});
// 搜索
$(".input-query").click(function () {

var keyword = $("#txt_keyword").val();
if (keyword != "") {
learun.httpAsync('GET', top.$.rootUrl + '/LR_OrganizationModule/User/GetList', { companyId: companyId, keyword: keyword }, function (data) {
renderUserlist(data || []);
});
}
else {
var data = userlist[departmentId] || [];
renderUserlist(data);
}
})
// 选中人员按钮点击事件
$('#selected_user_list').on('click', function (e) {
console.log(11);
var et = e.target || e.srcElement;
var $et = $(et);
if ($et.hasClass('user-reomve')) {
var userid = $et.parent().attr('data-value');
removeUser(userid);
userlistselected.splice(userlistselected.indexOf(userid), 1);
$('#user_list').find('[data-value="' + userid + '"]').removeClass('active');
}
});

// 滚动条
$('#user_list_warp').lrscroll();
$('#selected_user_list_warp').lrscroll();
},
initData: function () {
if (!!companyId) {
$('#company_select').lrselectSet(companyId);
}
if (!!departmentId) {
$('#department_tree').lrtreeSet('setValue', departmentId);
}

$.lrSetForm(top.$.rootUrl + '/LR_AuthorizeModule/UserRelation/GetUserIdList?objectId=' + objectId, function (data) {
if (data.userIds == "") {
return false;
}
var $warp = $('#selected_user_list');
$.each(data.userInfoList, function (id, item) {
if (item) {
userlistselectedobj[item.F_UserId] = item;
}
});
var userList = data.userIds.split(',');
for (var i = 0, l = userList.length; i < l; i++) {
var userId = userList[i];
var item = userlistselectedobj[userId];
if (!!item) {
if (userlistselected.indexOf(userId) == -1) {
userlistselected.push(userId);
}

var _html = '<div class="user-selected-box" data-value="' + item.F_UserId + '" >';
_html += '<p><span data-id="' + item.F_CompanyId + '"></span></p>';
_html += '<p><span data-id="' + item.F_DepartmentId + '"></span>【' + item.F_RealName + '】</p>';
_html += '<span class="user-reomve" title="移除选中人员"></span>';
_html += '</div>';
$warp.append($(_html));
learun.clientdata.getAsync('department', {
key: item.F_DepartmentId,
callback: function (_data, op) {
$warp.find('[data-id="' + op.key + '"]').text(_data.name);
}
});
learun.clientdata.getAsync('company', {
key: item.F_CompanyId,
callback: function (_data, op) {
$warp.find('[data-id="' + op.key + '"]').text(_data.name);
}
});
$('#user_list').find('[data-value="' + item.F_UserId + '"]').addClass('active');
}
}
});
}
};
// 保存数据
acceptClick = function () {
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/SetRead', {
objectId: objectId,
//category: category,
userIds: String(userlistselected)
}, function (res) { });
return true;
};
page.init();
}

+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -940,6 +940,9 @@
<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\ReadIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\SelectForm.css" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\SelectForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\ReadForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\FormView.js" />
@@ -1208,6 +1211,7 @@
<Content Include="Areas\LR_AuthorizeModule\Views\FilterTime\Form.js" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\LookForm.css" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\LookForm.js" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\SelectForm.cshtml" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\SelectForm.css" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\SelectForm.js" />
<Content Include="Areas\LR_CodeDemo\Views\GantProject\Form.js" />
@@ -4189,7 +4193,6 @@
<Content Include="Areas\LR_SystemModule\Views\DataSource\SelectForm.cshtml" />
<Content Include="Views\Home\AdminDesktopTemp.cshtml" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\LookForm.cshtml" />
<Content Include="Areas\LR_AuthorizeModule\Views\UserRelation\SelectForm.cshtml" />
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\Form.cshtml" />
<Content Include="Areas\LR_CodeGeneratorModule\Views\TemplatePC\Index.cshtml" />
<Content Include="Areas\LR_CodeGeneratorModule\Views\TemplateAPP\Index.cshtml" />
@@ -7243,6 +7246,8 @@
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\FormView.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\WorkStudyPositionApply\CheckIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\ReadForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\SelectForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Dispatch\ReadIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchBLL.cs View File

@@ -199,7 +199,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
dispatchService.ModifTimeByProcessId( processId);
dispatchService.ModifTimeByProcessId(processId);
}
catch (Exception ex)
{


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchEntity.cs View File

@@ -104,6 +104,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("PROCESSID")]
public string processId { get; set; }
/// <summary>
/// 保存有权限查看的人(主键)
/// </summary>
[Column("READER")]
public string Reader { get; set; }

#endregion

#region 扩展操作


+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs View File

@@ -49,7 +49,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.Instructions,
t.DisOffice,
t.FlowNo,
t.processId
t.processId,
t.Reader
");
strSql.Append(" FROM Dispatch t ");
strSql.Append(" WHERE 1=1 ");
@@ -67,6 +68,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("DisTitle", "%" + queryParam["DisTitle"].ToString() + "%", DbType.String);
strSql.Append(" AND t.DisTitle Like @DisTitle ");
}
if (!queryParam["DisFrom"].IsEmpty())
{
dp.Add("DisFrom", "%" + queryParam["DisFrom"].ToString() + "%", DbType.String);
strSql.Append(" AND t.DisTitle Like @DisFrom ");
}
return this.BaseRepository("CollegeMIS").FindList<DispatchEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


Loading…
Cancel
Save