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 @@
-
资产名称
- +
资产名称*
+
-
资产类别
-
+
资产类别*
+
资产来源
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.js index 88408af80..5d719d717 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormItem.js @@ -125,6 +125,9 @@ var bootstrap = function ($, learun) { } else { postData.MainId = learun.newGuid(); } + if (postData.AAIId) { + postData.AAIId = learun.newGuid(); + } if (!!callBack) { callBack(postData); return true; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs index c0795750d..a52536be8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AcceptanceMain/Ass_AcceptanceMainService.cs @@ -354,12 +354,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem insertassinfoitem.AICodeNum = i + 1; insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); - insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值 - insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位 - insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号 - insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家 - insertassinfoitem.AIUse = assinfoitem.AUse;//用途 - insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格 + insertassinfoitem.AIAssValue = assitemapp.AAIPrice;//价值 + insertassinfoitem.AIUnits = assitemapp.AAIUnit;//单位 + insertassinfoitem.AISpecificationtype = assitemapp.AAIModel;//型号 + insertassinfoitem.AIManufacturer = assitemapp.AAIManufacturer;//厂家 + insertassinfoitem.AIUse = assitemapp.AAIUse;//用途 + insertassinfoitem.AISpecification = assitemapp.AAISpecification;//规格 insertassinfoitem.AIASSName = assitemapp.AAIName; insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; insertassinfoitem.AIAssType = entity.AssType; @@ -417,12 +417,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem insertassinfoitem.AICodeNum = 1; insertassinfoitem.AICode = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); insertassinfoitem.AICodeNumJY = insertAss_AssetsInfo.ACode + "_" + insertassinfoitem.AICodeNum.ToString(); - insertassinfoitem.AIAssValue = assinfoitem.APrice;//价值 - insertassinfoitem.AIUnits = assinfoitem.AUnit;//单位 - insertassinfoitem.AISpecificationtype = assinfoitem.AModel;//型号 - insertassinfoitem.AIManufacturer = assinfoitem.AManufacturer;//厂家 - insertassinfoitem.AIUse = assinfoitem.AUse;//用途 - insertassinfoitem.AISpecification = assinfoitem.ASpecification;//规格 + insertassinfoitem.AIAssValue = assitemapp.AAIPrice;//价值 + insertassinfoitem.AIUnits = assitemapp.AAIUnit;//单位 + insertassinfoitem.AISpecificationtype = assitemapp.AAIModel;//型号 + insertassinfoitem.AIManufacturer = assitemapp.AAIManufacturer;//厂家 + insertassinfoitem.AIUse = assitemapp.AAIUse;//用途 + insertassinfoitem.AISpecification = assitemapp.AAISpecification;//规格 insertassinfoitem.AIASSName = assitemapp.AAIName; insertassinfoitem.AIIStorageId = assitemapp.AAIStorageId; insertassinfoitem.AIAssType = entity.AssType;