|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299 |
- /* * 版 本 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();
- }
|