|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-07-17 11:20
- * 描 述:新生录取管理
- */
- var refreshGirdData;
- var NowGrade;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- var data_grade = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByMaxClass',
- {});
- NowGrade = data_grade.info;
-
- page.initGird();
- page.bind();
- //page.refreshMoney();
- },
- bind: function () {
- $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
- page.search(queryJson);
- //page.refreshMoney();
- }, 380, 400);
- $("#IsSubsidize1").lrDataItemSelect({ code: "jyYewOrNot" });
- $('#Grade').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
- value: "year",
- text: "year",
- });
- $('#Grade').lrselectSet(NowGrade);
-
- $('#DeptNo').lrselect({
- allowSearch: true,
- value: "deptno",
- text: "deptname",
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
- select: function (item) {
- if (item) {
- $('#MajorNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
- });
- } else {
- $('#MajorNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- param: { strWhere: "1=1 AND CheckMark=1" }
- });
- }
-
- }
- });
- $('#MajorNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
- value: "majorno",
- text: "majorname",
- param: { strWhere: "1=1 AND CheckMark=1" },
- select: function (item) {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1" }
- });
- }
- }
- });
- $('#ClassNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1" },
- value: "classno",
- text: "classname"
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- $('#lr_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '查看',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/FormView?keyValue=' + keyValue,
- width: 800,
- height: 600,
- btn: null
- });
- }
- });
-
- //完善资助信息
- $("#lr_supply").on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '完善信息',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/IsHelpForm?keyValue=' + keyValue,
- width: 600,
- height: 450,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
-
- });
-
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
- headData: [
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "班级", name: "ClassNo", width: 150, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
- key: value,
- keyId: 'classno',
- callback: function (_data) {
- callback(_data['classname']);
- }
- });
- }
- },
- {
- label: "户别", name: "ResidenceType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'HouseholdCategory',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "享受等级", name: "SupportGrade", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- if (value && value.indexOf(',') != -1) {
- var content = '';
- var texts = value.split(',');
- for (var i = 0; i < texts.length; i++) {
- learun.clientdata.getAsync('dataItem',
- {
- key: texts[i],
- code: 'SupportGrade',
- callback: function (_data) {
- content += _data.text + ',';
-
- }
- });
- }
- content = content.substring(0, content.length - 1);
- callback(content);
- } else {
- learun.clientdata.getAsync('dataItem',
- {
- key: value,
- code: 'SupportGrade',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- }
- //formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'SupportGrade',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- //}
- },
- {
- label: "资助种类(一等)", name: "SupportType", width: 200, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- if (value && value.indexOf(',') != -1) {
- var content = '';
- var texts = value.split(',');
- for (var i = 0; i < texts.length; i++) {
- learun.clientdata.getAsync('dataItem',
- {
- key: texts[i],
- code: 'SupportType1',
- callback: function (_data) {
- content += _data.text + ',';
-
- }
- });
- }
- content = content.substring(0, content.length - 1);
- callback(content);
- } else {
- learun.clientdata.getAsync('dataItem',
- {
- key: value,
- code: 'SupportType1',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- }
- },
- {
- label: "资助种类(二等)", name: "SupportType1", width: 200, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- if (value && value.indexOf(',') != -1) {
- var content = '';
- var texts = value.split(',');
- for (var i = 0; i < texts.length; i++) {
- learun.clientdata.getAsync('dataItem',
- {
- key: texts[i],
- code: 'SupportType2',
- callback: function (_data) {
- content += _data.text + ',';
-
- }
- });
- }
- content = content.substring(0, content.length - 1);
- callback(content);
- } else {
- learun.clientdata.getAsync('dataItem',
- {
- key: value,
- code: 'SupportType2',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- }
-
- },
- //{
- // label: "资助种类", name: "SupportType", width: 100, align: "left",
- // formatterAsync: function (callback, value, row, op, $cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'SupportType1',
- // callback: function (_data) {
- // if (_data.text) {
- // callback(_data.text);
- // } else {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'SupportType2',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- // }
- // }
- // });
- // }
- //},
- { label: "符合资助条件", name: "SupportCondition", width: 200, align: "left" },
- { label: "创建时间", name: "SupportTime", width: 200, align: "left" },
- { label: "操作人", name: "SupportUserName", width: 100, align: "left" },
- { label: "备注信息", name: "SupportRemarks", width: 200, align: "left" }
- ],
- //isMultiselect: true,
- mainId: 'StuId',
- isPage: true,
- sord: 'desc',
- sidx: 'SupportTime'
- });
- page.search();
- },
- refreshMoney: function () {
- var deptNo = $("#DeptNo").lrselectGet();
- var majorNo = $("#MajorNo").lrselectGet();
- var classNo = $("#ClassNo").lrselectGet();
- $.post(
- top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetHelpStatistics',
- {
- DeptNo: deptNo,
- MajorNo: majorNo,
- ClassNo: classNo
- },
- function (res) {
- $("#allAmount").html(res.data.aa);
- $("#isAmount").html(res.data.bb);
- }, "json");
- },
- search: function (param) {
- param = param || {};
- param.SqlParameter = ' AND IsReport=1 AND IsSupport=1';
-
- if (!param.Grade && param.Grade == undefined) {
- param.Grade = NowGrade;
- }
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- },
-
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|