|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-08-29 16:50
- * 描 述:选课专业
- */
- var refreshGirdData;
- var acceptClick;
- var OLPOEId = request("OLPOEId");
- 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);
- }, 220, 400);
- $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
- $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
- $('#Grade').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
- value: 'value',
- text: 'text',
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 添加专业
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'formadd',
- title: '添加专业',
- url: top.$.rootUrl + '/EducationalAdministration/CdMajor/IndexOfElective?OLPOEId=' + OLPOEId,
- width: 1000,
- height: 700,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtablemanagemajor').jfGridValue('ElectiveMajorId');
- //console.log(OLPOEId);
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/DeleteForm', { keyValue: keyValue, OLPOEId: OLPOEId }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtablemanagemajor').lrAuthorizeJfGridLei({
- url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajor/GetPageList',
- headData: [
- { label: "专业名称", name: "MajorName", width: 150, align: "left" },
- { label: "专业编号", name: "MajorNo", width: 80, align: "left" },
- { label: "年级", name: "Grade", width: 80, align: "left" },
- { label: "学制", name: "LengthOfSchooling", width: 60, align: "left" },
- {
- label: "学科门类", name: "SubjectSpeciesNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'SubjectSpecies',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "校区", name: "F_SchoolId", width: 200, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
- key: value,
- keyId: 'f_companyid',
- callback: function (_data) {
- callback(_data['f_fullname']);
- }
- });
- }
- },
- {
- 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: "GraduateNo", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'CollegeType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- }
- ],
- mainId: 'ElectiveMajorId',
- isMultiselect: true,
- isPage: true,
- sidx: 'MajorNo',
- sord: 'ASC'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.OLPOEId = OLPOEId;
- $('#gridtablemanagemajor').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
-
- refreshGirdData = function () {
- page.search();
- };
-
- // 保存数据
- acceptClick = function (callBack) {
- if (!!callBack) {
- learun.layerClose(window.name);
- callBack();
- }
- };
- page.init();
- }
|