|
- 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);
- }, 290, 400);
- $('#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) {
- var Grades = $("#Grade").lrselectGet();
- if (Grades != null && Grades != "" && Grades != "undefined") {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 AND Grade='" + Grades + "' order by classno desc" }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
- });
- }
- } else {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
- });
- }
- }
- }
- });
- $('#Grade').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
- value: "value",
- text: "text",
- select: function (item) {
- var MajorNos = $("#MajorNo").lrselectGet();
- if (MajorNos != null && MajorNos != "" && MajorNos != "undefined") {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: {
- strWhere: "majorno='" + MajorNos + "' AND CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
- }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
- });
- }
- } else {
- if (item) {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: {
- strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
- }
- });
- } else {
- $('#ClassNo').lrselectRefresh({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
- });
- }
- }
-
- }
- });
- $('#ClassNo').lrselect({
- allowSearch: true,
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
- param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
- value: "classno",
- text: "classname"
- });
- $('#FinishSchoolMark').lrselect({
- data: [{ text: "已毕业", value: "2" }, { text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
- text: "text",
- value: "value"
- })
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- //就业协议备案
- $('#lr_employagree').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- var EmployAgreeStatus = $('#gridtable').jfGridValue('EmployAgreeStatus');
- if (learun.checkrow(keyValue)) {
- if (EmployAgreeStatus.indexOf('1') != -1) {
- return learun.alert.warning("选中项包括已备案数据!");
- }
- learun.layerConfirm('是否确认备案就业协议!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsEmployAgree', { keyValue: keyValue, status: '1' }, function () {
- refreshGirdData();
- });
- }
- });
- }
- })
- //取消就业协议备案
- $('#lr_cancelemployagree').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- var EmployAgreeStatus = $('#gridtable').jfGridValue('EmployAgreeStatus');
- if (learun.checkrow(keyValue)) {
- for (var i = 0; i < EmployAgreeStatus.split(',').length; i++) {
- if (EmployAgreeStatus.split(',')[i] != 1) {
- return learun.alert.warning("选中项包括未备案数据!");
- }
- }
- learun.layerConfirm('是否确认取消备案就业协议!', function (res) {
- if (res) {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsEmployAgree', { keyValue: keyValue, status: '0' }, function () {
- refreshGirdData();
- });
- }
- });
- }
- })
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
- headData: [
- { label: "学号", name: "StuNo", width: 130, align: "left" },
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "GenderNo", width: 50, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "男" : "女";
- }
- },
- {
- label: "系所", name: "DeptNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
- key: value,
- keyId: 'deptno',
- callback: function (_data) {
- callback(_data['deptname']);
- }
- });
- }
- },
- {
- 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: 'majorno',
- callback: function (_data) {
- callback(_data['majorname']);
- }
- });
- }
- },
- {
- label: "班级", name: "ClassNo", width: 100, 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: "Grade", width: 50, align: "left" },
- {
- label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'EduSystem',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "毕业证书号", name: "DiplomaNo", width: 100, align: "left" },
- {
- label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
- if (val == '0') {
- return '待准许';
- } else if (val == "1") {
- return '准许毕业';
- } else if (val == '2') {
- return '已毕业';
- } else {
- return '待准许';
- }
- }
- },
- { label: "毕业时间", name: "FinishSchoolDate", width: 130, align: "left" },
- {
- label: "就业协议备案状态", name: "EmployAgreeStatus", width: 120, align: "left", formatter: function (cellvalue) {
- return cellvalue == "1" ? "已备案" : "未备案"
- }
- },
- { label: "就业协议备案时间", name: "EmployAgreeDate", width: 100, align: "left" },
- ],
- mainId: 'StuId',
- isPage: true,
- rows: 100,
- isMultiselect: true,
-
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|