+
-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js
index eb523302a..2a3ddd474 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js
@@ -138,6 +138,52 @@ var bootstrap = function ($, learun) {
});
}
});
+
+ // 下发审批指定接收人
+ $('#lr_IssueSpecifyReceiver').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('SFileId');
+ var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver');
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'form',
+ title: '下发审批指定接收人',
+ url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueForm?keyValue=' + keyValue + '&specifyReceiver=' + specifyReceiver,
+ width: 800,
+ height: 200,
+ callBack: function (id) {
+ var res = false;
+ // 验证数据
+ res = top[id].validForm();
+ // 保存数据
+ if (res) {
+ res = top[id].save('', function () {
+ page.search();
+ });
+ }
+ return res;
+ }
+ });
+ }
+ });
+ // 结束
+ $('#lr_OverIssue').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('SFileId');
+ if (learun.checkrow(keyValue)) {
+ var SendFlag = $('#gridtable').jfGridValue('SendFlag');
+ if (SendFlag !== 2) {
+ learun.alert.warning("当前公文未审批通过,请耐心等待审批!");
+ return;
+ }
+ learun.layerConfirm('是否结束下发!', function (res) {
+ if (res) {
+ processId = learun.newGuid();
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) {
+ refreshGirdData(res, {});
+ });
+ }
+ });
+ }
+ });
},
// 初始化列表
initGird: function () {
@@ -146,19 +192,31 @@ var bootstrap = function ($, learun) {
headData: [
{ label: "主题", name: "Title", width: 300, 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: "Receiver", width: 300, align: "left"
},
{
- label: "接收人", name: "Receiver", width: 300, 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: "Sender", width: 100, align: "left"
@@ -172,7 +230,11 @@ var bootstrap = function ($, learun) {
if (cellvalue === 1) {
return '
审批中';
} else if (cellvalue === 2) {
- return '
已下发';
+ return '
审批通过';
+ } else if (cellvalue === 3) {
+ return '
审批失败';
+ } else if (cellvalue === 4) {
+ return '
下发完毕';
} else {
return '
草稿';
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml
new file mode 100644
index 000000000..4354f033a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml
@@ -0,0 +1,11 @@
+@{
+ ViewBag.Title = "公文发送";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js
new file mode 100644
index 000000000..885d83209
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js
@@ -0,0 +1,96 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-04-11 10:31
+ * 描 述:公文发送
+ */
+var acceptClick;
+var keyValue = request('keyValue');
+var rFileId = request('rFileId');
+var specifyReceiver = request('specifyReceiver');
+// 设置权限
+var setAuthorize;
+// 设置表单数据
+var setFormData;
+// 验证数据是否填写完整
+var validForm;
+// 保存数据
+var save;
+var bootstrap = function ($, learun) {
+ "use strict";
+ // 设置权限
+ setAuthorize = function (data) {
+ };
+ var page = {
+ init: function () {
+ $('.lr-form-wrap').lrscroll();
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#SpecifyReceiver').lrUserSelect({ type: '1' });
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetFormData?keyValue=' + keyValue, function (data) {
+ for (var id in data) {
+ if (!!data[id].length && data[id].length > 0) {
+ $('#' + id).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ if (rFileId) {
+ $('#SpecifyReceiver').lrformselectSet(specifyReceiver);
+ } else {
+
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+
+ }
+ }
+
+ });
+ }
+ }
+ };
+ // 设置表单数据
+ setFormData = function (processId) {
+ if (!!processId) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetFormDataByProcessId?processId=' + processId, function (data) {
+ for (var id in data) {
+ if (!!data[id] && data[id].length > 0) {
+ $('#' + id).jfGridSet('refreshdata', data[id]);
+ }
+ else {
+ if (id == 'Sys_SendFile') {
+ keyValue = data[id].SFileId;
+ }
+ $('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ }
+ }
+ });
+ }
+ }
+ // 验证数据是否填写完整
+ validForm = function () {
+ if (!$('#form').lrValidform()) {
+ return false;
+ }
+ return true;
+ };
+ // 保存数据
+ save = function (processId, callBack, i) {
+ var formData = $('body').lrGetFormData();
+ formData.RFileId = rFileId;
+ formData.SFileId = keyValue;
+ var postData = {
+ strEntity: JSON.stringify(formData)
+ };
+ $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Issue', postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack(res, formData, i);
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml
index 8442521e0..7321389a5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml
@@ -17,6 +17,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js
index da100e6ee..4f2f9e528 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js
@@ -24,6 +24,40 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
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_SendFile/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;
+ }
+ });
+ }
+
+ });
},
// 初始化列表
initGird: function () {
@@ -36,6 +70,30 @@ var bootstrap = function ($, learun) {
{
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) {
@@ -45,6 +103,16 @@ var bootstrap = function ($, learun) {
return '
未读';
}
}
+ },
+ {
+ label: "下发状态", name: "SendStatus", width: 100, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue === true) {
+ return '
已下发';
+ } else {
+ return '
未下发';
+ }
+ }
}
],
mainId: 'RFileId',
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml
index d9c93f669..03657cc84 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml
@@ -9,7 +9,7 @@