diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js index d0407bd70..a862bfbc6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js @@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { $('#AIUsePeople').lrselectRefresh({ url: top.$.rootUrl +'/LR_OrganizationModule/User/GetListByDepartmentId?departmentId='+val.value,text:'F_RealName',value:'F_UserId'}) }}); - $('#AIUsePeople').lrselect({ text: 'F_RealName', value:'F_UserId'}); + $('#AIUsePeople').lrselect({ allowSearch:true, text: 'F_RealName', value:'F_UserId'}); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs index d0c5e2dbd..41439a148 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs @@ -153,6 +153,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("操作成功!"); } + + + /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs index 84f5a5c1d..d29ebadd3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs @@ -185,6 +185,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("删除成功!"); } /// + /// 设置批示状态为已处理 + /// 主键 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult DisPose(string keyValue) + { + sys_ReceiveFileIBLL.DisPose(keyValue); + return Success("操作成功!"); + } + /// /// 保存实体数据(新增、修改) /// 主键 /// @@ -230,6 +242,38 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); return Success("保存成功!"); } + + /// + /// 主任批示 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult ZhuRenP(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + //entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP(); + entity.SpecifyReceiver = "System"; + sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); + return Success("发送成功"); + } + + /// + /// 校长批示 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult XiaoZhangP(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + //entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP(); + entity.SpecifyReceiver = "System"; + sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); + return Success("发送成功"); + } + + /// /// 查看实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js index a5487d379..95d546df3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js @@ -357,9 +357,9 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, - keyId: 'f_departmentid', + keyId: 'id', callback: function (_data) { - callback(_data['f_fullname']); + callback(_data['name']); } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml index 7a8e6875b..8d710de48 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml @@ -31,15 +31,17 @@
-
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js index 6277bb5d1..b3dd34cde 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js @@ -51,11 +51,6 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag != 0) { - learun.alert.warning("当前项目已提交不能编辑!"); - return; - } learun.layerForm({ id: 'form', title: '编辑', @@ -116,25 +111,68 @@ var bootstrap = function ($, learun) { } }); - //  提交 - $('#lr_submit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('RID'); - if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag != 0) { - learun.alert.warning("当前项目已提交,请耐心等待审批!"); - return; + ////  提交 + //$('#lr_submit').on('click', function () { + // var keyValue = $('#gridtable').jfGridValue('RID'); + // if (learun.checkrow(keyValue)) { + // var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); + // if (SendFlag != 0) { + // learun.alert.warning("当前项目已提交,请耐心等待审批!"); + // return; + // } + // learun.layerConfirm('是否确认提交该项!', function (res) { + // if (res) { + // processId = learun.newGuid(); + // learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + // refreshGirdData(res, {}); + // }); + // } + // }); + // } + //}); + + //校办主任阅签 + $('#lr_IssueSpecifyReceiver1').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认请校办主任阅签!', function (res) { + if (res) { + var formData = {}; + formData.RFileId = ''; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ZhuRenP', postData, function (res) { + refreshGirdData(res, {}); + }); + } + }); } - learun.layerConfirm('是否确认提交该项!', function (res) { - if (res) { - processId = learun.newGuid(); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { - refreshGirdData(res, {}); - }); - } - }); - } - }); + }); + //校长书记批办 + $('#lr_IssueSpecifyReceiver2').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认请校校长书记批办!', function (res) { + if (res) { + var formData = {}; + formData.RFileId = ''; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/XiaoZhangP', postData, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 下发审批指定接收人 $('#lr_IssueSpecifyReceiver').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); @@ -164,12 +202,6 @@ var bootstrap = function ($, learun) { $('#lr_OverIssue').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - console.log(SendFlag); - if (SendFlag !== '2') { - learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); - return; - } learun.layerConfirm('是否结束下发!', function (res) { if (res) { processId = learun.newGuid(); @@ -197,7 +229,7 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', headData: [ { @@ -212,6 +244,7 @@ var bootstrap = function ($, learun) { }); } }, + { label: "接收时间", name: "RReceiveTime", width: 100, align: "left" }, { label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, { label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", @@ -261,22 +294,28 @@ var bootstrap = function ($, learun) { }); } }, - { label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "RSendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { if (cellvalue === "1") { - return '审批中'; - } else if (cellvalue === "2") { - return '审批通过'; - } else if (cellvalue === "3") { - return '审批失败'; + return '已下发'; } else if (cellvalue === "4") { return '下发完毕'; } else { return '草稿'; } } + }, + { + label: "是否需要处理", name: "HasDispose", width: 100, align: "left", + formatter: function (cellvalue, row) { + console.log(cellvalue); + if (cellvalue == "1") { + return '需要处理'; + } else { + return '无需处理'; + } + } } ], mainId: 'RID', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml index 65b9df404..116a42a8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml @@ -17,7 +17,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js index e33eb9d0f..25dcee72c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js @@ -25,39 +25,21 @@ var bootstrap = function ($, learun) { location.reload(); }); - $('#lr_Issue').on('click', - function () { - var keyValue = $('#gridtable').jfGridValue('SFileId'); - var rFileId = $('#gridtable').jfGridValue('RFileId'); - var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); - if (learun.checkrow(rFileId)) { - var SendStatus = $('#gridtable').jfGridValue('SendStatus'); - if (SendStatus) { - learun.alert.warning("已下发!"); - return; - } - learun.layerForm({ - id: 'formIssue', - title: '下发', - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue + '&rFileId=' + rFileId + '&specifyReceiver=' + specifyReceiver, - width: 500, - height: 500, - callBack: function (id) { - var res = false; - // 验证数据 - res = top[id].validForm(); - // 保存数据 - if (res) { - res = top[id].save('', function () { - page.search(); - }); - } - return res; + //已处理 + $('#lr_dispose').on('click', + function() { + var sendId = $('#gridtable').jfGridValue('RFileId'); + if (learun.checkrow(sendId)) { + learun.layerConfirm('是否确认此批示已处理!', function (res) { + if (res) { + learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/DisPose?keyValue='+sendId, function () { + page.search(); + }); } }); } - }); + }, // 初始化列表 initGird: function () { @@ -67,33 +49,10 @@ var bootstrap = function ($, learun) { { label: "接收人", name: "Receiver", width: 150, align: "left" }, + { label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "查阅时间", name: "ReadTime", width: 150, align: "left" }, - { - label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: - function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', - { - key: value, - callback: function (_data) { - if (_data.length > 0) { - var text = ''; - $.each(_data, - function (i, item) { - if (item) { - text += item.name + ','; - } - }); - text = text.substring(0, text.lastIndexOf(',')); - callback(text); - } else { - callback(_data.name); - } - } - }); - } - }, { label: "状态", name: "ReadFlag", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -105,20 +64,25 @@ var bootstrap = function ($, learun) { } }, { - label: "下发状态", name: "SendStatus", width: 100, align: "left", - formatter: function (cellvalue, row) { - if (cellvalue === true) { - return '已下发'; - } else { - return '未下发'; + label: "处理状态", name: "RStatus", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + console.log(callback); + switch (callback) { + case 0: + return '未处理'; + case 1: + return '已处理';; + + default: + return '无需处理'; } } - } + }, ], mainId: 'RFileId', isPage: true, sidx: 'ReadFlag,ReadTime', - sord: 'ASC' + sord: 'DASC' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml index 3fe7da42e..faeeea12f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml @@ -23,5 +23,13 @@
内容
+
+
批示
+ +
+
+
通知管理员
+
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js index fbadefa2a..69f163320 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js @@ -22,6 +22,11 @@ var bootstrap = function ($, learun) { layerUrlH: 300, dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' }); + + $('#RStatus').lrRadioCheckbox({data:[{text:'通知',value:0},{text:'不通知',value:1}],text:'text',value:'value' + }); + + $('#SendType').lrDataItemSelect({ code: 'FileSendType' }); if (selectedRow.ReadFlag == true) {//已读 $('#Url').lrUploader(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml index 7d0c09a4a..e5ef59c0c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml @@ -27,7 +27,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js index d85c98cff..aa5c2827d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js @@ -79,22 +79,22 @@ var bootstrap = function ($, learun) { }); } }); - // 指定接收人 - $('#lr_SpecifyReceiver').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('RFileId'); - if (learun.checkrow(keyValue)) { - learun.layerForm({ - id: 'formSys_ReceiveFile', - title: '指定接收人', - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, - width: 600, - height: 400, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); - } - }); + //// 指定接收人 + //$('#lr_SpecifyReceiver').on('click', function () { + // var keyValue = $('#gridtable').jfGridValue('RFileId'); + // if (learun.checkrow(keyValue)) { + // learun.layerForm({ + // id: 'formSys_ReceiveFile', + // title: '指定接收人', + // url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, + // width: 600, + // height: 400, + // callBack: function (id) { + // return top[id].acceptClick(refreshGirdData); + // } + // }); + // } + //}); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RFileId'); @@ -118,32 +118,28 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('RFileId'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { - top.layer.open({ + + //判断查阅状态 + if (selectedRow.ReadFlag == false) { + //判断附件 + //if (selectedRow.Url == null || selectedRow.Url == "") { + //自动已读 + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + //} + } + learun.layerForm({ id: 'formSys_ReceiveFile', - type: 2, title: '查看', - area: ['1000px', '600px'], - btn: null, - content: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, - skin: 'lr-layer-nobtn', - success: function (layero, index) { - top['formSys_ReceiveFile'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); - - //判断查阅状态 - if (selectedRow.ReadFlag == false) { - //判断附件 - //if (selectedRow.Url == null || selectedRow.Url == "") { - //自动已读 - learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - //} - } - }, - end: function () { - top['formSys_ReceiveFile'] = null; + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, + width: 1000, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); } }); + } }); @@ -162,43 +158,12 @@ var bootstrap = function ($, learun) { callback(_data.name); } }); - }}, - { label: "主题", name: "Title", width: 300, align: "left" }, - { label: "发送时间", name: "SendTime", width: 130, align: "left" }, - { - label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'FileSendType', - callback: function (_data) { - callback(_data.text); - } - }); } }, + { label: "主题", name: "Title", width: 300, align: "left" }, + { label: "发送时间", name: "SendTime", width: 130, align: "left" }, { - label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: - function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', - { - key: value, - callback: function (_data) { - if (_data.length > 0) { - var text = ''; - $.each(_data, - function (i, item) { - if (item) { - text += item.name + ','; - } - }); - text = text.substring(0, text.lastIndexOf(',')); - callback(text); - } else { - callback(_data.name); - } - } - }); - } + label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "ReadFlag", width: 100, align: "left", @@ -210,6 +175,19 @@ var bootstrap = function ($, learun) { } } }, + { + label: "是否通知管理员", name: "RStatus", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + switch (callback) { + + case 1: + return '不通知'; + case 0: + return '通知'; + default: + } + } + }, { label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, ], mainId: 'RFileId', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs index 7e1aac7f2..d4aa3188f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs @@ -189,6 +189,12 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("MMM", strSql.ToString()); } + if (dtListEntity.F_Name.Contains("公文接收")) + { + dtListEntity.F_Sql = + "SELECT Title as f_title,SendTime as f_time FROM dbo.Sys_ReceiveFile WHERE DelFlag=0 AND ReadFlag<>1 AND ReceiverId='" + + loginUserInfo.userId + "'"; + } var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/Form.cshtml index 0bb56eee5..60dc7428b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/Form.cshtml @@ -18,8 +18,8 @@
-
信息来源
- +
信息来源*
+
来源地址
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js index fc40d184c..35e94c692 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexFlow.js @@ -75,7 +75,7 @@ var bootstrap = function ($, learun) { }); // 查看 $('#lr_view').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('SFileId'); + var keyValue = $('#gridtable').jfGridValue('F_NewsId'); if (learun.checkrow(keyValue)) { if (keyValue.indexOf(",") != -1) { learun.alert.warning("只能选择一条记录查看!"); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 3a789cc9e..7fd995799 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -168,7 +168,8 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + //ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); return View(); } @@ -476,7 +477,7 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js index 928cc635c..4b59e201f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js @@ -624,8 +624,8 @@ var bootstrap = function ($, learun) { learun.frameTab.open({ F_ModuleId: '104', F_Icon: 'fa fa-user', - F_FullName: '公文查阅', - F_UrlAddress: '/EducationalAdministration/Sys_ReceiveFile/Index' + F_FullName: '公文接收', + F_UrlAddress: '/EducationalAdministration/Sys_ReceiveDocument/Index' }); }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs index bf9a5c81e..1dc980ae9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs @@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("RRECEIVEUNIT")] public string RReceiveUnit { get; set; } /// + /// 接收时间 + /// + [Column("RRECEIVETIME")] + public DateTime? RReceiveTime { get; set; } + /// /// 缓急程度 /// [Column("RURGENCYDEGREE")] @@ -79,6 +84,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("SENDERID")] public string SenderId { get; set; } + /// + /// 需要处理 + /// + [NotMapped] + [Column("HasDispose")] + public int? HasDispose { get; set; } #endregion #region 扩展操作 @@ -90,6 +101,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var loginUser = LoginUserInfo.Get(); this.RID = Guid.NewGuid().ToString(); this.SenderId = loginUser.userId; + this.RReceiveTime = DateTime.Now; this.RSendFlag = "0"; } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs index e6ca855a5..71f56c304 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs @@ -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 @@ -42,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.SpecifyReceiver, t.RContent, t.RSendFlag, + t.RReceiveTime, t.RProcessId "); strSql.Append(" FROM Sys_ReceiveDocument t "); @@ -64,7 +66,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); strSql.Append(" AND t.RTitle Like @RTitle "); } - return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + var list= this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + foreach (var item in list) + { + if(!item.RSendFlag.Equals("4")) + { + var listentity=this.BaseRepository().FindList(a => a.SFileId == item.RID).Count(); + if(listentity>0) + { + item.HasDispose = 1; + } + else + { + item.HasDispose = 0; + } + } + + } + + return list; } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs index a30082a12..62aa0282f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs @@ -90,6 +90,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string senderId) + { + try + { + return sys_ReceiveFileService.GetPageListBySenderId(senderId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取Sys_ReceiveFile表实体数据 @@ -214,6 +232,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void DisPose(string keyValue) + { + try + { + sys_ReceiveFileService.DisPose(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 查看实体数据 @@ -276,6 +312,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public string ZhuRenP() + { + try + { + return sys_ReceiveFileService.ZhuRenP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public string XiaoZhangP() + { + try + { + return sys_ReceiveFileService.XiaoZhangP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs index fc1bd46af..3b91b4259 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs @@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("DELFLAG")] public bool? DelFlag { get; set; } /// + /// 管理员是否已经处理 + /// + [Column("RSTATUS")] + public int? RStatus { get; set; } + /// /// 查阅时间 /// [Column("READTIME")] diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs index 66ab79f86..5390d5fc1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs @@ -40,6 +40,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 用户编号 /// IEnumerable GetPageListByUserId(Pagination pagination, string queryJson, string userId); + IEnumerable GetPageListBySenderId(string senderId); #endregion #region 提交数据 @@ -68,6 +69,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void VirtualDeleteEntity(string keyValue); + void DisPose(string keyValue); /// /// 查看实体数据 /// 主键 @@ -79,5 +81,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void Issue(Sys_IssueEntity entity); void ReceiveDocumentIssue(Sys_IssueEntity entity); + string ZhuRenP(); + string XiaoZhangP(); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs index 6f41043e2..ea7fa1154 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; +using Learun.Application.Base.AuthorizeModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.LR_Desktop; using Microsoft.AspNet.SignalR.Client; @@ -139,6 +140,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string userId) + { + try + { + var list = this.BaseRepository().FindList(a => a.SenderId == userId && a.RStatus==0); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取页面显示列表数据 @@ -245,6 +265,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration oldentity.ReplyFlag = true; oldentity.ReplyTime = DateTime.Now; oldentity.SpecifyReceiver = entity.SpecifyReceiver; + oldentity.RStatus = entity.RStatus; this.BaseRepository().Update(oldentity); } else @@ -322,6 +343,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void DisPose(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.RFileId == keyValue); + if (null != entity) + { + entity.RStatus = 1; + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 查看实体数据 /// 主键 @@ -450,6 +495,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public string ZhuRenP() + { + var loginUser = LoginUserInfo.Get(); + var PeopleInTheSameDepartment = this.BaseRepository() + .FindList(a => a.F_DepartmentId == loginUser.departmentId); + //从同一部门的人中找出主任 + var roleEntity = this.BaseRepository().FindEntity(a => a.F_FullName == "公文接收主任"); + var allZhuRen = new List(); + if (null != roleEntity) + { + allZhuRen = this.BaseRepository() + .FindList(a => a.F_ObjectId == roleEntity.F_RoleId).Select(a => a.F_UserId).ToList(); + } + + var zhurenID = PeopleInTheSameDepartment.FirstOrDefault(a => allZhuRen.Contains(a.F_UserId))?.F_UserId; + return zhurenID; + + } + + public string XiaoZhangP() + { + var xiaozhangID = this.BaseRepository().FindEntity(a=>a.F_RealName.Contains("关亮"))?.F_UserId; + + return xiaozhangID; + } + + /// /// 公文接收 下发指定接收人 /// @@ -460,12 +533,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { //从‘查阅情况’ 列表中跳转 将发送情况改变 - if (!string.IsNullOrEmpty(entity.RFileId)) - { - var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); - rEntity.SendStatus = true; - db.Update(rEntity); - } + //if (!string.IsNullOrEmpty(entity.RFileId)) + //{ + // var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); + // rEntity.SendStatus = true; + // db.Update(rEntity); + //} var Sys_ReceiveDocument = db.FindEntity(a => a.RID == entity.SFileId); var teacherlist = db.FindList(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); @@ -511,6 +584,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); + Sys_ReceiveDocument.RSendFlag = "1"; db.Update(Sys_ReceiveDocument); db.Commit(); //读取信息推送管理-公文下发推送(02)的配置 @@ -592,5 +666,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + } }