From bdfd92308ecad92d1b8b6010122167fd2f5181ee Mon Sep 17 00:00:00 2001
From: zhichao lei <442149704@qq.com>
Date: Mon, 28 Sep 2020 16:31:28 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=8C=E6=94=BF=E5=85=AC=E6=96=87=E5=9B=9E?=
=?UTF-8?q?=E5=A4=8D=E5=8E=9F=E6=A0=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/Sys_SendFile/Form.cshtml | 26 ++-
.../Views/Sys_SendFile/Form.js | 194 +++++++++++++++++-
.../Views/Sys_SendFile/FormView.cshtml | 20 +-
.../Views/Sys_SendFile/FormView.js | 25 +--
.../Views/Sys_SendFile/Index.cshtml | 6 +-
.../Views/Sys_SendFile/Index.js | 76 ++-----
.../Views/Sys_SendFile/ReadList.cshtml | 3 +-
.../Views/Sys_SendFile/ReadList.js | 69 -------
.../Views/NWFProcess/htPrint.cshtml | 5 +-
.../EmpInfo/EmpInfoService.cs | 2 +
.../Sys_SendFile/Sys_SendFileService.cs | 167 +++++++++++++--
11 files changed, 417 insertions(+), 176 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml
index b266ec6c7..6312927ed 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml
@@ -7,14 +7,26 @@
主题*
- @*
+
+
+
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js")
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js")
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js
index 1985e9447..87802f8ab 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js
@@ -26,8 +26,70 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
- //$('#ReceiverId').lrUserSelect({ type: '1' });
- //$('#NoReceiver').lrUserSelect({ type: '1' });
+ $('#CompanyId').lrCompanySelect({ type: 'multiple' });
+ $('#DeptId').lrDepartmentSelect({ type: 'treemultiple' });
+ $('#PostId').lrPostSelect({ type: 'treemultiple' });
+ $('#ReceiverUserId').lrUserSelect({ type: '1' });
+ $('#SendType').lrDataItemSelect({
+ code: 'FileSendType', select: function (item) {
+ if (item != null && item != undefined) {
+ if (item.id === 1 || item.id === "1") {
+ $("#CompanyIddiv").show();
+ $("#CompanyId").attr("isvalid", "yes");
+ $("#CompanyId").attr("checkexpession", "NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ } else if (item.id === 2 || item.id === "2") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").show();
+ $("#DeptId").attr("isvalid", "yes");
+ $("#DeptId").attr("checkexpession", "NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ } else if (item.id === 3 || item.id === "3") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").show();
+ $("#PostId").attr("isvalid", "yes");
+ $("#PostId").attr("checkexpession", "NotNull");
+ } else {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").show();
+ $("#ReceiverUserId").attr("isvalid", "yes");
+ $("#ReceiverUserId").attr("checkexpession", "NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ }
+ }
+ }
+ });
+ $('#SendType').lrselectSet("1");
$('#Url').lrUploader();
var ContentsUE = UE.getEditor('Contents');
$('#Contents')[0].ue = ContentsUE;
@@ -41,6 +103,63 @@ var bootstrap = function ($, learun) {
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ if (data[id].SendType === 1 || data[id].SendType == "1") {
+ $("#CompanyIddiv").show();
+ $("#CompanyId").attr("isvalid", "yes");
+ $("#CompanyId").attr("checkexpession", "NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#CompanyId").lrselectSet(data[id].ReceiverId);
+ } else if (data[id].SendType === 2 || data[id].SendType == "2") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").show();
+ $("#DeptId").attr("isvalid", "yes");
+ $("#DeptId").attr("checkexpession", "NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#DeptId").lrselectSet(data[id].ReceiverId);
+ } else if (data[id].SendType === 3 || data[id].SendType === "3") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").show();
+ $("#PostId").attr("isvalid", "yes");
+ $("#PostId").attr("checkexpession", "NotNull");
+ $("#PostId").lrselectSet(data[id].ReceiverId);
+ } else {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").show();
+ $("#ReceiverUserId").attr("isvalid", "yes");
+ $("#ReceiverUserId").attr("checkexpession", "NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId);
+ }
}
}
@@ -61,6 +180,63 @@ var bootstrap = function ($, learun) {
keyValue = data[id].SFileId;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
+ if (data[id].SendType === 1 || data[id].SendType == "1") {
+ $("#CompanyIddiv").show();
+ $("#CompanyId").attr("isvalid", "yes");
+ $("#CompanyId").attr("checkexpession", "NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#CompanyId").lrselectSet(data[id].ReceiverId);
+ } else if (data[id].SendType === 2 || data[id].SendType == "2") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").show();
+ $("#DeptId").attr("isvalid", "yes");
+ $("#DeptId").attr("checkexpession", "NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#DeptId").lrselectSet(data[id].ReceiverId);
+ } else if (data[id].SendType === 3 || data[id].SendType === "3") {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").hide();
+ $("#ReceiverUserId").removeAttr("isvalid");
+ $("#ReceiverUserId").removeAttr("NotNull");
+ $("#PostIddiv").show();
+ $("#PostId").attr("isvalid", "yes");
+ $("#PostId").attr("checkexpession", "NotNull");
+ $("#PostId").lrselectSet(data[id].ReceiverId);
+ } else {
+ $("#CompanyIddiv").hide();
+ $("#CompanyId").removeAttr("isvalid");
+ $("#CompanyId").removeAttr("NotNull");
+ $("#DeptIddiv").hide();
+ $("#DeptId").removeAttr("isvalid");
+ $("#DeptId").removeAttr("NotNull");
+ $("#ReceiverIddiv").show();
+ $("#ReceiverUserId").attr("isvalid", "yes");
+ $("#ReceiverUserId").attr("checkexpession", "NotNull");
+ $("#PostIddiv").hide();
+ $("#PostId").removeAttr("isvalid");
+ $("#PostId").removeAttr("NotNull");
+ $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId);
+ }
}
}
});
@@ -76,6 +252,20 @@ var bootstrap = function ($, learun) {
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
+ var sendtype = $('#SendType').lrselectGet();
+ if (sendtype == "1") {
+ formData.ReceiverId = $("#CompanyId").lrselectGet();
+ formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text();
+ } else if (sendtype == "2") {
+ formData.ReceiverId = $("#DeptId").lrselectGet();
+ formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text();
+ } else if (sendtype == "3") {
+ formData.ReceiverId = $("#PostId").lrselectGet();
+ formData.Receiver = $("#PostId").find(".lr-select-placeholder").text();
+ } else {
+ formData.ReceiverId = $("#ReceiverUserId").lrformselectGet();
+ formData.Receiver = $("#ReceiverUserId").find("span").text();
+ }
if (!!processId) {
formData.SProcessId = processId;
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml
index 0f8eb81cf..70dba3553 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml
@@ -3,17 +3,25 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
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 c2b347179..eb523302a 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,51 +138,6 @@ var bootstrap = function ($, learun) {
});
}
});
-
- // 下发审批指定接收人
- $('#lr_IssueSpecifyReceiver').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('SFileId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '下发审批指定接收人',
- url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueForm?keyValue=' + keyValue,
- 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 () {
@@ -190,21 +145,34 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList',
headData: [
{ label: "主题", name: "Title", width: 300, align: "left" },
- { label: "已接收", name: "Receiver", width: 300, align: "left" },
- { label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" },
- { label: "下发人", name: "Sender", width: 100, align: "left" },
- { label: "下发时间", name: "SendTime", width: 150, 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: "Sender", width: 100, align: "left"
+ },
+ {
+ label: "下发时间", name: "SendTime", width: 150, align: "left"
+ },
{
label: "状态", name: "SendFlag", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue === 1) {
return '审批中';
} else if (cellvalue === 2) {
- return '审批通过';
- } else if (cellvalue === 3) {
- return '审批失败';
- } else if (cellvalue === 4) {
- return '下发完毕';
+ return '已下发';
} else {
return '草稿';
}
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 7321389a5..d3f0e2c7a 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,7 +17,6 @@
@@ -26,4 +25,4 @@
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js")
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js")
\ No newline at end of file
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 65148062e..da100e6ee 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,40 +24,6 @@ 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 () {
@@ -70,30 +36,6 @@ 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) {
@@ -103,16 +45,6 @@ var bootstrap = function ($, learun) {
return '未读';
}
}
- },
- {
- label: "下发状态", name: "SendStatus", width: 100, align: "left",
- formatter: function (cellvalue, row) {
- if (cellvalue === true) {
- return '已下发';
- } else {
- return '未下发';
- }
- }
}
],
mainId: 'RFileId',
@@ -125,7 +57,6 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.SFileId = keyValue;
- param.STypeId = 1;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml
index bd37293b2..f19e0fd41 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml
@@ -27,7 +27,6 @@
被委托人:@ViewBag.UserName(身份证号码:@ViewBag.IDCard)
- (签字)
委托人:关亮(身份证号码:110111196506121035)
@@ -57,8 +56,8 @@