浏览代码

添加归档 操作

优化设置填报人公式可修改and设置填报人填报时间不回显问题
金隅分支
edy 3 年前
父节点
当前提交
972305eec6
共有 8 个文件被更改,包括 122 次插入34 次删除
  1. +37
    -15
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs
  2. +5
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js
  3. +13
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml
  5. +22
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js
  6. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs
  8. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs

+ 37
- 15
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 视图功能

/// <summary>
@@ -76,15 +77,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}

/// <summary>
/// 设置公式
/// <summary>
/// <returns></returns>
[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("保存成功!");
}

/// <summary>
/// 归档
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
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
}
}

+ 5
- 5
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 '<span class=\"label label-danger\">作废</span>';
} else if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">待设置填报人</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">待设置公式</span>';
} else if (cellvalue === 3) {
return '<span class=\"label label-success\">待填报</span>';
} else {
return '<span class=\"label label-default\">已完成</span>';
} else if (cellvalue === 3) {
return '<span class=\"label label-default\">已完成<pan>';
}
}
},


+ 13
- 13
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'));


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml 查看文件

@@ -39,6 +39,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-trash-o"></i>&nbsp;提交</a>
<a id="lr_file" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;归档</a>
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-reorder"></i>&nbsp;<span class="lrlt">更多</span><span class="caret"></span>
</a>


+ 22
- 1
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 '<span class=\"label label-success\">待设置填报人</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-default\">待填报</span>';
return '<span class=\"label label-success\">待填报</span>';
} else if (cellvalue === 3) {
return '<span class=\"label label-default\">已完成<pan>';
}
}
},


+ 24
- 0
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

/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
public QualityReportMainEntity IsFinish(string keyValue)
{
try
{
return qualityReportMainService.IsFinish(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


}
}

+ 2
- 0
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
/// <param name="FillinFromId"></param>
void EditProjectByFId(string FillinFromId);

QualityReportMainEntity IsFinish(string keyValue);

#endregion

}

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs 查看文件

@@ -255,5 +255,23 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
#endregion

public QualityReportMainEntity IsFinish(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<QualityReportMainEntity>(x => x.FillinFromId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

正在加载...
取消
保存