|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-03-26 11:41
- * 描 述:入库申请明细
- */
- 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();
- });
- // 新增
- $('#lr_add').on('click', function () {
- learun.layerForm({
- id: 'formAss_AssetsInfoItemApply',
- title: '新增',
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form',
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('AAIId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'formAss_AssetsInfoItemApply',
- title: '编辑',
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form?keyValue=' + keyValue,
- width: 600,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('AAIId');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/DeleteForm', { keyValue: keyValue}, function () {
- refreshGirdData();
- });
- }
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/GetPageList',
- headData: [
- { label: "资产编号", name: "AAICode", width: 100, align: "left"},
- { label: "资产名称", name: "AAIName", width: 100, align: "left"},
- { label: "英文名称", name: "AAIEName", width: 100, align: "left"},
- { label: "资产类别", name: "AAITId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',
- key: value,
- keyId: 'atid',
- callback: function (_data) {
- callback(_data['aname']);
- }
- });
- }},
- { label: "规格型号", name: "AAIModel", width: 100, align: "left"},
- { label: "生产厂家", name: "AAIManufacturer", width: 100, align: "left"},
- { label: "资产来源", name: "AAISource", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'zcly',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }},
- { label: "供应商", name: "AAISupplierId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('custmerData', {
- url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData',
- key: value,
- keyId: 'sid',
- callback: function (_data) {
- callback(_data['sname']);
- }
- });
- }},
- { label: "单价", name: "AAIPrice", width: 100, align: "left"},
- { label: "数量", name: "AAIStock", width: 100, align: "left"},
- { label: "数量单位", name: "AAIUnit", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op,$cell) {
- learun.clientdata.getAsync('dataItem', {
- key: value,
- code: 'sldw',
- callback: function (_data) {
- callback(_data.text);
- }
- });
- }},
- { label: "排序", name: "AAIOrder", width: 100, align: "left"},
- { label: "资产图片", name: "AAIPhoto", width: 100, align: "left"},
- { label: "资产描述", name: "AAIContent", width: 100, align: "left"},
- { label: "资产品牌", name: "AAISpecification", width: 100, align: "left"},
- { label: "用途", name: "AAIUse", width: 100, align: "left"},
- ],
- mainId:'AAIId',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|