@@ -29,7 +29,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -38,7 +38,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -47,7 +47,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[HttpGet] | |||
public ActionResult ViewForm() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -92,8 +92,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity( keyValue ); | |||
var jsonData = new { | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Ass_Acceptance = Ass_AcceptanceData, | |||
}; | |||
return Success(jsonData); | |||
@@ -107,8 +108,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetEntityByProcessId( processId ); | |||
var jsonData = new { | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetEntityByProcessId(processId); | |||
var jsonData = new | |||
{ | |||
Ass_Acceptance = Ass_AcceptanceData, | |||
}; | |||
return Success(jsonData); | |||
@@ -156,7 +158,8 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Ass_AcceptanceEntity entity = strEntity.ToObject<Ass_AcceptanceEntity>(); | |||
ass_AcceptanceIBLL.SaveEntity(keyValue,entity); | |||
entity.Status = "0"; | |||
ass_AcceptanceIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
@@ -164,5 +167,52 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 审核 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Check(string keyValue) | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var StuInfoBasicData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity(item); | |||
if (StuInfoBasicData != null) | |||
{ | |||
StuInfoBasicData.Status = "1"; | |||
ass_AcceptanceIBLL.SaveEntity(item, StuInfoBasicData); | |||
} | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 取消审核 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UnCheck(string keyValue) | |||
{ | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var StuInfoBasicData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity(item); | |||
if (StuInfoBasicData != null) | |||
{ | |||
StuInfoBasicData.Status = "2"; | |||
ass_AcceptanceIBLL.SaveEntity(item, StuInfoBasicData); | |||
} | |||
} | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -94,6 +94,13 @@ var bootstrap = function ($, learun) { | |||
$('#Model').val(data.AModel);//规格型号 | |||
$('#AAIManufacturer').val(data.AManufacturer);//品牌 | |||
$('#Price').val(data.APrice)//单价 | |||
$('#Stock').val(data.AStock)//数量 | |||
if ($('#Price').val() > 0 && $('#Stock').val() > 0) { | |||
var Price = $('#Price').val() | |||
var Stock = $('#Stock').val() | |||
var Stock = Price * Stock; | |||
$('#TotalPrice').val(Stock); | |||
} | |||
}); | |||
} | |||
}, | |||
@@ -40,9 +40,10 @@ | |||
<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_submit" class="btn btn-default"><i class="fa fa-check"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | |||
<a id="check" class="btn btn-default"><i class="fa fa-lock"></i> 验收通过</a> | |||
<a id="uncheck" class="btn btn-default"><i class="fa fa-unlock"></i> 验收不通过</a> | |||
@*<a id="lr_submit" class="btn btn-default"><i class="fa fa-check"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a>*@ | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -37,7 +37,7 @@ var bootstrap = function ($, learun) { | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function() { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
@@ -86,7 +86,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/ViewForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
btn:null | |||
btn: null | |||
}); | |||
} | |||
}); | |||
@@ -102,7 +102,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -113,7 +113,43 @@ var bootstrap = function ($, learun) { | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//审核 | |||
$('#check').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
if (Status != 0) { | |||
learun.alert.warning("当前项无需验收!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认审核该项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Check', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//去审 | |||
$('#uncheck').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
//var Status = Status.split(','); | |||
if (Status != 0) { | |||
learun.alert.warning("当前项无需验收!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认取消审核该项?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/UnCheck', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
@@ -139,73 +175,80 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetPageList', | |||
headData: [ | |||
{ label: "设备名称", name: "Name", width: 100, align: "left"}, | |||
{ label: "品牌", name: "Manufacturer", width: 100, align: "left"}, | |||
{ label: "规格型号", name: "Model", width: 100, align: "left"}, | |||
{ label: "单位", name: "Unit", width: 100, align: "left"}, | |||
{ label: "数量", name: "Stock", width: 100, align: "left"}, | |||
{ label: "单价", name: "Price", width: 100, align: "left"}, | |||
{ label: "总价", name: "TotalPrice", width: 100, align: "left"}, | |||
{ label: "使用部门", name: "DepartmentId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
{ label: "使用人", name: "UserID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
{ label: "设备名称", name: "Name", width: 100, align: "left" }, | |||
{ label: "品牌", name: "Manufacturer", width: 100, align: "left" }, | |||
{ label: "规格型号", name: "Model", width: 100, align: "left" }, | |||
{ label: "单位", name: "Unit", width: 100, align: "left" }, | |||
{ label: "数量", name: "Stock", width: 100, align: "left" }, | |||
{ label: "单价", name: "Price", width: 100, align: "left" }, | |||
{ label: "总价", name: "TotalPrice", width: 100, align: "left" }, | |||
{ | |||
label: "使用部门", name: "DepartmentId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "使用人", name: "UserID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsyncReal('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
}); | |||
} | |||
}, | |||
{ label: "放置地点", name: "Place", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === '1') { | |||
if (cellvalue === '0') { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === '2') { | |||
return '<span class=\"label label-success\">已审核</span>'; | |||
} else if (cellvalue === '1') { | |||
return '<span class=\"label label-success\">验收成功</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
return '<span class=\"label label-default\" >验收不合规</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId:'ID', | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
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:'ASS_zcys',// 填写流程对应模板编号 | |||
processId:processId, | |||
level:'1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
//refreshGirdData = function (res, postData) { | |||
// if (!!res) | |||
// { | |||
// if (res.code == 200) | |||
// { | |||
// // 发起流程 | |||
// var postData = { | |||
// schemeCode:'ASS_zcys',// 填写流程对应模板编号 | |||
// processId:processId, | |||
// level:'1', | |||
// }; | |||
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { | |||
// learun.loading(false); | |||
// }); | |||
// } | |||
// page.search(); | |||
// } | |||
//}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -3,6 +3,7 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Collections; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +36,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ScheduleIndex() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
@@ -62,6 +73,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取日程数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GetListForSchedule() | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
List<Hashtable> data = new List<Hashtable>(); | |||
foreach (SchoolCalendarEntity entity in schoolCalendarIBLL.GetList()) | |||
{ | |||
Hashtable ht = new Hashtable(); | |||
ht["id"] = entity.ID; | |||
ht["academicYearNo"] = "【" + entity.AcademicYearNo + "】"; | |||
ht["title"] = entity.Content; | |||
ht["end"] = (entity.EndTime.ToDate().ToString("yyyy-MM-dd") + " " + entity.EndTime.ToString().Substring(0, 2) + ":" + entity.EndTime.ToString().Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm:ss"); | |||
ht["start"] = (entity.StartTime.ToDate().ToString("yyyy-MM-dd") + " " + entity.StartTime.ToString().Substring(0, 2) + ":" + entity.StartTime.ToString().Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm:ss"); | |||
ht["allDay"] = false; | |||
data.Add(ht); | |||
} | |||
return ToJsonResult(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
@@ -82,8 +116,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var SchoolCalendarData = schoolCalendarIBLL.GetSchoolCalendarEntity( keyValue ); | |||
var jsonData = new { | |||
var SchoolCalendarData = schoolCalendarIBLL.GetSchoolCalendarEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
SchoolCalendar = SchoolCalendarData, | |||
}; | |||
return Success(jsonData); | |||
@@ -114,11 +149,48 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
UserInfo userInfo = LoginUserInfo.Get(); SchoolCalendarEntity entity = strEntity.ToObject<SchoolCalendarEntity>(); | |||
schoolCalendarIBLL.SaveEntity(userInfo,keyValue,entity); | |||
UserInfo userInfo = LoginUserInfo.Get(); | |||
SchoolCalendarEntity entity = strEntity.ToObject<SchoolCalendarEntity>(); | |||
//根据学年和学期查询 | |||
var model = schoolCalendarIBLL.GetSchoolCalendarEntityByNo(entity.AcademicYearNo, entity.Semester); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
if (model != null) | |||
{ | |||
return Fail("当前学期已存在!"); | |||
} | |||
} | |||
else | |||
{ | |||
if (model != null && model.ID != keyValue) | |||
{ | |||
return Fail("当前学期已存在!"); | |||
} | |||
} | |||
schoolCalendarIBLL.SaveEntity(userInfo, keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 学年 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GenerateNearByAcademic() | |||
{ | |||
return Success(Learun.Util.WebHelper.GenerateNearByAcademic()); | |||
} | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GenerateNearBySemeter() | |||
{ | |||
return Success(Learun.Util.WebHelper.GenerateNearBySemeter()); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -137,7 +137,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/GetPageList', | |||
headData: [ | |||
{ | |||
@@ -194,19 +194,20 @@ var bootstrap = function ($, learun) { | |||
}, | |||
{ label: "年级", name: "Grade", width: 50, align: "left" }, | |||
{ label: "课程编码", name: "LessonNo", width: 200, align: "left" }, | |||
{ | |||
label: "课程名称", name: "LessonNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
key: value, | |||
keyId: 'lessonno', | |||
callback: function (_data) { | |||
callback(_data['lessonname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "课程名称", name: "LessonName", width: 200, align: "left" }, | |||
//{ | |||
// label: "课程名称", name: "LessonNo", width: 200, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
// key: value, | |||
// keyId: 'lessonno', | |||
// callback: function (_data) { | |||
// callback(_data['lessonname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "人数", name: "StuNum", width: 80, align: "left" }, | |||
{ label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, | |||
{ label: "班级编号", name: "TeachClassNo", width: 80, align: "left" }, | |||
@@ -48,7 +48,7 @@ | |||
<input id="TotalStudyHour" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="LessonInfo"> | |||
<div class="lr-form-item-title">每周课时<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title">总学时<font face="宋体">*</font></div> | |||
<input id="TotalHours" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="LessonInfo"> | |||
@@ -3,13 +3,21 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-6 lr-form-item" data-table="SchoolCalendar"> | |||
@*<div class="col-xs-6 lr-form-item" data-table="SchoolCalendar"> | |||
<div class="lr-form-item-title">学年</div> | |||
<input id="AcademicYearNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SchoolCalendar"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item" data-table="SchoolCalendar"> | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SchoolCalendar"> | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SchoolCalendar"> | |||
<div class="lr-form-item-title">开始日期</div> | |||
@@ -15,8 +15,22 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$("#Semester").lrDataItemSelect({ code: 'Semester' }); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/SchoolCalendar/GenerateNearByAcademic', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/SchoolCalendar/GenerateNearBySemeter', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -46,6 +60,7 @@ var bootstrap = function ($, learun) { | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
learun.frameTab.currentIframe().location.reload(); | |||
}); | |||
}; | |||
page.init(); | |||
@@ -0,0 +1,166 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta name="viewport" content="width=device-width" /> | |||
<title>日程管理</title> | |||
<script src="~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js"></script> | |||
<script src="~/Content/jquery/plugin/jquery-ui/jquery-ui.min.js"></script> | |||
<script src="~/Content/jquery/plugin/fullcalendar/js/fullcalendar.min.js"></script> | |||
<link href="~/Content/jquery/plugin/fullcalendar/css/fullcalendar.css" rel="stylesheet" /> | |||
@Html.AppendCssFile( | |||
"/Views/LR_Content/style/lr-common.css", | |||
"/Views/LR_Content/style/lr-iframe-index.css" | |||
) | |||
<script type='text/javascript'> | |||
var search = (window.location.search).split('?')[1]; | |||
var type = search.split('=')[1]; | |||
//type=1 校历查看;type=2 校历管理(日历模式) | |||
$(document).ready(function () { | |||
resize(); | |||
$('.calendar').fullCalendar({ | |||
header: { | |||
left: 'prev,next', | |||
center: 'title', | |||
right: 'agendaDay,agendaWeek,month' | |||
}, | |||
monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], | |||
dayNamesShort: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], | |||
buttonText: { | |||
prev: '上一页', | |||
next: '下一页', | |||
month: '月视图', | |||
week: '周视图', | |||
day: '日视图' | |||
}, | |||
titleFormat: "yyyy年MM月", | |||
columnFormat: { | |||
month: 'ddd', | |||
week: 'MM月dd日 ddd', | |||
day: 'MM月dd日 ddd' | |||
}, | |||
allDayText: '今天', | |||
axisFormat: "HH:00", | |||
height: $(window).height() - 55, | |||
dayClick: function (date, allDay, jsEvent, view) { | |||
if (type == 2) { | |||
btn_add(); | |||
} | |||
}, | |||
editable: true, | |||
eventLimit: true, | |||
eventAfterRender: function (event, element, view) {//数据绑定上去后添加相应信息在页面上 | |||
//var fstart = $.fullCalendar.formatDate(event.start, "HH:mm"); | |||
//var fend = $.fullCalendar.formatDate(event.end, "HH:mm"); | |||
if (view.name == "month") {//按月份 | |||
var evtcontent = '<div class="fc-event-inner fc-event-skin" data-id="' + event.id + '">'; | |||
//evtcontent += '<span class="fc-event-time">' + fstart + " - " + fend + '</span>'; | |||
evtcontent += '<span class="fc-event-time">' + event.academicYearNo + '</span>'; | |||
evtcontent += '<span class="fc-event-title">: ' + event.title + '</span>'; | |||
evtcontent += '</div><div class="ui-resizable-handle ui-resizable-e"> </div>'; | |||
if (type == 2) { | |||
evtcontent += '<div class="fc-event-delete" style="width:100%;height:100%;background-color:#000;" data-id="' + event.id + '">删除</div>'; | |||
} | |||
element.html(evtcontent); | |||
} else { | |||
var evtcontent = '<div class="fc-event-inner fc-event-skin" data-id="' + event.id + '" style="height:98%">'; | |||
evtcontent += '<div class="fc-event-head fc-event-skin">'; | |||
evtcontent += '<span class="fc-event-time">' + event.academicYearNo + '</span>'; | |||
//evtcontent += '<div class="fc-event-time">' + fstart + " - " + fend + event.title + '</div>'; | |||
evtcontent += '<div class="fc-event-title">' + event.title + '</div>'; | |||
evtcontent += '</div>'; | |||
evtcontent += '<div class="fc-event-content"></div>'; | |||
evtcontent += '<div class="fc-event-bg"></div>'; | |||
evtcontent += '</div>'; | |||
if (type == 2) { | |||
evtcontent += '<div class="fc-event-delete" style="width:100%;height:2%;background-color:#000;" data-id="' + event.id + '">删除</div>'; | |||
} | |||
element.html(evtcontent); | |||
} | |||
}, | |||
events: (function () { | |||
var _data = []; | |||
$.ajax({ | |||
url: top.$.rootUrl + '/EducationalAdministration/SchoolCalendar/GetListForSchedule', | |||
type: "get", | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
_data = data; | |||
} | |||
}); | |||
return _data; | |||
})() | |||
}); | |||
}); | |||
function resize() { | |||
$('#pageayout').height($(window).height() - 20); | |||
$(window).resize(function (e) { | |||
window.setTimeout(function () { | |||
$('#pageayout').height($(window).height() - 20); | |||
}, 200); | |||
e.stopPropagation(); | |||
}); | |||
} | |||
//添加校历 | |||
function btn_add() { | |||
if (type == 2) { | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '添加校历', | |||
url: '/EducationalAdministration/SchoolCalendar/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
} | |||
}); | |||
} | |||
}; | |||
//编辑校历 | |||
$(document).on('click', '.fc-event-inner', function () { | |||
if (type == 2) { | |||
var keyValue = $(this).attr('data-id'); | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '编辑校历', | |||
url: '/EducationalAdministration/SchoolCalendar/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
} | |||
}); | |||
} | |||
}); | |||
//删除日程 | |||
$(document).on('click', '.fc-event-delete', function () { | |||
if (type == 2) { | |||
var keyValue = $(this).attr('data-id'); | |||
if (!keyValue) { | |||
learun.alert.warning("请选择日程!"); | |||
return false; | |||
} | |||
top.learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
top.learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SchoolCalendar/DeleteForm', { keyValue: keyValue }, function () { | |||
callback(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
function callback() { | |||
location.reload(); | |||
} | |||
</script> | |||
</head> | |||
<body> | |||
<div id="pageayout" class="border" style="overflow: auto; padding: 0px;"> | |||
<div id='calendar' class="calendar" style="margin: 10px;background: #fff; "></div> | |||
</div> | |||
</body> | |||
</html> |
@@ -7910,6 +7910,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\FormView.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolCalendar\ScheduleIndex.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -415,7 +415,7 @@ | |||
<li>文化程度 : {{teacherInfo.CultureDegreeNo | cultureDegreeNo}} </li> | |||
<li>毕业学校 : {{teacherInfo.GraduateSchoolName}} </li> | |||
<li>最高学位 : {{teacherInfo.DegreeNo | degreeNo}}</li> | |||
<li>来校年月 : {{teacherInfo.InSchoolDate | date}}</li> | |||
<li>来校年月 : {{teacherInfo.SchoolDate | date}}</li> | |||
</ul> | |||
</div> | |||
@@ -90,6 +90,48 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表 | |||
/// </summary> | |||
/// <returns>返回列表</returns> | |||
public IEnumerable<SchoolCalendarEntity> GetList() | |||
{ | |||
try | |||
{ | |||
return schoolCalendarService.GetList(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public SchoolCalendarEntity GetSchoolCalendarEntityByNo(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return schoolCalendarService.GetSchoolCalendarEntityByNo(academicYearNo, semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -34,6 +34,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
SchoolCalendarEntity GetSchoolCalendarEntity(string keyValue); | |||
/// <summary> | |||
/// 获取列表 | |||
/// </summary> | |||
/// <returns>返回列表</returns> | |||
IEnumerable<SchoolCalendarEntity> GetList(); | |||
/// <summary> | |||
/// 根据学年获取SchoolCalendar表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
SchoolCalendarEntity GetSchoolCalendarEntityByNo(string academicYearNo, string semester); | |||
#endregion | |||
#region 提交数据 | |||
@@ -142,6 +142,48 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 获取列表 | |||
/// </summary> | |||
/// <returns>返回列表</returns> | |||
public IEnumerable<SchoolCalendarEntity> GetList() | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindList<SchoolCalendarEntity>(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
throw; | |||
else | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SchoolCalendar表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public SchoolCalendarEntity GetSchoolCalendarEntityByNo(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<SchoolCalendarEntity>(x => x.AcademicYearNo == academicYearNo && x.Semester == semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -204,6 +246,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
} | |||
} |
@@ -31,7 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" t.*,op.ExamType "); | |||
strSql.Append(@" t.*,op.ExamType,op.LessonName "); | |||
strSql.Append(" FROM TeachClass t "); | |||
strSql.Append(" left join openlessonplan op on op.academicyearno=t.academicyearno and op.semester=t.semester and op.DeptNo=t.DeptNo and op.majorno =t.majorno "); | |||
strSql.Append(" and op.grade =t.grade and op.lessonno =t.lessonno and op.F_SchoolId =t.F_SchoolId "); | |||
@@ -357,10 +357,10 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach | |||
//strSql.Append(" where aa.VID='" + queryParam["VID"] + "'"); | |||
strSql.Append(@" | |||
select aa.LessonNo,aa.EmpNo,aa.AcademicYearNo,aa.Semester,aa.VID,aa.StuNo,bb.IScore,bb.UID,cc.EmpName,dd.LessonName,ee.StuName,ee.DeptNo,ee.MajorNo,ee.ClassNo | |||
select aa.LessonNo,aa.EmpNo,aa.AcademicYearNo,aa.Semester,aa.VID,aa.StuNo,bb.IScore,bb.UID,cc.EmpName,aa.LessonName,ee.StuName,ee.DeptNo,ee.MajorNo,ee.ClassNo | |||
from | |||
( | |||
select a.LessonNo,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo | |||
select a.LessonNo,a.LessonName,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo | |||
from " + misdbname + @".dbo.StuSelectLessonList a | |||
left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester | |||
where b.Status=1 and b.VID='" + queryParam["VID"] + @"' | |||
@@ -378,7 +378,6 @@ group by a.EmpNo, a.LessonNo, a.UID | |||
) bb | |||
on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID | |||
left join " + misdbname + @".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo | |||
left join " + misdbname + @".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo | |||
left join " + misdbname + @".dbo.StuInfoBasic ee on aa.StuNo = ee.StuNo | |||
where 1=1 "); | |||
@@ -518,14 +517,14 @@ where 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append(@" | |||
select ee.*,ss.*,cc.EmpName,dd.LessonName from | |||
select ee.*,ss.*,cc.EmpName from | |||
( | |||
select a.LessonNo,a.EmpNo,count(a.StuNo) as StudentCount | |||
select a.LessonNo,a.LessonName,a.EmpNo,count(a.StuNo) as StudentCount | |||
from " + misdbname + @".dbo.StuSelectLessonList a | |||
left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester | |||
where b.Status=1 and b.VID='" + queryParam["VID"] + @"' | |||
and a.StuNo is not null and a.StuNo <> '' | |||
group by a.LessonNo,a.EmpNo | |||
group by a.LessonNo,a.EmpNo,a.LessonName | |||
) ss | |||
left join | |||
( | |||
@@ -543,7 +542,6 @@ group by aa.EmpNo,aa.LessonNo | |||
) ee | |||
on ee.EmpNo=ss.EmpNo and ee.LessonNo=ss.LessonNo | |||
left join " + misdbname + @".dbo.EmpInfo cc on ss.EmpNo=cc.EmpNo | |||
left join " + misdbname + @".dbo.LessonInfo dd on ss.LessonNo = dd.LessonNo | |||
where 1=1 "); | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||