|
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var Class, ClassName;
- var page = {
- init: function () {
- Class = request('Class')
- $.ajax({
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
- type: "get",
- dataType: "json",
- async: false,
- cache: false,
- success: function (res) {
- if (res.code == 200) {
- let obj = res.data.find(e => e.value == Class)
- ClassName = obj ? obj.text : ''
- $('.printTitle').text((ClassName || '') + '学生方向确认')
- }
- },
- });
- page.initGird();
- page.bind();
- },
- bind: function () {
- $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
- page.search(queryJson);
- }, 200, 400);
- $('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
- $('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#printPage').jqprint();
- });
- },
- // 初始化列表
- initGird: function () {
- let option = {
- url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
- headData: [
- { label: "姓名", name: "StuName", width: 100, align: "center" },
- {
- label: "性别", name: "GenderNo", width: 40, align: "center",
- formatter: function (cellvalue) {
- return cellvalue == true ? "男" : "女";
- }
- },
- { label: "身份证号", name: "IdentityCardNo", width: 150, align: "center" },
- {
- label: "民族", name: "NationalityNo", width: 100, align: "center",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'National',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "学籍号", name: "StuCode", width: 160, align: "center", },
- {
- label: '选择方向', name: '选择方向', align: "center", statistics: true, width: 460,
- children: [
- { label: "技能高考", name: "GK", width: 80, align: "center" },
- { label: "高职单招", name: "DZ", width: 80, align: "center" },
- { label: "3+2高职转段", name: "ZD", width: 100, align: "center" },
- { label: "就业", name: "JY", width: 70, align: "center" },
- { label: "签名", name: "QM", width: 80, align: "center" },
- ]
- },
-
-
- ],
- mainId: 'StuId',
- isPage: true,
- rows: 24,
- isShowNum: true,
- // 是否显示序号
- //isMultiselect: true,
- //onSelectRow: function (rowdata) {
- // if (rowdata.CheckMark == "1") {
- // $("#check").hide();
- // $("#uncheck").show();
- // $("#lr_edit").hide();
- // $("#lr_delete").hide();
- // } else {
- // $("#uncheck").hide();
- // $("#check").show();
- // $("#lr_edit").show();
- // $("#lr_delete").show();
- // }
- //}
- onRenderComplete: function (list) {
- //if (!list.length) {
- // $('.pageCard').hide()
- //}
- }
-
- }
- $('#gridtable').lrAuthorizeJfGridLei(option);
- $('#gridtable1').lrAuthorizeJfGridLei({
- ...option, onRenderComplete: function (list) {
- if (!list.length) { $('.pageCard1').hide() }
- }
- });
- $('#gridtable2').lrAuthorizeJfGridLei({
- ...option, onRenderComplete: function (list) {
- if (!list.length) { $('.pageCard2').hide() }
- }
- });
- $('#gridtable3').lrAuthorizeJfGridLei({
- ...option, onRenderComplete: function (list) {
- if (!list.length) { $('.pageCard3').hide() }
- }
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.ClassNo = Class;
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 1 });
- $('#gridtable1').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 2 });
- $('#gridtable2').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 3 });
- $('#gridtable3').jfGridSet('reload', { queryJson: JSON.stringify(param) }, { page: 4 });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|