|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2019-04-04 10:08
- * 描 述:缺货单
- */
- 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_view').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('AOId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'formAss_AssetsOutApplyIncomplete',
- title: '查看缺货单',
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/Form?keyValue=' + keyValue,
- width: 1000,
- height: 700,
- btn: ["出库", "关闭"],
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- $('#lr_viewapp').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('AOId');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'formAss_AssetsInfoApply',
- title: '查看出库申请',
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue,
- width: 1000,
- height: 600,
- btn: null
- });
- }
- });
- },
- // 初始化列表
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/GetPageList',
- headData: [
- { label: "缺货单号", name: "AOCode", width: 200, align: "left" },
- { label: "缺货总价", name: "AOPrice", width: 100, align: "left" },
- { label: "生成时间", name: "AOCreateTime", width: 150, align: "left" },
- {
- label: "出库人", name: "AOAUserId", width: 100, align: "left",
- formatterAsync: function (callback, value, row, op, $cell) {
- learun.clientdata.getAsync('user', {
- key: value,
- callback: function (_data) {
- callback(_data.name);
- }
- });
- }
- },
- { label: "出库时间", name: "AOACreateTime", width: 150, align: "left" },
- {
- label: "缺货单状态", name: "AOOutStatus", width: 100, align: "left", formatter: function (cellvalue, row) {
- if (cellvalue === 0) {
- return '<span class=\"label label-warning\">待出库</span>';
- } else if (cellvalue === 2) {
- return '<span class=\"label label-success\">出库完成</span>';
- } else {
- return '<span class=\"label label-default\" >部分出库</span>';
- }
- }
- }
- ],
- mainId: 'AOAIId',
- isPage: true
- });
- page.search();
- },
- search: function (param) {
- param = param || {};
- $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
- }
- };
- refreshGirdData = function () {
- page.search();
- };
- page.init();
- }
|