Browse Source

教材出库 删除未关闭窗口

教材入库 删除未关闭窗口
教材使用明细返回重复列表
临城职教中职
ndbs 2 years ago
parent
commit
ef21f9e693
4 changed files with 12 additions and 8 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  2. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js
  3. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js
  4. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs View File

@@ -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;
}


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js View File

@@ -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);
});
}
});


+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js View File

@@ -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]);
}


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs View File

@@ -136,13 +136,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
List<TextbookInOutEntity> returnList = new List<TextbookInOutEntity>();
TextbookInOutEntity InOutList = new TextbookInOutEntity();
//TextbookInOutEntity InOutList = new TextbookInOutEntity();
List<TextBookInEntity> InEntity = this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(x => x.InOutCode == keyValue).ToList();
List<TextBookOutEntity> OutEntity = this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(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;
}


Loading…
Cancel
Save