diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs index 9f942b47e..f91d2815c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoApplyController.cs @@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.AssetManagementSystem; using System.Web.Mvc; using System.Collections.Generic; using System; +using System.Linq; +using Learun.Application.Base.SystemModule; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -17,6 +19,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public class Ass_AssetsInfoApplyController : MvcControllerBase { private Ass_AssetsInfoApplyIBLL ass_AssetsInfoApplyIBLL = new Ass_AssetsInfoApplyBLL(); + private DataItemIBLL dataItemIbll = new DataItemBLL(); #region 视图功能 @@ -48,6 +51,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { return View(); } + /// + /// 打印清单 + /// + /// + [HttpGet] + public ActionResult Inventory() + { + return View(); + } [HttpGet] public ActionResult FormViewJY() { @@ -149,6 +161,42 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers }; return Success(jsonData); } + + + /// + /// 获取入库清单数据 + /// + /// 入库清单id + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetInventoryInfo(string applyId) + { + var applyEntity = ass_AssetsInfoApplyIBLL.GetAss_AssetsInfoApplyEntity(applyId); + var applyItemList = ass_AssetsInfoApplyIBLL.GetAss_AssetsInfoItemApplyList(applyId).ToList(); + var unitList = dataItemIbll.GetDetailList("sldw"); + var ItemList = new List(); + foreach (var item in applyItemList) + { + ItemList.Add(new + { + aOrder = applyItemList.IndexOf(item),//序号 + aName = item.AAIName,//名字 + aUnit = unitList.FirstOrDefault(a => a.F_ItemValue == item.AAIUnit)?.F_ItemName,//单位 + aNum = item.AAIStock, + aPrice = item.AAIPrice,//价格 + aAllPrice = item.AAIPrice * item.AAIStock,//总价格 + }); + } + var data = new + { + projectName = "", + list = ItemList + }; + + return Success(data); + } + #endregion #region 提交数据 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 cbf1b2a46..fa7797f8f 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 @@ -4,6 +4,8 @@ using Learun.Application.TwoDevelopment.AssetManagementSystem; using System.Web.Mvc; using System.Collections.Generic; using System; +using System.Linq; +using Learun.Application.Base.SystemModule; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -17,6 +19,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public class Ass_AssetsOutApplyController : MvcControllerBase { private Ass_AssetsOutApplyIBLL ass_AssetsOutApplyIBLL = new Ass_AssetsOutApplyBLL(); + private DataItemIBLL dataItemIbll=new DataItemBLL(); #region 视图功能 @@ -27,7 +30,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单查看页 @@ -48,6 +51,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers ViewBag.AOCode = "CKSQ_" + CommonHelper.CreateNo(); return View(); } + /// + /// 出库清单 + /// + /// + [HttpGet] + public ActionResult Inventory() + { + return View(); + } #endregion #region 获取数据 @@ -80,9 +92,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity( keyValue ); - var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList( Ass_AssetsOutApplyData.AOId ); - var jsonData = new { + var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity(keyValue); + var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(Ass_AssetsOutApplyData.AOId); + var jsonData = new + { Ass_AssetsOutApply = Ass_AssetsOutApplyData, Ass_AssetsOutItemApply = Ass_AssetsOutItemApplyData, }; @@ -96,9 +109,10 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers [AjaxOnly] public ActionResult GetFormDataByProcessId(string processId) { - var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetEntityByProcessId( processId ); - var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList( Ass_AssetsOutApplyData.AOId ); - var jsonData = new { + var Ass_AssetsOutApplyData = ass_AssetsOutApplyIBLL.GetEntityByProcessId(processId); + var Ass_AssetsOutItemApplyData = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(Ass_AssetsOutApplyData.AOId); + var jsonData = new + { Ass_AssetsOutApply = Ass_AssetsOutApplyData, Ass_AssetsOutItemApply = Ass_AssetsOutItemApplyData, }; @@ -106,6 +120,42 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers } #endregion + + /// + /// 获取出库清单数据 + /// + /// 出库单id + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetInventoryInfo(string applyId) + { + var outEntity = ass_AssetsOutApplyIBLL.GetAss_AssetsOutApplyEntity(applyId); + var outItem = ass_AssetsOutApplyIBLL.GetAss_AssetsOutItemApplyList(applyId).ToList(); + var unitList= dataItemIbll.GetDetailList("sldw"); + var ItemList = new List(); + foreach (var item in outItem) + { + ItemList.Add(new + { + aOrder = outItem.IndexOf(item),//序号 + aName = item.AOIName,//名字 + aUnit =unitList.FirstOrDefault(a=>a.F_ItemValue==item.AOIUnit)?.F_ItemName,//单位 + aNum = 1, + aPrice = item.AOIPrice,//价格 + aAllPrice = item.AOIPrice,//总价格 + }); + + } + + var data = new + { + projectName = outEntity.AOProjectName, + list = ItemList + }; + return Success(data); + } + #region 提交数据 /// @@ -135,7 +185,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers entity.AOOutStatus = 0; entity.AOCreateTime = DateTime.Now; List ass_AssetsOutItemApplyList = strass_AssetsOutItemApplyList.ToObject>(); - ass_AssetsOutApplyIBLL.SaveEntity(keyValue,entity,ass_AssetsOutItemApplyList); + ass_AssetsOutApplyIBLL.SaveEntity(keyValue, entity, ass_AssetsOutItemApplyList); return Success("保存成功!"); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs index a9142421a..04f654a08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_ReceiveController.cs @@ -3,6 +3,8 @@ using System.Data; using Learun.Application.TwoDevelopment.AssetManagementSystem; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; +using Learun.Application.Base.SystemModule; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -17,7 +19,8 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { private Ass_ReceiveIBLL ass_ReceiveIBLL = new Ass_ReceiveBLL(); private Ass_ReceiveItemIBLL assReceiveItemIbll = new Ass_ReceiveItemBLL(); - + private DataItemIBLL dataItemIbll = new DataItemBLL(); + private Ass_AssetsInfoIBLL assAssetsInfoIbll = new Ass_AssetsInfoBLL(); #region 视图功能 /// @@ -43,6 +46,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { return View(); } + [HttpGet] + public ActionResult Inventory() + { + return View(); + } #endregion #region 获取数据 @@ -104,6 +112,41 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers } #endregion + /// + /// 获取出库清单数据 + /// + /// 出库单id + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetInventoryInfo(string applyId) + { + var outItem = assReceiveItemIbll.GetList(applyId).ToList(); + var unitList = dataItemIbll.GetDetailList("sldw"); + var ItemList = new List(); + foreach (var item in outItem) + { + var entity = assAssetsInfoIbll.GetAss_AssetsInfoEntity(item.AID); + ItemList.Add(new + { + aOrder = outItem.IndexOf(item),//序号 + aName = entity.AName,//名字 + aUnit = unitList.FirstOrDefault(a => a.F_ItemValue == entity.AUnit)?.F_ItemName,//单位 + aNum = item.ANum, + aPrice = entity.APrice,//价格 + aAllPrice = entity.APrice * int.Parse(item.ANum),//总价格 + }); + + } + + var data = new + { + projectName = "", + list = ItemList + }; + return Success(data); + } + #region 提交数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml index 45d9dfae2..4e3c7b306 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.cshtml @@ -37,6 +37,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js index a2fd3ec3e..372be7a3f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Index.js @@ -202,6 +202,22 @@ var bootstrap = function ($, learun) { }); } }); + //打印清单 + $('#lr_inventory').on('click', + function() { + var keyValue = $('#gridtable').jfGridValue('AAId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formAss_AssetsOutApply', + title: '清单', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoApply/Inventory?keyValue=' + keyValue, + width: 1000, + height: 700, + callBack: function(id) { + } + }); + } + }); }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Inventory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Inventory.cshtml new file mode 100644 index 000000000..3ad4119a9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoApply/Inventory.cshtml @@ -0,0 +1,222 @@ +@{ + ViewBag.Title = "采购申请"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
打印
+ + + + + + + + + + + + + + + + + + + + + + + + + +
西昌民族幼专入库清单
入库日期2020年         月         日
序 号品 名规 格单 位数 量单 价金 额用 途
合计(人民币)大写:(人民币)小写:1333.00
+
+
项目负责人:
+
验收人:
+
+
+ +
+ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml index d630e3e49..b4433d291 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItemApply/Form.cshtml @@ -47,7 +47,7 @@
供应商
-
+
单价*
@@ -59,7 +59,7 @@
数量单位
-
+
排序*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Inventory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Inventory.cshtml new file mode 100644 index 000000000..cae7272a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Inventory.cshtml @@ -0,0 +1,233 @@ +@{ + ViewBag.Title = "出库清单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
打印
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
西昌民族幼专出库清单
部门项目名称
领用/出库日期2020年         月         日
序 号品 名规 格单 位数 量单 价金 额用 途
合计(人民币)大写:(人民币)小写:1333.00
+
+
项目负责人:
+
验收人:
+
领用人:
+
经办人:
+
+
+ +
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml index 3d3b4d4e0..aca7b1293 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Form.cshtml @@ -5,7 +5,7 @@
申请人
-
+
申请人部门
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml index 47f65aa7a..62608ff0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.cshtml @@ -20,6 +20,7 @@  编辑  删除  查看 +   打印清单  提交
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js index 797b70fcb..77dcd00e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Index.js @@ -156,6 +156,22 @@ var bootstrap = function ($, learun) { }); } }); + //打印清单 + $('#lr_inventory').on('click', + function() { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formAss_AssetsOutApply', + title: '清单', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Receive/Inventory?keyValue=' + keyValue, + width: 1000, + height: 700, + callBack: function(id) { + } + }); + } + }); }, // 初始化列表 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Inventory.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Inventory.cshtml new file mode 100644 index 000000000..6d622375b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Receive/Inventory.cshtml @@ -0,0 +1,235 @@ +@{ + ViewBag.Title = "出库清单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
打印
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
西昌民族幼专出库清单
部门项目名称
领用/出库日期2020年         月         日
序 号品 名规 格单 位数 量单 价金 额用 途
合计(人民币)大写:(人民币)小写:1333.00
+
+
项目负责人:
+
验收人:
+
领用人:
+
经办人:
+
+
+ +
+ 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 f28456852..67aa97bd2 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 @@ -6872,6 +6872,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs index eb78cd936..1b04330d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs @@ -283,8 +283,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); Ass_AssetsInfoItem.Create(); Ass_AssetsInfoItem.AId = entity.AId; + Ass_AssetsInfoItem.AIASSName = entity.AName; + Ass_AssetsInfoItem.AIAssValue = entity.APrice;//价值 + Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位 Ass_AssetsInfoItem.AICodeNum = i + 1; Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; + Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; Ass_AssetsInfoItem.AIIsInStorage = true; @@ -298,8 +302,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); Ass_AssetsInfoItem.Create(); Ass_AssetsInfoItem.AId = entity.AId; + Ass_AssetsInfoItem.AIASSName = entity.AName; + Ass_AssetsInfoItem.AIAssValue = entity.APrice; + Ass_AssetsInfoItem.AIUnits = entity.AUnit;//单位 Ass_AssetsInfoItem.AICodeNum = 1; Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; + Ass_AssetsInfoItem.AICodeNumJY = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; Ass_AssetsInfoItem.AIIsInStorage = false;