From ef21f9e6933609f77adf44bcd7566afd66711050 Mon Sep 17 00:00:00 2001 From: ndbs Date: Mon, 7 Mar 2022 19:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E6=9D=90=E5=87=BA=E5=BA=93=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9C=AA=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=20=E6=95=99=E6=9D=90=E5=85=A5=E5=BA=93=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=9C=AA=E5=85=B3=E9=97=AD=E7=AA=97=E5=8F=A3=20=E6=95=99?= =?UTF-8?q?=E6=9D=90=E4=BD=BF=E7=94=A8=E6=98=8E=E7=BB=86=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/TextbookInOutController.cs | 4 ++-- .../Views/TextBookIn/FormDelete.js | 4 +++- .../Views/TextBookOut/FormDelete.js | 7 ++++--- .../TextbookInOut/TextbookInOutService.cs | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs index 06aa8120d..6508f556d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs @@ -2,6 +2,7 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.Util; using System.Data; +using System.Linq; using System.Web.Mvc; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers @@ -120,7 +121,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetFormUseData(string keyValue) { var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue); - var TextBookInOutDetailData = textbookInOutIBLL.GetInOrOutEntity(TextBookInOutData.BookCode); + var TextBookInOutDetailData = textbookInOutIBLL.GetInOrOutEntity(TextBookInOutData.BookCode).OrderBy(x => x.CreateTime); var jsonData = new { TextBookInOut = TextBookInOutData, @@ -161,7 +162,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { entity.IsDel = 0; entity.IsSubmit = 0; - entity.FinallyNum = 0; entity.CreateTime = DateTime.Now; entity.CrateUserID = loginUserInfo.userId; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js index d6a277dca..d76f03857 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js @@ -50,7 +50,9 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/DeleteForm', { keyValue: NewkeyValue }, function () { - refreshGirdData(); + var index = top.layer.getFrameIndex(window.name); + console.log('index', index); + top.layer.close(index); }); } }); 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 3da830d6a..00b88cb23 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 @@ -101,8 +101,9 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认删除该项!', function (res, index) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/DeleteForm', { keyValue: NewkeyValue }, function () { - refreshGirdData(); - learun.layerClose(window.name); + var index = top.layer.getFrameIndex(window.name); + console.log('index', index); + top.layer.close(index); }); } }); @@ -112,7 +113,7 @@ var bootstrap = function ($, learun) { initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?keyValue=' + keyValue, function (data) { - for(var id in data) { + for (var id in data) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); } 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 320211875..5be074838 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 @@ -136,13 +136,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { List returnList = new List(); - TextbookInOutEntity InOutList = new TextbookInOutEntity(); + //TextbookInOutEntity InOutList = new TextbookInOutEntity(); List InEntity = this.BaseRepository("CollegeMIS").FindList(x => x.InOutCode == keyValue).ToList(); List OutEntity = this.BaseRepository("CollegeMIS").FindList(x => x.InOutCode == keyValue).ToList(); if (InEntity.Count() > 0 || OutEntity.Count() > 0) { for (int i = 0; i < InEntity.Count(); i++) { + TextbookInOutEntity InOutList = new TextbookInOutEntity(); InOutList.CKORRK = "入库"; InOutList.InorOut = InEntity[i].InOutCode; InOutList.BookCode = InEntity[i].BookCode; @@ -154,6 +155,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } for (int j = 0; j < OutEntity.Count(); j++) { + TextbookInOutEntity InOutList = new TextbookInOutEntity(); InOutList.CKORRK = "出库"; InOutList.InorOut = OutEntity[j].InOutCode; InOutList.BookCode = OutEntity[j].BookCode; @@ -163,7 +165,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration InOutList.Remark = OutEntity[j].Remark; returnList.Add(InOutList); } - returnList.OrderBy(x => x.CreateTime); } return returnList; }