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 @@