|
- /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
- * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
- * 创建人:超级管理员
- * 日 期:2021-12-16 10:14
- * 描 述:长阳迎新
- */
- 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);
- }, 220, 400);
- $('#AcademicYearNo').lrselect({
- placeholder: "请选择学年",
- allowSearch: true,
- url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
- value: 'value',
- text: 'text'
- });
- //学期
- $('#Semester').lrselect({
- placeholder: "请选择学期",
- allowSearch: true,
- url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
- value: 'value',
- text: 'text'
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGridLei({
- url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetStatistics',
- headData: [
- { label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
- { label: "学期", name: "Semester", width: 50, align: "left" },
- { label: "教材名称", name: "TextBookName", width: 150, align: "left" },
- { label: "出版号", name: "PublishNo", width: 100, align: "left" },
- { label: "第一作者", name: "FirstAuthor", width: 100, align: "left" },
- { label: "其他作者", name: "OtherAuthor", width: 100, align: "left" },
- {
- label: "出版日期", name: "Pubdate", width: 80, align: "left",
- formatter: function (value) {
- return learun.formatDate(value, 'yyyy-MM-dd');
- }
- },
- { label: "出版社", name: "Publisher", width: 100, align: "left" },
- {
- label: "教材类型", name: "TextBookType", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'TextBookType',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- {
- label: "教材性质", name: "TextBookNature", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'TextBookNature',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }
- },
- { label: "单价", name: "Price", width: 60, align: "left" },
- { label: "版次", name: "Edition", width: 100, align: "left" },
- { label: "印次", name: "Impression", width: 100, align: "left" },
- {
- label: "练习册", name: "IsWorkBook", width: 100, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
- "<span class=\"label label-danger\">否</span>";
- }
- },
- {
- label: "教参教辅", name: "IsTeachConsult", width: 100, align: "left",
- formatter: function (cellvalue) {
- return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
- "<span class=\"label label-danger\">否</span>";
- }
- },
- { label: "订购数量", name: "DGNum", width: 200, align: "left" }
- ],
- mainId: 'PublishNo',
- sidx: 'PublishNo desc',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- $('#gridtable').jfGridSet('reload');
- };
- page.init();
- }
|