@@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using Learun.Application.TwoDevelopment.LR_CodeDemo; | |||
using System.Collections.Generic; | |||
using System; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -38,6 +39,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页-查看 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -120,13 +130,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
StuDisciplineManagementEntity entity = strEntity.ToObject<StuDisciplineManagementEntity>(); | |||
entity.CheckStatus = "0"; | |||
entity.CreateTime = DateTime.Now; | |||
entity.CreateUserId = userInfo.userId; | |||
stuDisciplineManagementIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
stuDisciplineManagementIBLL.DoSubmit(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -18,24 +18,23 @@ var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if(!!data) | |||
{ | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
if (!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
@@ -43,15 +42,22 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); | |||
$('#StuNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
@@ -62,23 +68,24 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId,param,callback) { | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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 == 'StuDisciplineManagement' && data[id] ){ | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if (id == 'StuDisciplineManagement' && data[id]) { | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
}); | |||
} | |||
callback && callback(); } | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
@@ -89,8 +96,8 @@ var bootstrap = function ($, learun) { | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if(!!processId){ | |||
formData.ProcessId =processId; | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "学生违纪管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">违纪学生<font face="宋体">*</font></div> | |||
<div id="StuNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">违纪时间<font face="宋体">*</font></div> | |||
<input id="DisciplineTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">处理老师<font face="宋体">*</font></div> | |||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">处理时间</div> | |||
<input id="DealTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">事情经过</div> | |||
<textarea id="Things" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">学生态度</div> | |||
<textarea id="StudentAttitude" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">班主任意见</div> | |||
<textarea id="TeacherOpinion" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="StuDisciplineManagement"> | |||
<div class="lr-form-item-title">家长意见</div> | |||
<textarea id="ParentsOpinion" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/FormView.js") |
@@ -0,0 +1,113 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-03-26 15:23 | |||
* 描 述:学生违纪管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if (!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#StuNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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 == 'StuDisciplineManagement' && data[id]) { | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,8 +1,10 @@ | |||
@{ | |||
ViewBag.Title = "学生违纪管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
/**/ | |||
ViewBag.Title = "学生违纪管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
@@ -27,13 +29,13 @@ | |||
<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"> | |||
<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_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> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -21,11 +21,11 @@ var bootstrap = function ($, learun) { | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', | |||
param: { strWhere: "1=1 " }, | |||
value: "stuno", | |||
text: "stuname" | |||
value: "StuNo", | |||
text: "StuName" | |||
}); | |||
//$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); | |||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -36,16 +36,17 @@ var bootstrap = function ($, learun) { | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form', | |||
width: 600, | |||
height: 400, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
processId = learun.newGuid(); | |||
res = top[id].save(processId, refreshGirdData); | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
@@ -55,12 +56,17 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
@@ -80,9 +86,14 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -91,9 +102,36 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus != "0") { | |||
learun.alert.warning("当前项已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DoSubmit', { keyValue: keyValue, status: "1", processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
@@ -101,62 +139,70 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetPageList', | |||
headData: [ | |||
{ label: "违纪学生", name: "StuNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuno', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "违纪时间", name: "DisciplineTime", width: 120, align: "left"}, | |||
{ label: "处理老师", name: "EmpNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
}}, | |||
{ label: "处理时间", name: "DealTime", width: 120, align: "left"}, | |||
{ label: "事情经过", name: "Things", width: 100, align: "left"}, | |||
{ label: "学生态度", name: "StudentAttitude", width: 100, align: "left"}, | |||
{ label: "班主任意见", name: "TeacherOpinion", width: 100, align: "left"}, | |||
{ label: "家长意见", name: "ParentsOpinion", width: 100, align: "left"}, | |||
{ | |||
label: "违纪学生", name: "StuNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
key: value, | |||
keyId: 'stuno', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "违纪时间", name: "DisciplineTime", width: 120, align: "left" }, | |||
{ | |||
label: "处理老师", name: "EmpNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "处理时间", name: "DealTime", width: 120, align: "left" }, | |||
{ label: "事情经过", name: "Things", width: 200, align: "left" }, | |||
{ label: "学生态度", name: "StudentAttitude", width: 100, align: "left" }, | |||
{ label: "班主任意见", name: "TeacherOpinion", width: 100, align: "left" }, | |||
{ label: "家长意见", name: "ParentsOpinion", width: 100, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-warning\">审核中</span>" : cellvalue == "2" ? "<span class=\"label label-success\">审核通过</span>" : cellvalue == "3" ? "<span class=\"label label-danger\">审核未通过</span>" : "<span class=\"label label-default\">草稿</span>"; | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: "CreateTime desc" | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (!!res) | |||
{ | |||
if (res.code == 200) | |||
{ | |||
// 发起流程 | |||
var postData = { | |||
schemeCode:'',// 填写流程对应模板编号 | |||
processId:processId, | |||
level:'1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { | |||
learun.loading(false); | |||
}); | |||
if (!!res) { | |||
if (res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: 'StuDisciplineManagement',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -958,6 +958,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForStudent.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuConsumption\IndexForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\AmountForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuGrant\Index.js" /> | |||
@@ -6933,6 +6934,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\TeacherOvertimeManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -30,6 +30,7 @@ | |||
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherCancelLeaveManageMethod" type="Learun.Application.WorkFlow.TeacherCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherOvertimeManageMethod" type="Learun.Application.WorkFlow.TeacherOvertimeManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuDisciplineManageMethod" type="Learun.Application.WorkFlow.StuDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -70,6 +71,7 @@ | |||
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherCancelLeaveManageMethod" name="TeacherCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherOvertimeManageMethod" name="TeacherOvertimeManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuDisciplineManageMethod" name="StuDisciplineManageMethod"></type> | |||
</container> | |||
@@ -142,6 +142,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
try | |||
{ | |||
stuDisciplineManagementService.DoSubmit(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||
{ | |||
try | |||
{ | |||
stuDisciplineManagementService.ChangeStatusByProcessId(status, processId, userId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -49,6 +49,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, StuDisciplineManagementEntity entity); | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DoSubmit(string keyValue, string status, string processId); | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void ChangeStatusByProcessId(string status, string processId, string userId); | |||
#endregion | |||
} | |||
@@ -30,18 +30,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.StuNo, | |||
t.DisciplineTime, | |||
t.EmpNo, | |||
t.DealTime, | |||
t.Things, | |||
t.StudentAttitude, | |||
t.TeacherOpinion, | |||
t.ParentsOpinion | |||
"); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM StuDisciplineManagement t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -181,6 +170,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 提交实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DoSubmit(string keyValue, string status, string processId) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuDisciplineManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void ChangeStatusByProcessId(string status, string processId, string userId) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql("update StuDisciplineManagement set CheckStatus='" + status + "',CheckUserId='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -94,6 +94,7 @@ | |||
<Compile Include="Delegate\NWFDelegateRuleEntity.cs" /> | |||
<Compile Include="Delegate\NWFDelegateService.cs" /> | |||
<Compile Include="NodeMethod\TeacherCancelLeaveManageMethod.cs" /> | |||
<Compile Include="NodeMethod\StuDisciplineManageMethod.cs" /> | |||
<Compile Include="NodeMethod\TeacherOvertimeManageMethod.cs" /> | |||
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" /> | |||
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | |||
@@ -0,0 +1,26 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class StuDisciplineManageMethod : IWorkFlowMethod | |||
{ | |||
StuDisciplineManagementIBLL stuDisciplineManagementIBLL = new StuDisciplineManagementBLL(); | |||
public void Execute(WfMethodParameter parameter) | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
stuDisciplineManagementIBLL.ChangeStatusByProcessId("2", parameter.processId, parameter.userId); | |||
} | |||
else | |||
{ | |||
stuDisciplineManagementIBLL.ChangeStatusByProcessId("3", parameter.processId, parameter.userId); | |||
} | |||
} | |||
} | |||
} |