From 2b206ddac355dc1bf1d50d1e5ecad3d0d0148540 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 10 Aug 2021 10:34:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=B5=84=E4=BA=A7=E4=B8=AD?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5=E6=9C=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ass_AssetsOutApplyController.cs | 13 ++++++++++++- .../Views/Ass_Acceptance/FormView.js | 10 ++++++++-- .../Views/Ass_AssetsOutApply/AssetsForm.cshtml | 2 +- .../Views/Ass_AssetsOutApply/AssetsForm.js | 1 + .../Ass_AssetsOutApply/AssetsFormView.cshtml | 2 +- .../Views/Ass_AssetsOutApply/AssetsIndex.js | 2 +- .../Views/Ass_AssetsOutApply/Form.cshtml | 2 +- .../Views/Ass_AssetsOutApply/FormView.cshtml | 2 +- .../Views/Ass_AssetsOutApply/Index.js | 2 +- .../Learun.Application.Web.csproj | 1 + .../Ass_AssetsOutApplyService.cs | 17 ++++++++--------- 11 files changed, 36 insertions(+), 18 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs index c78eeec23..e739dd47f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs @@ -184,11 +184,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers /// 保存实体数据(新增、修改) /// 主键 /// + /// ispl:是否批量调拨 /// [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] - public ActionResult SaveForm(string keyValue, string strEntity, string strass_AssetsOutItemApplyList) + public ActionResult SaveForm(string keyValue, string strEntity, string strass_AssetsOutItemApplyList, bool ispl = false) { Ass_AssetsOutApplyEntity entity = strEntity.ToObject(); if (string.IsNullOrEmpty(keyValue)) @@ -198,6 +199,16 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers entity.AOCreateTime = DateTime.Now; } List ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject>(); + if (ispl) + { + foreach (var item in ass_AssetsOutItemApplyList) + { + item.AOINewUsePeople = entity.AOINewUsePeople; + item.AOINewRoomId = entity.AOINewRoomId; + item.AOINewDepartment = entity.AOINewDepartment; + item.AOINewStorageId = entity.AOINewStorageId; + } + } ass_AssetsOutApplyIBLL.SaveEntity(keyValue, entity, ass_AssetsOutItemApplyList); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js index b1f1067b9..a86f109d8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js @@ -111,11 +111,17 @@ var bootstrap = function ($, learun) { // label: '资产型号', name: 'AAIModel', width: 100, align: 'left' //}, { - label: '规格型号', name: 'AAISpecification', width: 100, align: 'left' + label: '规格型号', name: 'AAIModel', width: 100, align: 'left' }, { label: '单位', name: 'AAIUnit', width: 80, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { - + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'sldw', + callback: function (_data) { + callback(_data.text); + } + }); } }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml index 02dc8e60c..6bac8ffeb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.cshtml @@ -52,7 +52,7 @@
-
项目名称
+
调拨名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js index 818108528..6d6005d69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsForm.js @@ -340,6 +340,7 @@ var bootstrap = function ($, learun) { formData.AOReasonType = 3; postData.strEntity = JSON.stringify(formData); postData.strass_AssetsOutItemApplyList = JSON.stringify($('#Ass_AssetsOutItemApply').jfGridGet('rowdatas')); + postData.ispl = true; $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.cshtml index d07637903..4faea1419 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.cshtml @@ -52,7 +52,7 @@
-
项目名称
+
调拨名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js index 5dc1c07e9..23a9bfd39 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js @@ -196,7 +196,7 @@ var bootstrap = function ($, learun) { // }); // } //}, - { label: "项目名称", name: "AOProjectName", width: 150, align: "left" }, + { label: "调拨名称", name: "AOProjectName", width: 150, align: "left" }, { label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, { label: "申请人", name: "AOCreateUserId", width: 100, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Form.cshtml index 7fad7456f..fa646dc8f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Form.cshtml @@ -36,7 +36,7 @@
-
项目名称
+
调拨名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml index 0329844b3..26c8a22cb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml @@ -28,7 +28,7 @@
-
项目名称
+
调拨名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js index c1be124c8..01c804d9f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js @@ -196,7 +196,7 @@ var bootstrap = function ($, learun) { // }); // } //}, - { label: "项目名称", name: "AOProjectName", width: 150, align: "left" }, + { label: "调拨名称", name: "AOProjectName", width: 150, align: "left" }, { label: "申请时间", name: "AOCreateTime", width: 150, align: "left" }, { label: "申请人", name: "AOCreateUserId", width: 100, align: "left", diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index ee26e9677..a8aca62f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -7397,6 +7397,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyService.cs index b1514ce82..db8f6018a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsOutApply/Ass_AssetsOutApplyService.cs @@ -209,14 +209,13 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem foreach (Ass_AssetsOutItemApplyEntity item in ass_AssetsOutItemApplyList) { - allPrice += item.AOIPrice.ToDecimal(); item.Create(); item.AOId = ass_AssetsOutApplyEntityTmp.AOId; - item.AOINewUsePeople = entity.AOINewUsePeople; - item.AOINewRoomId = entity.AOINewRoomId; - item.AOINewDepartment = entity.AOINewDepartment; - item.AOINewStorageId = entity.AOINewStorageId; + //item.AOINewUsePeople = entity.AOINewUsePeople; + //item.AOINewRoomId = entity.AOINewRoomId; + //item.AOINewDepartment = entity.AOINewDepartment; + //item.AOINewStorageId = entity.AOINewStorageId; db.Insert(item); } entity.AOPrice = allPrice; @@ -230,10 +229,10 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem item.Create(); allPrice += item.AOIPrice.ToDecimal(); item.AOId = entity.AOId; - item.AOINewUsePeople = entity.AOINewUsePeople; - item.AOINewRoomId = entity.AOINewRoomId; - item.AOINewDepartment = entity.AOINewDepartment; - item.AOINewStorageId = entity.AOINewStorageId; + //item.AOINewUsePeople = entity.AOINewUsePeople; + //item.AOINewRoomId = entity.AOINewRoomId; + //item.AOINewDepartment = entity.AOINewDepartment; + //item.AOINewStorageId = entity.AOINewStorageId; db.Insert(item); } entity.AOPrice = allPrice;