/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2022-07-11 14:34 * 描 述:宿舍调换申请 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var startTime; var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 300, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); $('#DeptNo').lrselect({ value: "deptno", text: "deptname", url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', select: function (item) { if (item) { $('#MajorNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } }); } else { $('#MajorNo').lrselectRefresh({ url: "", data: [] }); } $('#ClassNo').lrselectRefresh({ url: "", data: [] }); } }); $('#MajorNo').lrselect({ value: "majorno", text: "majorname", select: function (item) { if (item) { $('#ClassNo').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } }); } } }); $('#MajorNo').on("click", function () { var data = $('#DeptNo').lrselectGet(); if (!data) { learun.alert.error('请先选择系'); } }); $('#ClassNo').on("click", function () { var data1 = $('#DeptNo').lrselectGet(); var data2 = $('#MajorNo').lrselectGet(); if (!data1 || !data2) { learun.alert.error('请先选择系和专业'); } }); $('#ClassNo').lrselect({ value: "classno", text: "classname" }); $('#Months').lrDataItemSelect({ code: "MonthInt", type: "multiple" }); $('#Year').lrselect({ url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GenerateNearByYear', value: 'value', text: 'text' }); }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/YKTStateMent/GetAnalysisByMonthForStudentPageList', headData: [ { label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "姓名", name: "StuName", width: 100, align: "left" }, { label: "性别", name: "GenderNo", width: 100, align: "left", formatter: function (cellvalue) { return cellvalue == "1" ? "男" : "女"; } }, { label: "系部", name: "DeptName", width: 100, align: "left" }, { label: "专业", name: "MajorName", width: 100, align: "left" }, { label: "班级", name: "ClassName", width: 100, align: "left" }, { label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, { label: "消费金额", name: "MONEY", width: 100, align: "left", statistics: true }, { label: "消费次数", name: "PayTimes", width: 100, align: "left", statistics: true }, { label: "平均消费金额", name: "PerMoney", width: 100, align: "left", statistics: true } ], isPage: true }); //page.search(); }, search: function (param) { param = param || {}; param.StartDate = startTime; param.EndDate = endTime; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { page.search(); }; page.init(); }