|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-07-17 11:20
- * 描 述:新生录取管理
- */
- 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);
- }, 500, 400);
-
- //地市
- $('#City').lrselect({
- allowSearch: true,
- //type: 'multiple',
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_CITY',
- param: { strWhere: "1=1 and cparent='650000'" },
- value: "ccode",
- text: "cname",
- maxHeight: 200,
- select: function (item) {
- if (item) {
- var code = $("#City").lrselectGet();
- //县区
- $('#County').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA',
- param: { strWhere: "1=1 and charindex(aparent,('" + code + "'))>0 " },
- value: "acode",
- text: "aname",
- maxHeight: 200,
- //select: function(item) {
- // if (item) {
- // var countyCode = $("#County").lrselectGet();
- // //专业
- // $('#MajorNo').lrselectRefresh({
- // type: 'multiple',
- // url: top.$.rootUrl +
- // '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- // param: {
- // strWhere: "1=1 and City='" + code + "' and Area='" + countyCode + "'"
- // },
- // value: "majorno",
- // text: "majorname",
- // maxHeight: 200,
- // });
- // }
- //}
- });
- }
- }
- });
- //县区
- $('#County').lrselect({
- allowSearch: true,
- //type: 'multiple',
- //url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=DIC_AREA',
- //param: { strWhere: "1=1 " },
- value: "acode",
- text: "aname",
- maxHeight: 200,
-
- });
- //专业
- $('#MajorNo').lrselect({
- allowSearch: true,
- //type: 'multiple',
- url: top.$.rootUrl +
- '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- param: {
- strWhere: "1=1 "
- },
- value: "id",
- text: "majorname",
- maxHeight: 200,
- });
- //老师
- $('#EmpNo').lrselect({
- //type: 'multiple',
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo',
- param: { strWhere: "1=1 " },
- value: "empno",
- text: "empname",
- maxHeight: 200,
- });
- //年度
- $('#Year').lrselect({
- // type: 'multiple',
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorYear',
- param: { strWhere: "1=1 " },
- value: "year",
- text: "year",
- maxHeight: 200,
- });
-
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
-
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageListForTJ',
- headData: [
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "Gender", width: 100, align: "left",
- formatter: function (value) {
- if (value == '0') {
- return '女';
- } else {
- return '男';
- }
- }
- },
- {
- label: "民族", name: "Nationals", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'National',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "身份证号", name: "IDCard", width: 100, align: "left" },
- { label: "住址", name: "HomeAddress", width: 100, align: "left" },
- { label: "手机号", name: "StuMobile", width: 100, align: "left" },
- { label: "中考总分", name: "MidTermExam", width: 100, align: "left" },
- { label: "语文", name: "chinese", width: 100, align: "left" },
- { label: "数学", name: "math", width: 100, align: "left" },
- { label: "英语", name: "english", width: 100, align: "left" },
- { label: "物理与化学", name: "physicsAndChemistry", width: 100, align: "left" },
- { label: "政治与历史", name: "politicsAndHistory", width: 100, align: "left" },
- { label: "体育", name: "physicalEducation", width: 100, align: "left" },
- { label: "毕业学校", name: "FromSchool", width: 100, align: "left" },
- { label: "特长", name: "Specialty", width: 100, align: "left" },
- {
- label: "地市", name: "City", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
- key: value,
- keyId: 'ccode',
- callback: function (_data) {
- callback(_data['cname']);
- }
- });
- }
- },
- {
- label: "县区", name: "County", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
- key: value,
- keyId: 'acode',
- callback: function (_data) {
- callback(_data['aname']);
- }
- });
- }
- },
- {
- 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: 'id',
- callback: function (_data) {
- callback(_data['majorname']);
- }
- });
- }
- },
- {
- label: "推荐教师", name: "EmpNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
- key: value,
- keyId: 'empno',
- callback: function (_data) {
- callback(_data['empname']);
- }
- });
- }
- }
- ],
- //isMultiselect: true,
- mainId: 'StuId',
- isPage: true
- });
- //$('#gridtable').jfGrid({
- // url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetTJList',
- // headData: [
- // { label: "教师编号", name: "empno", width: 100, align: "left" },
- // {
- // label: "教师姓名", name: "empno", width: 100, align: "left",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('custmerData', {
- // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
- // key: value,
- // keyId: 'empno',
- // callback: function (_data) {
- // callback(_data['empname']);
- // }
- // });
- // }
- // },
- // { label: "人数", name: "num", width: 100, align: "left" },
- // ],
- // mainId: 'StuId',
- // isPage: false
-
- //});
- page.search();
- },
- search: function (param) {
- param = param || {};
- //录取=是
- param.SqlParameter = " and t.IsAdmission=1";
- //中考总分
- if (!!$('#MidTermExam1').val()) {
- param.SqlParameter += " and isnull(t.MidTermExam,0)>=" + $('#MidTermExam1').val();
- }
- if (!!$('#MidTermExam2').val()) {
- param.SqlParameter += " and isnull(t.MidTermExam,0)<=" + $('#MidTermExam2').val();
- }
- //语文
- if (!!$('#chinese1').val()) {
- param.SqlParameter += " and isnull(s.chinese,0)>=" + $('#chinese1').val();
- }
- if (!!$('#chinese2').val()) {
- param.SqlParameter += " and isnull(s.chinese,0)<=" + $('#chinese2').val();
- }
- //数学
- if (!!$('#math1').val()) {
- param.SqlParameter += " and isnull(s.math,0)>=" + $('#math1').val();
- }
- if (!!$('#math2').val()) {
- param.SqlParameter += " and isnull(s.math,0)<=" + $('#math2').val();
- }
- //英语
- if (!!$('#english1').val()) {
- param.SqlParameter += " and isnull(s.english,0)>=" + $('#english1').val();
- }
- if (!!$('#english2').val()) {
- param.SqlParameter += " and isnull(s.english,0)<=" + $('#english2').val();
- }
- //物理与化学
- if (!!$('#physicsAndChemistry1').val()) {
- param.SqlParameter += " and isnull(s.physicsAndChemistry,0)>=" + $('#physicsAndChemistry1').val();
- }
- if (!!$('#physicsAndChemistry2').val()) {
- param.SqlParameter += " and isnull(s.physicsAndChemistry,0)<=" + $('#physicsAndChemistry2').val();
- }
- //政治与历史
- if (!!$('#politicsAndHistory1').val()) {
- param.SqlParameter += " and isnull(s.politicsAndHistory,0)>=" + $('#politicsAndHistory1').val();
- }
- if (!!$('#politicsAndHistory2').val()) {
- param.SqlParameter += " and isnull(s.politicsAndHistory,0)<=" + $('#politicsAndHistory2').val();
- }
- //体育
- if (!!$('#physicalEducation1').val()) {
- param.SqlParameter += " and isnull(s.physicalEducation,0)>=" + $('#physicalEducation1').val();
- }
- if (!!$('#physicalEducation2').val()) {
- param.SqlParameter += " and isnull(s.physicalEducation,0)<=" + $('#physicalEducation2').val();
- }
-
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|