diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs index d8397a484..74f3f633a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs @@ -20,7 +20,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); private DepartmentBLL departmentIBLL = new DepartmentBLL(); - private QualityReportMainIBLL fualityReportMainIBLL = new QualityReportMainBLL(); + private QualityReportMainIBLL qualityReportMainIBLL = new QualityReportMainBLL(); + #region 视图功能 /// @@ -76,15 +77,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } - /// - /// 设置公式 - /// - /// - [HttpGet] - public ActionResult Formula() - { - return View(); - } #endregion #region 获取数据 @@ -122,11 +114,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var FillinFromData = fillinFromIBLL.GetFillinFromEntity(keyValue); if (FillinFromData.FillingCycle == "2") { - FillinFromData.FillingTime2= FillinFromData.FillingTime; + FillinFromData.FillingTime2 = FillinFromData.FillingTime; } else { - FillinFromData.FillingTime1= FillinFromData.FillingTime; + FillinFromData.FillingTime1 = FillinFromData.FillingTime; } var jsonData = new { @@ -151,7 +143,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers if (Model != null) { Model.State = -1; - fualityReportMainIBLL.DelProjectByFId(keyValue); + qualityReportMainIBLL.DelProjectByFId(keyValue); } fillinFromIBLL.SaveEntity(keyValue, Model); return Success("作废成功!"); @@ -177,7 +169,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers entity.State = 2; } #endregion - fualityReportMainIBLL.EditProjectByFId(keyValue); + qualityReportMainIBLL.EditProjectByFId(keyValue); } #region 处理填报日期 @@ -263,11 +255,41 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers Model.State = 0; Model.FillingPeople = ""; } - fualityReportMainIBLL.EditProjectByFId(keyValue); + qualityReportMainIBLL.EditProjectByFId(keyValue); fillinFromIBLL.SaveEntity(keyValue, Model); return Success("保存成功!"); } + /// + /// 归档 + /// + /// + /// + public ActionResult IsFile(string keyValue) + { + var Model = fillinFromIBLL.GetFillInNo(keyValue); + if (Model != null) + { + var ModeList = qualityReportMainIBLL.IsFinish(keyValue); + if (ModeList != null) + { + if (ModeList.Status == 1) + { + Model.State = 3; + } + else + { + return Success("归档失败!"); + } + } + else + { + return Success("归档失败!"); + } + } + fillinFromIBLL.SaveEntity(keyValue, Model); + return Success("归档成功!"); + } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js index 5e4d30951..513d89b4c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js @@ -193,16 +193,16 @@ var bootstrap = function ($, learun) { { label: "状态", name: "State", width: 150, align: "center", formatter: function (cellvalue) { - if (cellvalue === 0) { + if (cellvalue === -1) { + return '作废'; + } else if (cellvalue === 0) { return '草稿'; } else if (cellvalue === 1) { return '待设置填报人'; } else if (cellvalue === 2) { - return '待设置公式'; - } else if (cellvalue === 3) { return '待填报'; - } else { - return '已完成'; + } else if (cellvalue === 3) { + return '已完成'; } } }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js index 3f6672d27..0eb1fb2e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js @@ -16,19 +16,19 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#Formula').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' }); - $('#Formula').lrGirdSelect({ - url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain', - selectWord: 'name', - value: 'id', - text: 'name', - headData: - [ - { label: "公式", name: "result", width: 300, align: "left" }, - { label: "公式名称", name: "name", width: 300, align: "left" } - ], - select: function (item) { - } - }); + //$('#Formula').lrGirdSelect({ + // url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain', + // selectWord: 'name', + // value: 'id', + // text: 'name', + // headData: + // [ + // { label: "公式", name: "result", width: 300, align: "left" }, + // { label: "公式名称", name: "name", width: 300, align: "left" } + // ], + // select: function (item) { + // } + //}); $('#lrPeople')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#lrPeople').val(learun.clientdata.get(['userinfo']).realName); $('#lrTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml index b76e7d410..5a5a0eeba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml @@ -39,6 +39,7 @@  编辑  作废  提交 +  归档 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js index 472e27ac6..d83a109f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js @@ -147,6 +147,7 @@ var bootstrap = function ($, learun) { }); } }); + //隐藏显示 $('#lr_hide').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -160,6 +161,24 @@ var bootstrap = function ($, learun) { }); } }); + //归档 + $('#lr_file').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('State'); + if (Status !== 2) { + learun.alert.warning("当前项未执行到此处,暂不能归档!"); + return false; + } + learun.layerConfirm('确定要归档么!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/FillinFrom/IsFile', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -261,7 +280,9 @@ var bootstrap = function ($, learun) { } else if (cellvalue === 1) { return '待设置填报人'; } else if (cellvalue === 2) { - return '待填报'; + return '待填报'; + } else if (cellvalue === 3) { + return '已完成'; } } }, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs index b35da9697..2a19c382e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs @@ -190,5 +190,29 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } #endregion + /// + /// + /// + /// + public QualityReportMainEntity IsFinish(string keyValue) + { + try + { + return qualityReportMainService.IsFinish(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs index efd462a48..483ad45e5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs @@ -56,6 +56,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop /// void EditProjectByFId(string FillinFromId); + QualityReportMainEntity IsFinish(string keyValue); + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs index 7a8b8e908..718023e1b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs @@ -259,5 +259,23 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop } #endregion + public QualityReportMainEntity IsFinish(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.FillinFromId == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } \ No newline at end of file