/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2019-08-21 17:28 * 描 述:成绩比例设置 */ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { page.initGird(); page.bind(); page.bindSelect(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 360, 400); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 新增 $('#lr_add').on('click', function () { learun.layerForm({ id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/Form', width: 600, height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); }); // 编辑 $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', title: '成绩比例设置', url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/Form?keyValue=' + keyValue, width: 600, height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); } }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } }); } }); }, bindSelect: function () { //校区 $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } }); //学年 $('#AcademicYearNo').lrselect({ placeholder: "请选择学年", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', value: 'value', text: 'text' }); //学期 $('#Semester').lrselect({ placeholder: "请选择学期", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', value: 'value', text: 'text' }); //年级 $('#Grade').lrselect({ placeholder: "请选择年级", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData', value: 'value', text: 'text' }); $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $('#LessonNo').lrselect({ placeholder: "请选择课程", allowSearch: true, url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', value: 'value', text: 'text' }); }, // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/GetPageList', headData: [ { label: "校区", name: "F_School", width: 150, align: "left" }, { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, { label: "学期", name: "Semester", width: 80, align: "left" }, { label: "年级", name: "Grade", width: 80, align: "left" }, { label: "系编号", name: "DeptNo", width: 100, align: "left" }, { label: "系名称", name: "DeptName", width: 150, align: "left" }, { label: "专业编号", name: "MajorNo", width: 100, align: "left" }, { label: "专业名称", name: "MajorName", width: 150, align: "left" }, { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, { label: "课程名称", name: "LessonName", width: 150, align: "left" }, { label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" }, { label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" }, { label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" }, { label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" }, { label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) { return (cellvalue === true || cellvalue === "true") ? "" : ""; } }, ], mainId: 'ID', isPage: true, isMultiselect: true, sidx: 'AcademicYearNo,Semester', sord: 'desc' }); page.search(); }, search: function (param) { param = param || {}; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { page.search(); }; page.init(); }