|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-07-17 11:20
- * 描 述:新生录取管理
- */
- 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);
- }, 380, 400, true,
- function () {
- var cardobj = idcardreader.readcard("lr_btn_readcard");
- if (cardobj.resultFlag == 0) {
- learun.alert.success("身份证信息读取成功");
- $("#StuName").val(cardobj.resultContent.partyName);
- $("#IDCard").val(cardobj.resultContent.certNumber);
- } else {
- learun.alert.error('读取错误!未检测到身份证或设备连接错误,请调整身份证位置并重新读取,多次未读取到身份证信息则可能是身份证芯片已损坏!');
- }
- });
-
- $('#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"
- });
- $('#Year').lrselect({
- url:top.$.rootUrl+'/EducationalAdministration/StuEnroll/GetYearListByClass',
- value:"year",
- text:"year",
- })
-
- //刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form',
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/Form?keyValue=' + keyValue,
- width: 800,
- height: 600,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- $('#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_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('StuId');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
-
- // 同步系部
- $('#lr_syn').on('click', function () {
- learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuEnroll/SyncDept', function () {
- refreshGirdData();
- });
- });
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
- });
- // 分配班级
- $('#lr_allocationClass').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: "分配班级",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationClass',
- width: 1300,
- height: 600,
- btn: null
- });
-
- });
- // 分配宿舍
- $('#lr_allocationDormitory').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配宿舍",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/AllocationDormitory',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
-
-
- // 分配宿舍
- $('#lr_newallocationDormitory').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配宿舍",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationDormitory',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
-
- // 分配宿舍
- $('#lr_newallocationBed').on('click', function () {
- learun.layerFormForPercent({
- id: 'form',
- title: "分配床位",
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/NewAllocationBed',
- width: '90%',
- height: '90%',
- btn: null
- });
- });
- $("#demaxiya").on("click", function () {
- alert(123);
-
- })
-
-
-
-
-
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetPageList',
- headData: [
- { label: "学生报名号", name: "RegistrationNo", width: 100, align: "left" },
- { label: "姓名", name: "StuName", width: 100, align: "left" },
- {
- label: "性别", name: "Gender", width: 100, align: "left", formatter: function (value) {
- return value == "1" ? "男" : "女";
-
- }
- },
- {
- 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: "IsReport", width: 100, align: "left",
- formatter: function (value, row, drop) {
- if (row.IsReport) {
- return '<span class=\"label label-success\">报到</span>';
- } else if (row.IsReport == false) {
- return '<span class=\"label label-warning\">未报到</span>';
- }
- else {
- return "未处理";
- }
-
- }
- },
- {
- label: "是否住宿", name: "IsCheckIn", width: 100, align: "left",
- formatter: function (value, row) {
- if (row.IsCheckIn) {
- return '<span class=\"label label-success\">住宿</span>';
- } else if (row.IsCheckIn == false) {
- return '<span class=\"label label-warning\">走读</span>';
- } else {
- return "未处理";
- }
-
- }
- },
- {
- label: "是否资助", name: "IsSubsidize1", width: 100, align: "left", formatter: function (value, row) {
-
- if (row.IsSubsidize1) {
- return '<span class=\"label label-success\">资助</span>';
- } else if (row.IsSubsidize1 == false) {
- return '<span class=\"label label-warning\">不资助</span>';
- } else {
- return "未处理";
- }
- }
- },
- {
- label: "是否军训", name: "IsMilitary", width: 100, align: "left",
- formatter: function (value, row) {
- if (row.IsMilitary) {
- return '<span class=\"label label-success\">军训</span>';
- } else if (row.IsMilitary == false) {
- return '<span class=\"label label-warning\">不军训</span>';
- } else {
- return "未处理";
- }
-
- }
- },
- {
- label: "缴费状态", name: "IsPay", width: 60, align: "left", formatter: function (val, row) {
- if (row.IsPay) {
- return '<span class=\"label label-success\">缴费</span>';
- } else if (row.IsPay == false) {
- return '<span class=\"label label-warning\">未缴费</span>';
- }
- else {
- return "未处理";
- }
- }
- },
- {
- label: "拍照", name: "IsMug", width: 100, align: "left",
- formatter: function (value, row) {
- if (row.IsMug) {
- return '<span class=\"label label-success\">已拍照</span>';
- } else if (row.IsMug == false) {
- return '<span class=\"label label-warning\">未拍照</span>';
- } else {
- return '未处理';
- }
- }
- },
- {
- label: "领取军训服", name: "IsTakeCloths", width: 100, align: "left", formatter: function (value, row) {
- if (row.IsTakeCloths) {
- return '<span class=\"label label-success\">已领取</span>';
- } else if (row.IsTakeCloths == false) {
- return '<span class=\"label label-warning\">未领取</span>';
- } else {
- return '未处理';
- }
- }
- },
- {
- label: "量取校服尺寸", name: "IsQuantity", width: 100, align: "left", formatter: function (value, row) {
- if (row.IsQuantity) {
- return '<span class=\"label label-success\">已量</span>';
- } else if (row.IsQuantity == false) {
- return '<span class=\"label label-warning\">未量</span>';
- } else {
- return '未处理';
- }
- }
- },
- {
- label: "领取床上用品", name: "IsGetBeddingArticle", width: 100, align: "left", formatter: function (value, row) {
- if (row.IsGetBeddingArticle) {
- return '<span class=\"label label-success\">已领取</span>';
- } else if (row.IsGetBeddingArticle == false) {
- return '<span class=\"label label-warning\">未领取</span>';
- } else {
- return '未处理';
- }
- }
- },
-
- ],
- mainId: 'StuId',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- param.Grade = "20";
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- //refreshGirdDatas = function () {
- // alert(2222);
- //};
- page.init();
- }
|