|
|
@@ -10,6 +10,7 @@ var bootstrap = function ($, learun) { |
|
|
|
var page = { |
|
|
|
init: function () { |
|
|
|
page.initGird(); |
|
|
|
console.log(223223223); |
|
|
|
page.bind(); |
|
|
|
}, |
|
|
|
bind: function () { |
|
|
@@ -40,6 +41,11 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#lr_edit').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('ID'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit'); |
|
|
|
if (IsSubmit == 1) { |
|
|
|
learun.alert.warning("当前项目已提交,不可编辑!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '编辑', |
|
|
@@ -56,6 +62,11 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#lr_delete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('ID'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit'); |
|
|
|
if (IsSubmit == 1) { |
|
|
|
learun.alert.warning("当前项目已提交,不可删除!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
learun.layerConfirm('是否确认删除该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/DeleteForm', { keyValue: keyValue }, function () { |
|
|
@@ -64,6 +75,23 @@ var bootstrap = function ($, learun) { |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
$('#lr_submit').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('ID'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit'); |
|
|
|
if (IsSubmit == 1) { |
|
|
|
learun.alert.warning("当前项目已提交,请勿重复提交!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
learun.layerConfirm('是否确认提交该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/SubmitForm', { keyValue: keyValue }, function (res) { |
|
|
|
refreshGirdData(res, {}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
initGird: function () { |
|
|
|
$('#gridtable').lrAuthorizeJfGrid({ |
|
|
@@ -108,6 +136,7 @@ var bootstrap = function ($, learun) { |
|
|
|
}, |
|
|
|
search: function (param) { |
|
|
|
param = param || {}; |
|
|
|
param.SqlParameter = 'and IsDel = 0 '; |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|