diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs index f573ba020..3ef093f68 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs @@ -19,9 +19,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class StuVolunteerController : MvcControllerBase { private StuVolunteerIBLL stuVolunteerIBLL = new StuVolunteerBLL(); - private UserIBLL userIBLL = new UserBLL(); - private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); - #region 视图功能 @@ -131,6 +128,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } + /// + /// 专业注册 + /// + /// + [HttpGet] + public ActionResult IndexMajor() + { + return View(); + } + /// + /// + /// + /// + [HttpGet] + public ActionResult FormMajor() + { + return View(); + } + #endregion #region 获取数据 @@ -356,24 +372,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("提交成功!"); } + /// + /// 专业:审核/去审核 + /// + /// + /// + public ActionResult MajorForm(string keyValue ,int MajorStatus) + { + stuVolunteerIBLL.MajorForm(keyValue,MajorStatus); + return Success("录取成功!"); + } - //public ActionResult Search(string CardNo, string txtPass) - //{ - // var StuVolunteerData = stuVolunteerIBLL.IsEnrollByCard(CardNo); - // if (StuVolunteerData != null) - // { - // var jsonData = new - // { - // StuVolunteer = StuVolunteerData, - // }; - // return Success(jsonData); - // } - // else - // { - // return Success(null); - // } - //} - + /// + /// 注册专业 + /// + /// 主键 + /// 审核状态 + /// + [HttpPost] + [AjaxOnly] + public ActionResult SaveMajorForm(string keyValue, string MajorNo) + { + stuVolunteerIBLL.SaveMajorForm(keyValue, MajorNo); + return Success("注册成功!"); + } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/ClassForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/ClassForm.js index 5acba0529..8ca3077b5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/ClassForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/ClassForm.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var MajorNo = request('MajorNo'); var bootstrap = function ($, learun) { "use strict"; var page = { @@ -15,14 +16,24 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + if (MajorNo != null && MajorNo != "" && MajorNo != undefined) { + console.log(MajorNo,321); + $('#ClassNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and MajorNo = '" + MajorNo + "'" }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } + $("#ClassNo").lrselect(); }, initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetFormData?keyValue=' + keyValue, function (data) { for (var id in data) { if (!!data[id].length && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); + $('#' + id).jfGridSet('refreshdata', data[id]); } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml index e152d88d3..c7e58b257 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Form.cshtml @@ -29,7 +29,7 @@
中考总分*
- +
身份证号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormGenerate.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormGenerate.js index 4d5bfd422..2ba63add3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormGenerate.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormGenerate.js @@ -19,11 +19,36 @@ var bootstrap = function ($, learun) { $('#IsPlan').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#Sex').lrDataItemSelect({ code: 'usersex' }); - $('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + //$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + //$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + //$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#MajorNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + value: 'majorno', + text: 'majorname', + maxHeight: 200, + select: function (item) { + var classNo = $("#MajorNo").lrselectGet(); + if (classNo != null && classNo != "" && classNo != undefined) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and majorno in (" + classNo + ")" }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and majorno ='' " }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } + } + }) + $("#ClassNo").lrselect(); }, initData: function () { if (!!keyValue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.cshtml new file mode 100644 index 000000000..2fa36e15c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "分班"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
专业
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.js new file mode 100644 index 000000000..5133e33f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormMajor.js @@ -0,0 +1,52 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-16 10:14 + * 描 述:长阳迎新 + */ +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 () { + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/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 data = $('body').lrGetFormData(); + var postData = { + MajorNo: data.MajorNo + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/SaveMajorForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js index 49e3b7533..9ed573a15 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Index.js @@ -86,12 +86,12 @@ var bootstrap = function ($, learun) { 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); - } - }); + key: value, + code: 'usersex', + callback: function (_data) { + callback(_data.text); + } + }); } }, { @@ -115,6 +115,7 @@ var bootstrap = function ($, learun) { { label: "备注", name: "Demo", width: 100, align: "left" }, ], mainId: 'ID', + sidx: 'UpdateTime desc', isPage: true, isMultiselect: true diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.cshtml index 687099312..8bb23a38c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.cshtml @@ -14,17 +14,21 @@
学生姓名
+ @*
+
第一意向
+
+
+
+
第二意向
+
+
+
+
第三意向
+
+
*@
-
第一意向
-
-
-
-
第二意向
-
-
-
-
第三意向
-
+
注册专业
+
班级
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.js index 54c1e3b24..808eea17e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexDivide.js @@ -17,10 +17,36 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 220, 400); $('#Sex').lrDataItemSelect({ code: 'usersex' }); - $('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); - $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + //$('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + //$('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + //$('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#MajorNo').lrselect({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + value: 'majorno', + text: 'majorname', + maxHeight: 200, + select: function (item) { + var classNo = $("#MajorNo").lrselectGet(); + if (classNo != null && classNo != "" && classNo != undefined) { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and majorno in (" + classNo + ")" }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } else { + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj', + param: { strWhere: " 1=1 and majorno ='' " }, + value: "classno", + text: "classname", + maxHeight: 200 + }); + } + } + }) + $("#ClassNo").lrselect(); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -36,18 +62,33 @@ var bootstrap = function ($, learun) { learun.alert.warning("选中记录包含审核通过的数据!"); return; } - learun.layerForm({ - id: 'classform', - title: '选择班级', - url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/ClassForm?keyValue=' + keyValue, - width: 400, - height: 300, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); - } - }); + var MajorNos = $('#gridtable').jfGridValue('MajorNo'); + var arrayList = MajorNos.split(','); + var res = true; + for (var i = 0; i < arrayList.length; i++) { + if (arrayList[0] == arrayList[i]) { + MajorNos = arrayList[0]; + res = true; + } else { + res = false; + } + } + if (res) { + learun.layerForm({ + id: 'classform', + title: '选择班级', + url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/ClassForm?keyValue=' + keyValue + '&MajorNo=' + MajorNos, + width: 400, + height: 300, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } else { + learun.alert.warning("请选择相同专业学生进行分班!"); + return; + } }); - }, // 初始化列表 initGird: function () { @@ -69,13 +110,52 @@ var bootstrap = function ($, learun) { }, { label: "中考总分", name: "StuScore", width: 100, align: "left" }, { label: "身份证号", name: "CardNo", width: 150, align: "left" }, + //{ + // label: "第一意向", name: "MajorOne", 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: "MajorTwo", 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: "MajorThree", 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: "MajorOne", width: 100, align: "left", + label: "注册专业", name: "MajorNo", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', key: value, - keyId: 'id', + keyId: 'majorno', callback: function (_data) { callback(_data['majorname']); } @@ -83,29 +163,11 @@ var bootstrap = function ($, learun) { } }, { - label: "第二意向", name: "MajorTwo", 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: "MajorThree", 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: "MajorStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 + ? "已审核" + : "未审核"; } }, { @@ -139,7 +201,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; - param.SqlParameter = " and IsEnroll=1 and EnrollStatus=1"; + param.SqlParameter = " and IsEnroll=1 and EnrollStatus=1 and MajorStatus=1"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.cshtml index aa9538b9d..a9d10789f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.cshtml @@ -26,6 +26,11 @@
性别
+
+
分数
+
+
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.js index 68cf882c1..5213a81a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexEnroll.js @@ -7,6 +7,7 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var strsql = ''; var page = { init: function () { page.initGird(); @@ -17,11 +18,25 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 220, 400); $('#Sex').lrDataItemSelect({ code: 'usersex' }); + $('#StuScore').lrDataItemSelect({ + code: 'EnrollScore', + select: function (item) { + if (item != undefined) { + switch (item.id) { + case item.id: + strsql = " and t.StuScore " + item.id + ""; + break; + default: + break; + } + } + } + }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); - //// 录取 + // 录取 $('#lr_enroll').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { @@ -106,6 +121,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.SqlParameter = strsql + " and MajorOne is null and IsCYSchool = 'True' "; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexGenerate.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexGenerate.cshtml index 96e4e53f3..5c76d9e23 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexGenerate.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexGenerate.cshtml @@ -30,7 +30,7 @@
班级
-
+
分班审核
-
+
学籍状态
+
+
+
第一意向
+
+
+
+
第二意向
+
+
+
+
第三意向
+
+
+
+
注册专业
+
+
+
+
+ + +
+
+ +
+
+  专业注册 +  审核 +  去审核 +
+
+ +
+ + + +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/IndexMajor.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexMajor.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexMajor.js new file mode 100644 index 000000000..4e813b33d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexMajor.js @@ -0,0 +1,192 @@ +/* * 版 本 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); + $('#Sex').lrDataItemSelect({ code: 'usersex' }); + $('#MajorOne').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#MajorTwo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#MajorThree').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'id', text: 'majorname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //注册专业 + $('#lr_major').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + //状态 + var MajorStatus = $('#gridtable').jfGridValue('MajorStatus'); + if (MajorStatus.indexOf('1') != -1) { + learun.alert.warning("选中记录包含审核通过的数据!"); + return; + } + learun.layerForm({ + id: 'FormMajor', + title: '专业注册', + url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/FormMajor?keyValue=' + keyValue, + width: 400, + height: 300, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 审核 + $('#lr_check').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + + //专业状态 + var MajorStatus = $('#gridtable').jfGridValue('MajorStatus'); + if (MajorStatus.indexOf('1') != -1) { + learun.alert.warning("选中记录包含审核通过的数据!"); + return; + } + + learun.layerConfirm('是否确认审核选中记录!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/MajorForm', { keyValue: keyValue, MajorStatus: 1 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 去审核 + $('#lr_cancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + + //专业状态 + var MajorStatus = $('#gridtable').jfGridValue('MajorStatus'); + if (MajorStatus.indexOf('0') != -1) { + learun.alert.warning("选中记录包含待审核的数据!"); + return; + } + + learun.layerConfirm('是否确认去审选中记录!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuVolunteer/MajorForm', { keyValue: keyValue, MajorStatus: 0 }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/GetPageList', + headData: [ + { label: "学生姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "Sex", 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: "StuScore", width: 100, align: "left" }, + { label: "身份证号", name: "CardNo", width: 150, align: "left" }, + { + label: "第一意向", name: "MajorOne", 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: "MajorTwo", 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: "MajorThree", 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: "MajorNo", width: 150, 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: "MajorStatus", width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 + ? "已审核" + : "未审核"; + } + }, + { label: "学号", name: "StuNo", width: 150, align: "left" }, + { label: "备注", name: "Demo", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + isMultiselect: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = " and IsEnroll=1 and EnrollStatus=1"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 92cc125a7..4be1bf804 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1116,12 +1116,14 @@ + + @@ -7545,6 +7547,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanService.cs index c91399324..3c7bf07bd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlan/OpenLessonPlanService.cs @@ -262,7 +262,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration return new OpenLessonPlanEntity(); } - return this.BaseRepository("CollegeMIS").FindEntity(x => x.F_SchoolId == F_SchoolId && x.Grade == classInfoEntity.Grade && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.DeptNo == classInfoEntity.DeptNo && x.MajorNo == classInfoEntity.MajorNo && x.LessonNo == LessonNo && x.LessonSortNo == "1"); + return this.BaseRepository("CollegeMIS").FindEntity(x => x.F_SchoolId == F_SchoolId && x.Grade == classInfoEntity.Grade && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.MajorNo == classInfoEntity.MajorNo && x.LessonNo == LessonNo && x.LessonSortNo == "1"); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs index 4aa10bbc2..7344b170c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerBLL.cs @@ -448,6 +448,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 专业审核 + /// + /// + /// + public void MajorForm(string keyValue, int ClassStatus) + { + try + { + stuVolunteerService.MajorForm(keyValue, ClassStatus); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 专业注册 + /// + /// + /// + public void SaveMajorForm(string keyValue, string MajorNo) + { + try + { + stuVolunteerService.SaveMajorForm(keyValue, MajorNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs index 1c789d662..54eeaee5b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerEntity.cs @@ -64,17 +64,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CARDNO")] public string CardNo { get; set; } - /// - /// 系所号 - /// - [Column("DEPTNO")] - public string DeptNo { get; set; } + ///// + ///// 系所号 + ///// + //[Column("DEPTNO")] + //public string DeptNo { get; set; } /// /// 专业 /// [Column("MAJORNO")] public string MajorNo { get; set; } /// + /// 专业状态 + /// + [Column("MAJORSTATUS")] + public int? MajorStatus { get; set; } + /// /// 中考总分 /// [Column("STUSCORE")] @@ -214,11 +219,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("CLASSSTATUS")] public int? ClassStatus { get; set; } - ///// - ///// 是否提交专业 - ///// - //[Column("ISSUBMIT")] - //public bool? IsSubmit { get; set; } + /// /// 报名状态 0 草稿,1提交 /// @@ -251,7 +252,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public void Modify(string keyValue) { this.ID = keyValue; - this.UpdateTime= DateTime.Now; + this.UpdateTime = DateTime.Now; } #endregion #region 扩展字段 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs index da8bd922d..0d1eaa80e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerIBLL.cs @@ -127,6 +127,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// 主键 void CanJoin(string keyValue); + /// + /// 专业审核 + /// + /// + /// + void MajorForm(string keyValue, int MajorStatus); + /// + /// 注册专业 + /// + /// + /// + void SaveMajorForm(string keyValue, string MajorNos); + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs index 33438fee6..5eae36568 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuVolunteer/StuVolunteerService.cs @@ -88,7 +88,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("StuCodeStatus", queryParam["StuCodeStatus"].ToString(), DbType.String); strSql.Append(" AND t.StuCodeStatus = @StuCodeStatus "); } - + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } if (!queryParam["MajorOne"].IsEmpty()) { dp.Add("MajorOne", queryParam["MajorOne"].ToString(), DbType.String); @@ -232,9 +236,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration foreach (var id in arr) { var stuNo = GetStuNo(); - string sql = $"update StuVolunteer set StuNo='{stuNo}' ,ClassNo='{ClassNo}', DeptNo='{classinfo.DeptNo}',MajorNo='{classinfo.MajorNo}',ClassStatus=0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set ClassNo='{ClassNo}', DeptNo='{classinfo.DeptNo}',MajorNo='{classinfo.MajorNo}',ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; + string sql = $"update StuVolunteer set StuNo='{stuNo}' ,ClassNo='{ClassNo}',ClassStatus=0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set ClassNo='{ClassNo}',ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); - } } @@ -668,6 +671,69 @@ and t.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=t.StuNo) " } } } + + /// + /// 专业审核 + /// + /// + /// 状态 + public void MajorForm(string keyValue, int ClassStatus) + { + try + { + if (keyValue.Contains(",")) + { + keyValue = string.Join("','", keyValue.Split(',')); + } + string sql = $"update StuVolunteer set MajorStatus={ClassStatus} where ID in ('{keyValue}')"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 专业注册 + /// + /// + /// + public void SaveMajorForm(string keyValue, string MajorNo) + { + try + { + var Majorinfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.MajorNo == MajorNo); + if (Majorinfo != null) + { + var arr = keyValue.Split(',').ToList(); + foreach (var id in arr) + { + string sql = $"update StuVolunteer set MajorNo = '{MajorNo}',ClassNo = '', MajorStatus = 0 ,ClassStatus = 0 where ID='{id}' and (StuNo is null or len(StuNo)=0); update StuVolunteer set MajorNo='{MajorNo}', ClassNo = '', MajorStatus =0,ClassStatus=0 where ID='{id}' and (StuNo is not null or len(StuNo)>0)"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + } + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion } }