From f73eb4fe47126c6cf75e19f0777b14a8bcdc352e Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 16 Jul 2021 14:21:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E9=AA=8C=E6=94=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Ass_Acceptance/Form.js | 15 ++++++------ .../Views/Ass_Acceptance/FormItem.cshtml | 8 +++---- .../Views/Ass_Acceptance/FormItem.js | 3 +++ .../Ass_AcceptanceMainService.cs | 24 +++++++++---------- 4 files changed, 27 insertions(+), 23 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 5e4c93c5e..88ab13bf3 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 @@ -60,14 +60,14 @@ var bootstrap = function ($, learun) { var keyValue = $('#Ass_Acceptance').jfGridValue('AAIId'); var AAICode = $('#Ass_Acceptance').jfGridValue('AAICode'); selectedRow = $('#Ass_Acceptance').jfGridGet('rowdata'); - + if (learun.checkrow(AAICode)) { learun.layerForm({ id: 'formitem', title: '编辑明细', url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormItem?keyValue=' + keyValue, width: 860, - height: 600, + height: 500, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -81,20 +81,20 @@ var bootstrap = function ($, learun) { title: '新增明细', url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormItem', width: 860, - height: 600, + height: 500, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } }); }); $("#detaildel").on('click', function () { - var keyValue = $('#Ass_Acceptance').jfGridValue('AAIId'); + var keyValue = $('#Ass_Acceptance').jfGridValue('AAICode'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { $.each(tempdatra, function (key, val) { - if (val && val.AAIId === keyValue) { - pricecount -= val.AAIPrice; + if (val && val.AAICode === keyValue) { + pricecount -= (val.AAIPrice * val.AAIStock); tempdatra.splice(key, 1); } }); @@ -303,6 +303,7 @@ var bootstrap = function ($, learun) { // }); //var ifnewrow = true; + $.each(tempdatra, function (key, val) { if (tempdatra[key].AAICode === temprow.AAICode) { tempdatra[key] = temprow; @@ -319,7 +320,7 @@ var bootstrap = function ($, learun) { $('#Ass_Acceptance').jfGridSet('refreshdata', tempdatra.sort(sortNumber)); }; function sortNumber(a, b) { - return 1;//a.AAIOrder - b.AAIOrder; + return a.AAIOrder - b.AAIOrder; }; // 验证数据是否填写完整 validForm = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.cshtml index 7a3d6eccf..cc2c0e1d3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.cshtml @@ -8,12 +8,12 @@