|
- /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
- * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- * 创建人:超级管理员
- * 日 期:2022-02-27 09:35
- * 描 述:TextBookIndentDetail
- */
- var selectedRow;
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- // 查询
- $('#btn_Search').on('click', function () {
- var keyword = $('#txt_Keyword').val();
- page.search({ keyword: keyword });
- });
- $('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- selectedRow = null;
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form',
- width: 700,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- selectedRow = $('#gridtable').jfGridGet('rowdata');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form?keyValue=' + keyValue,
- width: 700,
- 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/TextBookIndentDetail/DeleteForm', { keyValue: keyValue}, function () {
- });
- }
- });
- }
- });
- },
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/GetPageList',
- headData: [
- { label: 'ID', name: 'ID', width: 200, align: "left" },
- { label: 'IndentId', name: 'IndentId', width: 200, align: "left" },
- { label: 'DeptNo', name: 'DeptNo', width: 200, align: "left" },
- { label: 'MajorNo', name: 'MajorNo', width: 200, align: "left" },
- { label: 'ClassNo', name: 'ClassNo', width: 200, align: "left" },
- { label: 'TeachSum', name: 'TeachSum', width: 200, align: "left" },
- { label: 'StuSum', name: 'StuSum', width: 200, align: "left" },
- { label: 'Price', name: 'Price', width: 200, align: "left" },
- { label: 'BookNo', name: 'BookNo', width: 200, align: "left" },
- { label: 'BooName', name: 'BooName', width: 200, align: "left" },
- { label: '出版号', name: 'PublishNo', width: 200, align: "left" },
- { label: 'Remark', name: 'Remark', width: 200, align: "left" },
- { label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" },
- { label: 'CreateUserID', name: 'CreateUserID', width: 200, align: "left" },
- { label: 'LessonNo', name: 'LessonNo', width: 200, align: "left" },
- ],
- mainId:'ID',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- $('#gridtable').jfGridSet('reload');
- };
- page.init();
- }
|