Browse Source

图书归还、图书借阅 数量字段添加验证

新疆警官学校中职
zhangli 2 years ago
parent
commit
5c4e3f7c1e
2 changed files with 12 additions and 1 deletions
  1. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js
  2. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js

+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js View File

@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookBorrow/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
@@ -39,6 +39,11 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var Amount = $('#Amount').val();
if (Amount <= 0 || Math.floor(Amount) !== Amount) {
learun.alert.warning('数量请输入大于0的整数!');
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js View File

@@ -39,6 +39,12 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}

var Amount = $('#Amount').val();
if (Amount <= 0 || Math.floor(Amount) !== Amount) {
learun.alert.warning('数量请输入大于0的整数!');
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};


Loading…
Cancel
Save