/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 * 日 期:2021-10-11 16:46 * 描 述:助学金及审核 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); $('#SchoolType').lrselect({ allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), value: "Id", text: "ItemName" }); $('#State').lrselect({ data: [{ text: "待审核", value: "0" }, { text: "审核通过", value: "1" }, { text: "不通过", value: "2" }], text: "text", value: "value" }) // 审核 $('#lr_allaudit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { if (keyValue.indexOf(",") != -1) { learun.layerConfirm('是否确认审核选中项!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/AduitForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } else { var State = $('#gridtable').jfGridValue('State'); if (State != 0) { learun.alert.warning("当前项不可进行审核!"); return false; } learun.layerForm({ id: 'form', title: '审核', url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/FormAudit?keyValue=' + keyValue, width: 600, height: 580, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); } } }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Scholarshipxj/GetPageList', headData: [ { label: "学生", name: "StuName", width: 200, align: "left" }, { label: "学生学号", name: "StuNo", width: 200, align: "left" }, { label: "班级", name: "ClassNo", width: 200, 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: "SchoolType", width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/EducationalAdministration/Scholarship/GetList?queryJson=' + JSON.stringify({ IsType: 1, IsValid: 0 }), key: value, keyId: 'Id', callback: function (_data) { callback(_data['ItemName']); } }); } }, { label: "申请时间", name: "GetTime", width: 200, align: "left", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, { label: "审核状态", name: "State", width: 200, align: "left", formatter: function (cellvalue) { if (cellvalue == '0') { return '待审核'; } else if (cellvalue == '1') { return '审核通过'; } else if (cellvalue == '2') { return '不通过'; } } }, { label: "审核时间", name: "AuditTime", width: 200, align: "left", formatter: function (cellvalue) { return learun.formatDate(cellvalue, 'yyyy-MM-dd'); } }, ], mainId: 'Id', isPage: true, isMultiselect: true,//复选框 }); page.search(); }, search: function (param) { param = param || {}; param.IsType = 1; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); }, downLoad: function (fileId) { top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: top.$.lrToken }, method: 'POST' }); } }; refreshGirdData = function () { $('#gridtable').jfGridSet('reload'); }; page.init(); } function downLoad(fileId, fileTwo) { if (fileTwo) { top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () { }); } top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); }