@@ -5,6 +5,7 @@ | |||
* 描 述:TeachingCompetition | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -70,13 +71,18 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 评价 | |||
// 部门 | |||
$('#lr_dept').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 0) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '评价', | |||
title: '部门审核', | |||
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=1', | |||
width: 600, | |||
height: 600, | |||
@@ -90,9 +96,13 @@ var bootstrap = function ($, learun) { | |||
$('#lr_school').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 1) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '部门', | |||
title: '学校审核', | |||
url: top.$.rootUrl + '/EducationalAdministration/TeachingCompetition/FormDeptSchool?keyValue=' + keyValue +'&DeptSchool=2', | |||
width: 600, | |||
height: 600, | |||
@@ -106,6 +116,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 2) { | |||
learun.alert.warning("请等待审核"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '评价', | |||
@@ -258,7 +272,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
isMultiselect: false, | |||
sidx: "CreateTime desc" | |||
}); | |||
@@ -46,6 +46,16 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 部门学校审核界面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormDeptSchool() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -116,6 +126,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
sRPaperIBLL.DeptOrSchoolForm(keyValue, DeptSchool); | |||
return Success("操作成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckForm(string keyValue, string strEntity) | |||
@@ -42,6 +42,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 部门学校审核界面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormDeptSchool() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -112,6 +121,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
sRProjectIBLL.DeptOrSchoolForm(keyValue, DeptSchool); | |||
return Success("操作成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckForm(string keyValue, string strEntity) | |||
@@ -42,6 +42,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 部门学校审核界面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormDeptSchool() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -112,6 +121,13 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
sRWorkIBLL.DeptOrSchoolForm(keyValue, DeptSchool); | |||
return Success("操作成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckForm(string keyValue, string strEntity) | |||
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "TeachingCompetition"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">名称</div> | |||
<div id="Name" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">论文论著题目</div> | |||
<input id="Topic" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">发表刊物</div> | |||
<input id="Press" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">发表时间<font face="宋体">*</font></div> | |||
<input id="PostedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#PostedTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">级别</div> | |||
<div id="Rank" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">期刊</div> | |||
<input id="TitleWorks" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">附件</div> | |||
<div id="Path" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRPaper"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRPaper/FormDeptSchool.js") |
@@ -0,0 +1,48 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-12 11:42 | |||
* 描 述:TeachingCompetition | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var DeptSchool = request('DeptSchool'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||
$('#Path').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/DeptOrSchoolForm', { keyValue: keyValue, DeptSchool, DeptSchool }, function () { | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -30,10 +30,12 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<div class=" btn-group btn-group-sm" learun-authorize="no"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_dept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 部门</a> | |||
<a id="lr_school" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 学校</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-trash-o"></i> 评价</a> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:科技论文 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -24,6 +25,7 @@ var bootstrap = function ($, learun) { | |||
$('#Grade').lrDataItemSelect({ code: 'EncouragementDegree' }); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
@@ -39,6 +41,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -55,6 +61,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRPaper/DeleteForm', { keyValue: keyValue }, function () { | |||
@@ -67,7 +77,12 @@ var bootstrap = function ($, learun) { | |||
// 评价 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 2) { | |||
learun.alert.warning("请等待审核"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '评价', | |||
@@ -80,6 +95,58 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 部门 | |||
$('#lr_dept').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State !=0) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '部门审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRPaper/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=1', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 学校 | |||
$('#lr_school').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State != 1) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '学校审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRPaper/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=2', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -147,6 +214,33 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
//{ label: "State", name: "State", ishide:true}, | |||
{ | |||
label: "部门审核人", name: "DeptUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "学校审核人", name: "SchoolUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "审批用户", name: "AuditUser", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -170,7 +264,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
isMultiselect: false, | |||
sidx: "CreateTime desc" | |||
}); | |||
page.search(); | |||
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "TeachingCompetition"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">主持人<font face="宋体">*</font></div> | |||
<div id="Compere" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">组员</div> | |||
<div id="Participant" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">题目</div> | |||
<input id="TaskContent" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">课题编号</div> | |||
<input id="TaskNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">立项时间<font face="宋体">*</font></div> | |||
<input id="StartTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#StartTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">结题时间<font face="宋体">*</font></div> | |||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">成果形式</div> | |||
<input id="ResultForm" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">附件</div> | |||
<div id="Path" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRProject"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRProject/FormDeptSchool.js") |
@@ -0,0 +1,48 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-12 11:42 | |||
* 描 述:TeachingCompetition | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var DeptSchool = request('DeptSchool'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#Compere').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||
$('#Participant').lrUserSelect(1); | |||
$('#Path').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/SRProject/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/SRProject/DeptOrSchoolForm', { keyValue: keyValue, DeptSchool, DeptSchool }, function () { | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -31,10 +31,12 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<div class=" btn-group btn-group-sm" learun-authorize="no"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_dept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 部门</a> | |||
<a id="lr_school" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 学校</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-trash-o"></i> 评价</a> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:科技项目 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -38,6 +39,7 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
@@ -59,6 +61,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRProject/DeleteForm', { keyValue: keyValue }, function () { | |||
@@ -71,7 +77,12 @@ var bootstrap = function ($, learun) { | |||
// 评价 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 2) { | |||
learun.alert.warning("请等待审核"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '评价', | |||
@@ -84,6 +95,56 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 部门 | |||
$('#lr_dept').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State != 0) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '部门审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRProject/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=1', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 学校 | |||
$('#lr_school').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State != 1) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '学校审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRProject/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=2', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -174,6 +235,32 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "部门审核人", name: "DeptUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "学校审核人", name: "SchoolUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "审批部门", name: "AuditDepartment", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -210,7 +297,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
isMultiselect: false, | |||
sidx: "CreateTime desc" | |||
}); | |||
page.search(); | |||
@@ -0,0 +1,43 @@ | |||
@{ | |||
ViewBag.Title = "TeachingCompetition"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<div id="DepartmentId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">名称</div> | |||
<div id="Name" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">论文论著题目</div> | |||
<input id="Topic" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">发表刊物</div> | |||
<input id="Press" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">发表时间<font face="宋体">*</font></div> | |||
<input id="PostedTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#PostedTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">级别</div> | |||
<div id="Rank" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">著作职称</div> | |||
<div id="TitleWorks" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">附件</div> | |||
<div id="Path" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SRWork"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/SRWork/FormDeptSchool.js") |
@@ -0,0 +1,49 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-12 11:42 | |||
* 描 述:TeachingCompetition | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var DeptSchool = request('DeptSchool'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DepartmentId').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); | |||
$('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||
$('#TitleWorks').lrDataItemSelect({ code: 'TitleWorks' }); | |||
$('#Rank').lrDataItemSelect({ code: 'Level' }); | |||
$('#Path').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/SRWork/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/SRWork/DeptOrSchoolForm', { keyValue: keyValue, DeptSchool, DeptSchool }, function () { | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -30,10 +30,12 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<div class=" btn-group btn-group-sm" learun-authorize="no"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_dept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 部门</a> | |||
<a id="lr_school" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 学校</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-trash-o"></i> 评价</a> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:科技著作 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -38,6 +39,7 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
@@ -59,6 +61,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/SRWork/DeleteForm', { keyValue: keyValue }, function () { | |||
@@ -71,7 +77,12 @@ var bootstrap = function ($, learun) { | |||
// 评价 | |||
$('#lr_check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].State != 2) { | |||
learun.alert.warning("请等待审核"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '评价', | |||
@@ -84,6 +95,56 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 部门 | |||
$('#lr_dept').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State != 0) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '部门审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=1', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 学校 | |||
$('#lr_school').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return; | |||
} | |||
if (selectedRow[0].State != 1) { | |||
learun.alert.warning("数据异常!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '学校审核', | |||
url: top.$.rootUrl + '/PersonnelManagement/SRWork/FormDeptSchool?keyValue=' + keyValue + '&DeptSchool=2', | |||
width: 600, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -162,6 +223,32 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "部门审核人", name: "DeptUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "学校审核人", name: "SchoolUser", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
//{ | |||
// label: "审批用户", name: "AuditUser", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -185,7 +272,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
isMultiselect: false, | |||
sidx: "CreateTime desc" | |||
}); | |||
page.search(); | |||
@@ -1872,8 +1872,11 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.css" /> | |||
<Content Include="Areas\PersonnelManagement\Views\Sal_UserSalary\ImportForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRPaper\CheckForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRPaper\FormDeptSchool.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRProject\CheckForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRProject\FormDeptSchool.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRWork\CheckForm.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRWork\FormDeptSchool.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForStudent.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\StuSaverecord\IndexForTeacher.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherLeaveManagement\Form.js" /> | |||
@@ -8159,6 +8162,9 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\FormDeptSchool.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\TrainingRoomUse\FormView.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRPaper\FormDeptSchool.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRProject\FormDeptSchool.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\SRWork\FormDeptSchool.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -74,7 +74,7 @@ | |||
<!--Redis 缓存前缀 --> | |||
<!--<add key="RedisPrev" value="adms706" />--> | |||
<!--缓存链接配置--> | |||
<add key="RedisExchangeHosts" value="127.0.0.1:6379,allowadmin=true"/> | |||
<add key="RedisExchangeHosts" value="127.0.0.1:6380,allowadmin=true"/> | |||
<!--head 头像存储地址 --> | |||
<add key="fileHeadImg" value="E:\西昌程序单校区版2019_09_16\Learun.Framework.Ultimate V7\Learun.Application.Web\bin\Release\Publish\Content\images\head" /> | |||
@@ -75,7 +75,7 @@ | |||
<!--Redis 缓存前缀 --> | |||
<add key="RedisPrev" value="LRADMS"/> | |||
<!--缓存链接配置--> | |||
<add key="RedisExchangeHosts" value="127.0.0.1:6379,allowadmin=true"/> | |||
<add key="RedisExchangeHosts" value="127.0.0.1:6380,allowadmin=true"/> | |||
<!--head 头像存储地址 --> | |||
<add key="fileHeadImg" value="C:/fileHeadImg"/> | |||
<add key="fileAppDTImg" value="C:/fileAppDTImg" /> | |||
@@ -188,6 +188,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
model.EvaluateTeacher = entity.EvaluateTeacher; | |||
model.EvaluateTime = DateTime.Now; | |||
model.EvaluateRemark = entity.EvaluateRemark; | |||
model.State = 3; | |||
db.Update(model); | |||
} | |||
db.Commit(); | |||
@@ -216,11 +217,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
if (DeptSchool == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State=2 where id= '" + keyValue + "'"); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
else | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=2 where id= '" + keyValue + "'"); | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update TeachingCompetition set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
} | |||
catch (Exception ex) | |||
@@ -136,6 +136,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
sRPaperService.DeptOrSchoolForm(keyValue, DeptSchool); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -74,6 +74,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
this.ID = Guid.NewGuid().ToString(); | |||
this.CreateUser = LoginUserInfo.Get().userId; | |||
this.CreateTime = DateTime.Now; | |||
this.State = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
@@ -46,6 +46,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
void CheckEntity(string keyValue, SRPaperEntity entity); | |||
void DeptOrSchoolForm(string keyValue, string DeptSchool); | |||
#endregion | |||
} | |||
@@ -170,6 +170,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
model.AuditUser = entity.AuditUser; | |||
model.AuditTime = DateTime.Now; | |||
model.AuditRemark = entity.AuditRemark; | |||
model.State = 3; | |||
db.Update(model); | |||
} | |||
db.Commit(); | |||
@@ -187,6 +188,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
if (DeptSchool == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRPaper set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State="+ DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
else | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRPaper set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -136,6 +136,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
sRProjectService.DeptOrSchoolForm(keyValue, DeptSchool); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -94,6 +94,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
this.ID = Guid.NewGuid().ToString(); | |||
this.CreateUser = LoginUserInfo.Get().userId; | |||
this.CreateTime = DateTime.Now; | |||
this.State = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
@@ -44,6 +44,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, SRProjectEntity entity); | |||
void CheckEntity(string keyValue, SRProjectEntity entity); | |||
void DeptOrSchoolForm(string keyValue, string DeptSchool); | |||
#endregion | |||
} | |||
@@ -177,6 +177,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
model.AuditTime = DateTime.Now; | |||
model.AuditDepartment = LoginUserInfo.Get().departmentId; | |||
model.AuditRemark = entity.AuditRemark; | |||
model.State = 3; | |||
db.Update(model); | |||
} | |||
db.Commit(); | |||
@@ -194,6 +195,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
if (DeptSchool == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRProject set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
else | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRProject set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -135,6 +135,24 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
sRWorkService.DeptOrSchoolForm(keyValue, DeptSchool); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -60,8 +60,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
public DateTime? SchoolTime { get; set; } | |||
[Column("SCHOOLUSER")] | |||
public string SchoolUser { get; set; } | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
[Column("STATE")] | |||
public int? State { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -73,6 +73,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
this.ID = Guid.NewGuid().ToString(); | |||
this.CreateUser = LoginUserInfo.Get().userId; | |||
this.CreateTime = DateTime.Now; | |||
this.State = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
@@ -43,9 +43,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, SRWorkEntity entity); | |||
void CheckEntity(string keyValue, SRWorkEntity entity); | |||
void DeptOrSchoolForm(string keyValue, string DeptSchool); | |||
#endregion | |||
} | |||
@@ -172,6 +172,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
model.AuditUser = entity.AuditUser; | |||
model.AuditTime = DateTime.Now; | |||
model.AuditRemark = entity.AuditRemark; | |||
model.State = 3; | |||
db.Update(model); | |||
} | |||
db.Commit(); | |||
@@ -189,6 +190,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void DeptOrSchoolForm(string keyValue, string DeptSchool) | |||
{ | |||
try | |||
{ | |||
if (DeptSchool == "1") | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRWork set DeptUser='" + LoginUserInfo.Get().userId + "',DeptTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
else | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(" update SRWork set SchoolUser='" + LoginUserInfo.Get().userId + "',SchoolTime='" + DateTime.Now + "',State=" + DeptSchool + " where id= '" + keyValue + "'"); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||