From 52dc145fba3034ac148392b6c828af2d3d10b3b2 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 26 Apr 2022 15:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E6=9D=90=E5=BA=93=E5=AD=98=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=B4=AF=E8=AE=A1=E5=87=BA=E5=BA=93=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E5=85=A5=E5=BA=93=E6=95=B0=E9=87=8F=20?= =?UTF-8?q?=E5=8F=8A=E5=8F=91=E7=8E=B0=E7=9A=84Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/TextBookIn/Index.js | 2 +- .../Views/TextBookOut/Form.js | 1 + .../Views/TextBookOut/FormDelete.js | 1 + .../Views/TextBookOut/FormView.js | 1 + .../Views/TextBookOut/Index.js | 2 +- .../Views/TextbookInOut/Index.js | 21 ++++++++++++------- .../Views/TextbookInOut/IndexInOut.js | 9 ++++---- .../TextBookIn/TextBookInService.cs | 3 ++- .../TextBookOut/TextBookOutService.cs | 5 ++++- .../TextbookInOut/TextbookInOutEntity.cs | 13 ++++++++++++ .../TextbookInOut/TextbookInOutService.cs | 15 ++++++++++--- 11 files changed, 53 insertions(+), 20 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js index 4117cd9cc..ca62c60e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js @@ -101,7 +101,7 @@ var bootstrap = function ($, learun) { { label: '出版社', name: 'Publisher', width: 200, align: "left" }, { label: '版次', name: 'Edition', width: 200, align: "left" }, { label: '印次', name: 'Impression', width: 200, align: "left" }, - { label: '创建人', name: 'CreateTime', width: 200, align: "left" }, + { label: '创建时间', name: 'CreateTime', width: 200, align: "left" }, { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" }, { label: '修改人', name: 'UpTime', width: 200, align: "left" }, { label: '修改用户', name: 'UpUserID', width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js index 786bf7c40..ee2caaddd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js @@ -64,6 +64,7 @@ var bootstrap = function ($, learun) { $('#TextBookOut').jfGrid({ headData: [ { label: '出库单', name: 'BookCode', width: 180, align: 'left' }, + { label: '数量', name: 'Variate', width: 100, align: 'left' }, { label: "专业部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js index 00b88cb23..966f1e12b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js @@ -31,6 +31,7 @@ var bootstrap = function ($, learun) { $('#TextBookOut').jfGrid({ headData: [ { label: '出库单', name: 'BookCode', width: 180, align: 'left' }, + { label: '数量', name: 'Variate', width: 100, align: 'left' }, { label: "专业部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js index d73fcf0d0..b691b41ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js @@ -34,6 +34,7 @@ var bootstrap = function ($, learun) { $('#TextBookOut').jfGrid({ headData: [ { label: '出库单', name: 'BookCode', width: 180, align: 'left' }, + { label: '数量', name: 'Variate', width: 100, align: 'left' }, { label: "专业部", name: "DeptNo", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js index a2a3c6cba..414117110 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js @@ -135,7 +135,7 @@ var bootstrap = function ($, learun) { { label: '出版社', name: 'Publisher', width: 200, align: "left" }, { label: '版次', name: 'Edition', width: 200, align: "left" }, { label: '印次', name: 'Impression', width: 200, align: "left" }, - { label: '创建人', name: 'CreateTime', width: 200, align: "left" }, + { label: '创建时间', name: 'CreateTime', width: 200, align: "left" }, { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" }, { label: '修改人', name: 'UpTime', width: 200, align: "left" }, { label: '修改用户', name: 'UpUserID', width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js index b14b3e7c6..bb455e207 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js @@ -93,7 +93,7 @@ var bootstrap = function ($, learun) { }); }, initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').lrAuthorizeJfGridLei({ url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList', headData: [ { label: '库存单号', name: 'BookCode', width: 200, align: "left" }, @@ -115,15 +115,20 @@ var bootstrap = function ($, learun) { { label: '出版号', name: 'PublishNo', width: 200, align: "left" }, { label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" }, { label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" }, - //{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" }, { label: '出版社', name: 'Publisher', width: 200, align: "left" }, - { label: '版次', name: 'Edition', width: 200, align: "left" }, - { label: '印次', name: 'Impression', width: 200, align: "left" }, - { label: '创建人', name: 'CreateTime', width: 200, align: "left" }, + { label: '版次', name: 'Edition', width: 100, align: "left" }, + { label: '印次', name: 'Impression', width: 100, align: "left" }, + { label: '创建时间', name: 'CreateTime', width: 200, align: "left" }, { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" }, - { label: '修改人', name: 'UpTime', width: 200, align: "left" }, - { label: '修改用户', name: 'UpUserID', width: 200, align: "left" }, - { label: '当前数量', name: 'FinallyNum', width: 200, align: "left" }, + { label: '当前数量', name: 'FinallyNum', width: 100, align: "left" }, + { label: '累计入库数量', name: 'RKNum', width: 100, align: "left" }, + { label: '累计出库数量', name: 'CKNum', width: 100, align: "left" }, + { + label: '是否提交', name: 'IsSubmit', width: 100, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "是" : "否"; + } + }, { label: '备注', name: 'Remark', width: 200, align: "left" }, ], diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js index 5675d2c7d..e8df7f57f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexInOut.js @@ -39,7 +39,7 @@ var bootstrap = function ($, learun) { }); }, initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').lrAuthorizeJfGridLei({ url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList', headData: [ { label: '库存单号', name: 'BookCode', width: 200, align: "left" }, @@ -61,15 +61,14 @@ var bootstrap = function ($, learun) { { label: '出版号', name: 'PublishNo', width: 200, align: "left" }, { label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" }, { label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" }, - //{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" }, { label: '出版社', name: 'Publisher', width: 200, align: "left" }, { label: '版次', name: 'Edition', width: 200, align: "left" }, { label: '印次', name: 'Impression', width: 200, align: "left" }, - { label: '创建人', name: 'CreateTime', width: 200, align: "left" }, + { label: '创建时间', name: 'CreateTime', width: 200, align: "left" }, { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" }, - { label: '修改人', name: 'UpTime', width: 200, align: "left" }, - { label: '修改用户', name: 'UpUserID', width: 200, align: "left" }, { label: '当前数量', name: 'FinallyNum', width: 200, align: "left" }, + { label: '累计入库数量', name: 'RKNum', width: 100, align: "left" }, + { label: '累计出库数量', name: 'CKNum', width: 100, align: "left" }, { label: '备注', name: 'Remark', width: 200, align: "left" }, ], diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs index 5be7cff4e..a22c832f0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs @@ -225,7 +225,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration textbookInList[i].Impression = entity.Impression; variate += textbookInList[i].variate; } - this.BaseRepository("CollegeMIS").Insert(textbookInList); + db.Insert(textbookInList); if (variate != 0 && variate > 0) { @@ -233,6 +233,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (newtextInOutEntity != null) { newtextInOutEntity.FinallyNum += variate; + newtextInOutEntity.RKNum += variate; db.Update(newtextInOutEntity); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs index bf44e3788..f52b88eae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs @@ -259,7 +259,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration textbookOutList[i].Impression = entity.Impression; variate += textbookOutList[i].Variate; } - this.BaseRepository("CollegeMIS").Insert(textbookOutList); + + db.Insert(textbookOutList); if (variate != 0 && variate > 0) { @@ -267,6 +268,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (newtextInOutEntity != null) { newtextInOutEntity.FinallyNum -= variate; + newtextInOutEntity.CKNum += variate; + if (newtextInOutEntity.FinallyNum > 0 || newtextInOutEntity.FinallyNum == 0) { db.Update(newtextInOutEntity); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs index 645228264..9589c2294 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs @@ -152,6 +152,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public string CKORRK { get; set; } + + /// + /// 累计出库 + /// + /// + [Column("CKNUM")] + public decimal? CKNum { get; set; } + /// + /// 累计入库 + /// + /// + [Column("RKNUM")] + public decimal? RKNum { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs index 76fb1ee92..49055a6e5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs @@ -160,8 +160,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration InOutList.InorOut = OutEntity[j].InOutCode; InOutList.BookCode = OutEntity[j].BookCode; InOutList.variate = OutEntity[j].Variate; - InOutList.CreateTime = InEntity[j].CreateTime; - InOutList.CrateUserID = InEntity[j].CrateUserID; + InOutList.CreateTime = OutEntity[j].CreateTime; + InOutList.CrateUserID = OutEntity[j].CrateUserID; InOutList.Remark = OutEntity[j].Remark; returnList.Add(InOutList); } @@ -233,6 +233,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration else { entity.Create(); + entity.CKNum = 0; + entity.RKNum = 0; this.BaseRepository("CollegeMIS").Insert(entity); } } @@ -263,7 +265,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var entity = BaseRepository("CollegeMIS").FindEntity(x => x.ID == item); entity.IsSubmit = 1; + //添加入库总数 + entity.RKNum += entity.FinallyNum; db.Update(entity); + #region 将本次记录保存出库单 TextBookInEntity InEntity = new TextBookInEntity { ID = Guid.NewGuid().ToString(), @@ -279,8 +284,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration Publisher = entity.Publisher, Edition = entity.Edition, Impression = entity.Impression, - variate = entity.FinallyNum + variate = entity.FinallyNum, + CreateTime = DateTime.Now, + CrateUserID = "system", + Remark = "初始数据删除需谨慎" }; + #endregion db.Insert(InEntity); } db.Commit();