diff --git a/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSubBind.js b/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSubBind.js deleted file mode 100644 index ad01bee3802e6496a6ed3a16527a82aba8e79d62..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSubBind.js +++ /dev/null @@ -1,64 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - //获取年级部分信息以及当前拥有的技能列表 - AjaxPostUtil.request({url:schoolBasePath + "schoolgradesubject002", params: {rowId: parent.rowId}, type: 'json', callback: function (json) { - $("#gradeName").html(json.bean.gradeName); - $("#schoolName").html(json.bean.schoolName); - - //初始化年级所属学校科目列表 - showGrid({ - id: "subjectList", - url: schoolBasePath + "schoolsubjectmation006", - params: {schoolId: json.bean.schoolId}, - pagination: false, - template: getFileContent('tpl/template/checkbox-property.tpl'), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function(data) { - var skill = json.bean.skill; - for(var i = 0; i < skill.length; i++){ - $('input:checkbox[rowId="' + skill[i].id + '"]').attr("checked", true); - } - form.render('checkbox'); - } - }); - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - - if (winui.verifyForm(data.elem)) { - - //获取选中的科目技能信息 - var propertyIds = ""; - $.each($('input:checkbox:checked'),function(){ - propertyIds = propertyIds + $(this).attr("rowId") + ","; - }); - - var params = { - rowId: parent.rowId, - propertyIds: propertyIds - }; - - AjaxPostUtil.request({url:schoolBasePath + "schoolgradesubject003", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - }}); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSublist.js b/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSublist.js deleted file mode 100644 index 1108d0e1acd7132e51a4b4b0cfb6095f76c720f8..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolgradeSub/schoolgradeSublist.js +++ /dev/null @@ -1,113 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'opTable', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form; - var opTable; - - // 获取当前登陆用户所属的学校列表 - schoolUtil.queryMyBelongSchoolList(function (json) { - $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); - form.render("select"); - initTable(); - }); - - function initTable(){ - opTable = layui.opTable.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: schoolBasePath + 'schoolgradesubject001', - where: getTableParams(), - even: true, - page: true, - limits: [8, 16, 24, 32, 40, 48, 56], - limit: 8, - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'gradeName', width: 150, title: '年级名称'}, - { field: 'subjectNum', title: '科目数', align: 'center', width: 100 }, - { field: 'schoolName', width: 200, title: '所属学校'}, - { field: 'yearN', width: 160, align: 'center', title: 'N年后达到这个级别'}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} - ]], - openNetwork: { - openCols: [ - {field: 'skillName', title: '技能'} - ], - /** - * - * @param data 当前行数据 - * @param success 成功 - * @param message 显示异常消息[没有数据 出错 等] - */ - onNetwork: function (data, success, message) { - var str = ""; - for(var i = 0; i < data.skill.length; i++){ - str += '' + data.skill[i].subjectName + ''; - } - success({skillName: str}) - } - }, - done: function(json) { - matchingLanguage(); - } - }); - - layui.table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'subBind') { //科目绑定 - subBind(data); - } - }); - - form.render(); - } - - $("body").on("click", "#formSearch", function() { - refreshTable(); - }); - - //科目绑定 - function subBind(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolgradeSub/schoolgradeSubBind.html", - title: "科目绑定", - pageId: "schoolgradeSubBind", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - layui.table.reloadData("messageTable", {where: getTableParams()}); - } - - function refreshTable(){ - layui.table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - function getTableParams() { - return { - gradeName: $("#gradeName").val(), - schoolId: $("#schoolId").val() - }; - } - - exports('schoolgradeSublist', {}); -}); diff --git a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationadd.js b/school/src/main/resources/template/js/schoolgrademation/schoolgrademationadd.js deleted file mode 100644 index 854bd1a445bdd8c4ba5fa269243c8572a5b2f871..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationadd.js +++ /dev/null @@ -1,95 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form', 'layedit'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form, - layedit = layui.layedit; - - matchingLanguage(); - form.render(); - - // 获取当前登陆用户所属的学校列表 - schoolUtil.queryMyBelongSchoolList(function (json) { - $("#OverAllSchool").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); - form.render("select"); - loadParentGrade(); - }); - - form.on('select(OverAllSchool)', function(data) { - loadParentGrade(); - }); - - //加载所属年级 - function loadParentGrade(){ - showGrid({ - id: "OverAllGrade", - url: schoolBasePath + "grademation006", - params: {schoolId: $("#OverAllSchool").val()}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - } - - form.on('radio(type)', function (data) { - var val = data.value; - if(val == '1'){//正常年级 - $("#parentIdBox").addClass("layui-hide"); - $("#yearNBox").removeClass("layui-hide"); - } else if (val == '2'){//补习班 - $("#parentIdBox").removeClass("layui-hide"); - $("#yearNBox").addClass("layui-hide"); - $("#yearN").val("0"); - } else { - winui.window.msg('状态值错误', {icon: 2, time: 2000}); - } - }); - - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var pId = '0'; - var yearN = 0; - if($("input[name='type']:checked").val() == '2'){ - if(isNull($("#OverAllGrade").val())) { - winui.window.msg('请选择正常年级', {icon: 2, time: 2000}); - return false; - } else { - pId = $("#OverAllGrade").val(); - } - } else { - yearN = $("#yearN").val(); - } - var params = { - schoolId: $("#OverAllSchool").val(), - gradeName: $("#gradeName").val(), - pId: pId, - yearN: yearN, - type: $("input[name='type']:checked").val() - }; - - AjaxPostUtil.request({url:schoolBasePath + "grademation002", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - // 取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); - -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationedit.js b/school/src/main/resources/template/js/schoolgrademation/schoolgrademationedit.js deleted file mode 100644 index fb7376fc90ebff9f0abfa1df337b5fecc085e1e0..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationedit.js +++ /dev/null @@ -1,62 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form', 'layedit'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form, - layedit = layui.layedit; - - var layContent; - - showGrid({ - id: "showForm", - url: schoolBasePath + "grademation004", - params: {rowId: parent.rowId}, - pagination: false, - template: getFileContent('tpl/schoolgrademation/schoolgrademationeditTemplate.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - if(json.bean.parentName == '0' || isNull(json.bean.parentName)){ - $("#parentIdBox").addClass("layui-hide"); - } else { - $("#yearNBox").addClass("layui-hide"); - } - - matchingLanguage(); - form.render(); - - form.on('submit(formEditBean)', function (data) { - - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - gradeName: $("#gradeName").val(), - yearN: $("#yearN").val() - }; - - AjaxPostUtil.request({url:schoolBasePath + "grademation005", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - } - }); - - // 取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - - }); - -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationlist.js b/school/src/main/resources/template/js/schoolgrademation/schoolgrademationlist.js deleted file mode 100644 index c49b3e4f9d56f8fabe4eccf86b2b5073f829f20e..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolgrademation/schoolgrademationlist.js +++ /dev/null @@ -1,142 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'tableTreeDj', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - tableTree = layui.tableTreeDj; - - authBtn('1586314893391'); - - // 获取当前登陆用户所属的学校列表 - schoolUtil.queryMyBelongSchoolList(function (json) { - $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); - form.render("select"); - initTable(); - }); - - function initTable(){ - tableTree.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: schoolBasePath + 'grademation001', - where: getTableParams(), - cols: [[ - { field: 'gradeName', width: 150, title: '年级名称'}, - { field: 'schoolName', width: 200, title: '所属学校'}, - { field:'yearN', width: 160, align: 'center', title: 'N年后达到这个级别'}, - { field:'typeName', width: 120, title: '年级状态'}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }, { - keyId: 'id', - keyPid: 'pId', - title: 'gradeName', - }); - - tableTree.getTable().on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'del') { //删除 - del(data, obj); - } else if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'upMove') { //上移 - upMove(data); - } else if (layEvent === 'downMove') { //下移 - downMove(data); - } - }); - - form.render(); - } - - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - loadTable(); - } - return false; - }); - - //删除 - function del(data, obj) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url:schoolBasePath + "grademation003", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolgrademation/schoolgrademationedit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "grademationedit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - //新增 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/schoolgrademation/schoolgrademationadd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "grademationadd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - //上移 - function upMove(data) { - AjaxPostUtil.request({url:schoolBasePath + "grademation007", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //下移 - function downMove(data) { - AjaxPostUtil.request({url:schoolBasePath + "grademation008", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - function loadTable() { - tableTree.reload("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return { - gradeName: $("#gradeName").val(), - schoolId: $("#schoolId").val() - }; - } - - exports('schoolgrademationlist', {}); -}); diff --git a/school/src/main/resources/template/js/schoolstudentmation/assignmentClass.js b/school/src/main/resources/template/js/schoolstudentmation/assignmentClass.js deleted file mode 100644 index 0a540ef1ca04a5370f53c176a7b7b94f8cfd9a47..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolstudentmation/assignmentClass.js +++ /dev/null @@ -1,67 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form; - - var stuSessionYear = "";//该学生上学的年份 - var gradePointYear = "";//年级当前属于哪一年上学的学生 - - //获取学生信息展示用于分班 - AjaxPostUtil.request({url:schoolBasePath + "studentmation004", params: {rowId: parent.rowId}, type: 'json', callback: function (json) { - stuSessionYear = json.bean.sessionYear; - $("#showForm").html(getDataUseHandlebars($("#assignmentTemplate").html(), json)); - //加载当前选中的年级是哪一届的以及这一届的班级信息 - showGrid({ - id: "classId", - url: schoolBasePath + "grademation009", - params: {gradeId: json.bean.gradeId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function(data) { - gradePointYear = data.bean.year - $("#gradeSessionYear").val(gradePointYear); - $("#gradeSessionYearSpan").html(gradePointYear); - form.render('select'); - } - }); - matchingLanguage(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - classId: $("#classId").val(), - rowId: parent.rowId - }; - //判断该学生和当前年级指向的入学年份是否一致 - if(gradePointYear != stuSessionYear){ - var msg = "该生属于" + stuSessionYear + "届学生,年级指向" + gradePointYear + "届,是否继续?"; - layer.confirm(msg, { icon: 3, title: '确认操作' }, function (index) { - layer.close(index); - saveData(params) - }); - } else { - saveData(params) - } - } - return false; - }); - }}); - - //保存数据 - function saveData(params){ - AjaxPostUtil.request({url:schoolBasePath + "studentmation005", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - - }); -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolstudentmation/schoolNotInClassStudentInSchooLlist.js b/school/src/main/resources/template/js/schoolstudentmation/schoolNotInClassStudentInSchooLlist.js deleted file mode 100644 index 8bbdbf149bb3d82d3b44db9a801ba03d8d09318d..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolstudentmation/schoolNotInClassStudentInSchooLlist.js +++ /dev/null @@ -1,141 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - // 获取当前登陆用户所属的学校列表 - schoolUtil.queryMyBelongSchoolList(function (json) { - $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); - form.render("select"); - // 加载年级 - initGradeId(); - initTable(); - }); - //学校监听事件 - form.on('select(schoolId)', function(data) { - //加载年级 - initGradeId(); - }); - - //所属年级 - function initGradeId(){ - showGrid({ - id: "gradeId", - url: schoolBasePath + "grademation006", - params: {schoolId: $("#schoolId").val()}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - } - - function initTable(){ - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: schoolBasePath + 'studentmation003', - where: getTableParams(), - even: true, - page: true, - limits: [8, 16, 24, 32, 40, 48, 56], - limit: 8, - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'studentName', width: 100, title: '学生姓名', templet: function (d) { - return '' + d.studentName + ''; - }}, - { field: 'studentNo', width: 140, title: '学号'}, - { field: 'stuSex', width: 60, align: 'center', title: '性别'}, - { field: 'nation', width: 80, title: '民族'}, - { field: 'schoolName', width: 200, title: '所在学校'}, - { field: 'gradeName', width: 100, title: '所在年级'}, - { field: 'sessionYear', width: 80, align: 'center', title: '所属届'}, - { field: 'stuType', width: 100, title: '学生类型'}, - { field: 'residenceTypeName', width: 100, title: '户口类型'}, - { field: 'guardian', width: 80, title: '监护人'}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'assignmentClass') { //分班 - assignmentClass(data); - } else if (layEvent === 'details') { //详情 - details(data); - } - }); - form.render(); - } - - $("body").on("click", "#formSearch", function() { - refreshTable(); - }); - - //分班 - function assignmentClass(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolstudentmation/assignmentClass.html", - title: "分班", - pageId: "assignmentClass", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - //详情 - function details(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolstudentmation/schoolStudentDetail.html", - title: "学生信息", - pageId: "schoolStudentDetail", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - //刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function refreshTable(){ - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - function getTableParams() { - return { - gradeId: $("#gradeId").val(), - schoolId: $("#schoolId").val(), - studentName: $("#studentName").val() - }; - } - - exports('schoolNotInClassStudentInSchooLlist', {}); -}); diff --git a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentDetail.js b/school/src/main/resources/template/js/schoolstudentmation/schoolStudentDetail.js deleted file mode 100644 index 78193adc49d6ac857f5167acc93840f25459c553..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentDetail.js +++ /dev/null @@ -1,38 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$ - - showGrid({ - id: "showForm", - url: schoolBasePath + "studentmation008", - params: {rowId: parent.rowId}, - pagination: false, - template: $("#detailTemplate").html(), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - - if (!isNull(json.bean.userPhoto)){ - $("#userPhoto").attr("src", fileBasePath + json.bean.userPhoto); - } else { - $("#userPhoto").attr("src", "../../assets/images/no-userphoto.png"); - } - - if(json.bean.preschoolEducation != 1){ - $("#preschoolSchoolBox").hide(); - } - matchingLanguage(); - } - }); - - }); - -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentEdit.js b/school/src/main/resources/template/js/schoolstudentmation/schoolStudentEdit.js deleted file mode 100644 index f421bab1a725486d955205f171ca98f6d7fc575b..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentEdit.js +++ /dev/null @@ -1,369 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'laydate', 'fileUpload'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - form = layui.form, - laydate = layui.laydate; - - var rowNum = 1; //表格的序号 - var usetableTemplate = $("#usetableTemplate").html(); - var schoolId = "";//学校id - - showGrid({ - id: "showForm", - url: schoolBasePath + "studentmation006", - params: {rowId: parent.rowId}, - pagination: false, - template: $("#editTemplate").html(), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - schoolId = json.bean.schoolId; - // 哪一届 - laydate.render({elem: '#sessionYear', type: 'year', max: 'date' }); - - // 入校时间 - laydate.render({elem: '#joinTime', type: 'date'}); - - // 初始化上传 - $("#userPhoto").upload(systemCommonUtil.uploadCommon003Config('userPhoto', 15, json.bean.userPhoto, 1)); - - $("input:radio[name=userSex][value=" + json.bean.userSex + "]").attr("checked", true); - $("input:radio[name=idcardType][value=" + json.bean.idcardType + "]").attr("checked", true); - $("input:radio[name=state][value=" + json.bean.state + "]").attr("checked", true); - $("input:radio[name=residenceType][value=" + json.bean.residenceType + "]").attr("checked", true); - $("input:radio[name=stuType][value=" + json.bean.stuType + "]").attr("checked", true); - $("input:radio[name=outsideSchool][value=" + json.bean.outsideSchool + "]").attr("checked", true); - $("input:radio[name=foreignStudents][value=" + json.bean.foreignStudents + "]").attr("checked", true); - $("input:radio[name=onlyChild][value=" + json.bean.onlyChild + "]").attr("checked", true); - $("input:radio[name=behindChildren][value=" + json.bean.behindChildren + "]").attr("checked", true); - $("input:radio[name=floatingPopulation][value=" + json.bean.floatingPopulation + "]").attr("checked", true); - $("input:radio[name=singleParentFamily][value=" + json.bean.singleParentFamily + "]").attr("checked", true); - $("input:radio[name=entranceType][value=" + json.bean.entranceType + "]").attr("checked", true); - $("input:radio[name=schoolChoiceStudents][value=" + json.bean.schoolChoiceStudents + "]").attr("checked", true); - $("input:radio[name=attendType][value=" + json.bean.attendType + "]").attr("checked", true); - $("input:radio[name=healthCondition][value=" + json.bean.healthCondition + "]").attr("checked", true); - $("input:radio[name=overseasChinese][value=" + json.bean.overseasChinese + "]").attr("checked", true); - $("input:radio[name=bloodType][value=" + json.bean.bloodType + "]").attr("checked", true); - $("input:radio[name=orphan][value=" + json.bean.orphan + "]").attr("checked", true); - $("input:radio[name=preschoolEducation][value=" + json.bean.preschoolEducation + "]").attr("checked", true); - if(json.bean.preschoolEducation != 1){ - $("#preschoolSchoolBox").hide(); - } - $("input:radio[name=preferential][value=" + json.bean.preferential + "]").attr("checked", true); - $("input:radio[name=onePatch][value=" + json.bean.onePatch + "]").attr("checked", true); - $("input:radio[name=schoolBus][value=" + json.bean.schoolBus + "]").attr("checked", true); - $("input:radio[name=vaccination][value=" + json.bean.vaccination + "]").attr("checked", true); - - //加载年级 - initGradeId(); - //加载交通方式 - initTransportationId(); - //加载家庭情况 - initHomeSituationId(); - //加载身心障碍 - initBodyMindId(); - //加载家庭成员 - initDataToShow(json.bean.stuParents); - - //所属年级 - function initGradeId(){ - showGrid({ - id: "gradeId", - url: schoolBasePath + "grademation006", - params: {schoolId: schoolId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function(data) { - $("#gradeId").val(json.bean.gradeId); - loadThisGradeNowYear(); - form.render('select'); - } - }); - } - - //加载交通方式 - function initTransportationId(){ - showGrid({ - id: "modeOfTransportation", - url: schoolBasePath + "schooltransportation006", - params: {schoolId: schoolId}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function(data) { - $("#modeOfTransportation").val(json.bean.modeOfTransportation); - form.render('select'); - } - }); - } - - //加载家庭情况 - function initHomeSituationId(){ - showGrid({ - id: "homeSituation", - url: schoolBasePath + "schoolfamilysituation006", - params: {schoolId: schoolId}, - pagination: false, - template: getFileContent('tpl/template/checkbox-property.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function(data) { - var homeSituation = json.bean.homeSituation; - for(var i = 0; i < homeSituation.length; i++){ - $('#homeSituation input:checkbox[rowId="' + homeSituation[i].situationId + '"]').attr("checked", true); - } - form.render('checkbox'); - } - }); - } - - //加载身心障碍 - function initBodyMindId(){ - showGrid({ - id: "bodyMind", - url: schoolBasePath + "schoolbodymind006", - params: {schoolId: schoolId}, - pagination: false, - template: getFileContent('tpl/template/checkbox-property.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function(data) { - var bodyMind = json.bean.bodyMind; - for(var i = 0; i < bodyMind.length; i++){ - $('#bodyMind input:checkbox[rowId="' + bodyMind[i].bodyMindId + '"]').attr("checked", true); - } - form.render('checkbox'); - } - }); - } - - //年级监听事件 - form.on('select(gradeId)', function(data) { - if(isNull(data.value) || data.value === '请选择'){ - $("#classId").html(""); - form.render('select'); - } else { - //加载班级 - loadThisGradeNowYear(); - } - }); - - //学前教育变化事件 - form.on('radio(preschoolEducation)', function(data) { - if (data.value == 1){ - $("#preschoolSchoolBox").show(); - } else { - $("#preschoolSchoolBox").hide(); - } - }); - - //加载当前选中的年级是哪一届的以及这一届的班级信息 - function loadThisGradeNowYear(){ - showGrid({ - id: "classId", - url: schoolBasePath + "grademation009", - params: {gradeId: $("#gradeId").val()}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function(data) { - $("#classId").val(json.bean.classId); - form.render('select'); - }, - ajaxSendErrorAfter: function (json) { - $("#classId").html(""); - form.render('select'); - } - }); - } - - matchingLanguage(); - form.render(); - - form.on('submit(formEditBean)', function (data) { - - if (winui.verifyForm(data.elem)) { - var userPhoto = $("#userPhoto").find("input[type='hidden'][name='upload']").attr("oldurl"); - var params = { - studentName: $("#studentName").val(), - userPhoto: isNull(userPhoto) ? "" : userPhoto, - nameUseBefore: $("#nameUseBefore").val(), - studentNo: $("#studentNo").val(), - userSex: $("input[name='userSex']:checked").val(), - nation: $("#nation").val(), - idcardType: $("input[name='idcardType']:checked").val(), - idCard: $("#idCard").val(), - schoolId: schoolId, - gradeId: $("#gradeId").val(), - classId: $("#classId").val(), - state: $("input[name='state']:checked").val(), - residenceType: $("input[name='residenceType']:checked").val(), - residenceNo: $("#residenceNo").val(), - residencePoliceStation: $("#residencePoliceStation").val(), - joinTime: $("#joinTime").val(), - sessionYear: $("#sessionYear").val(), - homeAddress: $("#homeAddress").val(), - homePostalCode: $("#homePostalCode").val(), - homeContact: $("#homeContact").val(), - homePhone: $("#homePhone").val(), - speciality: $("#speciality").val(), - guardian: $("#guardian").val(), - guardianIdcard: $("#guardianIdcard").val(), - localContact: $("#localContact").val(), - contactRelationship: $("#contactRelationship").val(), - contactPhone: $("#contactPhone").val(), - homeMemberStr: "",//家庭成员json串 - bodyMind: "",//身心障碍json串 - stuType: $("input[name='stuType']:checked").val(), - outsideSchool: $("input[name='outsideSchool']:checked").val(), - foreignStudents: $("input[name='foreignStudents']:checked").val(), - onlyChild: $("input[name='onlyChild']:checked").val(), - behindChildren: $("input[name='behindChildren']:checked").val(), - floatingPopulation: $("input[name='floatingPopulation']:checked").val(), - singleParentFamily: $("input[name='singleParentFamily']:checked").val(), - entranceType: $("input[name='entranceType']:checked").val(), - schoolChoiceStudents: $("input[name='schoolChoiceStudents']:checked").val(), - attendType: $("input[name='attendType']:checked").val(), - healthCondition: $("input[name='healthCondition']:checked").val(), - overseasChinese: $("input[name='overseasChinese']:checked").val(), - homeSituation: "",//家庭情况 - bloodType: $("input[name='bloodType']:checked").val(), - preschoolEducation: $("input[name='preschoolEducation']:checked").val(), - preschoolSchool: "",//学前教育学校 - orphan: $("input[name='orphan']:checked").val(), - preferential: $("input[name='preferential']:checked").val(), - onePatch: $("input[name='onePatch']:checked").val(), - modeOfTransportation: $("#modeOfTransportation").val(), - schoolBus: $("input[name='schoolBus']:checked").val(), - vaccination: $("input[name='vaccination']:checked").val(), - rowId: parent.rowId - }; - - //获取家庭成员json信息 - var rowTr = $("#useTable tr"); - var tableData = new Array(); - $.each(rowTr, function(i, item) { - //获取行编号 - var rowNum = $(item).attr("trcusid").replace("tr", ""); - var row = { - name: $("#name" + rowNum).val(), - idcard: $("#idcard" + rowNum).val(), - unit: $("#unit" + rowNum).val(), - phone: $("#phone" + rowNum).val(), - nation: $("#nation" + rowNum).val(), - residenceNo: $("#residenceNo" + rowNum).val(), - callName: $("#callName" + rowNum).val(), - speciality: $("#speciality" + rowNum).val() - }; - tableData.push(row); - }); - params.homeMemberStr = JSON.stringify(tableData); - - //学前教育学校 - if(params.preschoolEducation == 1){ - params.preschoolSchool = $("#preschoolSchool").val(); - } - - //获取家庭情况信息 - var propertyIds = ""; - $.each($('#homeSituation input:checkbox:checked'),function(){ - propertyIds = propertyIds + $(this).attr("rowId") + ","; - }); - params.homeSituation = propertyIds; - - //获取身心障碍信息 - var bodyMindIds = ""; - $.each($('#bodyMind input:checkbox:checked'),function(){ - bodyMindIds = bodyMindIds + $(this).attr("rowId") + ","; - }); - params.bodyMind = bodyMindIds; - - AjaxPostUtil.request({url:schoolBasePath + "studentmation007", params: params, type: 'json', callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - } - }); - - //渲染家庭成员数据到页面 - function initDataToShow(stuParents){ - //渲染列表项 - $.each(stuParents, function(i, item) { - addRow(); - $("#name" + (rowNum - 1)).val(item.name);//姓名回显 - $("#idcard" + (rowNum - 1)).val(item.idcard);//身份证号回显 - $("#unit" + (rowNum - 1)).val(item.unit);//工作单位回显 - $("#phone" + (rowNum - 1)).val(item.phone);//手机号回显 - $("#nation" + (rowNum - 1)).val(item.nation);//民族回显 - $("#residenceNo" + (rowNum - 1)).val(item.residenceNo);//户口所在地编码回显 - $("#callName" + (rowNum - 1)).val(item.callName);//称呼回显 - $("#speciality" + (rowNum - 1)).val(item.speciality);//特长回显 - }); - //渲染 - form.render(); - } - - //新增行 - $("body").on("click", "#addRow", function() { - addRow(); - }); - - //删除行 - $("body").on("click", "#deleteRow", function() { - deleteRow(); - }); - - //新增行 - function addRow() { - var par = { - id: "row" + rowNum.toString(), //checkbox的id - trId: "tr" + rowNum.toString(), //行的id - name: "name" + rowNum.toString(), //姓名 - idcard: "idcard" + rowNum.toString(), //身份证号 - unit: "unit" + rowNum.toString(), //工作单位 - phone: "phone" + rowNum.toString(), //手机号 - nation: "nation" + rowNum.toString(), //民族 - residenceNo: "residenceNo" + rowNum.toString(), //户口所在地编码 - callName: "callName" + rowNum.toString(), //称呼 - speciality: "speciality" + rowNum.toString() //特长 - }; - $("#useTable").append(getDataUseHandlebars(usetableTemplate, par)); - form.render('checkbox'); - rowNum++; - } - - //删除行 - function deleteRow() { - var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked"); - if(checkRow.length > 0) { - $.each(checkRow, function(i, item) { - $(item).parent().parent().remove(); - }); - } else { - winui.window.msg('请选择要删除的行', {icon: 2, time: 2000}); - } - } - - // 取消 - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - - }); - -}); \ No newline at end of file diff --git a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentInSchooLlist.js b/school/src/main/resources/template/js/schoolstudentmation/schoolStudentInSchooLlist.js deleted file mode 100644 index 3408dff4f9970e115c2ef8d78cb8fcbdc5cadec1..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/js/schoolstudentmation/schoolStudentInSchooLlist.js +++ /dev/null @@ -1,184 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table; - - authBtn('1595157157794'); - - // 获取当前登陆用户所属的学校列表 - schoolUtil.queryMyBelongSchoolList(function (json) { - $("#schoolId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); - form.render("select"); - // 加载年级 - initGradeId(); - initTable(); - }); - // 学校监听事件 - form.on('select(schoolId)', function(data) { - // 加载年级 - initGradeId(); - }); - - //所属年级 - function initGradeId(){ - showGrid({ - id: "gradeId", - url: schoolBasePath + "grademation006", - params: {schoolId: $("#schoolId").val()}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - form.render('select'); - } - }); - } - - //年级监听事件 - form.on('select(gradeId)', function(data) { - if(isNull(data.value) || data.value === '请选择'){ - $("#classId").html(""); - form.render('select'); - } else { - //加载班级 - loadThisGradeNowYear(); - } - }); - - //加载当前选中的年级是哪一届的以及这一届的班级信息 - function loadThisGradeNowYear(){ - showGrid({ - id: "classId", - url: schoolBasePath + "grademation009", - params: {gradeId: $("#gradeId").val()}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function(data) { - form.render('select'); - }, - ajaxSendErrorAfter: function (json) { - $("#classId").html(""); - form.render('select'); - } - }); - } - - function initTable(){ - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: schoolBasePath + 'studentmation001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'studentName', width: 100, title: '学生姓名', templet: function (d) { - return '' + d.studentName + ''; - }}, - { field: 'studentNo', width: 140, title: '学号'}, - { field: 'stuSex', width: 60, align: 'center', title: '性别'}, - { field: 'nation', width: 80, title: '民族'}, - { field: 'schoolName', width: 200, title: '所在学校'}, - { field: 'gradeName', width: 100, title: '所在年级'}, - { field: 'className', width: 100, title: '所在班级'}, - { field: 'sessionYear', width: 80, align: 'center', title: '所属届'}, - { field: 'stuType', width: 100, title: '学生类型'}, - { field: 'residenceTypeName', width: 100, title: '户口类型'}, - { field: 'guardian', width: 80, title: '监护人'}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - } else if (layEvent === 'details') { //详情 - details(data); - } - }); - form.render(); - } - - $("body").on("click", "#formSearch", function() { - refreshTable(); - }); - - // 编辑 - function edit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolstudentmation/schoolStudentEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "schoolStudentEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 详情 - function details(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/schoolstudentmation/schoolStudentDetail.html", - title: "学生信息", - pageId: "schoolStudentDetail", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 刷新数据 - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - // 下载模板 - $("body").on("click", "#exportStudentModel", function() { - postDownLoadFile({ - url : schoolBasePath + 'studentmation009', - params: getTableParams(), - method : 'post' - }); - }); - - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function refreshTable(){ - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); - } - - function getTableParams() { - return { - gradeId: $("#gradeId").val(), - schoolId: $("#schoolId").val(), - classId: $("#classId").val(), - studentName: $("#studentName").val() - }; - } - - exports('schoolStudentInSchooLlist', {}); -}); diff --git a/school/src/main/resources/template/tpl/schoolgradeSub/schoolgradeSubBind.html b/school/src/main/resources/template/tpl/schoolgradeSub/schoolgradeSubBind.html deleted file mode 100644 index cd545d91832862d4a6c173cc5827f2c77f9b0f3b..0000000000000000000000000000000000000000 --- a/school/src/main/resources/template/tpl/schoolgradeSub/schoolgradeSubBind.html +++ /dev/null @@ -1,44 +0,0 @@ - - -
- -