From 5c4e3f7c1ebd06db40019b632db0ced4cabe3306 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Thu, 24 Nov 2022 10:59:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=BD=92=E8=BF=98=E3=80=81?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E5=80=9F=E9=98=85=20=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EducationalAdministration/Views/BookBorrow/Form.js | 7 ++++++- .../EducationalAdministration/Views/BookReturn/Form.js | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js index bbf6ab106..efba63287 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.js @@ -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()) }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js index e84acbf33..9f274fd28 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js @@ -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()) };