From 34bfa1a71c8ccaf186c5248bacc6db20b8fa3a98 Mon Sep 17 00:00:00 2001 From: hwh2023 <598694955@qq.com> Date: Thu, 31 Aug 2023 14:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E6=95=B0=E9=87=8F=E5=B0=8F?= =?UTF-8?q?=E6=95=B0=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Purchase_Edu/Form.js | 23 +++++++++++++++++-- .../Views/Purchase_Edu_Apply/Form.js | 4 ++++ .../Views/Purchase_Info/Form.js | 22 ++++++++++++++++-- .../Views/Purchase_Info_Apply/Form.js | 4 ++++ .../Views/Purchase_Logistic/Form.js | 22 ++++++++++++++++-- .../Views/Purchase_Logistic_Apply/Form.js | 4 ++++ .../Views/Purchase_Other/Form.js | 22 ++++++++++++++++-- .../Views/Purchase_Other_Apply/Form.js | 4 ++++ .../Views/Purchase_Print/Form.js | 23 +++++++++++++++++-- .../Views/Purchase_Print_Apply/Form.js | 4 ++++ .../Views/Purchase_Service/Form.js | 4 ++++ .../Views/Purchase_Service_Apply/Form.js | 4 ++++ .../Views/Purchase_Student/Form.js | 23 +++++++++++++++++-- .../Views/Purchase_Student_Apply/Form.js | 4 ++++ .../Views/Purchase_Travel_Apply/Form.js | 4 ++++ .../Views/Purchase_Work/Form.js | 23 +++++++++++++++++-- .../Views/Purchase_Work_Apply/Form.js | 4 ++++ .../LearunApp-2.2.0/config.js | 2 +- 18 files changed, 185 insertions(+), 15 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Form.js index 96d179f72..a7b30b70b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu/Form.js @@ -52,7 +52,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +77,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -125,9 +139,14 @@ var bootstrap = function ($, learun) { }; // 保存数据 acceptClick = function (callBack) { + console.log(12) if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Edu"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); postData.strpurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js index 08ce511e3..7cd990607 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Edu_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Edu_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu_apply"]').lrGetFormData()); postData.strpurchase_Edu_applydetailsList = JSON.stringify($('#Purchase_Edu_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Form.js index 01e4343c5..2459e1cc0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info/Form.js @@ -52,7 +52,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +77,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -128,6 +142,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Info"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData()); postData.strPurchase_Info_DetailsList = JSON.stringify($('#Purchase_Info_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js index 0d91dd5ae..74d190f1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Info_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Info_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Info_apply"]').lrGetFormData()); postData.strpurchase_Info_applydetailsList = JSON.stringify($('#Purchase_Info_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Form.js index f4084c2cc..41c3fc766 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic/Form.js @@ -52,7 +52,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +77,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -128,6 +142,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Logistic"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData()); postData.strPurchase_Logistic_DetailsList = JSON.stringify($('#Purchase_Logistic_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js index 2a02ea484..ad372c045 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Logistic_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Logistic_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic_apply"]').lrGetFormData()); postData.strpurchase_Logistic_applydetailsList = JSON.stringify($('#Purchase_Logistic_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Form.js index 103fd9dcd..29cfa0af9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other/Form.js @@ -52,7 +52,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +77,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -128,6 +142,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Other"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData()); postData.strPurchase_Other_DetailsList = JSON.stringify($('#Purchase_Other_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js index 44aab9d6a..cd6966db0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Other_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Other_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Other_apply"]').lrGetFormData()); postData.strpurchase_Other_applydetailsList = JSON.stringify($('#Purchase_Other_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Form.js index 5aae48ec9..46e9ea767 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print/Form.js @@ -52,7 +52,15 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + //console.log(123) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +78,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -128,6 +143,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Print"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData()); postData.strPurchase_Print_DetailsList = JSON.stringify($('#Purchase_Print_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js index 01f421aa8..b2bab0d74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Print_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Print_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Print_apply"]').lrGetFormData()); postData.strpurchase_Print_applydetailsList = JSON.stringify($('#Purchase_Print_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service/Form.js index 4fb4cc65e..18df9ba59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service/Form.js @@ -110,6 +110,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Service"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Service"]').lrGetFormData()); postData.strPurchase_Service_DetailsList = JSON.stringify($('#Purchase_Service_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Form.js index 64bfa321b..566cb03df 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Service_Apply/Form.js @@ -144,6 +144,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Service_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Service_apply"]').lrGetFormData()); postData.strPurchase_Service_applydetailsList = JSON.stringify($('#Purchase_Service_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Form.js index fe1f660c0..45a6749f0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student/Form.js @@ -52,7 +52,15 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { - data.Price = Math.abs(data.Price) + //console.log(123) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -70,7 +78,14 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -128,6 +143,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Student"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData()); postData.strPurchase_Student_DetailsList = JSON.stringify($('#Purchase_Student_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js index 66fa68dde..5f103835b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Student_Apply/Form.js @@ -146,6 +146,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Student_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Student_apply"]').lrGetFormData()); postData.strpurchase_Student_applydetailsList = JSON.stringify($('#Purchase_Student_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Form.js index edfd3261f..b52c3713c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Travel_Apply/Form.js @@ -129,6 +129,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Travel_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Travel_apply"]').lrGetFormData()); postData.strPurchase_Travel_applydetailsList = JSON.stringify($('#Purchase_Travel_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Form.js index 129c60aae..da26ed5bb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work/Form.js @@ -53,7 +53,14 @@ var bootstrap = function ($, learun) { change: function (data, num) {// 行数据和行号 if (!isNaN(data.Price)) { //console.log(123) - data.Price = Math.abs(data.Price) + if (data.Price < 0) { + data.Price = Math.abs(data.Price) + } + if (data.Price.split('.').length > 1) { + if (data.Price.split('.')[1].length > 2) { + data.Price = parseFloat(data.Price).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -71,7 +78,15 @@ var bootstrap = function ($, learun) { }, change: function (data, num) {// 行数据和行号 if (!isNaN(data.Quantity)) { - data.Quantity = Math.abs(data.Quantity) + //console.log(123) + if (data.Quantity < 0) { + data.Quantity = Math.abs(data.Quantity) + } + if (data.Quantity.split('.').length > 1) { + if (data.Quantity.split('.')[1].length > 2) { + data.Quantity = parseFloat(data.Quantity).toFixed(2) + } + } computeamount(); } else { learun.alert.warning("只能是数字"); @@ -129,6 +144,10 @@ var bootstrap = function ($, learun) { if (!$('#form').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Work"]').lrGetFormData().TotalAmount) <= 0) { + learun.alert.warning("总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData()); postData.strpurchase_Work_DetailsList = JSON.stringify($('#Purchase_Work_Details').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js index c4ec21af5..b92385c45 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Purchase_Work_Apply/Form.js @@ -149,6 +149,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + if (parseFloat($('[data-table="Purchase_Work_apply"]').lrGetFormData().Totalamount) <= 0) { + learun.alert.warning("报账总金额不能为零"); + return false; + } var postData = {}; postData.strEntity = JSON.stringify($('[data-table="Purchase_Work_apply"]').lrGetFormData()); postData.strpurchase_Work_applydetailsList = JSON.stringify($('#Purchase_Work_applydetails').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index cb54b4517..57700712c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -12,7 +12,7 @@ export default { "http://localhost:31173/", ], // "webHost": "http://fwh.ldyesz.edu.cn:8000/", - "webHost": "http://localhost:20472/", + "webHost": "http://192.168.10.245:8009/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [{ username: "system",