|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-06-03 15:52
- * 描 述:收费方式设置
- */
- 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);
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeBank/Form',
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ChargeBankID');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeBank/Form?keyValue=' + keyValue,
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ChargeBankID');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeBank/DeleteForm', { keyValue: keyValue }, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/ReceiveSendFeeManagement/FinaChargeBank/GetPageList',
- headData: [
- { label: "收费方式名称", name: "ChargeBankName", width: 200, align: "left" },
- { label: "备注", name: "Remark", width: 200, align: "left" },
- { label: "虚拟方式标志", name: "VirtualFlag", width: 100, align: "left",
- //formatterAsync: function (callback, value, row, op,$cell) {
- // learun.clientdata.getAsync('dataItem', {
- // key: value,
- // code: 'YesOrNoInt',
- // callback: function (_data) {
- // callback(_data.text);
- // }
- // });
- //}
- formatter: function (cellvalue, rowObject) {
- return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
- }
- },
- { label: "时间", name: "CreateDate", width: 130, align: "left" },
- { label: "创建用户", name: "CreateUserName", width: 100, align: "left" },
- ],
- mainId: 'ChargeBankID',
- isPage: true,
- sidx: 'CreateDate',
- sord: 'desc'
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|