|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2021-05-25
- * 描 述:完善资助信息
- */
- var acceptClick;
- var keyValue = request('keyValue');
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- $('.lr-form-wrap').lrscroll();
- page.bind();
- page.initData();
- },
- bind: function () {
- //$('#SupportGrade').lrDataItemSelect({
- // code: 'SupportGrade'
- // //,select: function (item) {
- // // if (item != undefined) {
- // // if (item.id == '1') {
- // // $('#SupportType').lrDataItemSelect({ code: 'SupportType1' });
- // // }
- // // else if (item.id == '2') {
- // // $('#SupportType').lrDataItemSelect({ code: 'SupportType2' });
- // // }
- // // }
- // //}
- //});
- //$('#SupportGrade').lrselectSet("1");
- $('#SupportType').lrRadioCheckbox({
- type: 'checkbox',
- code: 'SupportType1',
- });
- $('#SupportType1').lrRadioCheckbox({
- type: 'checkbox',
- code: 'SupportType2',
- });
- },
- initData: function () {
- if (!!keyValue) {
- $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetFormData?keyValue=' + keyValue, function (data) {
- for (var id in data) {
- if (!!data[id].length && data[id].length > 0) {
- $('#' + id).jfGridSet('refreshdata', data[id]);
- }
- else {
- $('[data-table="' + id + '"]').lrSetFormData(data[id]);
- }
- }
-
- });
- }
- }
- };
- // 保存数据
- acceptClick = function (callBack) {
- if (!$('body').lrValidform()) {
- return false;
- }
- var strEntity = $('body').lrGetFormData();
- if (strEntity.SupportType) {
- strEntity.SupportGrade = '1';
- }
- else if (strEntity.SupportType1) {
- strEntity.SupportGrade = '2';
- }
- //console.log(strEntity);
- var postData = {
- strEntity: JSON.stringify(strEntity)
- };
- $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SupplySupport?keyValue=' + keyValue, postData, function (res) {
- // 保存成功后才回调
- if (!!callBack) {
- callBack();
- }
- });
- };
- page.init();
- }
|