12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- /*
- * 描 述:库区管理
- */
- var selectedRow;
- var refreshGirdData;
- var typnum = 1;
- var bootstrap = function ($, learun) {
- "use strict";
- var ds = {};
- var page = {
- init: function () {
- page.inittree();
- page.bind();
- },
- bind: function () {
- $('#save').on('click', function () {
- if (ds["ID"] != '') {
- learun.httpAsyncPost(top.$.rootUrl + '/SysManager/UpAlctPolicy/UpEdit', ds, function (res) {
- page.search(ds);
- });
- }
- else {
- learun.alert.error('此选项不允许操作');
- }
- })
- },
- inittree: function () {
- $('#policyType').lrtree({
- url: top.$.rootUrl + '/SysManager/UpAlctPolicy/GetTree',
- param: { parentId: '0' },
- nodeClick: page.treeNodeClick
- });
- $('#policyType').lrtreeSet('setValue', '53298b7a-404c-4337-aa7f-80b2a4ca6681');
- },
- treeNodeClick: function (item) {
- if (item.parentId != '0' && item.parentId != '00') {
- var value = item.id;
- ds["ID"] = value;
- page.search(ds);
- }
- else {
- ds["ID"] = '';
- $("#F_WHERE").text('');
- $("#F_ORDER").text('');
- $('#txt_ISEDIT').text("");
- }
- },
- search: function (param) {
- if (param["ID"] != '') {
- learun.httpAsyncPost(top.$.rootUrl + '/SysManager/UpAlctPolicy/GetPolicyItem', param, function (res) {
- var entity = eval(res.data);
- $("#F_WHERE").text(entity.WHERESTR);
- $("#F_ORDER").text(entity.ORDERSTR);
- if (entity.ISEDIT == 0) {
- $('#txt_ISEDIT').text("启用");
- $("#txt_ISEDIT").css('color', "red");
- }
- else {
- $('#txt_ISEDIT').text("禁用");
- $("#txt_ISEDIT").css('color', "black");
- }
- });
- }
- }
- };
- page.init();
- }
|