var refreshGirdData; var OneInTimebegin = ''; var OneInTimeend = ''; var ProductTimebegin = ''; var ProductTimeend = ''; var logbegin = ''; var logend = ''; var bootstrap = function ($, learun) { "use strict"; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { // 调用后台查询 // queryJson 查询条件 queryJson["Pation"] = $("#Pation").val(); page.search({ queryJson: JSON.stringify(queryJson) }); }, 250); // 查询 $('#btn_Search').on('click', function () { var keyword = $('#txt_Keyword').val(); page.search({ queryJson: JSON.stringify({ keyword: $('#txt_Keyword').val() }) }); }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); }); // 启用 $('#lr_start').on('click', function () { var postData = $('#gridtable').jfGridGet("rowdata"); if (postData.length == 0) { learun.alert.error('未选择行!'); return false; } learun.layerConfirm('是否确认启用该站台!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/FJManager/SysCon/EnablePation', { ids: JSON.stringify(postData.map((item) => item.Id)) }, function () { refreshGirdData(); }); } }); }); // 禁用 $('#lr_notstart').on('click', function () { var postData = $('#gridtable').jfGridGet("rowdata"); if (postData.length == 0) { learun.alert.error('未选择行!'); return false; } learun.layerConfirm('是否确认禁用该站台!', function (res) { if (res) { learun.postForm(top.$.rootUrl + '/FJManager/SysCon/DisablePation', { ids: JSON.stringify(postData.map((item) => item.Id)) }, function () { refreshGirdData(); }); } }); }); }, // 初始化列表 initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/FJManager/SysCon/GetOutInPationList', headData: [ { label: "仓库", name: "WareHouseName", width: 80, align: "left" }, { label: "站台", name: "Code", width: 50, align: "left" }, { label: "名称", name: "Name", width: 150, align: "left" }, { label: "状态", name: "StatuName", width: 50, align: "left" }, { label: "备注", name: "Memo", width: 80, align: "left" }, { label: "创建时间", name: "AddTime", width: 130, align: "left" }, { label: "更新时间", name: "EditTime", width: 130, align: "left" }, ], mainId: 'Id', isPage: true, reloadSelected: true, autowWidth: true, sidx: 'AddTime', sord: 'DESC', isMultiselect: true, }); page.search({ queryJson: JSON.stringify({ keyword: $('#txt_Keyword').val() }) }); }, search: function (param) { param = param || { queryJson: JSON.stringify({ InvStateCode: 3 }) }; $('#gridtable').jfGridSet('reload', param); } }; refreshGirdData = function () { page.search(); }; page.init(); }