@@ -1,69 +0,0 @@ | |||
数字化智慧校园 | |||
统一身份认证补充接口 | |||
V1.0 | |||
概述 | |||
根据特定需求开发补充接口 | |||
登录接口 | |||
采用标准Http GET 请求发送用户名、密码到认证接口,接口实现用户名密码判定后返回标准json; | |||
请求地址:http://10.30.0.10:8000/Login/CheckLoginForSSOBC | |||
请求方式:发送标准Http GET请求到认证地址 | |||
接口请求参数 | |||
参数 | |||
说明 | |||
u | |||
用户名 | |||
p | |||
密码 | |||
认证接口返回参数 | |||
参数 | |||
说明 | |||
code | |||
状态码 返回200成功、其他失败 | |||
info | |||
状态消息 返回login success表示登录成功、其他失败 | |||
data | |||
保留 暂时无用 | |||
登录成功后,认证服务器将在用户浏览器cookies中写入数字化智慧校园系统数据,第三方系统可直接跳转到http://10.30.0.10:8000/Home/Index 进入数字化智慧校园系统。 | |||
退出登录接口 | |||
第三方系统退出时,需要主动调用退出登录接口以同步数字化智慧校园系统退出状态。 | |||
采用标准Http POST 请求,返回标准json; | |||
请求地址:http://10.30.0.10:8000/Login/OutLoginForSSOBC | |||
请求方式:发送标准Http POST请求到认证地址 | |||
接口请求参数:无 | |||
认证接口返回参数 | |||
参数 | |||
说明 | |||
code | |||
状态码 返回200成功、其他失败 | |||
info | |||
状态消息 返回logout success表示退出成功、其他失败 | |||
data | |||
保留 暂时无用 | |||
@@ -122,22 +122,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
var data = arrangeLessonTermIBLL.GetEntity(keyValue); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取调度时间数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetLessonDateList(string queryJson) | |||
{ | |||
var data = arrangeLessonTermIBLL.GetList(queryJson).Where(x => x.LessonDate.HasValue).Select(x => x.LessonDate).Distinct().Select(x => new | |||
{ | |||
text = x, | |||
value = x | |||
}).OrderBy(x => x.value); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -149,11 +149,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
emItemEntity.ClassRoomName = olpoe.ClassRoomName; | |||
listElectiveMergeItemEntity.Add(emItemEntity); | |||
} | |||
if (listElectiveMergeItemEntity.Select(m=>m.LessonSection.Substring(0,1)).Distinct().Count()>1) | |||
{ | |||
return Fail("合班失败!请确认所选课程是否为同一天课程。"); | |||
} | |||
electiveMergeIBLL.SaveEntity(null, emMergeEntity, listElectiveMergeItemEntity); | |||
return Success("合班成功!"); | |||
} | |||
@@ -1,117 +0,0 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 18:12 | |||
/// 描 述:考试记录表 | |||
/// </summary> | |||
public class Exam_ExamPlanController : MvcControllerBase | |||
{ | |||
private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamPlanIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity( keyValue ); | |||
var jsonData = new { | |||
Exam_ExamPlan = Exam_ExamPlanData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamPlanIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanEntity entity = strEntity.ToObject<Exam_ExamPlanEntity>(); | |||
exam_ExamPlanIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -104,18 +104,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
LessonInfoData.Introduction = WebHelper.HtmlDecode(LessonInfoData.Introduction); | |||
return Success(LessonInfoData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetLessonByMajorNo(string majorNo) | |||
{ | |||
var LessonInfoList = lessonInfoIBLL.GetLessonByMajorNo(majorNo); | |||
return Success(LessonInfoList); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -5,7 +5,6 @@ using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
using System.Linq; | |||
using Learun.Application.Base.SystemModule; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -26,7 +25,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
CdMajorIBLL CdMajorIBLL = new CdMajorBLL(); | |||
private StuSelectLessonListOfElectivePreIBLL stuSelectLessonListOfElectivePreIBLL = new StuSelectLessonListOfElectivePreBLL(); | |||
private OpenLessonPlanOfElectiveChangeIBLL openLessonPlanOfElectiveChangeIBLL = new OpenLessonPlanOfElectiveChangeBLL(); | |||
private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); | |||
#region 视图功能 | |||
@@ -226,57 +224,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
if (!string.IsNullOrEmpty(entity.AfterLessonNo)) | |||
{ | |||
model.AfterLessonNo = entity.AfterLessonNo; | |||
var lesson = dataSourceIBLL.GetDataTable("LessonInfo", "t.lessonno='" + entity.AfterLessonNo + "'"); | |||
if (lesson != null && lesson.Rows.Count > 0) | |||
{ | |||
model.AfterLessonName = lesson.Rows[0]["lessonname"].ToString(); | |||
} | |||
} | |||
else | |||
{ | |||
var lesson = dataSourceIBLL.GetDataTable("LessonInfo", "t.lessonno='" + entity.LessonNo + "'"); | |||
if (lesson != null && lesson.Rows.Count > 0) | |||
{ | |||
model.AfterLessonName = lesson.Rows[0]["lessonname"].ToString(); | |||
} | |||
} | |||
if (!string.IsNullOrEmpty(entity.AfterEmpNo)) | |||
{ | |||
model.AfterEmpNo = entity.AfterEmpNo; | |||
var emp = dataSourceIBLL.GetDataTable("EmpInfo", "t.empno='" + entity.AfterEmpNo + "'"); | |||
if (emp != null && emp.Rows.Count > 0) | |||
{ | |||
model.AfterEmpName = emp.Rows[0]["empname"].ToString(); | |||
} | |||
} | |||
else | |||
{ | |||
var emp = dataSourceIBLL.GetDataTable("EmpInfo", "t.empno='" + entity.EmpNo + "'"); | |||
if (emp != null && emp.Rows.Count > 0) | |||
{ | |||
model.AfterEmpName = emp.Rows[0]["empname"].ToString(); | |||
} | |||
} | |||
if (!string.IsNullOrEmpty(entity.AfterClassRoomNo)) | |||
{ | |||
model.AfterClassRoomNo = entity.AfterClassRoomNo; | |||
var classRoom = dataSourceIBLL.GetDataTable("ClassRoomInfo", "t.classroomno='" + entity.AfterClassRoomNo + "'"); | |||
if (classRoom != null && classRoom.Rows.Count > 0) | |||
{ | |||
model.AfterClassRoomName = classRoom.Rows[0]["classroomname"].ToString(); | |||
} | |||
} | |||
else | |||
{ | |||
var classRoom = dataSourceIBLL.GetDataTable("ClassRoomInfo", "t.classroomno='" + entity.ClassRoomNo + "'"); | |||
if (classRoom != null && classRoom.Rows.Count > 0) | |||
{ | |||
model.AfterClassRoomName = classRoom.Rows[0]["classroomname"].ToString(); | |||
} | |||
} | |||
openLessonPlanOfElectiveChangeIBLL.SaveEntity("", model); | |||
@@ -5,7 +5,6 @@ using Learun.Util; | |||
using Newtonsoft.Json; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Configuration; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Web.Mvc; | |||
@@ -184,25 +183,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 全院学生成绩查看页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AllStuScoreQueryIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 全院学生成绩打印 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AllStuScoreQueryPrint() | |||
{ | |||
ViewBag.WebApi = ConfigurationManager.AppSettings["WebApi"]; | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -735,24 +715,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success(result); | |||
} | |||
/// <summary> | |||
/// 全院学生成绩查看 | |||
/// </summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetScoreListByStuInfo(string queryJson) | |||
{ | |||
var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson); | |||
if (data.Any()) | |||
{ | |||
data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x=>x.LessonSortNo).ThenBy(x => x.LessonNo); | |||
} | |||
return Success(data); | |||
} | |||
public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo) | |||
{ | |||
var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo); | |||
@@ -71,16 +71,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 补考名单查看 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexUnpass() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -116,28 +106,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 补考名单查看 | |||
/// <param name="pagination">分页参数</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForUnpass(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuScoreNotPassIBLL.GetPageListForUnpass(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -203,17 +171,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuScoreNotPassIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// 初始化补考成绩 | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult InitScore() | |||
{ | |||
stuScoreNotPassIBLL.InitScore(); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
@@ -71,16 +71,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 二次补考成绩查看 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexUnpassTwo() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -156,27 +146,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForUnpass(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = stuScoreNotPassTwoIBLL.GetPageListForUnpass(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -207,18 +176,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
stuScoreNotPassTwoIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 初始化二次补考成绩 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult InitScore() | |||
{ | |||
stuScoreNotPassTwoIBLL.InitScore(); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
@@ -34,12 +34,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult QueryStuSelectResultForTeacher() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 教务-审核表单页 | |||
/// <summary> | |||
@@ -46,16 +46,16 @@ var bootstrap = function ($, learun) { | |||
//调度开始时间 | |||
$('#AttemperStartTime').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), | |||
value: 'value', | |||
text: 'text' | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
//调度结束时间 | |||
$('#AttemperEndTime').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), | |||
value: 'value', | |||
text: 'text' | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
} | |||
}, | |||
@@ -180,9 +180,20 @@ var bootstrap = function ($, learun) { | |||
$('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); | |||
$('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); | |||
//调度开始时间 | |||
$('#AttemperStartTime').lrselect({ allowSearch: true }); | |||
$('#AttemperStartTime').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
//调度结束时间 | |||
$('#AttemperEndTime').lrselect({ allowSearch: true }); | |||
$('#AttemperEndTime').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -223,10 +234,7 @@ var bootstrap = function ($, learun) { | |||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | |||
} | |||
} | |||
var timer = setTimeout(function () { | |||
page.query(); | |||
clearTimeout(timer); | |||
}, 3000) | |||
page.query(); | |||
} | |||
}); | |||
} | |||
@@ -260,7 +268,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
setFormData = function (processId) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
@@ -302,14 +310,9 @@ var bootstrap = function ($, learun) { | |||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | |||
} | |||
} | |||
var timer = setTimeout(function () { | |||
page.query(); | |||
clearTimeout(timer); | |||
}, 3000) | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
@@ -333,7 +336,7 @@ var bootstrap = function ($, learun) { | |||
return false; | |||
} | |||
if (formData.AttemperEndTime < formData.AttemperStartTime) { | |||
learun.alert.warning("调度结束时间不能小于调度开始时间!"); | |||
learun.alert.warning("调度结束时间应该大于调度开始时间!"); | |||
return false; | |||
} | |||
} | |||
@@ -346,7 +349,7 @@ var bootstrap = function ($, learun) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
}; | |||
@@ -126,11 +126,11 @@ | |||
</div> | |||
<div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper"> | |||
<div class="lr-form-item-title">调度开始时间<font face="宋体">*</font></div> | |||
<input id="AttemperStartTime" class="form-control" readonly/> | |||
<div id="AttemperStartTime" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item AttemperType AttemperTypeTiao" data-table="ArrangeLessonTermAttemper"> | |||
<div class="lr-form-item-title">调度结束时间<font face="宋体">*</font></div> | |||
<input id="AttemperEndTime" class="form-control" readonly /> | |||
<div id="AttemperEndTime" readonly></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item " data-table="ArrangeLessonTermAttemper"> | |||
<div class="lr-form-item-title">调度备注</div> | |||
@@ -41,22 +41,21 @@ var bootstrap = function ($, learun) { | |||
p.TeachClassNo = $('#TeachClassNo').lrselectGet(); | |||
p.EmpNo = $('#EmpNo').lrselectGet(); | |||
p.ClassroomNo = $('#ClassroomNo').lrselectGet(); | |||
//console.log(p); | |||
//if (!!p.F_SchoolId && !!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | |||
if (!!p.AcademicYearNo && !!p.Semester && !!p.DeptNo && !!p.MajorNo && !!p.LessonNo && !!p.TeachClassNo && !!p.EmpNo && !!p.ClassroomNo) { | |||
//调度开始时间 | |||
$('#AttemperStartTime').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), | |||
value: 'value', | |||
text: 'text' | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
//调度结束时间 | |||
$('#AttemperEndTime').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetLessonDateList?queryJson=' + JSON.stringify(p), | |||
value: 'value', | |||
text: 'text' | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify(p), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
} | |||
}, | |||
@@ -180,6 +179,20 @@ var bootstrap = function ($, learun) { | |||
$('#NewEmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); | |||
$('#ClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); | |||
$('#NewClassroomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname' }); | |||
//调度开始时间 | |||
$('#AttemperStartTime').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
//调度结束时间 | |||
$('#AttemperEndTime').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTerm/GetList?queryJson=' + JSON.stringify({}), | |||
value: 'LessonDate', | |||
text: 'LessonDate' | |||
}); | |||
}, | |||
initData: function () { | |||
@@ -223,7 +236,7 @@ var bootstrap = function ($, learun) { | |||
$('#NewClassroomNo').siblings('div').html('教室<font face="宋体">*</font>'); | |||
} | |||
} | |||
page.query(); | |||
} | |||
}); | |||
} | |||
@@ -257,7 +270,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
setFormData = function (processId) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
@@ -304,7 +317,6 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
@@ -324,7 +336,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} else if (formData.AttemperType == "01") { //调课:调度时间比较 | |||
if (formData.AttemperEndTime < formData.AttemperStartTime) { | |||
learun.alert.warning("调度结束时间不能小于调度开始时间!"); | |||
learun.alert.warning("调度结束时间应该大于调度开始时间!"); | |||
return false; | |||
} | |||
} | |||
@@ -337,7 +349,7 @@ var bootstrap = function ($, learun) { | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ArrangeLessonTermAttemper/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
}; | |||
@@ -408,36 +408,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
//if (res.code == 200) { | |||
// // 发起流程 | |||
// learun.workflowapi.create({ | |||
// isNew: true, | |||
// schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||
// processId: processId, | |||
// processName: '课程异动申请',// 对应流程名称 | |||
// processLevel: '1', | |||
// description: '', | |||
// formData: JSON.stringify(postData), | |||
// callback: function (res, data) { | |||
// } | |||
// }); | |||
// page.search(); | |||
//} | |||
if (res && res.code && res.code == 200) { | |||
if (res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||
learun.workflowapi.create({ | |||
isNew: true, | |||
schemeCode: 'ArrangeLessonTermAttemper',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
processName: '课程异动申请',// 对应流程名称 | |||
processLevel: '1', | |||
description: '', | |||
formData: JSON.stringify(postData), | |||
callback: function (res, data) { | |||
} | |||
}); | |||
page.search(); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -5,7 +5,6 @@ | |||
* 描 述:选课专业 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var OLPOEId = request("OLPOEId"); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
@@ -130,17 +129,8 @@ var bootstrap = function ($, learun) { | |||
$('#gridtablemanagemajor').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!!callBack) { | |||
learun.layerClose(window.name); | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -11,10 +11,10 @@ | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="F_DepartmentId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EmpInfo"> | |||
@*<div class="col-xs-12 lr-form-item" data-table="EmpInfo"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
</div>*@ | |||
</div> | |||
@@ -35,7 +35,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
$('#F_DepartmentId').lrselect(); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -1,43 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "考试记录表"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考名称<font face="宋体">*</font></div> | |||
<input id="PlanName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考类型<font face="宋体">*</font></div> | |||
<div id="PlanType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考编号<font face="宋体">*</font></div> | |||
<input id="PlanCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排考总人数<font face="宋体">*</font></div> | |||
<input id="EPStuCount" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">生成座位<font face="宋体">*</font></div> | |||
<div id="EPRandom" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">是否生成<font face="宋体">*</font></div> | |||
<div id="EPGenarate" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||
<div class="lr-form-item-title">排序号<font face="宋体">*</font></div> | |||
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") |
@@ -1,68 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 18:12 | |||
* 描 述:考试记录表 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,66 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "考试记录表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">排考名称</div> | |||
<input id="PlanName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">排考类型</div> | |||
<div id="PlanType"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">排考编号</div> | |||
<input id="PlanCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">生成座位</div> | |||
<div id="EPRandom"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否生成</div> | |||
<div id="EPGenarate"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 生成排考名单</a> | |||
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考名单</a> | |||
<a id="lr_planks" class="btn btn-default"><i class="fa fa-plus"></i> 安排考试</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") |
@@ -1,147 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-14 18:12 | |||
* 描 述:考试记录表 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 生成排考名单 | |||
$('#lr_generate').on('click', function () { | |||
}); | |||
// 清除排考名单 | |||
$('#lr_cleargenerate').on('click', function () { | |||
}); | |||
// 安排考试 | |||
$('#lr_planks').on('click', function () { | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "排考名称", name: "PlanName", width: 100, align: "left" }, | |||
{ | |||
label: "排考类型", name: "PlanType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'StudentType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "排考编号", name: "PlanCode", width: 100, align: "left" }, | |||
{ label: "排考总人数", name: "EPStuCount", width: 100, align: "left" }, | |||
{ | |||
label: "生成座位", name: "EPRandom", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
{ | |||
label: "是否生成", name: "EPGenarate", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "是" : "否"; | |||
} | |||
}, | |||
{ label: "排序号", name: "EPOrder", width: 100, align: "left" }, | |||
], | |||
mainId: 'EPId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -40,10 +40,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/Index?OLPOEId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
//btn: null | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
btn: null | |||
}); | |||
} | |||
@@ -186,9 +183,8 @@ var bootstrap = function ($, learun) { | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue.indexOf(',') == -1) | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
else { | |||
else | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
}, | |||
{ label: "上课时间", name: "LessonTime", width: 150, align: "left" }, | |||
@@ -225,29 +221,18 @@ var bootstrap = function ($, learun) { | |||
{ label: "通过人数", name: "StuNum", width: 60, align: "left" }, | |||
{ label: "已报人数(预)", name: "StuNumOfApplyPre", width: 80, align: "left" }, | |||
{ label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" }, | |||
{ | |||
label: "是否已选专业", name: "IsElectiveMajor", width: 100, align: "left", formatter: function (cellvalue,row) { | |||
if (!!row.ElectiveMajorList && row.ElectiveMajorList.length > 0) { | |||
return "<span class=\"label label-success\">是</span>"; | |||
} else { | |||
return "<span class=\"label label-default\">否</span>"; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "选课专业", name: "ElectiveMajorList", width: 150, align: "left", formatter: function (cellvalue, row) { | |||
var str = ""; | |||
if (!!cellvalue && cellvalue.length > 0) { | |||
for (var i = 0; i < cellvalue.length; i++) { | |||
str += cellvalue[i].Grade + "级" + cellvalue[i].MajorName; | |||
if (i != cellvalue.length - 1) { | |||
str += ","; | |||
} | |||
} | |||
} | |||
return str; | |||
} | |||
} | |||
//{ | |||
// label: "选课专业", name: "ElectiveMajorList", width: 150, align: "left",formatter: function (cellvalue,row) { | |||
// var str = ""; | |||
// for (var i = 0; i < row.ElectiveMajorList.length; i++) { | |||
// str += row.ElectiveMajorList[i].Grade + "级" + row.ElectiveMajorList[i].MajorName; | |||
// if (i != row.ElectiveMajorList.length - 1) { | |||
// str += ","; | |||
// } | |||
// } | |||
// return str; | |||
// } | |||
//} | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
@@ -26,24 +26,21 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
选课要求:至少需要选择3门不同的课程 | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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 btnBox" learun-authorize="yes"> | |||
<a id="lr_apply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名</a> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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 btnBox" learun-authorize="yes"> | |||
<a id="lr_apply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||
<a id="lr_applyPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名(预)</a> | |||
<a id="lr_cancelPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名(预)</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||
<a id="lr_applyPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名(预)</a> | |||
<a id="lr_cancelPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名(预)</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
@@ -176,7 +176,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListOfStudent', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
@@ -196,21 +196,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "课程类型", name: "LessonTypeId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
console.log(row.LessonTypeId); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', | |||
key: row.LessonTypeId, | |||
keyId: 'ltid', | |||
callback: function (_data) { | |||
callback(_data['lessontypename']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -17,7 +17,7 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
$('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); | |||
$("#GenderNo").lrDataItemSelect({ code: 'usersex' }); | |||
$("#PartyFaceNo").lrDataItemSelect({ code: 'PolityStatus' }); | |||
$("#PartyFaceNo").lrDataItemSelect({ code: 'BCdPartyFace' }); | |||
$("#FamilyOriginNo").lrDataItemSelect({ code: 'ExamineeCategory' }); | |||
$("#NationalityNo").lrDataItemSelect({ code: 'National' }); | |||
$("#TestStuSortNo").lrDataItemSelect({ code: 'ExamineeType' }); | |||
@@ -1,38 +0,0 @@ | |||
@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
</style> | |||
<div class="lr-layout"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="AcademicYearNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<input id="StuNo" type="text" class="form-control" placeholder="请输入学号" /> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-check-circle"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js") |
@@ -1,108 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-06-14 11:02 | |||
* 描 述:全院学生成绩查看 | |||
*/ | |||
var selectedRow; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.bindSelect(); | |||
}, | |||
bind: function () { | |||
// 查询 | |||
$('#btn_Search').on('click', function () { | |||
var p = {}; | |||
p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
p.Semester = $('#Semester').lrselectGet(); | |||
p.StuNo = $.trim($('#StuNo').val()); | |||
if (p.StuNo == null || p.StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
page.initGird(); | |||
page.search(p); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', function () { | |||
var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
var Semester = $('#Semester').lrselectGet(); | |||
var StuNo = $.trim($('#StuNo').val()); | |||
if (StuNo == null || StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'AllStuScoreQueryPrint', | |||
title: '学生成绩单', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
}); | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', | |||
headData: [ | |||
{ label: '学号', name: 'StuNo', width: 100, align: "left" }, | |||
{ label: '姓名', name: 'StuName', width: 200, align: "left" }, | |||
{ label: '专业', name: 'MajorName', width: 100, align: "left" }, | |||
{ label: '班级', name: 'ClassName', width: 100, align: "left" }, | |||
{ label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, | |||
{ label: '学期', name: 'Semester', width: 50, align: "left" }, | |||
{ label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, | |||
{ label: '科目', name: 'LessonName', width: 300, align: "left" }, | |||
{ label: '学分', name: 'StudyScore', width: 50, align: "left" }, | |||
{ label: '成绩', name: 'Score', width: 100, align: "left" }, | |||
{ label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, | |||
{ label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, | |||
{ label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, | |||
{ label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, | |||
], | |||
mainId: 'StuNo', | |||
isPage: false, | |||
sidx: '', | |||
sord: '', | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -1,167 +0,0 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |||
<title>Document</title> | |||
<style> | |||
* { | |||
padding: 0; | |||
margin: 0; | |||
} | |||
ul, | |||
li { | |||
list-style: none; | |||
} | |||
input { | |||
border: 0; | |||
outline: none; | |||
} | |||
.tableBox{ | |||
width:100%; | |||
height:100%; | |||
display:block; | |||
} | |||
h4 { | |||
text-align: center; | |||
height: 60px; | |||
line-height: 60px; | |||
} | |||
ul { | |||
margin: 0 auto; | |||
height: 30px; | |||
padding-left: 50px; | |||
} | |||
ul li { | |||
float: left; | |||
width: 20%; | |||
margin-right: 30px; | |||
} | |||
table { | |||
width: 100%; | |||
border: 1px solid #222; | |||
border-top: none; | |||
border-bottom: none; | |||
border-right: 0; | |||
/*float: left;*/ | |||
table-layout:fixed; | |||
} | |||
tr { | |||
height: 44px; | |||
} | |||
td { | |||
width: 5%; | |||
height: 44px; | |||
border: 1px solid #222; | |||
text-align: center; | |||
} | |||
td:nth-child(4) | |||
{ | |||
width: 20%; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
line-height: 34px; | |||
text-align: center; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div class="tableBox"> | |||
<h4>塔里木职业技术学院学生成绩单</h4> | |||
<ul class="ulDom"></ul> | |||
<table cellpadding="0" cellspacing="0" class="Ltable" border="1" style="text-align: center;"></table> | |||
</div> | |||
<div class="btn">打印</div> | |||
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> | |||
<script src="~/Content/jquery/plugin/layer/layer.js"></script> | |||
<script src="~/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js"></script> | |||
<script> | |||
function request(d) { for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { var b = c[a].split("="); if (b[0] == d) if ("undefined" == unescape(b[1])) break; else return unescape(b[1]) } return "" }; | |||
</script> | |||
<script> | |||
$(window).load(function () { | |||
$.ajax({ | |||
url: '@ViewBag.WebApi/Learun/adms/EducationalAdministration/StuScore/scoreListByStuInfo', | |||
type: 'get', | |||
cache: false, | |||
dataType: 'json', | |||
data: { StuNo: request("StuNo"), AcademicYearNo: request("AcademicYearNo"), Semester: request("Semester")}, | |||
success: function (res) { | |||
//console.log(res); | |||
if (res.code == 200) { | |||
//layer.msg('操作成功'); | |||
//数据绑定 | |||
var data = res.data; | |||
var ulData = "" | |||
ulData = `<li><span>姓名:</span>${data.StuName ? data.StuName : ""}</li><li><span>学号:</span>${data.StuNo ? data.StuNo : ""}</li><li><span>专业:</span>${data.MajorName ? data.MajorName : ''}</li><li><span>班级:</span>${data.ClassName ? data.ClassName : ''}</li>` | |||
$(".ulDom").html(ulData) | |||
var tableDom = "<table cellpadding='0' cellspacing='0'><tr><td>学年</td><td>学期</td><td>科目类型</td> <td>科目</td> <td>学分</td><td>成绩</td> <td>第一次补考成绩</td><td>第二次补考成绩</td></tr>"; | |||
var trDom = ""; | |||
var tdDom = ""; | |||
// 学年 | |||
for (var j = 0; j < data.ScoreList.length; j++) { | |||
var rowNum = data.ScoreList[j].StuScoreEntityList.length | |||
//console.log("rowNum", rowNum) | |||
// 学期 | |||
for (var i = 0; i < data.ScoreList[j].StuScoreEntityList.length; i++) { | |||
trDom += '<tr>' | |||
tdDom = "" | |||
if (i == 0) { | |||
tdDom += `<td rowspan='${rowNum}'> ${data.ScoreList[j].AcademicYearNo ? data.ScoreList[j].AcademicYearNo : ''}</td><td rowspan='${rowNum}'>第${data.ScoreList[j].Semester ? data.ScoreList[j].Semester : ''}学期</td>` | |||
} | |||
tdDom += `<td> ${data.ScoreList[j].StuScoreEntityList[i].LessonSortName ? data.ScoreList[j].StuScoreEntityList[i].LessonSortName : '无'}</td><td> ${data.ScoreList[j].StuScoreEntityList[i].LessonName ? data.ScoreList[j].StuScoreEntityList[i].LessonName : '无'}</td><td> ${data.ScoreList[j].StuScoreEntityList[i].StudyScore ? data.ScoreList[j].StuScoreEntityList[i].StudyScore : '无'}</td><td> ${data.ScoreList[j].StuScoreEntityList[i].Score ? data.ScoreList[j].StuScoreEntityList[i].Score : '无'}</td><td> ${data.ScoreList[j].StuScoreEntityList[i].ScoreOfNotPass ? data.ScoreList[j].StuScoreEntityList[i].ScoreOfNotPass : '无'}</td><td> ${data.ScoreList[j].StuScoreEntityList[i].ScoreOfNotPassTwo ? data.ScoreList[j].StuScoreEntityList[i].ScoreOfNotPassTwo : '无'}</td>` | |||
trDom += tdDom + "</tr>"; | |||
} | |||
} | |||
tableDom += trDom + "</table>"; | |||
$(".Ltable").html(tableDom); | |||
} else if (res.code == 400) { | |||
layer.msg(res.info, function () { }); | |||
} else if (res.code == 500) { | |||
layer.msg('似乎出了点小问题,请稍后再试', function () { }); | |||
} | |||
}, | |||
error: function () { | |||
layer.msg('网络出错,请稍后再试', function () { }); | |||
return; | |||
} | |||
}); | |||
}); | |||
</script> | |||
<script> | |||
$('.btn').click(function () { | |||
$('.tableBox').jqprint(); | |||
}) | |||
</script> | |||
</body> | |||
</html> |
@@ -1,58 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "长阳迎新"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<div id="grade"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<a id="lr_Init" class="btn btn-default"><i class="fa fa-plus"></i> 初始化补考成绩</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js") |
@@ -1,147 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
allowSearch: true, | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { | |||
var deptno = ""; | |||
if (val) { | |||
deptno = val.deptno; | |||
} | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, | |||
text: "MajorName", | |||
value: "MajorNo" | |||
}) | |||
} | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ | |||
allowSearch: true, | |||
code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: | |||
function (val) { | |||
var majorNo = ''; | |||
if (val) { | |||
majorNo = val.MajorNo; | |||
} | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + | |||
majorNo, | |||
text: "ClassName", | |||
value: "ClassNo" | |||
}); | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/LessonInfo/GetLessonByMajorNo?majorNo=' + | |||
majorNo, | |||
text: "LessonName", | |||
value: "LessonNo" | |||
}); | |||
} | |||
}); | |||
$('#ClassNo').lrDataSourceSelect({ | |||
allowSearch: true, | |||
code: 'bjsj', value: 'classno', text: 'classname' | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ | |||
allowSearch: true, | |||
code: 'LessonInfo', value: 'lessonno', text: 'lessonname' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 初始化补考成绩 | |||
$('#lr_Init').on('click', function () { | |||
learun.layerConfirm('是否确认初始化补考成绩!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/InitScore', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/GetPageListForUnpass', | |||
headData: [ | |||
{ | |||
label: "学号", name: "stuno", width: 80, align: "left" | |||
}, | |||
{ | |||
label: "姓名", name: "stuname", width: 100, align: "left" | |||
}, | |||
{ label: "课程", name: "LessonName", width: 100, align: "left" }, | |||
{ label: "考试年级", name: "Grade", width: 100, align: "left" }, | |||
{ | |||
label: "学年", name: "AcademicYearNo", width: 80, align: "left", | |||
//formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'usersex', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
}, | |||
{ label: "学期", name: "Semester", width: 150, align: "left" }, | |||
{ label: "班级", name: "classname", width: 150, align: "left" }, | |||
{ label: "平时成绩", name: "OrdinaryScore2", width: 150, align: "left" }, | |||
{ label: "期末成绩", name: "TermEndScore2", width: 150, align: "left" }, | |||
{ label: "成绩", name: "Score2", width: 150, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
sidx: 'ClassNo,LessonNo', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -1,58 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "二次补考成绩查看"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">年级</div> | |||
<div id="grade"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程</div> | |||
<div id="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<a id="lr_Init" class="btn btn-default"><i class="fa fa-plus"></i> 初始化二次补考成绩</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js") |
@@ -1,143 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-16 10:14 | |||
* 描 述:长阳迎新 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//年级 | |||
$('#grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { | |||
var deptno = ""; | |||
if (val) { | |||
deptno = val.deptno; | |||
} | |||
$('#MajorNo').lrselectRefresh({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, | |||
text: "MajorName", | |||
value: "MajorNo" | |||
}) | |||
} | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ | |||
code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: | |||
function (val) { | |||
var majorNo = ''; | |||
if (val) { | |||
majorNo = val.MajorNo; | |||
} | |||
$('#ClassNo').lrselectRefresh({ | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + | |||
majorNo, | |||
text: "ClassName", | |||
value: "ClassNo" | |||
}); | |||
$('#LessonNo').lrselectRefresh({ | |||
url: top.$.rootUrl + | |||
'/EducationalAdministration/LessonInfo/GetLessonByMajorNo?majorNo=' + | |||
majorNo, | |||
text: "LessonName", | |||
value: "LessonNo" | |||
}); | |||
} | |||
}); | |||
$('#ClassNo').lrDataSourceSelect({ | |||
code: 'bjsj', value: 'classno', text: 'classname' | |||
}); | |||
$('#LessonNo').lrDataSourceSelect({ | |||
code: 'LessonInfo', value: 'lessonno', text: 'lessonname' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 初始化补考成绩 | |||
$('#lr_Init').on('click', function () { | |||
learun.layerConfirm('是否确认初始化二次补考成绩!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/InitScore', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetPageListForUnpass', | |||
headData: [ | |||
{ | |||
label: "学号", name: "stuno", width: 80, align: "left" | |||
}, | |||
{ | |||
label: "姓名", name: "stuname", width: 100, align: "left" | |||
}, | |||
{ label: "课程", name: "LessonName", width: 100, align: "left" }, | |||
{ label: "考试年级", name: "Grade", width: 100, align: "left" }, | |||
{ | |||
label: "学年", name: "AcademicYearNo", width: 80, align: "left", | |||
//formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'usersex', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
}, | |||
{ label: "学期", name: "Semester", width: 150, align: "left" }, | |||
{ label: "班级", name: "classname", width: 150, align: "left" }, | |||
{ label: "平时成绩", name: "OrdinaryScore2", width: 150, align: "left" }, | |||
{ label: "期末成绩", name: "TermEndScore2", width: 150, align: "left" }, | |||
{ label: "成绩", name: "Score2", width: 150, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
sidx: 'ClassNo,LessonNo', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -21,9 +21,6 @@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
选课要求:至少需要选择3门不同的课程 | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
@@ -68,7 +68,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, | |||
@@ -87,21 +87,6 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "课程类型", name: "LessonTypeId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
console.log(row.LessonTypeId); | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', | |||
key: row.LessonTypeId, | |||
keyId: 'ltid', | |||
callback: function (_data) { | |||
callback(_data['lessontypename']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
@@ -1,59 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "选修课课程"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" class="form-control"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">选课状态</div> | |||
<div id="ElectiveSelectStatus"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">报名状态</div> | |||
<div id="ElectiveSignUpStatus"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js") |
@@ -1,218 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-05-15 10:33 | |||
* 描 述:选修课课程 | |||
*/ | |||
var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学年!"); | |||
return false; | |||
} | |||
if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { | |||
top.learun.alert.warning("请先选择学期!"); | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 300, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学期", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); | |||
$('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 60, align: "left" }, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系所", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "姓名", name: "StuName", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "GenderNo", width: 80, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == true ? "男" : "女"; | |||
} | |||
}, | |||
{ | |||
label: "选课状态", name: "Id", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == null || cellvalue == undefined || cellvalue == "") { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} else { | |||
return '<span class=\"label label-success\">已报名</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "报名状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-primary\">审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">报名成功</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-warning\">报名失败</span>'; | |||
} else { | |||
return '<span class=\"label label-default\">未报名</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, | |||
{ | |||
label: "所选课程名称", name: "LessonName", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', | |||
key: row.LessonNo, | |||
keyId: 'lessonno', | |||
callback: function (_data) { | |||
callback(_data['lessonname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "课程学分", name: "StudyScore", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ | |||
label: "教师姓名", name: "EmpName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: row.EmpNo, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { | |||
if (cellvalue.indexOf(',') == -1) { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
} else { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
} | |||
}, | |||
{ label: "上课时间", name: "LessonTime", width: 180, align: "left" }, | |||
{ | |||
label: "教室名称", name: "ClassRoomName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', | |||
key: row.ClassRoomNo, | |||
keyId: 'classroomno', | |||
callback: function (_data) { | |||
callback(_data['classroomname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'StuId', | |||
isPage: true, | |||
sidx: 'StuNo', | |||
sord: 'asc' | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.EmpNo = learun.clientdata.get(['userinfo']).enCode; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -1,5 +1,4 @@ | |||
using System; | |||
using Learun.Application.Form; | |||
using Learun.Application.Form; | |||
using Learun.Util; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
@@ -332,20 +331,12 @@ namespace Learun.Application.Web.Areas.LR_FormModule.Controllers | |||
[ValidateInput(false)] | |||
public ActionResult SaveInstanceForms(string data) | |||
{ | |||
try | |||
List<SaveModel> list = data.ToObject<List<SaveModel>>(); | |||
foreach (var item in list) | |||
{ | |||
List<SaveModel> list = data.ToObject<List<SaveModel>>(); | |||
foreach (var item in list) | |||
{ | |||
formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); | |||
} | |||
return Success("保存成功!"); | |||
formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); | |||
} | |||
catch (Exception e) | |||
{ | |||
return Fail("输入字段超过限定长度,请精简内容后再试。"); | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 删除自定义表单数据 | |||
@@ -64,7 +64,7 @@ | |||
<input id="fromHeight" type="text" class="form-control" placeholder="请输入高" value="400" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">条件筛选Sql语句<font face="宋体">*</font></div> | |||
<div class="lr-form-item-title">请填写Sql语句<font face="宋体">*</font></div> | |||
<textarea id="F_CloseDoSql" class="form-control" style="height: 60px" placeholder="请填写Sql语句" isvalid="yes" checkexpession="NotNull"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
@@ -366,18 +366,19 @@ var bootstrap = function ($, learun) { | |||
$('#step-1').lrSetFormData(data.module); | |||
$('#F_FormId').lrselectSet(data.relation.F_FormId); | |||
$("#F_CloseDoSql").val(data.relation.F_CloseDoSql); | |||
var settingJson = JSON.parse(data.relation.F_SettingJson); | |||
$('[name="formOpenType"][value="' + settingJson.layer.opentype + '"]').attr('checked', 'checked'); | |||
$('#fromWidth').val(settingJson.layer.width); | |||
$('#fromHeight').val(settingJson.layer.height); | |||
$('[name="queryDatetime"][value="' + settingJson.query.isDate + '"]').attr('checked', 'checked'); | |||
$('#queryDatetime').lrselectSet(settingJson.query.DateField); | |||
$('#queryWidth').val(settingJson.query.width); | |||
$('#queryHeight').val(settingJson.query.height); | |||
queryData = settingJson.query.fields; | |||
console.log(queryData); | |||
$('#query_girdtable').jfGridSet('refreshdata', queryData); | |||
@@ -15,7 +15,6 @@ var relation; | |||
var mainTablePk = ""; | |||
var mainTable = ""; | |||
var mainCompontId = ""; | |||
var sqlwhere = ""; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
@@ -29,7 +28,7 @@ var bootstrap = function ($, learun) { | |||
relation = data.relation; | |||
settingJson = JSON.parse(data.relation.F_SettingJson); | |||
formScheme = JSON.parse(data.scheme.F_Scheme); | |||
sqlwhere = relation.F_CloseDoSql; | |||
for (var i = 0, l = formScheme.dbTable.length; i < l; i++) { | |||
var tabledata = formScheme.dbTable[i]; | |||
if (tabledata.relationName == "") { | |||
@@ -306,9 +305,6 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (!!sqlwhere) { | |||
queryJson.sqlwhere = sqlwhere; | |||
} | |||
param.queryJson = JSON.stringify(queryJson); | |||
$('#gridtable').jfGridSet('reload', param); | |||
} | |||
@@ -711,13 +711,13 @@ var bootstrap = function ($, learun) { | |||
signUrl: signUrl, | |||
stamp: stamp | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { | |||
learun.loading(false); | |||
if (_data) { | |||
learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); | |||
learun.frameTab.close(tabIframeId); | |||
} | |||
}); | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { | |||
learun.loading(false); | |||
if (_data) { | |||
learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); | |||
learun.frameTab.close(tabIframeId); | |||
} | |||
}); | |||
}); | |||
}); | |||
} | |||
@@ -1721,18 +1721,14 @@ var bootstrap = function ($, learun) { | |||
formData[_item.field] = processId; | |||
point.formData = JSON.stringify(formData); | |||
formDataList.push(point); | |||
//liangkun 修复第一次保存失败报错后第二次直接会update | |||
//_item.isUpdate = true; | |||
_item.isUpdate = true; | |||
} | |||
}); | |||
if (formDataList.length > 0) { | |||
$.lrSaveForm(top.$.rootUrl + '/LR_FormModule/Custmerform/SaveInstanceForms', { data: JSON.stringify(formDataList) }, function (res) { | |||
if (res.code == 200) { | |||
//liangkun 修复第一次保存失败报错后第二次直接会update | |||
$.each(nwfForms, function (_index, _item) { | |||
_item.isUpdate = true; | |||
}); | |||
monitorSave(); | |||
} | |||
else { | |||
@@ -8,9 +8,9 @@ | |||
<div class="lr-layout-body"> | |||
<ul class="lr-left-list" id="lr_left_list"> | |||
<li class="active lrlt" data-value="1">登录日志</li> | |||
<li data-value="2" class="lrlt">访问日志</li> | |||
<li data-value="3" class="lrlt">操作日志</li> | |||
<li data-value="4" class="lrlt">异常日志</li> | |||
<li data-value="2" class="lrlt" >访问日志</li> | |||
<li data-value="3" class="lrlt" >操作日志</li> | |||
<li data-value="4" class="lrlt" >异常日志</li> | |||
</ul> | |||
</div> | |||
</div> | |||
@@ -23,22 +23,10 @@ | |||
<div id="datesearch" class="datetime"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">操作用户</div> | |||
<input id="OperateAccount" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系统功能</div> | |||
<input id="Module" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">操作类型</div> | |||
<input id="OperateType" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
@@ -51,9 +51,10 @@ var bootstrap = function ($, learun) { | |||
}); | |||
}); | |||
// 查询 | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 200, 400); | |||
$('#btn_Search').on('click', function () { | |||
var keyword = $('#txt_Keyword').val(); | |||
page.search({ keyword: keyword }); | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -1,141 +0,0 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-03-14 12:05 | |||
/// 描 述:宿舍晚归规则 | |||
/// </summary> | |||
public class Acc_DormitoryRuleController : MvcControllerBase | |||
{ | |||
private Acc_DormitoryRuleIBLL acc_DormitoryRuleIBLL = new Acc_DormitoryRuleBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = acc_DormitoryRuleIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Acc_DormitoryRuleData = acc_DormitoryRuleIBLL.GetAcc_DormitoryRuleEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Acc_DormitoryRule = Acc_DormitoryRuleData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
acc_DormitoryRuleIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Acc_DormitoryRuleEntity entity = strEntity.ToObject<Acc_DormitoryRuleEntity>(); | |||
DateTime time; | |||
bool flag = DateTime.TryParse(entity.LateReturnTime, out time); | |||
if (!flag) | |||
{ | |||
return Fail("晚归时间格式不正确!"); | |||
} | |||
if (!(entity.PushHour >= 0 && entity.PushHour <= 23)) | |||
{ | |||
return Fail("推送时间点填写不正确!"); | |||
} | |||
var model = acc_DormitoryRuleIBLL.GetEnableEntity(); | |||
if (entity.IsEnable == 1) | |||
{ | |||
if (string.IsNullOrEmpty(keyValue) && model != null) | |||
{ | |||
return Fail("只能有一个启用的规则!"); | |||
} | |||
else if (!string.IsNullOrEmpty(keyValue) && model != null && model.Id != keyValue) | |||
{ | |||
return Fail("只能有一个启用的规则!"); | |||
} | |||
} | |||
acc_DormitoryRuleIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -7,7 +7,6 @@ using System.Web.Helpers; | |||
using Newtonsoft.Json; | |||
using Newtonsoft.Json.Linq; | |||
using System; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
@@ -33,31 +32,26 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分配宿舍 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexDistribution() | |||
{ | |||
return View(); | |||
} | |||
///// <summary> | |||
///// 表单页 | |||
///// <summary> | |||
///// <returns></returns> | |||
//[HttpGet] | |||
//public ActionResult Form() | |||
//{ | |||
// return View(); | |||
//} | |||
/// <summary> | |||
/// 带参数的表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form(string ParentID = null, string ParentName = null, string keyValue = null) | |||
public ActionResult Form(string ParentID = null, string ParentName = null) | |||
{ | |||
ViewBag.ParentID = ParentID; | |||
ViewBag.ParentName = ParentName; | |||
ViewBag.BuildType = accommodationIBLL.GetBuildType(ParentID); | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
ViewBag.BuildType = accommodationIBLL.GetParentBuildType(keyValue); | |||
} | |||
return View(); | |||
} | |||
@@ -143,70 +137,9 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分配系 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormDept() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分配专业和班级 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormClass() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分配宿舍 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormRoom() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 床位管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexBed() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 床位管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormBed() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分类管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormClassify() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分类管理 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexClassify() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
@@ -234,38 +167,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取床位数据 | |||
/// <summary> | |||
/// <param name="RoomId">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetBedListByRoomId(string RoomId) | |||
{ | |||
var data = accommodationIBLL.GetBedListByRoomId(RoomId).OrderBy(x => x.DNo); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取分类数据 | |||
/// <summary> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetClassifyList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = accommodationIBLL.GetClassifyList(paginationobj, queryJson).OrderBy(x => x.DNo); | |||
//var jsonData = new | |||
//{ | |||
// rows = data, | |||
// total = paginationobj.total, | |||
// page = paginationobj.page, | |||
// records = paginationobj.records | |||
//}; | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取宿舍楼数据 | |||
@@ -368,19 +269,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
var data = accommodationIBLL.GetTreeNew(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取上级树形数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetClassifyTree() | |||
{ | |||
var data = accommodationIBLL.GetClassifyTree(); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -398,18 +286,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 删除 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteBed(string keyValue, string ParentID) | |||
{ | |||
accommodationIBLL.DeleteBed(keyValue, ParentID); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
@@ -423,54 +299,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
accommodationIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveBedForm(string keyValue, string ParentID, string strEntity) | |||
{ | |||
Acc_DormitoryBuildEntity entity = strEntity.ToObject<Acc_DormitoryBuildEntity>(); | |||
accommodationIBLL.SaveBedEntity(keyValue, ParentID, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 寝室分配系 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveDeptClass(string keyValue, string strEntity, int type) | |||
{ | |||
Acc_DormitoryBuildEntity entity = strEntity.ToObject<Acc_DormitoryBuildEntity>(); | |||
accommodationIBLL.SaveDeptClass(keyValue, entity, type); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 寝室分配床位 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list) | |||
{ | |||
//List<Acc_DormitoryBuildEntity> list = strEntity.ToObject<List<Acc_DormitoryBuildEntity>>(); | |||
string res = accommodationIBLL.SaveRoom(RoomId, list); | |||
if (!string.IsNullOrEmpty(res)) | |||
{ | |||
return Fail(res); | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 学生宿舍的单元、楼层、房间、床位添加 | |||
@@ -483,6 +312,11 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[AjaxOnly] | |||
public ActionResult DormitoryAdd(string keyValue, string strEntity) | |||
{ | |||
//dynamic entity = JsonConvert.DeserializeObject(strEntity); | |||
//var ElementNum = entity.ElementNum; | |||
//var FloorNum = entity.FloorNum; | |||
//var RoomNum = entity.RoomNUm; | |||
//var BedNum = entity.BedNum; | |||
JObject jsonEntity = JObject.Parse(strEntity); | |||
var elementNum = int.Parse(jsonEntity["ElementNum"].ToString()); | |||
@@ -510,7 +344,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
} | |||
/// <summary> | |||
/// 同步宿舍信息数据 | |||
/// </summary> | |||
@@ -519,7 +353,10 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
accommodationIBLL.SyncData(); | |||
return Success("同步成功"); | |||
} | |||
//public ActionResult DormitoryAdd(string a,string ) | |||
#endregion | |||
@@ -1,245 +0,0 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-03-10 10:06 | |||
/// 描 述:学生归宿管理 | |||
/// </summary> | |||
public class DormitoryReturnController : MvcControllerBase | |||
{ | |||
private DormitoryReturnIBLL dormitoryReturnIBLL = new DormitoryReturnBLL(); | |||
private AccommodationIBLL accommodationIBLL = new AccommodationBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormOut() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormReturn() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexReport() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取左侧树形数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetTree() | |||
{ | |||
var data = dormitoryReturnIBLL.GetTree(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = dormitoryReturnIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Acc_DormitoryReturnData = dormitoryReturnIBLL.GetAcc_DormitoryReturnEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Acc_DormitoryReturn = Acc_DormitoryReturnData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取下拉框数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GetDept() | |||
{ | |||
var data = accommodationIBLL.GetDept(); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取下拉框数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GetMajor(string strWhere) | |||
{ | |||
var data = accommodationIBLL.GetMajor(strWhere); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取下拉框数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GetClass(string strWhere) | |||
{ | |||
var data = accommodationIBLL.GetClass(strWhere); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
public ActionResult GetReportList(string queryJson) | |||
{ | |||
List<Acc_DormitoryBuildEntity> data = dormitoryReturnIBLL.GetReportList(queryJson).ToList(); | |||
var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList(); | |||
List<object> list2 = new List<object>(); | |||
foreach (var item in list) | |||
{ | |||
var name = item.Key == 1 ? "已归宿" : "未归宿"; | |||
list2.Add(new { name = name, value = item.num }); | |||
} | |||
return JsonResult(list2); | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <returns></returns> | |||
public ActionResult GetReportData(string queryJson) | |||
{ | |||
List<Acc_DormitoryBuildEntity> data = dormitoryReturnIBLL.GetReportList(queryJson).ToList(); | |||
var list = data.GroupBy(a => a.IsReturn).Select(a => new { a.Key, num = a.Count() }).ToList(); | |||
List<object> list2 = new List<object>(); | |||
List<String> list1 = new List<String>(); | |||
foreach (var item in list) | |||
{ | |||
var name = item.Key == 1 ? "已归宿" : "未归宿"; | |||
list2.Add(new { name = name, value = item.num }); | |||
list1.Add(name); | |||
} | |||
return Success(new { list1, list2 }); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
dormitoryReturnIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveData(string keyValue, string strEntity) | |||
{ | |||
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>(); | |||
dormitoryReturnIBLL.SaveData(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string type, string strEntity) | |||
{ | |||
Acc_DormitoryReturnEntity entity = strEntity.ToObject<Acc_DormitoryReturnEntity>(); | |||
dormitoryReturnIBLL.SaveEntity(type, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1,27 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "宿舍晚归规则"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule"> | |||
<div class="lr-form-item-title">晚归时间<font face="宋体">*</font></div> | |||
<input id="LateReturnTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:22:00" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule"> | |||
<div class="lr-form-item-title">推送人<font face="宋体">*</font></div> | |||
<div id="PushUser" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule"> | |||
<div class="lr-form-item-title">推送班主任<font face="宋体">*</font></div> | |||
<div id="ClassDiredctor"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule"> | |||
<div class="lr-form-item-title">推送时间点<font face="宋体">*</font></div> | |||
<input id="PushHour" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写0-23数字" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryRule"> | |||
<div class="lr-form-item-title">启用<font face="宋体">*</font></div> | |||
<div id="IsEnable"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Form.js") |
@@ -1,62 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-14 12:05 | |||
* 描 述:宿舍晚归规则 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#PushUser').lrDataSourceSelect({ | |||
code: 'teacheruserdata', value: 'f_userid', text: 'f_realname', type: 'multiple' | |||
}); | |||
$('#ClassDiredctor').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
$('#IsEnable').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'YesOrNoInt', | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,27 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "宿舍晚归规则"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Acc_DormitoryRule/Index.js") |
@@ -1,139 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-14 12:05 | |||
* 描 述:宿舍晚归规则 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Acc_DormitoryRule/GetPageList', | |||
headData: [ | |||
{ label: "晚归时间", name: "LateReturnTime", width: 100, align: "left" }, | |||
{ | |||
label: "推送人", name: "PushUser", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
if (value.indexOf(',') != -1) { | |||
var content = ''; | |||
var timearr = value.split(','); | |||
for (var i = 0; i < timearr.length; i++) { | |||
learun.clientdata.getAsync('custmerData', | |||
{ | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: timearr[i], | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
content += _data['f_realname']; | |||
} | |||
}); | |||
} | |||
content = content.substring(0, content.length - 1); | |||
callback(content); | |||
} else { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
} | |||
}, | |||
{ | |||
label: "推送班主任", name: "ClassDiredctor", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'YesOrNoInt', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "推送时间点", name: "PushHour", width: 100, align: "left" }, | |||
{ | |||
label: "启用", name: "IsEnable", width: 100, align: "left", | |||
formatter: function (cellvalue, rowObject) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -58,7 +58,11 @@ | |||
<div class="indSec1T"> | |||
<a :href="'/LogisticsManagement/Accommodation/Floor'">{{dormitoryName}}</a><a :href="'/LogisticsManagement/Accommodation/Unit?ID='+dormitoryID">{{unitName}}</a> | |||
<ul class="indSec1List"> | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-5.png" alt="" />多条件查找宿舍楼</a></li> | |||
<li><a href="#"><img src="/Content/images/floor/inSec1-6.png" alt="" />自动分配宿舍</a></li>*@ | |||
<li><a href="#" @@click="addFloor()"><img src="/Content/images/floor/inSec1-7.png" alt="" />添加楼层</a></li> | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-8.png" alt="" />批量删除</a></li> | |||
<li><a href="#"><img src="/Content/images/floor/inSec1-9.png" alt="" />打印宿舍数据</a></li>*@ | |||
</ul> | |||
</div> | |||
<div class="inSec1Row"> | |||
@@ -72,9 +76,7 @@ | |||
<div class="inSec1Con inSec1Con1"> | |||
<img class="inSec1Horn" src="/Content/images/floor/inSec1-11.png" alt="" /> | |||
<div class="inSec1Con2"> | |||
<div class="inSec1ConT">{{floor.dormitory.Name}} | |||
@*<div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div>*@ | |||
</div> | |||
<div class="inSec1ConT">{{floor.dormitory.Name}} <div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div></div> | |||
<div class="inSec1ConTxt"> | |||
<span>{{floor.RoomNum}}</span>间 <span>{{floor.BedNum}}</span>床 | |||
</div> | |||
@@ -342,7 +344,7 @@ | |||
}, | |||
addFloor: function () { | |||
var url = ""; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?ParentID=' + this.unitID + '&ParentName=' + this.unitName; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + this.unitID + '&ParentName=' + this.unitName; | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
@@ -359,7 +361,7 @@ | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?keyValue=' + id, | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
@@ -391,7 +393,7 @@ | |||
'<div class="laySec1L">' + | |||
'<div class="laySec1ConTitle">' + this.dormitoryName + ' ' + this.unitName + '</div> ' + | |||
'<div class="laySec1ConT">' + floor.dormitory.Name + | |||
'<span style="display:none">' + this.filter_sex(floor.dormitory.Sex) + '</span>' + | |||
this.filter_sex(floor.dormitory.Sex) + | |||
'</div>' + | |||
'<div class="laySec1R">' + | |||
'<div><div class="laySec1Txt"><span>负 责 人</span>' + floor.dormitory.Functionary + '</div> <div class="laySec1Txt"><span>负责人电话</span>' + floor.dormitory.Phone + '</div></div>' + | |||
@@ -401,14 +403,14 @@ | |||
'</div>' + | |||
'<div class="layer_sec layer_sec2">' + | |||
'<ul class="laySec2List">' + | |||
'<li><span>编 号</span>' + floor.dormitory.DNo + '</li>' + | |||
'<li><span>价 格</span>' + (floor.dormitory.Price == null ? '' : floor.dormitory.Price) + ' <i>元</i></li>' + | |||
'<li><span>编 号</span>' + floor.dormitory.Name + '</li>' + | |||
'<li><span>价 格</span>' + floor.dormitory.Price + ' <i>元</i></li>' + | |||
'<li><span>房 间</span>' + floor.RoomNum + ' <i>间</i></li>' + | |||
'<li><span>入 住</span>' + floor.HasStudentNum + ' <i>人</i></li>' + | |||
'<li><span>空 床</span>' + floor.NoStudentNum + ' <i>床</i></li>' + | |||
'<li><span>床 位</span>' + floor.BedNum + ' <i>个</i></li>' + | |||
//'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
//'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'</ul>' + | |||
'<div class="laySec2Btn">' + | |||
//'<a href="#"><img src="/Content/images/floor/inSec1-1.png" alt="" /></a>' + | |||
@@ -62,7 +62,11 @@ | |||
<div class="crumbsList3"></div> | |||
</div> | |||
<ul class="indSec1List"> | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-5.png" alt="" />多条件查找宿舍楼</a></li> | |||
<li><a href="#"><img src="/Content/images/floor/inSec1-6.png" alt="" />自动分配宿舍</a></li>*@ | |||
<li><a href="#" @@click="addFloor()"><img src="/Content/images/floor/inSec1-7.png" alt="" />添加房间</a></li> | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-8.png" alt="" />批量删除</a></li> | |||
<li><a href="#"><img src="/Content/images/floor/inSec1-9.png" alt="" />打印宿舍数据</a></li>*@ | |||
</ul> | |||
</div> | |||
<div class="inSec1Row"> | |||
@@ -114,6 +118,155 @@ | |||
<script> | |||
//var data = { | |||
// "rows": [ | |||
// { | |||
// "ID": "289fb13a-8e91-4c5d-bd6b-7b7de344dc17", | |||
// "Name": "101室", | |||
// "Functionary": '负责人', | |||
// "Leader": '舍长', | |||
// "BuildType": "宿舍楼-类型", | |||
// "CreateBy": '创建人', | |||
// "CreateTime": '创建时间', | |||
// "UpdateBy": '更新人', | |||
// "UpdateTime": '更新时间', | |||
// "Price": '价格', | |||
// "Remark": '备注说明', | |||
// "Phone": '负责人电话', | |||
// "Address": '地址', | |||
// "Campus": '校区', | |||
// "Dept": '系', | |||
// "Major": '专业', | |||
// "Class": '班级', | |||
// "Sex": "0",//性别 | |||
// "StudentID": '学生id', | |||
// "ParentID": "父ID", | |||
// "StuName": 'null' | |||
// }, { | |||
// "ID": "289fb13a-8e91-4c5d-bd6b-7b7de344dc17", | |||
// "Name": "202室", | |||
// "Functionary": '张丽梅', | |||
// "Leader": '舍长', | |||
// "BuildType": "宿舍楼-类型", | |||
// "CreateBy": '薛礼根', | |||
// "CreateTime": '2019-05-14', | |||
// "UpdateBy": '薛礼根', | |||
// "UpdateTime": '2019-05-14', | |||
// "Price": '800~1200', | |||
// "Remark": '备注说明', | |||
// "Phone": '15735806069', | |||
// "Address": '山西省小店区南中环街高新区23号', | |||
// "Campus": '山西省小店区高新校区', | |||
// "Dept": '数学系', | |||
// "Major": '数学与应用数学', | |||
// "Class": '班级', | |||
// "Sex": "0",//性别 | |||
// "StudentID": '学生id', | |||
// "ParentID": "父ID", | |||
// "StuName": 'null' | |||
// } | |||
// ], | |||
// "total": 1, | |||
// "page": 1, | |||
// "records": 10 | |||
//} | |||
//var html = ''; | |||
//$.each(data.rows, function (i, n) { | |||
// var floor = floorName(n.Name, 1); | |||
// html += '<div class="inSec1Col3">' + | |||
// '<div class="inSec1Box">' + | |||
// '<div class="inSec1Top">' + | |||
// '<span><span>' + floor + '</span> 室</span>' + | |||
// '<ul class="inSec1TopList">' + | |||
// '<li>' + | |||
// '<a href="javascript:;"><img src="/Content/images/floor/inSec1-2.png" alt="" /></a>' + | |||
// '<div class="inSec1Con inSec1Con1">' + | |||
// '<img class="inSec1Horn" src="/Content/images/floor/inSec1-11.png" alt="" />' + | |||
// '<div class="inSec1Con2">' + | |||
// '<div class="inSec1ConT"><span>' + floor + '</span>室 <div class="inSec1Sex"><img src="/Content/images/floor/inSec1-10.png" alt="" />女生宿舍</div></div>' + | |||
// '<div class="inSec1ConTxt">' + | |||
// '舍长 <span>' + n.Functionary + '</span> <span>4</span>床' + | |||
// '</div>' + | |||
// '<div class="inSec1ConTxt">' + | |||
// '入住 <span>4</span>人 空闲<span>0</span>床位' + | |||
// '</div>' + | |||
// '<div class="inSec1Btn" index="' + i + '">查看更多信息 <i class="fa fa-angle-right"></i></div>' + | |||
// '</div>' + | |||
// '</div>' + | |||
// '</li>' + | |||
// '<li><a href="#"><img src="/Content/images/floor/inSec1-1.png" alt="" /></a></li>' + | |||
// '<li><a href="javascript:;"><img src="/Content/images/floor/inSec1-3.png" alt="" /></a></li>' + | |||
// '</ul>' + | |||
// '<div class="clear"></div>' + | |||
// '</div>' + | |||
// '<div class="inSec1Imgs">101</div>' + | |||
// '<div class="inSec1Img">' + | |||
// '<a href="room"><img src="/Content/images/floor/dorm1-1.png" alt="" /></a>' + | |||
// '<div class="inSec1ImgCon">' + | |||
// '<div class="inSec1ImgCon1"><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></div>' + | |||
// '<div class="inSec1ImgCon2"><img src="/Content/images/floor/dorm1-3.png" alt="" /> 独卫</div>' + | |||
// '<div class="inSec1ImgCon3">满</div>' + | |||
// '</div>' + | |||
// '</div></div></div>'; | |||
//}) | |||
//$('.inSec1Row').html(html).on('click', '.inSec1Btn', function () { | |||
// var ind = $(this).attr('index'); | |||
// var datas = data.rows[ind]; | |||
// var floor = floorName(datas.Name, 1); | |||
// layer.open({ | |||
// type: 1, | |||
// closeBtn: 2, | |||
// area: ['888px', '80%'], | |||
// content: '<div class="layerBox unitLayer dormitoryLayer">' + | |||
// '<div class="layer_sec1 layer_sec">' + | |||
// '<div class="laySec1L">' + | |||
// '<div class="laySec1ConTitle"><span>1</span>号楼 <span>1</span>单元 <span>1</span>层</div> ' + | |||
// '<div class="laySec1ConT"><span>' + floor + '</span>室 ' + | |||
// '<div class="laySec1Sex"><img src="/Content/images/floor/inSec1-10.png" alt="" />女生宿舍</div></div>' + | |||
// '</div>' + | |||
// '<div class="laySec1R">' + | |||
// '<div><div class="laySec1Txt"><span>负 责 人</span>' + datas.Functionary + '</div> <div class="laySec1Txt"><span>负责人电话</span>' + datas.Phone + '</div></div>' + | |||
// '<div class="laySec1Txt"><span>校 区</span>' + datas.Campus + '</div>' + | |||
// '<div class="laySec1Txt"><span>地 址</span>' + datas.Address + '</div>' + | |||
// '</div>' + | |||
// '</div>' + | |||
// '<div class="layer_sec layer_sec2">' + | |||
// '<ul class="laySec2List">' + | |||
// '<li><span>编 号</span>001</li>' + | |||
// '<li><span>价 格</span>' + datas.Price + ' <i>元</i></li>' + | |||
// '<li><span>舍 长</span>' + datas.Leader + '</li>' + | |||
// '<li><span>入 住</span>4 <i>人</i></li>' + | |||
// '<li><span>床 位</span>4 <i>个</i></li>' + | |||
// '<li><span>空 床</span>0 <i>床</i></li>' + | |||
// '<li><span>涉及院系</span>' + datas.Dept + '</li>' + | |||
// '<li><span>涉及专业</span>' + datas.Major + '</li>' + | |||
// '<li><span>卫生等级</span><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i></li>' + | |||
// '<li><span>卫 生 间</span>0 <i>床</i></li>' + | |||
// '</ul>' + | |||
// '<div class="laySec2Btn">' + | |||
// '<a href="#"><img src="/Content/images/floor/inSec1-1.png" alt="" /></a>' + | |||
// '<a href="#"><img src="/Content/images/floor/inSec1-3.png" alt="" /></a>' + | |||
// '<a href="#"><img src="/Content/images/floor/inSec1-12.png" alt="" /></a>' + | |||
// '</div>' + | |||
// '</div>' + | |||
// '<div class="layer_sec layer_sec2 layer_sec4">' + | |||
// '<ul class="laySec2List">' + | |||
// '<li><span>创 建 人 </span>' + datas.CreateBy + '</li>' + | |||
// '<li><span>创建时间 </span>' + datas.CreateTime + '</li>' + | |||
// '<li><span>更 新 人</span>' + datas.UpdateBy + ' </li>' + | |||
// '<li><span>更新时间</span>' + datas.UpdateTime + ' </li>' + | |||
// '</ul>' + | |||
// '</div>' + | |||
// '<img class="layerImg" src="/Content/images/floor/dorm1-2.png" alt="" />' + | |||
// '<div class="inSec1Imgs">' + datas.Name + '</div>' + | |||
// '</div>' | |||
// }) | |||
//}) | |||
var parentID='@ViewBag.ParentID'; | |||
var vm = new Vue({ | |||
el: "#app", | |||
@@ -149,8 +302,7 @@ | |||
}.bind(this), 1000); | |||
}, | |||
filter_Dept: function (value) { | |||
var result = ''; | |||
if (!!value) { | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
@@ -158,22 +310,20 @@ | |||
callback: function (_data) { | |||
result = _data.deptname; | |||
} | |||
}); | |||
} | |||
}); | |||
return result; | |||
}, | |||
filter_Major: function (value) { | |||
var result = ''; | |||
if (!!value) { | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
result = _data.majorname; | |||
} | |||
});} | |||
}); | |||
return result; | |||
}, | |||
@@ -234,8 +384,8 @@ | |||
id: 'form', | |||
title: '新增', | |||
url: url, | |||
width: 900, | |||
height: 500, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(this.laterGetData()); | |||
}.bind(this) | |||
@@ -247,8 +397,8 @@ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, | |||
width: 900, | |||
height: 500, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(this.laterGetData()); | |||
}.bind(this) | |||
@@ -289,7 +439,7 @@ | |||
'<div class="layer_sec layer_sec2">' + | |||
'<ul class="laySec2List">' + | |||
'<li><span>编 号</span>' + floor.dormitory.Name + '</li>' + | |||
'<li><span>价 格</span>' + (floor.dormitory.Price == null ? '' : floor.dormitory.Price) + ' <i>元</i></li>' + | |||
'<li><span>价 格</span>' + floor.dormitory.Price + ' <i>元</i></li>' + | |||
'<li><span>舍 长</span>' + floor.dormitory.Leader + '</li>' + | |||
'<li><span>入 住</span>' + floor.HasStudentNum + ' <i>人</i></li>' + | |||
'<li><span>空 床</span>' + floor.NoStudentNum + ' <i>床</i></li>' + | |||
@@ -8,19 +8,19 @@ | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">每栋楼单元数量</div> | |||
<input id="ElementNum" type="number" class="form-control" /> | |||
<input id="ElementNum" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">每单元楼层数量</div> | |||
<input id="FloorNum" type="number" class="form-control" /> | |||
<input id="FloorNum" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">每楼层房间数量</div> | |||
<input id="RoomNum" type="number" class="form-control" /> | |||
<input id="RoomNum" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">每房间床位数量</div> | |||
<input id="BedNum" type="number" class="form-control" /> | |||
<input id="BedNum" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/DormitoryAdd.js") | |||
@@ -57,7 +57,8 @@ | |||
@*山西省小店区高新校区*@ | |||
<ul class="indSec1List"> | |||
@*<li><a href="#" @@click="allocation()"><img src="/Content/images/floor/inSec1-6.png" alt="" />自动分配宿舍</a></li>*@ | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-5.png" alt="" />多条件查找宿舍楼</a></li>*@ | |||
<li><a href="#" @@click="allocation()"><img src="/Content/images/floor/inSec1-6.png" alt="" />自动分配宿舍</a></li> | |||
<li><a href="#" @@click="addFloor()"><img src="/Content/images/floor/inSec1-7.png" alt="" />添加宿舍楼</a></li> | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-8.png" alt="" />批量删除</a></li>*@ | |||
@*<li><a href="#"><img src="/Content/images/floor/inSec1-9.png" alt="" />打印宿舍数据</a></li>*@ | |||
@@ -74,10 +75,7 @@ | |||
<div class="inSec1Con inSec1Con1"> | |||
<img class="inSec1Horn" src="/Content/images/floor/inSec1-11.png" alt="" /> | |||
<div class="inSec1Con2"> | |||
<div class="inSec1ConT"> | |||
{{floor.dormitory.Name}} | |||
@*<div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div>*@ | |||
</div> | |||
<div class="inSec1ConT">{{floor.dormitory.Name}} <div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div></div> | |||
<div class="inSec1ConTxt"> | |||
<span>{{floor.UnitNum}}</span>单元 <span>{{floor.floorNum}}</span>层 <span>{{floor.RoomNum}}</span>间 | |||
</div> | |||
@@ -133,7 +131,7 @@ | |||
}.bind(this), 1000); | |||
}, | |||
filter_Dept: function (value) { | |||
var result = ''; | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
@@ -146,7 +144,7 @@ | |||
return result; | |||
}, | |||
filter_Major: function (value) { | |||
var result = ''; | |||
var result; | |||
top.learun.clientdata.getAsync('custmerData', { | |||
sync: true, | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
@@ -197,7 +195,7 @@ | |||
}, | |||
addFloor: function () { | |||
var url = ""; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify'; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form'; | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
@@ -214,7 +212,7 @@ | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?keyValue=' + id, | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
@@ -236,10 +234,7 @@ | |||
var echarts1; | |||
//圆形图 | |||
var i = 0; | |||
var g = "0%"; | |||
if (!!floor.HasStudentNum && !!floor.BedNum && floor.HasStudentNum != 0 && floor.BedNum != 0) { | |||
g = ((floor.HasStudentNum / floor.BedNum) * 100).toFixed(2) + "%"; | |||
} | |||
var g = (floor.HasStudentNum / floor.BedNum) * 100 + "%"; | |||
layer.open({ | |||
type: 1, | |||
closeBtn: 2, | |||
@@ -248,8 +243,7 @@ | |||
'<img class="layerImg" src="/Content/images/floor/inSec1-4.png" alt="" />' + | |||
'<div class="layer_sec1 layer_sec">' + | |||
'<div class="laySec1L">' + | |||
'<div class="laySec1ConT">' + floor.dormitory.Name + | |||
'<span style="display:none">' + this.filter_sex(floor.dormitory.Sex) + '</span>' + | |||
'<div class="laySec1ConT">' + floor.dormitory.Name + this.filter_sex(floor.dormitory.Sex) + | |||
'</div>' + | |||
'<div class="laySec1R">' + | |||
'<div><div class="laySec1Txt"><span>负 责 人</span>' + floor.dormitory.Functionary + '</div> <div class="laySec1Txt"><span>负责人电话</span>' + floor.dormitory.Phone + '</div></div>' + | |||
@@ -259,16 +253,16 @@ | |||
'</div>' + | |||
'<div class="layer_sec layer_sec2">' + | |||
'<ul class="laySec2List">' + | |||
'<li><span>编 号</span>' + floor.dormitory.DNo + '</li>' + | |||
'<li><span>价 格</span>' + (floor.dormitory.Price == null ? '' : floor.dormitory.Price) + ' <i>元</i></li>' + | |||
'<li><span>编 号</span>' + floor.dormitory.Name + '</li>' + | |||
'<li><span>价 格</span>' + floor.dormitory.Price + ' <i>元</i></li>' + | |||
'<li><span>单 元</span>' + floor.UnitNum + ' <i>个</i></li>' + | |||
'<li><span>入 住</span>' + floor.HasStudentNum + ' <i>人</i></li>' + | |||
'<li><span>楼 层</span>' + floor.floorNum + ' <i>层</i></li>' + | |||
'<li><span>空 床</span>' + floor.NoStudentNum + ' <i>床</i></li>' + | |||
'<li><span>房 间</span>' + floor.RoomNum + ' <i>间</i></li>' + | |||
//'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
'<li><span>床 位</span>' + floor.UnitNum + ' <i>个</i></li>' + | |||
// '<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'</ul>' + | |||
'<div class="laySec2Btn">' + | |||
//'<a href="#"><img @@click="update(floor.dormitory.ID)" src="/Content/images/floor/inSec1-1.png" alt="" /></a>' + | |||
@@ -3,23 +3,13 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
@*<input value="@ViewBag.BuildType"/>*@ | |||
@if (ViewBag.ParentID != null) | |||
{ | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">上级</div> | |||
<input id="ParentID" type="hidden" value="@ViewBag.ParentID" /> | |||
<input type="text" class="form-control" value="@ViewBag.ParentName" readonly="readonly" /> | |||
</div> | |||
} | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">编号<font face="宋体">*</font></div> | |||
<input id="DNo" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<div class="lr-form-item-title">学生</div> | |||
<div id="StudentID"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
@@ -30,23 +20,36 @@ | |||
<div class="lr-form-item-title">类别<font face="宋体">*</font></div> | |||
<div id="BuildType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
@if (ViewBag.ParentID != null) | |||
{ | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">父单位</div> | |||
<input id="ParentID" type="hidden" value="@ViewBag.ParentID" /> | |||
<label class="form-control">@ViewBag.ParentName</label> | |||
</div> | |||
} | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="Campus"></div> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">负责人</div> | |||
<input id="Functionary" type="text" class="form-control" /> | |||
@@ -59,25 +62,16 @@ | |||
<div class="lr-form-item-title">价格</div> | |||
<input id="Price" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">顺序</div> | |||
<input id="sort" type="number" class="form-control"/> | |||
</div>*@ | |||
@if (ViewBag.BuildType == "3") | |||
@if (ViewBag.BuildType == "4") | |||
{ | |||
//寝室信息 | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">舍长</div> | |||
<input id="Leader" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">几人寝<font face="宋体">*</font></div> | |||
<input id="RoomType" type="number" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
<div class="lr-form-item-title">学生名字</div> | |||
<input id="StudentID" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">星级</div> | |||
@@ -88,16 +82,10 @@ | |||
<div id="HasToilet"></div> | |||
</div> | |||
} | |||
@if (ViewBag.BuildType == "4") | |||
{ | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">学生名字</div> | |||
<input id="StudentID" type="text" class="form-control" /> | |||
</div> | |||
} | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/Form.js") |
@@ -25,7 +25,6 @@ var bootstrap = function ($, learun) { | |||
code: 'HasToilet', | |||
}) | |||
$('#BuildType').lrDataItemSelect({ code: 'BuildType' }); | |||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); | |||
$('#StudentID').lrselect({ | |||
@@ -1,12 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生宿舍管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormBed.js") |
@@ -1,52 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ParentID = request('ParentID'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveBedForm?keyValue=' + keyValue + '&ParentID=' + ParentID, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,19 +0,0 @@ | |||
| |||
@{ | |||
ViewBag.Title = "FormClass"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="Major" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">班级<font face="宋体">*</font></div> | |||
<div id="Class" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormClass.js") | |||
@@ -1,82 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var acceptClick; | |||
var Dept = request('Dept'); | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Class').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Major').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + Dept + "'" }, | |||
select: function (item) { | |||
if (item) { | |||
$('#Class').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Class').on("click", | |||
function () { | |||
//var data1 = $('#Dept').lrselectGet(); | |||
var data2 = $('#Major').lrselectGet(); | |||
if (!data2) { | |||
learun.alert.error('请先选择专业'); | |||
} | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveDeptClass?type=2&keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,97 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生宿舍管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">上级</div> | |||
<div id="ParentID" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">名称<font face="宋体">*</font></div> | |||
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">编号<font face="宋体">*</font></div> | |||
<input id="DNo" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">位置</div> | |||
<input id="Address" type="text" class="form-control"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">类别<font face="宋体">*</font></div> | |||
<div id="BuildType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="Campus"></div> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div>*@ | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">负责人</div> | |||
<input id="Functionary" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">负责人电话</div> | |||
<input id="Phone" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">价格</div> | |||
<input id="Price" type="text" class="form-control" /> | |||
</div> | |||
@*<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">顺序</div> | |||
<input id="sort" type="number" class="form-control"/> | |||
</div>*@ | |||
@if (ViewBag.BuildType == "3") | |||
{ | |||
//寝室信息 | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">舍长</div> | |||
<input id="Leader" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">几人寝<font face="宋体">*</font></div> | |||
<input id="RoomType" type="number" class="form-control" isvalid="yes" checkexpession="NotNull"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">星级</div> | |||
<input id="Starred" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">是否独卫</div> | |||
<div id="HasToilet"></div> | |||
</div> | |||
} | |||
@if (ViewBag.BuildType == "4") | |||
{ | |||
<div class="col-xs-6 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">学生名字</div> | |||
<input id="StudentID" type="text" class="form-control" /> | |||
</div> | |||
} | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormClassify.js") |
@@ -1,167 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ParentID = request('ParentID'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
page.initSelect(); | |||
}, | |||
bind: function () { | |||
$('#BuildType').lrDataItemSelect({ code: 'BuildType' }); | |||
// 上级 | |||
$('#ParentID').lrselect({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetClassifyTree', | |||
type: 'tree', | |||
allowSearch: true, | |||
maxHeight: 225, | |||
select: function (item) { | |||
if (item&&item.id!='-1') { | |||
$('#BuildType').lrselectSet(item.title); | |||
$('#BuildType').attr('readonly', 'readonly'); | |||
} else { | |||
$('#BuildType').lrselectSet('1'); | |||
$('#BuildType').removeAttr('readonly'); | |||
} | |||
} | |||
}); | |||
$('#Sex').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'usersex', | |||
}); | |||
$("#HasToilet").lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'HasToilet', | |||
}) | |||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuid', text: 'stuname' }); | |||
//$('#StudentID').lrDataSourceSelect({ code: 'StuInfoTwo', value: 'stuid', text: 'stuname' }); | |||
$('#StudentID').lrselect({ | |||
value: "stuid", | |||
text: "stuname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic' | |||
}); | |||
$('#Class').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Dept').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#Major').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#Major').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#Class').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#Major').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#Class').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Major').on("click", | |||
function () { | |||
var data = $('#Dept').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#Class').on("click", | |||
function () { | |||
var data1 = $('#Dept').lrselectGet(); | |||
var data2 = $('#Major').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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]); | |||
} | |||
} | |||
}); | |||
} else { | |||
$('#ParentID').lrselectSet(ParentID); | |||
} | |||
}, | |||
initSelect: function () { | |||
var dfop = { | |||
type: 'tree', | |||
// 展开最大高度 | |||
maxHeight: 200, | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
// 访问数据接口地址 | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Company/GetTree', | |||
// 访问数据接口参数 | |||
param: { parentId: '0' }, | |||
} | |||
$('#Campus').lrselect(dfop); | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var strEntity = $('body').lrGetFormData(); | |||
if (!strEntity.ParentID && strEntity.BuildType != '1') { | |||
return learun.alert.warning("请选择上级!"); | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,15 +0,0 @@ | |||
| |||
@{ | |||
ViewBag.Title = "Allocation"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryBuild"> | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="Dept" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormDept.js") | |||
@@ -1,56 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Dept').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
allowSearch:true | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveDeptClass?type=1&keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,26 +0,0 @@ | |||
| |||
@{ | |||
ViewBag.Title = "FormClass"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.div12 { | |||
padding-left: 5px; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="content"> | |||
@*<div class="col-xs-12 lr-form-item div12"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">床位</div> | |||
<input id="Name" readonly="readonly" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生</div> | |||
<div class="Student" id="1"></div> | |||
</div> | |||
</div>*@ | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js") | |||
@@ -1,128 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var acceptClick; | |||
var Class = request('Class'); | |||
var keyValue = request('keyValue'); | |||
var Sex = request('Sex'); | |||
var arr = []; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + keyValue, function (data) { | |||
$('#content').html(''); | |||
var strWhere = " ClassNo='" + Class + "'"; | |||
if (Sex == '0') { | |||
strWhere += " and GenderNo=0"; | |||
} | |||
else if (Sex == '1') { | |||
strWhere += " and GenderNo=1"; | |||
} | |||
for (var i = 0; i < data.length; i++) { | |||
var html = ''; | |||
html += '<div class="col-xs-12 lr-form-item div12">'; | |||
html += '<div class="col-xs-6 lr-form-item">'; | |||
html += '<div class="lr-form-item-title">床位</div>'; | |||
html += '<input id="Name" readonly="readonly" type="text" class="form-control" value="' + | |||
data[i].Name + | |||
'" />'; | |||
html += '</div>'; | |||
html += '<div class="col-xs-6 lr-form-item" style="padding-right: 20px;">'; | |||
html += '<div class="lr-form-item-title">学生</div>'; | |||
html += '<div class="Student" id="' + data[i].ID + '"></div>'; | |||
html += '</div>'; | |||
html += '</div>'; | |||
$('#content').append(html); | |||
$('#' + data[i].ID).lrselect({ | |||
value: "stuno", | |||
text: "stuname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "StuInfoBasic", strWhere: strWhere }, | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
select: function (item) { | |||
// console.log(item); | |||
var stuid = ''; | |||
if (item) { | |||
stuid = item.stuno; | |||
} | |||
var id = $(this).attr('id'); | |||
//console.log('id', id); | |||
//console.log('item',item); | |||
arr.forEach(item => { | |||
if (item.ID == id) { | |||
//如果存在删除 | |||
removeByValue(arr, 'ID', id); | |||
} | |||
}); | |||
arr.push({ ID: id, StudentID: stuid }); | |||
} | |||
}); | |||
$('#' + data[i].ID).lrselectSet(data[i].StudentID); | |||
//arr.push({ ID: data[i].ID, StudentID: data[i].StudentID }); | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
//if (!$('body').lrValidform()) { | |||
// return false; | |||
//} | |||
//var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
//}; | |||
//console.log('arr', arr); | |||
for (var i = 0; i < arr.length - 1; i++) { | |||
for (var j = i + 1; j < arr.length; j++) { | |||
if (!!arr[i].StudentID && arr[i].StudentID === arr[j].StudentID) { | |||
return learun.alert.warning('学生不可重复!'); | |||
} | |||
} | |||
} | |||
var postData = { | |||
list: arr | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SaveRoom?RoomId=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
//删除数组元素 | |||
function removeByValue(arr, attr, value) { | |||
var index = 0; | |||
for (var i in arr) { | |||
if (arr[i][attr] == value) { | |||
index = i; | |||
break; | |||
} | |||
} | |||
arr.splice(index, 1); | |||
} | |||
} |
@@ -21,44 +21,44 @@ | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="ApartmentId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="UnitId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="FloorId"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
@*<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<input id="BuildType" type="text" class="form-control" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学校</div> | |||
<input id="School" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系</div> | |||
<input id="DeptName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<input id="Class" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<input id="MajorName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">负责人</div> | |||
<input id="Functionary" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">舍长</div> | |||
<input id="Leader" type="text" class="form-control" /> | |||
</div> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
@@ -66,19 +66,15 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
<a id="lr_dormitoryAdd" class="btn btn-default"><i class="fa fa-pencil-square"></i> 批量添加宿舍</a> | |||
<a id="lr_bedManage" class="btn btn-default"><i class="fa fa-pencil-square"></i> 床位管理</a> | |||
@*<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i> 自动分配宿舍</a> | |||
<a id="lr_syncdata" class="btn btn-default"><i class="fa fa-pencil-square"></i> 同步宿舍信息</a>*@ | |||
<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i> 自动分配宿舍</a> | |||
<a id="lr_syncdata" class="btn btn-default"><i class="fa fa-pencil-square"></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_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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_Classify" class="btn btn-default"><i class="fa fa-tags"></i> <span class="lrlt">分类管理</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
@@ -11,138 +11,36 @@ var bootstrap = function ($, learun) { | |||
var page = { | |||
init: function () { | |||
page.initTree(); | |||
page.initGird(); | |||
page.search({ ParentID: '' }); | |||
//page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 420, 400); | |||
//宿舍楼 | |||
$('#ApartmentId').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='1' " }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//单元 | |||
$('#UnitId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='2' and ApartmentId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//楼层 | |||
$('#FloorId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='3' and UnitId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name" | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
$('#UnitId').lrselect({ allowSearch: true }); | |||
$('#FloorId').lrselect({ allowSearch: true }); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
//.lrRadioCheckbox({ | |||
// type: 'radio', | |||
// code: 'usersex', | |||
//}); | |||
$('#Class').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Dept').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#Major').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#Major').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#Class').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#Major').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#Class').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}, 220, 400); | |||
$('#Sex').lrRadioCheckbox({ | |||
type: 'radio', | |||
code: 'usersex', | |||
}); | |||
$('#Major').on("click", | |||
function () { | |||
var data = $('#Dept').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#Class').on("click", | |||
function () { | |||
var data1 = $('#Dept').lrselectGet(); | |||
var data2 = $('#Major').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
if (selectedParent.BuildType != '3') { | |||
return learun.alert.warning("请选择楼层!"); | |||
} | |||
var url = ""; | |||
if (selectedParent.ID != null) { | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + selectedParent.ID + '&ParentName=' + selectedParent.Name; | |||
} else { | |||
return learun.alert.warning("请选择上级!"); | |||
//url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form'; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form'; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: url, | |||
width: 900, | |||
height: 550, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -160,8 +58,8 @@ var bootstrap = function ($, learun) { | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + keyValue, | |||
width: 900, | |||
height: 550, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
@@ -184,8 +82,7 @@ var bootstrap = function ($, learun) { | |||
//批量添加宿舍 | |||
$("#lr_dormitoryAdd").on("click", function () { | |||
var keyvalue1 = $("#gridtable").jfGridValue("ID"); | |||
//console.log(selectedParent.ChildType); | |||
if (selectedParent.BuildType == "1") { | |||
if (selectedParent.ChildType == "2") { | |||
var keyValue = selectedParent.ID; | |||
learun.layerForm({ | |||
id: 'form', | |||
@@ -241,45 +138,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//床位管理 | |||
$("#lr_bedManage").on("click", function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'indexBed', | |||
title: '床位管理', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexBed?ParentID=' + keyValue, | |||
width: 700, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
//分类管理 | |||
$("#lr_Classify").on("click", function () { | |||
learun.layerForm({ | |||
id: 'indexClassify', | |||
title: '分类管理', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexClassify', | |||
width: 1200, | |||
height: 780, | |||
//btn:null, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
//初始化左侧树 | |||
initTree: function () { | |||
@@ -289,7 +148,7 @@ var bootstrap = function ($, learun) { | |||
nodeClick: function (item) { | |||
selectedParent.ID = item.value; | |||
selectedParent.Name = item.text; | |||
selectedParent.BuildType = item.title; | |||
if (item.parent) { | |||
if (!item.parent.parentId) { | |||
selectedParent.ChildType = "2"; | |||
@@ -303,283 +162,155 @@ var bootstrap = function ($, learun) { | |||
if (item.text.indexOf("室") > -1) { | |||
selectedParent.ChildType = "5"; | |||
} | |||
var param = {}; | |||
if (item.title == '1') | |||
param.ApartmentId = item.value; | |||
else if (item.title == '2') | |||
param.UnitId = item.value; | |||
else if (item.title == '3') | |||
param.FloorId = item.value; | |||
//page.initGird(); | |||
//page.search({ ParentID: item.value }); | |||
page.search(param); | |||
page.initGird(); | |||
page.search({ ParentID: item.value }); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
//宿舍数据 | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ | |||
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "单元", name: "UnitName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "楼层", name: "FloorName", width: 100, align: "left" | |||
}, | |||
//{ | |||
// label: "学生", name: "StudentID", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
//$("#gridtable").removeClass("jfgrid-layout"); | |||
//$("#gridtable").removeAttr("style"); | |||
//$("#gridtable").empty(); | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', | |||
// key: value, | |||
// keyId: 'stuid', | |||
// callback: function (_data) { | |||
// callback(_data['stuname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "位置", name: "Address", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "Campus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
//$("#gridtable")[0].dfop = undefined; | |||
if (selectedParent.ChildType == "5") { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ label: "学生名字", name: "StuName", width: 100, align: "left" }, | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系", name: "Dept", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "Major", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "寝室类型", name: "RoomType", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value) { | |||
return value + '人寝'; | |||
} else { | |||
return ''; | |||
{ label: "班级", name: "Class", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'usersex', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
} | |||
}, | |||
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value == '0') | |||
return '女'; | |||
else if (value == '1') | |||
return '男'; | |||
else | |||
return ''; | |||
} | |||
}, | |||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||
//sord: 'ASC', | |||
isSubGrid: true, // 是否有子表 | |||
subGridExpanded: function (subContentId, rowItem) { | |||
$('#' + subContentId).jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID, | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ | |||
label: "学生", name: "StudentID", 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']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'ID', | |||
isPage: false, | |||
//sidx: 'DNo', | |||
//sord: 'ASC', | |||
}); | |||
//var param; | |||
//param = param || {}; | |||
//param.ParentID = rowItem.Id; | |||
$('#' + subContentId).jfGridSet('reload'); | |||
}, | |||
subGridHeight: 250, | |||
}); | |||
//$("#gridtable").empty(); | |||
//$("#gridtable")[0].dfop = undefined; | |||
//if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") { | |||
//} else { | |||
// //lrAuthorizeJfGridLei | |||
// $('#gridtable').jfGrid({ | |||
// url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
// headData: [ | |||
// { label: "名称", name: "Name", width: 100, align: "left" }, | |||
// { | |||
// label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||
// }, | |||
// { | |||
// label: "单元", name: "UnitName", width: 100, align: "left" | |||
// }, | |||
// { | |||
// label: "楼层", name: "FloorName", width: 100, align: "left" | |||
// }, | |||
// //{ | |||
// // label: "学生", name: "StudentID", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
}, | |||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
{ label: "价格", name: "Price", width: 100, align: "left" }, | |||
{ label: "星级", name: "Starred", width: 100, align: "left" }, | |||
{ | |||
label: "是否独卫", name: "HasToilet", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'HasToilet', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "舍长", name: "Leader", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect:true | |||
}); | |||
} else { | |||
$('#gridtable').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ label: "学生", name: "StudentID", 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: 'stuid', | |||
// // callback: function (_data) { | |||
// // callback(_data['stuname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// { label: "位置", name: "Address", width: 100, align: "left" }, | |||
// { | |||
// label: "校区", name: "Campus", 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: 'stuid', | |||
callback: function (_data) { | |||
callback(_data['stuname']); | |||
} | |||
}); | |||
} }, | |||
{ label: "位置", name: "Address", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "Campus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
// key: value, | |||
// keyId: 'f_companyid', | |||
// callback: function (_data) { | |||
// callback(_data['f_fullname']); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// //{ | |||
// // label: "系", name: "Dept", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('custmerData', { | |||
// // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
// // key: value, | |||
// // keyId: 'deptno', | |||
// // callback: function (_data) { | |||
// // callback(_data['deptname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// //{ | |||
// // label: "专业", name: "Major", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('custmerData', { | |||
// // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
// // key: value, | |||
// // keyId: 'id', | |||
// // callback: function (_data) { | |||
// // callback(_data['majorname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// //{ label: "班级", name: "Class", width: 100, align: "left" }, | |||
// //{ | |||
// // label: "性别", name: "Sex", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('dataItem', { | |||
// // key: value, | |||
// // code: 'usersex', | |||
// // callback: function (_data) { | |||
// // callback(_data.text); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// { label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
// { label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
// { label: "备注", name: "Remark", width: 100, align: "left" }, | |||
// ], | |||
// mainId: 'ID', | |||
// isPage: true, | |||
// //isMultiselect: true | |||
// //sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||
// //sord: 'ASC', | |||
// }); | |||
//} | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系", name: "Dept", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "Major", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "班级", name: "Class", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'usersex', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect:true | |||
}); | |||
} | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " AND t.BuildType ='4' "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
//page.initTree(); | |||
if (!!selectedParent.ID) { | |||
//var param = { ParentID: selectedParent.ID }; | |||
//$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
page.initTree(); | |||
page.search({ ParentID: selectedParent.ID }); | |||
} else { | |||
page.initTree(); | |||
page.search(); | |||
} | |||
}; | |||
@@ -1,61 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生宿舍管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@*<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlt "> | |||
树形列表 | |||
<a id="tree_refresh" onmouseover="this.style.cursor='hand'">刷新</a> | |||
</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div>*@ | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexBed.js") |
@@ -1,110 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var selectedParent = {}; | |||
var ParentID = request('ParentID'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormBed?ParentID=' + ParentID, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormBed?keyValue=' + keyValue + '&ParentID=' + ParentID, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/DeleteBed', { keyValue: keyValue, ParentID: ParentID }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + ParentID, | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: false, | |||
//isMultiselect: true, | |||
//sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||
//sord: 'ASC', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -1,69 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生宿舍管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="ApartmentId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="UnitId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="FloorId"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<input id="BuildType" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexClassify.js") |
@@ -1,187 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var selectedParent = {}; | |||
//var ParentID = request('ParentID'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
//宿舍楼 | |||
$('#ApartmentId').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='1' " }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//单元 | |||
$('#UnitId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='2' and ApartmentId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//楼层 | |||
$('#FloorId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='3' and UnitId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name" | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
$('#UnitId').lrselect({ allowSearch: true }); | |||
$('#FloorId').lrselect({ allowSearch: true }); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify', | |||
width: 700, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?keyValue=' + keyValue, | |||
width: 700, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetClassifyList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 150, align: "left" }, | |||
{ | |||
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "单元", name: "UnitName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "楼层", name: "FloorName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "类型", name: "BuildType", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value == '1') return '宿舍楼'; | |||
else if (value == '2') return '单元'; | |||
else if (value == '3') return '楼层'; | |||
else if (value == '4') return '房间'; | |||
} | |||
}, | |||
{ label: "位置", name: "Address", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "Campus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: false, | |||
//isMultiselect: true, | |||
//sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||
isTree: true, | |||
parentId: 'ParentID', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//param.SqlParameter = " AND t.BuildType <>'5' "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
learun.layerClose('indexClassify', ''); | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -1,92 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生宿舍管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlt "> | |||
树形列表 | |||
<a id="tree_refresh" onmouseover="this.style.cursor='hand'">刷新</a> | |||
</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap "> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlt">列表信息</span> | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">宿舍楼</div> | |||
<div id="ApartmentId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">单元</div> | |||
<div id="UnitId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">楼层</div> | |||
<div id="FloorId"></div> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<input id="BuildType" type="text" class="form-control" /> | |||
</div>*@ | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系</div> | |||
<div id="Dept"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="Major"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="Class"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="Sex"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">未分配</div> | |||
<div id="NoDistribution"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">已分配</div> | |||
<div id="Distribution"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
@*<a id="lr_dormitoryAdd" class="btn btn-default"><i class="fa fa-pencil-square"></i> 批量添加宿舍</a> | |||
<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i> 自动分配宿舍</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_Dept" class="btn btn-default"><i class="fa fa-pencil-square"></i> 分配系</a> | |||
<a id="lr_Class" class="btn btn-default"><i class="fa fa-pencil-square"></i> 分配专业班级</a> | |||
<a id="lr_Bed" class="btn btn-default"><i class="fa fa-pencil-square"></i> 分配宿舍</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js") |
@@ -1,625 +0,0 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-26 15:02 | |||
* 描 述:学生宿舍管理 | |||
*/ | |||
var refreshGirdData; | |||
var selectedParent = {}; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initTree(); | |||
page.initGird(); | |||
page.search({ ParentID: '' }); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 420, 400); | |||
//宿舍楼 | |||
$('#ApartmentId').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='1' " }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//单元 | |||
$('#UnitId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='2' and ApartmentId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name", | |||
select: function (item) { | |||
if (!!item) { | |||
//楼层 | |||
$('#FloorId').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DormitoryInfo', | |||
param: { strWhere: " BuildType='3' and UnitId='" + item.id + "'" }, | |||
value: "id", | |||
text: "name" | |||
}); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}); | |||
$('#UnitId').lrselect({ allowSearch: true }); | |||
$('#FloorId').lrselect({ allowSearch: true }); | |||
$('#Sex').lrDataItemSelect({ code: 'usersex' }); | |||
//.lrRadioCheckbox({ | |||
// type: 'radio', | |||
// code: 'usersex', | |||
//}); | |||
$('#NoDistribution').lrRadioCheckbox({ | |||
type: 'checkbox', | |||
code: 'NoDistribution' | |||
}); | |||
$('#Distribution').lrRadioCheckbox({ | |||
type: 'checkbox', | |||
code: 'NoDistribution' | |||
}); | |||
$('#Class').lrselect({ | |||
value: "classno", | |||
text: "classname" | |||
}); | |||
$('#Dept').lrselect({ | |||
value: "deptno", | |||
text: "deptname", | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||
select: function (item) { | |||
if (item) { | |||
$('#Major').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||
}); | |||
} | |||
else { | |||
$('#Major').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
$('#Class').lrselectRefresh({ | |||
url: "", | |||
data: [] | |||
}); | |||
} | |||
}); | |||
$('#Major').lrselect({ | |||
value: "majorno", | |||
text: "majorname", | |||
select: function (item) { | |||
if (item) { | |||
$('#Class').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Major').on("click", | |||
function () { | |||
var data = $('#Dept').lrselectGet(); | |||
if (!data) { | |||
learun.alert.error('请先选择系'); | |||
} | |||
}); | |||
$('#Class').on("click", | |||
function () { | |||
var data1 = $('#Dept').lrselectGet(); | |||
var data2 = $('#Major').lrselectGet(); | |||
if (!data1 || !data2) { | |||
learun.alert.error('请先选择系和专业'); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
var url = ""; | |||
if (selectedParent.ID != null) { | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + selectedParent.ID + '&ParentName=' + selectedParent.Name; | |||
} else { | |||
return learun.alert.warning("请选择上级!"); | |||
//url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form'; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: url, | |||
width: 900, | |||
height: 550, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + keyValue, | |||
width: 900, | |||
height: 550, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//批量添加宿舍 | |||
$("#lr_dormitoryAdd").on("click", function () { | |||
var keyvalue1 = $("#gridtable").jfGridValue("ID"); | |||
if (selectedParent.ChildType == "2") { | |||
var keyValue = selectedParent.ID; | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '批量添加宿舍', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/DormitoryAdd?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
else { | |||
learun.alert.warning("请选择楼"); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//刷新左侧的树 | |||
$("#tree_refresh").on("click", function () { | |||
page.initTree(); | |||
}); | |||
//分配系 | |||
$("#lr_Dept").on("click", function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var BuildType = $('#gridtable').jfGridValue('BuildType'); | |||
var Dept = $('#gridtable').jfGridValue('Dept'); | |||
var arr = BuildType.split(','); | |||
if (arr.some(x => x != '4')) { | |||
return learun.alert.warning("只能选择宿舍进行分配!"); | |||
} | |||
if (keyValue.indexOf(',') > 0) { | |||
var arrDept = Dept.split(','); | |||
for (var i = 0; i < arrDept.length; i++) { | |||
if (arrDept[i].length >= 1) { | |||
learun.alert.warning("选中记录包含已分配的数据!"); | |||
return false; | |||
} | |||
} | |||
} | |||
learun.layerForm({ | |||
id: 'formDept', | |||
title: '分配系部', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormDept?keyValue=' + keyValue, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
//分配专业和班级 | |||
$("#lr_Class").on("click", function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var BuildType = $('#gridtable').jfGridValue('BuildType'); | |||
var Dept = $('#gridtable').jfGridValue('Dept'); | |||
var arr = BuildType.split(','); | |||
if (arr.some(x => x != '4')) { | |||
return learun.alert.warning("只能选择宿舍进行分配!"); | |||
} | |||
var arrDept = Dept.split(','); | |||
if (arrDept.some(function (value, index) { | |||
return value.length === 0; | |||
})) { | |||
return learun.alert.warning("选中记录包含未分配系的数据!"); | |||
} | |||
if (keyValue.indexOf(',') > 0) { | |||
if (arrDept.some(function (value, index) { | |||
return value != arrDept[0]; | |||
})) { | |||
return learun.alert.warning("选中记录包含多种专业的数据,不可批量分配班级!"); | |||
} | |||
} | |||
learun.layerForm({ | |||
id: 'formClass', | |||
title: '分配专业班级', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClass?keyValue=' + keyValue + '&Dept=' + arrDept[0], | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
//分配宿舍 | |||
$("#lr_Bed").on("click", function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
var Sex = $('#gridtable').jfGridValue('Sex'); | |||
var BuildType = $('#gridtable').jfGridValue('BuildType'); | |||
var Name = $('#gridtable').jfGridValue('Name'); | |||
var Class = $('#gridtable').jfGridValue('Class'); | |||
var arr = BuildType.split(','); | |||
if (arr.some(x => x != '4')) { | |||
return learun.alert.warning("只能选择宿舍进行分配!"); | |||
} | |||
if (keyValue.indexOf(',') != -1) { | |||
return learun.alert.warning("只能选择一条记录进行分配!"); | |||
} | |||
if (Class.length == 0) { | |||
return learun.alert.warning("请先分配班级!"); | |||
} | |||
learun.layerForm({ | |||
id: 'formRoom', | |||
title: '分配宿舍--' + Name, | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormRoom?keyValue=' + keyValue + '&Class=' + Class + '&Sex=' + Sex, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
//初始化左侧树 | |||
initTree: function () { | |||
// 初始化左侧树形数据 | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetTree', | |||
nodeClick: function (item) { | |||
selectedParent.ID = item.value; | |||
selectedParent.Name = item.text; | |||
selectedParent.BuildType = item.title; | |||
if (item.parent) { | |||
if (!item.parent.parentId) { | |||
selectedParent.ChildType = "2"; | |||
} else { | |||
selectedParent.ChildType = "0"; | |||
} | |||
} | |||
else { | |||
selectedParent.ChildType = "1"; | |||
} | |||
if (item.text.indexOf("室") > -1) { | |||
selectedParent.ChildType = "5"; | |||
} | |||
var param = {}; | |||
if (item.title == '1') | |||
param.ApartmentId = item.value; | |||
else if (item.title == '2') | |||
param.UnitId = item.value; | |||
else if (item.title == '3') | |||
param.FloorId = item.value; | |||
//page.initGird(); | |||
//page.search({ ParentID: item.value }); | |||
page.search(param); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
//宿舍数据 | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ | |||
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "单元", name: "UnitName", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "楼层", name: "FloorName", width: 100, align: "left" | |||
}, | |||
//{ | |||
// label: "学生", name: "StudentID", 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: 'stuid', | |||
// callback: function (_data) { | |||
// callback(_data['stuname']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "位置", name: "Address", width: 100, align: "left" }, | |||
{ | |||
label: "校区", name: "Campus", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "系", name: "Dept", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "Major", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "寝室类型", name: "RoomType", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value) { | |||
return value + '人寝'; | |||
} else { | |||
return ''; | |||
} | |||
} | |||
}, | |||
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" }, | |||
{ | |||
label: "性别", name: "Sex", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value == '0') | |||
return '女'; | |||
else if (value == '1') | |||
return '男'; | |||
else | |||
return ''; | |||
} | |||
}, | |||
{ label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
{ label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'CheckInStu asc,ApartmentId asc,UnitId asc ,FloorId asc ', | |||
//sord: 'ASC', | |||
isSubGrid: true, // 是否有子表 | |||
subGridExpanded: function (subContentId, rowItem) { | |||
$('#' + subContentId).jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID, | |||
headData: [ | |||
{ label: "名称", name: "Name", width: 100, align: "left" }, | |||
{ | |||
label: "学生", name: "StudentID", 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']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'ID', | |||
isPage: false, | |||
//sidx: 'DNo', | |||
//sord: 'ASC', | |||
}); | |||
//var param; | |||
//param = param || {}; | |||
//param.ParentID = rowItem.Id; | |||
$('#' + subContentId).jfGridSet('reload'); | |||
}, | |||
subGridHeight: 250, | |||
}); | |||
//$("#gridtable").empty(); | |||
//$("#gridtable")[0].dfop = undefined; | |||
//if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") { | |||
//} else { | |||
// //lrAuthorizeJfGridLei | |||
// $('#gridtable').jfGrid({ | |||
// url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList', | |||
// headData: [ | |||
// { label: "名称", name: "Name", width: 100, align: "left" }, | |||
// { | |||
// label: "宿舍楼", name: "ApartmentName", width: 100, align: "left" | |||
// }, | |||
// { | |||
// label: "单元", name: "UnitName", width: 100, align: "left" | |||
// }, | |||
// { | |||
// label: "楼层", name: "FloorName", width: 100, align: "left" | |||
// }, | |||
// //{ | |||
// // label: "学生", name: "StudentID", 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: 'stuid', | |||
// // callback: function (_data) { | |||
// // callback(_data['stuname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// { label: "位置", name: "Address", width: 100, align: "left" }, | |||
// { | |||
// label: "校区", name: "Campus", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
// key: value, | |||
// keyId: 'f_companyid', | |||
// callback: function (_data) { | |||
// callback(_data['f_fullname']); | |||
// } | |||
// }); | |||
// } | |||
// }, | |||
// //{ | |||
// // label: "系", name: "Dept", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('custmerData', { | |||
// // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
// // key: value, | |||
// // keyId: 'deptno', | |||
// // callback: function (_data) { | |||
// // callback(_data['deptname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// //{ | |||
// // label: "专业", name: "Major", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('custmerData', { | |||
// // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
// // key: value, | |||
// // keyId: 'id', | |||
// // callback: function (_data) { | |||
// // callback(_data['majorname']); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// //{ label: "班级", name: "Class", width: 100, align: "left" }, | |||
// //{ | |||
// // label: "性别", name: "Sex", width: 100, align: "left", | |||
// // formatterAsync: function (callback, value, row, op, $cell) { | |||
// // learun.clientdata.getAsync('dataItem', { | |||
// // key: value, | |||
// // code: 'usersex', | |||
// // callback: function (_data) { | |||
// // callback(_data.text); | |||
// // } | |||
// // }); | |||
// // } | |||
// //}, | |||
// { label: "负责人", name: "Functionary", width: 100, align: "left" }, | |||
// { label: "负责人电话", name: "Phone", width: 100, align: "left" }, | |||
// { label: "备注", name: "Remark", width: 100, align: "left" }, | |||
// ], | |||
// mainId: 'ID', | |||
// isPage: true, | |||
// //isMultiselect: true | |||
// //sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ', | |||
// //sord: 'ASC', | |||
// }); | |||
//} | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " AND t.BuildType ='4' "; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
//page.initTree(); | |||
if (!!selectedParent.ID) { | |||
//var param = { ParentID: selectedParent.ID }; | |||
//$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
page.initTree(); | |||
page.search({ ParentID: selectedParent.ID }); | |||
} else { | |||
page.initTree(); | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -79,10 +79,10 @@ | |||
<div class="inSec1ConTxt"> | |||
姓名 <span :title="floor.stuInfo.StuName" class="inSec1ConSpan1">{{floor.stuInfo.StuName}}</span> 学号 <span :title="floor.stuInfo.StuNo" class="inSec1ConSpan2" style="margin-left:0">{{floor.stuInfo.StuNo}}</span> | |||
</div> | |||
@*<div class="inSec1ConTxt"> | |||
<div class="inSec1ConTxt"> | |||
院系 <span :title="floor.stuInfo.DeptNo | filter_Dept" class="inSec1ConSpan1">{{floor.stuInfo.DeptNo | filter_Dept}}</span> 专业 <span :title="floor.stuInfo.MajorNo | filter_Major" style="margin-left:0" class="inSec1ConSpan2">{{floor.stuInfo.MajorNo | filter_Major}}</span> | |||
</div> | |||
<div @@click="checkDetail(floor)" class="inSec1Btn">查看更多信息 <i class="fa fa-angle-right"></i></div>*@ | |||
<div @@click="checkDetail(floor)" class="inSec1Btn">查看更多信息 <i class="fa fa-angle-right"></i></div> | |||
</div> | |||
</div> | |||
</li> | |||
@@ -237,7 +237,7 @@ | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
result = _data.majorname; | |||
@@ -398,7 +398,7 @@ | |||
}, | |||
addFloor: function () { | |||
var url = ""; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/FormBed?ParentID=' + this.roomID + '&ParentName=' + this.roomName; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + this.roomID + '&ParentName=' + this.roomName; | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
@@ -415,7 +415,7 @@ | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormBed?keyValue=' + id, | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
@@ -542,7 +542,7 @@ | |||
top.learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
keyId: 'id', | |||
callback: function (_data) { | |||
result = _data.majorname; | |||
@@ -76,9 +76,7 @@ | |||
<div class="inSec1Con inSec1Con1"> | |||
<img class="inSec1Horn" src="/Content/images/floor/inSec1-11.png" alt="" /> | |||
<div class="inSec1Con2"> | |||
<div class="inSec1ConT">{{floor.dormitory.Name}} | |||
@*<div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div>*@ | |||
</div> | |||
<div class="inSec1ConT">{{floor.dormitory.Name}} <div class="inSec1Sex" :style="floor.dormitory.Sex | filter_style"><img :src="floor.dormitory.Sex | filter_sexImg" alt="" />{{floor.dormitory.Sex | filter_sex}}</div></div> | |||
<div class="inSec1ConTxt"> | |||
<span>{{floor.floorNum}}</span>层 <span>{{floor.RoomNum}}</span>间 <span>{{floor.BedNum}}</span>床 | |||
</div> | |||
@@ -257,7 +255,7 @@ | |||
floors: "", | |||
sexImgUrl: "/Content/images/floor/inSec1-10.png", | |||
dormitoryName: "", | |||
dormitoryID: "" | |||
dormitoryID:"" | |||
}, | |||
methods: { | |||
getData: function () { | |||
@@ -340,7 +338,7 @@ | |||
}, | |||
addFloor: function () { | |||
var url = ""; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?ParentID=' + this.dormitoryID; | |||
url = top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?ParentID=' + this.dormitoryID + '&ParentName=' + this.dormitoryName; | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
@@ -357,7 +355,7 @@ | |||
top.learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormClassify?keyValue=' + id, | |||
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/Form?keyValue=' + id, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
@@ -387,8 +385,7 @@ | |||
content: '<div class="layerBox unitLayer">' + | |||
'<div class="layer_sec1 layer_sec">' + | |||
'<div class="laySec1L">' + | |||
'<div class="laySec1ConT">' + floor.dormitory.Name+ | |||
'<span style="display:none">' + this.filter_sex(floor.dormitory.Sex) + '</span>' + | |||
'<div class="laySec1ConT">' + floor.dormitory.Name + this.filter_sex(floor.dormitory.Sex) + | |||
'</div>' + | |||
'<div class="laySec1R">' + | |||
'<div><div class="laySec1Txt"><span>负 责 人</span>' + floor.dormitory.Functionary + '</div> <div class="laySec1Txt"><span>负责人电话</span>' + floor.dormitory.Phone + '</div></div>' + | |||
@@ -398,15 +395,15 @@ | |||
'</div>' + | |||
'<div class="layer_sec layer_sec2">' + | |||
'<ul class="laySec2List">' + | |||
'<li><span>编 号</span>' + floor.dormitory.DNo + '</li>' + | |||
'<li><span>价 格</span>' + (floor.dormitory.Price == null ? '' : floor.dormitory.Price) + ' <i>元</i></li>' + | |||
'<li><span>编 号</span>' + floor.dormitory.Name + '</li>' + | |||
'<li><span>价 格</span>' + floor.dormitory.Price + ' <i>元</i></li>' + | |||
'<li><span>楼 层</span>' + floor.floorNum + ' <i>层</i></li>' + | |||
'<li><span>入 住</span>' + floor.HasStudentNum + ' <i>人</i></li>' + | |||
'<li><span>房 间</span>' + floor.RoomNum + ' <i>间</i></li>' + | |||
'<li><span>空 床</span>' + floor.NoStudentNum + ' <i>床</i></li>' + | |||
'<li><span>床 位</span>' + floor.BedNum + ' <i>个</i></li>' + | |||
//'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
//'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' + | |||
'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' + | |||
'</ul>' + | |||
'<div class="laySec2Btn">' + | |||
//'<a href="#"><img src="/Content/images/floor/inSec1-1.png" alt="" /></a>' + | |||
@@ -1,23 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生归宿管理"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">床位</div> | |||
<div id="DormitoryBuildId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">出宿时间</div> | |||
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">归宿时间</div> | |||
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" /> | |||
</div> | |||
@*<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">检查日期</div> | |||
<input id="CheckDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckDate').trigger('change'); } })" /> | |||
</div>*@ | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/Form.js") |
@@ -1,59 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-10 10:06 | |||
* 描 述:学生归宿管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ParentId = request('ParentId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DormitoryBuildId').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" }, | |||
text: 'name', | |||
value: 'id', | |||
allowSearch: true | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetFormData?keyValue=' + keyValue, function (data) { | |||
console.log('data', 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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveData?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,19 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生出宿"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">床位<font face="宋体">*</font></div> | |||
<div id="DormitoryBuildId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">出宿时间<font face="宋体">*</font></div> | |||
<input id="OutTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#OutTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/FormOut.js") |
@@ -1,61 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-10 10:06 | |||
* 描 述:学生归宿管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ParentId = request('ParentId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DormitoryBuildId').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" }, | |||
text: 'name', | |||
value: 'id', | |||
allowSearch: true | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var strEntity = $('body').lrGetFormData(); | |||
strEntity.ParentId = ParentId; | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveForm?type=1', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,19 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生出宿"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">床位<font face="宋体">*</font></div> | |||
<div id="DormitoryBuildId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">归宿时间<font face="宋体">*</font></div> | |||
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Acc_DormitoryReturn"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/FormReturn.js") |
@@ -1,61 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-10 10:06 | |||
* 描 述:学生归宿管理 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var ParentId = request('ParentId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DormitoryBuildId').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||
param: { code: 'DormitoryInfo', strWhere: "ParentID='" + ParentId + "' and BuildType='5' and (StudentID is not null and len(StudentID)>0) order by name" }, | |||
text: 'name', | |||
value: 'id', | |||
allowSearch: true | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/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) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var strEntity = $('body').lrGetFormData(); | |||
strEntity.ParentId = ParentId; | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/SaveForm?type=2', postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -1,49 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "学生归宿管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout" > | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlg ">树形列表</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap "> | |||
<div class="lr-layout-title"> | |||
<span id="titleinfo" class="lrlg">列表信息</span> | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
@*<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">出宿时间</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div>*@ | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<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"> | |||
<a id="lr_out" class="btn btn-default"><i class="fa fa-plus"></i> 学生出宿</a> | |||
<a id="lr_return" 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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/Index.js") |
@@ -1,159 +0,0 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-03-10 10:06 | |||
* 描 述:学生归宿管理 | |||
*/ | |||
var refreshGirdData; | |||
var ParentId = ''; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 初始化左侧树形数据 | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetTree', | |||
nodeClick: function (item) { | |||
if (item.title == '4') { | |||
ParentId = item.value; | |||
page.search({ ParentId: item.value }); | |||
} | |||
} | |||
}); | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 学生出宿 | |||
$('#lr_out').on('click', function () { | |||
if (!!ParentId) { | |||
learun.layerForm({ | |||
id: 'formout', | |||
title: '学生出宿', | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/FormOut?ParentId=' + ParentId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning('请选择宿舍!'); | |||
} | |||
}); | |||
// 学生出宿 | |||
$('#lr_return').on('click', function () { | |||
if (!!ParentId) { | |||
learun.layerForm({ | |||
id: 'formreturn', | |||
title: '学生归宿', | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/FormReturn?ParentId=' + ParentId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning('请选择宿舍!'); | |||
} | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/Form?keyValue=' + keyValue + '&ParentId=' + ParentId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetPageList', | |||
headData: [ | |||
{ label: "床位", name: "Name", width: 100, align: "left" }, | |||
{ label: "出宿时间", name: "OutTime", width: 200, align: "left" }, | |||
{ label: "归宿时间", name: "ReturnTime", width: 200, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'OutTime desc', | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
if (!!ParentId) { | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -1,49 +0,0 @@ | |||
| |||
@{ | |||
ViewBag.Title = "学生归宿统计"; | |||
Layout = "~/Views/Shared/_ReportTemplate.cshtml"; | |||
} | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
</style> | |||
<div class="lr-layout ui-report"> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle"> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Dept" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Major" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="Class" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class="btn-group btn-group-sm"> | |||
@*<a id="lr-replace" class="btn btn-default"><i class="fa fa-refresh"></i> <span class="lrlt">刷新</span></a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-grid" style="overflow:auto;"> | |||
<div class="grid-title"> | |||
<div style="overflow: hidden; padding-bottom: 20px; text-align: center; margin-left: auto; margin-right: auto;"> | |||
<div id="main" style="float: left; margin-right: 20px; width: 650px; height: 350px;border: 1px solid #ccc;"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<script src="~/Content/echarts/echarts.js"></script> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/DormitoryReturn/IndexReport.js") |
@@ -1,131 +0,0 @@ | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var year = ""; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initGrid(); | |||
page.initChart(); | |||
}, | |||
bind: function () { | |||
$('#Dept').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择系部", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetDept', | |||
value: 'Dept', | |||
text: 'DeptName', | |||
select: function (item) { | |||
if (item) { | |||
$('#Major').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor', | |||
param: { strWhere: "m.deptno='" + item.Dept + "'" } | |||
}); | |||
$('#Class').lrselectRefresh({ | |||
//url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass', | |||
//param: { strWhere: "c.majorno=''" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Major').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择专业", | |||
allowSearch: true, | |||
//url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetMajor', | |||
value: 'Major', | |||
text: 'MajorName', | |||
select: function (item) { | |||
if (item) { | |||
$('#Class').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetClass', | |||
param: { strWhere: "c.majorno='" + item.Major + "'" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#Class').lrselect({ | |||
width: '150px', | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
value: 'Class', | |||
text: 'ClassName' | |||
}); | |||
//查询 | |||
$('#btn_Search').on('click', function () { | |||
page.search({ Dept: $('#Dept').lrselectGet(), Major: $('#Major').lrselectGet(), Class: $('#Class').lrselectGet() }); | |||
}); | |||
}, | |||
initGrid: function () { | |||
$(".lr-layout-grid").height($(window).height() - 110); | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportList', | |||
headData: [ | |||
{ name: "name", label: "状态", width: 100, align: "center" }, | |||
{ name: "value", label: "人数", width: 150, align: "center" } | |||
] | |||
}); | |||
page.search(); | |||
}, | |||
initChart: function (queryJson) { | |||
var myChart1 = echarts.init(document.getElementById('main')); | |||
//var myChart2 = echarts.init(document.getElementById('main1')); | |||
queryJson = { | |||
Dept: $('#Dept').lrselectGet(), | |||
Major: $('#Major').lrselectGet(), | |||
Class: $('#Class').lrselectGet() | |||
}; | |||
//console.log('queryJson', queryJson); | |||
learun.httpAsyncPost(top.$.rootUrl + '/LogisticsManagement/DormitoryReturn/GetReportData', { queryJson: JSON.stringify(queryJson) }, function (res) { | |||
if (res.code == 200) { | |||
var option = { | |||
title: { | |||
text: '学生归宿统计', | |||
x: 'center' | |||
}, | |||
tooltip: { | |||
trigger: 'item', | |||
formatter: "{a} <br/>{b} : {c} ({d}%)" | |||
}, | |||
legend: { | |||
orient: 'vertical', | |||
left: 'left', | |||
data: res.data.list1 | |||
}, | |||
series: [ | |||
{ | |||
name: '学生归宿', | |||
type: 'pie', | |||
radius: '55%', | |||
center: ['50%', '60%'], | |||
data: res.data.list2, | |||
itemStyle: { | |||
emphasis: { | |||
shadowBlur: 10, | |||
shadowOffsetX: 0, | |||
shadowColor: 'rgba(0, 0, 0, 0.5)' | |||
} | |||
} | |||
} | |||
] | |||
}; | |||
myChart1.setOption(option); | |||
} | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
page.initChart(param); | |||
} | |||
}; | |||
page.init(); | |||
} | |||
@@ -85,15 +85,6 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 班级课程表【教务】 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ClassIndexInEducation() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 课程表【教学调度】 | |||
/// <summary> | |||
/// <returns></returns> | |||
@@ -1,159 +0,0 @@ | |||
@{ | |||
ViewBag.Title = "班级课程表"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<link href="~/Content/static/css/TimeTable.css" rel="stylesheet" /> | |||
<style id="style1" media="print"> | |||
* { | |||
-webkit-box-sizing: border-box; | |||
-moz-box-sizing: border-box; | |||
box-sizing: border-box; | |||
} | |||
ul { | |||
margin: 0px; | |||
padding: 0px; | |||
list-style: none; | |||
} | |||
li { | |||
list-style: none; | |||
} | |||
table, tr, td { | |||
cellspacing: 0px; | |||
cellpadding: 0px; | |||
padding: 0; | |||
margin: 0; | |||
} | |||
body { | |||
font-family: "Microsoft YaHei", "微软雅黑" !important; | |||
padding: 10px; | |||
color: #333; | |||
font-size: 12px; | |||
margin: 0; | |||
} | |||
.personalBox { | |||
padding: 10px; | |||
} | |||
.personT { | |||
font-size: 24px; | |||
text-align: center; | |||
margin-bottom: 15px | |||
} | |||
.perSemester { | |||
text-align: center; | |||
border: 1px solid #333; | |||
line-height: 25px; | |||
height: 30px; | |||
} | |||
.perWeek { | |||
overflow: hidden; | |||
line-height: 26px; | |||
height: 30px; | |||
text-align: center; | |||
border-left: 1px solid #333; | |||
border-right: 1px solid #333; | |||
} | |||
.perWeek li { | |||
width: 12.5%; | |||
float: left; | |||
border-left: 1px solid #333; | |||
height: 100%; | |||
} | |||
.perFestivalsBox { | |||
border-left: 1px solid #333; | |||
border-right: 1px solid #333; | |||
border-bottom: 1px solid #333; | |||
text-align: center; | |||
} | |||
.perFestivalsBox table { | |||
display: block; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
.perFestivalsBox td { | |||
border-left: 1px solid #333; | |||
border-top: 1px solid #333; | |||
padding: 1px; | |||
width: 12.5%; | |||
font-size: 12px; | |||
} | |||
.perFestivalsBox td div { | |||
min-height: 16px; | |||
line-height: 16px; | |||
} | |||
.perFestivalsBox td:first-child, .perWeek li:first-child { | |||
border-left: 0; | |||
} | |||
</style> | |||
<style> | |||
.lr-select { | |||
width: 150px; | |||
} | |||
</style> | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch" class="lr-search-date"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="F_SchoolId" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="ClassNo" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<a id="lr_search" class="btn btn-primary">查询</a> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" style="overflow: auto;"> | |||
<div class="warpper"> | |||
<div class="personalBox"> | |||
<div class="personT"></div> | |||
<div class="perSemester"></div> | |||
<ul class="perWeek"> | |||
<li>节次/星期</li> | |||
<li>星期一</li> | |||
<li>星期二</li> | |||
<li>星期三</li> | |||
<li>星期四</li> | |||
<li>星期五</li> | |||
<li>星期六</li> | |||
<li>星期日</li> | |||
</ul> | |||
<div class="perFestivalsBox"> | |||
<table cellspacing="0" border="0"></table> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TimeTable/ClassIndexInEducation.js") | |||
@@ -1,202 +0,0 @@ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.bindSelect(); | |||
}, | |||
loadData: function (param) { | |||
$.lrSetFormWithParam(top.$.rootUrl + '/PersonnelManagement/TimeTable/GetDataInEducation', param, | |||
function (data) { | |||
// 数据处理 | |||
var html = ''; | |||
var weekLists = data.weekList; | |||
for (var i = 1; i < 11; i++) { | |||
(function (arg) { | |||
var args = arg - 1; | |||
var datas = flogs(arg, weekLists, 'time'); | |||
html += ' <tr><td>' + arg + '节</td>'; | |||
if (datas) { | |||
var lists = datas.list; | |||
html += tdHandles(lists); | |||
} else { | |||
html += tdHandle(arg); | |||
} | |||
html += '</tr>'; | |||
})(i); //调用时参数 | |||
} | |||
$('.personT').text(data.schoolName); | |||
$('.perSemester').text(data.semester); | |||
$('.perFestivalsBox table').html(html); | |||
function flogs(num, data, obj) { | |||
var flog = false; | |||
$.each(data, | |||
function (i, n) { | |||
if (n[obj] == num) { | |||
flog = n; | |||
return; | |||
} | |||
}) | |||
return flog; | |||
} | |||
function flogs2(num, data, obj) { | |||
var arr = new Array(); | |||
$.each(data, | |||
function (i, n) { | |||
if (n[obj] == num) { | |||
arr.push(n); | |||
} | |||
}) | |||
return arr; | |||
} | |||
//某节课空 | |||
function tdHandle() { | |||
var html = ''; | |||
for (var j = 0; j < 7; j++) { | |||
html += '<td><div></div><div></div><div></div><div></div></td>'; | |||
} | |||
return html; | |||
} | |||
//某节课不空 | |||
function tdHandles(lists) { | |||
var html = ''; | |||
for (var k = 1; k < 8; k++) { | |||
(function (arg) { | |||
var args = arg - 1; | |||
var datas = flogs2(arg, lists, 'day'); | |||
if (datas.length > 0) { | |||
html += '<td class="active">'; | |||
$.each(datas, function (i, item) { | |||
if (i > 0) { | |||
html += '<hr>'; | |||
} | |||
html += '<div>课程:' + | |||
item.curriculum + | |||
'</div>' + | |||
'<div>教师:' + | |||
item.teacher + | |||
'</div>' + | |||
'<div>班级:' + | |||
item.className + | |||
'</div>' + | |||
'<div>教室:' + | |||
item.classRoom + | |||
'</div>'; | |||
}); | |||
html += '</td>'; | |||
} else { | |||
html += '<td><div></div><div></div><div></div><div></div></td>'; | |||
} | |||
})(k); | |||
} | |||
return html; | |||
} | |||
}); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ | |||
name: '上周', | |||
begin: function () { return learun.getTime(7); }, | |||
end: function () { | |||
return learun.getTime(1); | |||
} | |||
}, | |||
{ | |||
name: '本周', | |||
begin: function () { return learun.getTime(0); }, | |||
end: function () { | |||
return learun.getTime(-6); | |||
} | |||
}, | |||
{ | |||
name: '下周', | |||
begin: function () { return learun.getTime(-7); }, | |||
end: function () { | |||
return learun.getTime(-13); | |||
} | |||
}], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: 'currentWeek', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
//查询 | |||
$('#lr_search').on('click', function () { | |||
var p = {}; | |||
p.schoolId = $('#F_SchoolId').lrselectGet(); | |||
p.ClassNo = $('#ClassNo').lrselectGet(); | |||
page.search(p); | |||
}); | |||
}, | |||
bindSelect: function () { | |||
//校区 | |||
$('#F_SchoolId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { | |||
if (!!item) { | |||
// 班级 | |||
$('#ClassNo').lrselectRefresh({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', | |||
param: { schoolId: item.f_companyid }, | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
} else { | |||
//班级 | |||
$('#ClassNo').lrselectRefresh({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', | |||
param: { schoolId: "" }, | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
} | |||
} | |||
}); | |||
//班级 | |||
$('#ClassNo').lrselect({ | |||
placeholder: "请选择班级", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/TimeTable/GetClassData', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
page.loadData(param); | |||
} | |||
}; | |||
page.init(); | |||
}; |
@@ -557,11 +557,6 @@ namespace Learun.Application.Web.Controllers | |||
{ | |||
return Success(new { pwd = true }); | |||
} | |||
//每月1号强制用户修改密码 | |||
if (DateTime.Now.Day == 1 && up == "false") | |||
{ | |||
return Success(new { pwd = true }); | |||
} | |||
//是否30天未修改密码验证 | |||
//获取开关显示配置中“30天未修改密码登录后提示修改”项的配置 | |||
if (teachSwitchIBLL.FindFirst("modifypwdtip")) | |||
@@ -824,10 +824,6 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuDisciplineManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelDisciplineManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuVolunteerController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\ShowAuthorizeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6462,22 +6458,6 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\ShowAuthorize\Index.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\ShowAuthorize\Index.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\ShowAuthorize\Form.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\ShowAuthorize\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -35,7 +35,6 @@ var bootstrap = function ($, learun) { | |||
} | |||
if ($this.val() != $('#NewPwd').val()) { | |||
learun.alert.error("两次密码输入不一样"); | |||
return false; | |||
} | |||
}); | |||
} | |||
@@ -2203,7 +2203,6 @@ | |||
dfop.rows = 1000000; | |||
data = data || dfop.param || {}; | |||
dfop.param = data.param || data; | |||
dfop.running.pageparam.page = 1; | |||
_jfgrid.reload($self, dfop); | |||
break; | |||
case 'refresh': | |||
@@ -61,12 +61,6 @@ | |||
callBack: function (id) { | |||
return top[id].acceptClick(); | |||
}, | |||
end: function () { | |||
if (learun.frameTab.currentIframe().$('#' + item.F_GridId)[0].dfop.rows == 1000000) { | |||
learun.frameTab.currentIframe().$('#' + item.F_GridId)[0].dfop.rows = 30; | |||
learun.frameTab.currentIframe().$('#' + item.F_GridId).jfGridSet('reload'); | |||
} | |||
}, | |||
btn: ['导出Excel', '关闭'] | |||
}); | |||
}); | |||
@@ -34,7 +34,6 @@ | |||
<typeAlias alias="StuCancelDisciplineManageMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -79,7 +78,6 @@ | |||
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManageMethod" name="StuCancelDisciplineManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | |||
</container> | |||
@@ -143,9 +143,9 @@ | |||
<add key="dbbackuppath" value="D:\数字化校园\lr7test\Publish\Resource\DataBaseBackup"/> | |||
<!-- 报名选修课排队需要调用的WebApi --> | |||
<add key="WebApi" value="http://localhost:8088/" /> | |||
<add key="WebApi" value="http://localhost:8081/" /> | |||
<!-- 报名选修课的最大课程数 --> | |||
<add key="ElectiveLessonApplyMax" value="5" /> | |||
<add key="ElectiveLessonApplyMax" value="2" /> | |||
<!-- 河南对接登录 --> | |||
<add key="appid" value="TZ6RW1DUNIN6C5M88I" /> | |||
<add key="secret" value="55848ef07e0f4e0c991bc8b4426100b2" /> | |||
@@ -212,7 +212,6 @@ | |||
<Compile Include="Modules\ListenClassRecordApi.cs" /> | |||
<Compile Include="Modules\MpManagementApi.cs" /> | |||
<Compile Include="Modules\PersonnelManagement\EpidemicSituationCopyApi.cs" /> | |||
<Compile Include="Modules\StuScoreApi.cs" /> | |||
<Compile Include="Modules\StuInfoBasicApi.cs" /> | |||
<Compile Include="Modules\StatisticsApi.cs" /> | |||
<Compile Include="Modules\TaiGang\TUserApi.cs" /> | |||
@@ -1,143 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.Util; | |||
using Nancy; | |||
using Newtonsoft.Json; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
public class StuScoreApi : BaseNoLoginApi | |||
{ | |||
public StuScoreApi() | |||
: base("/Learun/adms/EducationalAdministration/StuScore") | |||
{ | |||
Get["/scoreListByStuInfo"] = GetScoreListByStuInfo; | |||
} | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); | |||
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); | |||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | |||
/// <summary> | |||
/// 全院学生成绩查看-打印成绩单 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
private Response GetScoreListByStuInfo(dynamic _) | |||
{ | |||
var param = this.GetReq<Model>(); | |||
ScoreListByStuInfo result = new ScoreListByStuInfo(); | |||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(param.StuNo); | |||
if (stuInfoBasicEntity != null) | |||
{ | |||
result.StuNo = stuInfoBasicEntity.StuNo; | |||
result.StuName = stuInfoBasicEntity.StuName; | |||
result.MajorNo = stuInfoBasicEntity.MajorNo; | |||
result.ClassNo = stuInfoBasicEntity.ClassNo; | |||
if (!string.IsNullOrEmpty(stuInfoBasicEntity.MajorNo)) | |||
{ | |||
result.MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(stuInfoBasicEntity.MajorNo)?.MajorName; | |||
} | |||
if (!string.IsNullOrEmpty(stuInfoBasicEntity.ClassNo)) | |||
{ | |||
result.ClassName = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo)?.ClassName; | |||
} | |||
} | |||
var queryJson = JsonConvert.SerializeObject(param); | |||
var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson); | |||
var dataTemp = data.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new ScoreList() | |||
{ | |||
AcademicYearNo = x.Key.AcademicYearNo, | |||
Semester = x.Key.Semester, | |||
StuScoreEntityList = x.Select(y => new StuScoreModel() | |||
{ | |||
AcademicYearNo = y.AcademicYearNo, | |||
Semester = y.Semester, | |||
LessonSortNo = y.LessonSortNo, | |||
LessonSortName = y.LessonSortName, | |||
LessonNo = y.LessonNo, | |||
LessonName = y.LessonName, | |||
StudyScore = y.StudyScore, | |||
Score = y.Score, | |||
ScoreOfNotPass = y.ScoreOfNotPass, | |||
ScoreOfNotPassTwo = y.ScoreOfNotPassTwo | |||
}).OrderBy(a=>a.LessonSortNo).ThenBy(a=>a.LessonNo).ToList() | |||
}).ToList().OrderByDescending(x=>x.AcademicYearNo).ThenByDescending(x=>x.Semester); | |||
result.ScoreList = dataTemp.ToList(); | |||
return Success(result); | |||
} | |||
public class Model | |||
{ | |||
/// <summary> | |||
/// 学年(18-19) | |||
/// </summary> | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 学期(1) | |||
/// </summary> | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// 学号 | |||
/// </summary> | |||
public string StuNo { get; set; } | |||
} | |||
public class ScoreListByStuInfo { | |||
public string StuNo { get; set; } | |||
public string StuName { get; set; } | |||
public string MajorNo { get; set; } | |||
public string MajorName { get; set; } | |||
public string ClassNo { get; set; } | |||
public string ClassName { get; set; } | |||
public List<ScoreList> ScoreList { get; set; } | |||
} | |||
public class ScoreList { | |||
public string AcademicYearNo { get; set; } | |||
public string Semester { get; set; } | |||
public List<StuScoreModel> StuScoreEntityList { get; set; } | |||
} | |||
public class StuScoreModel { | |||
public string AcademicYearNo { get; set; } | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// 课程类别码 | |||
/// </summary> | |||
public string LessonSortNo { get; set; } | |||
/// <summary> | |||
/// 课程类别名称 | |||
/// </summary> | |||
public string LessonSortName { get; set; } | |||
public string LessonNo { get; set; } | |||
public string LessonName { get; set; } | |||
/// <summary> | |||
/// 学分 | |||
/// </summary> | |||
public decimal? StudyScore { get; set; } | |||
/// <summary> | |||
/// 成绩 | |||
/// </summary> | |||
public decimal? Score { get; set; } | |||
/// <summary> | |||
/// 第一次补考成绩 | |||
/// </summary> | |||
public string ScoreOfNotPass { get; set; } | |||
/// <summary> | |||
/// 第二次补考成绩 | |||
/// </summary> | |||
public string ScoreOfNotPassTwo { get; set; } | |||
} | |||
} | |||
} |
@@ -13,7 +13,7 @@ using Nancy; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
public class TimeTable : BaseNoLoginApi | |||
public class TimeTable : BaseApi | |||
{ | |||
public TimeTable() | |||
: base("/learun/adms/timetable") | |||
@@ -21,7 +21,6 @@ namespace Learun.Application.WebApi.Modules | |||
Get["/list"] = GetList; | |||
Get["/StuList"] = GetStuInfo; | |||
Get["/StuLessonInfo"] = GetStuLessonInfo; | |||
Get["/timeTableData"] = GetTimeTableData; | |||
} | |||
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); | |||
private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); | |||
@@ -112,68 +111,6 @@ namespace Learun.Application.WebApi.Modules | |||
} | |||
/// <summary> | |||
/// 全院课程表【按班级分组】 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
private Response GetTimeTableData(dynamic _) | |||
{ | |||
var param = this.GetReq<TimeParameter>(); | |||
TimeTableData result = new TimeTableData(); | |||
//开始时间 | |||
var startdate = string.IsNullOrEmpty(param.StartDate) ? DateTime.Today : Convert.ToDateTime(param.StartDate); | |||
var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd"); | |||
var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd"); | |||
result.StartDate = startDate; | |||
result.EndDate = endDate; | |||
var semesterAndYear = Common.GetSemesterAndYear(startDate); | |||
result.AcademicYearNo = semesterAndYear.AcademicYearLong; | |||
result.Semester = semesterAndYear.Semester; | |||
//课程表数据 | |||
var timeTableList = new List<Learun.Application.TwoDevelopment.EducationalAdministration.TimeTable>(); | |||
//必修课课程表 | |||
var data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, ""); | |||
timeTableList.AddRange(data); | |||
//选修课课程表 | |||
var dataOfElective = arrangeLessonTermOfElectiveIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, ""); | |||
timeTableList.AddRange(dataOfElective); | |||
var dataTemp = timeTableList.GroupBy(x => new { x.TeachClassNo, x.ClassName, x.LessonSortNo }).Select(x => new ClassDataList() | |||
{ | |||
ClassNo = x.Key.TeachClassNo, | |||
ClassName = x.Key.ClassName, | |||
LessonSortNo = x.Key.LessonSortNo, | |||
TimeTableList = x.Select(y => new TwoDevelopment.EducationalAdministration.TimeTable() | |||
{ | |||
AcademicYear = y.AcademicYear, | |||
Semester = y.Semester, | |||
DeptNo = y.DeptNo, | |||
MajorNo = y.MajorNo, | |||
F_SchoolId = y.F_SchoolId, | |||
LessonNo = y.LessonNo, | |||
LessonName = y.LessonName, | |||
LessonDate = y.LessonDate, | |||
LessonTime = y.LessonTime, | |||
EmpNo = y.EmpNo, | |||
EmpName = y.EmpName, | |||
TeachClassNo = y.TeachClassNo, | |||
ClassName = y.ClassName, | |||
ClassRoomNo = y.ClassRoomNo, | |||
ClassroomName = y.ClassroomName, | |||
LessonSortNo = y.LessonSortNo | |||
}).OrderBy(a => a.LessonTime.Substring(0, 1)).ThenBy(a => a.LessonTime.Substring(1)).ToList() | |||
}).OrderBy(x => x.LessonSortNo).ThenBy(x => x.ClassNo).ToList(); | |||
result.ClassDataList = dataTemp; | |||
return Success(result); | |||
} | |||
/// <summary> | |||
/// 数字转中文 | |||
@@ -229,30 +166,6 @@ namespace Learun.Application.WebApi.Modules | |||
{ | |||
public string StartDate { get; set; } | |||
public string EndDate { get; set; } | |||
/// <summary> | |||
/// 班级编号 | |||
/// </summary> | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// 教师编号 | |||
/// </summary> | |||
public string EmpNo { get; set; } | |||
} | |||
public class TimeTableData | |||
{ | |||
public string AcademicYearNo { get; set; } | |||
public string Semester { get; set; } | |||
public string StartDate { get; set; } | |||
public string EndDate { get; set; } | |||
public List<ClassDataList> ClassDataList { get; set; } | |||
} | |||
public class ClassDataList | |||
{ | |||
public string ClassNo { get; set; } | |||
public string ClassName { get; set; } | |||
public string LessonSortNo { get; set; } | |||
public List<TwoDevelopment.EducationalAdministration.TimeTable> TimeTableList { get; set; } | |||
} | |||
} |