From 4f684b7fce4c13d1b85a65014c194e3a4516be0c Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 12 Jul 2021 10:57:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetManagementSystem/Views/Ass_Acceptance/Form.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js index 0148359e4..88cbd0844 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js @@ -92,8 +92,8 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { $.each(tempdatra, function (key, val) { - if (tempdatra[key].AAIId === keyValue) { - pricecount -= tempdatra[key].AAIPrice; + if (val && val.AAIId === keyValue) { + pricecount -= val.AAIPrice; tempdatra.splice(key, 1); } }); @@ -258,9 +258,6 @@ var bootstrap = function ($, learun) { pricecount = 0; $.each(temprow, function (i, item) { - if (item.AIAssValue) { - pricecount = parseFloat(pricecount) + parseFloat(item.AIAssValue); - } var entity = { //AAICode: item.AICode, AAICode: item.AICodeNumJY, @@ -302,9 +299,8 @@ var bootstrap = function ($, learun) { //if (ifnewrow) { // tempdatra.push(temprow); //} - for (var i = 0; i < tempdatra.length; i++) { - //pricecount = parseFloat(pricecount) +parseFloat(tempdatra[i].TotalPrice); + pricecount = parseFloat(pricecount) + parseFloat(tempdatra[i].AAIPrice); } $("#TotalPrice").val(pricecount); $('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber));