Browse Source

教材管理

金隅分支
zhangli 2 years ago
parent
commit
00d9658f9c
100 changed files with 11064 additions and 0 deletions
  1. +167
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs
  2. +197
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs
  3. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs
  4. +166
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs
  5. +168
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs
  6. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
  7. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubDetailController.cs
  8. +192
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  9. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml
  10. +163
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.js
  11. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.cshtml
  12. +132
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js
  13. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml
  14. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js
  15. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml
  16. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.js
  17. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml
  18. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  19. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Form.cshtml
  20. +112
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Form.js
  21. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.cshtml
  22. +97
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.js
  23. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.cshtml
  24. +146
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.js
  25. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.cshtml
  26. +92
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js
  27. +86
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml
  28. +273
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js
  29. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml
  30. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.js
  31. +74
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.cshtml
  32. +270
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.js
  33. +67
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml
  34. +140
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js
  35. +61
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.cshtml
  36. +288
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js
  37. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.cshtml
  38. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.js
  39. +79
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml
  40. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js
  41. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml
  42. +243
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js
  43. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.cshtml
  44. +202
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js
  45. +54
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.cshtml
  46. +162
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js
  47. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormOut.cshtml
  48. +122
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormOut.js
  49. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.cshtml
  50. +174
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js
  51. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.cshtml
  52. +163
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js
  53. +84
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Form.cshtml
  54. +96
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Form.js
  55. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Index.cshtml
  56. +188
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Index.js
  57. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Form.cshtml
  58. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Form.js
  59. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Index.cshtml
  60. +88
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Index.js
  61. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  62. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  63. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInMap.cs
  64. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentDetailMap.cs
  65. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs
  66. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs
  67. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookOutMap.cs
  68. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubDetailMap.cs
  69. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubMap.cs
  70. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs
  71. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  72. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInBLL.cs
  73. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInEntity.cs
  74. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInIBLL.cs
  75. +258
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs
  76. +217
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs
  77. +146
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs
  78. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs
  79. +340
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs
  80. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs
  81. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs
  82. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs
  83. +199
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs
  84. +169
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs
  85. +155
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs
  86. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs
  87. +255
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs
  88. +167
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutBLL.cs
  89. +160
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutEntity.cs
  90. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutIBLL.cs
  91. +303
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs
  92. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs
  93. +158
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
  94. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs
  95. +180
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs
  96. +144
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailBLL.cs
  97. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailEntity.cs
  98. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailIBLL.cs
  99. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailService.cs
  100. +216
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs

+ 167
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs View File

@@ -0,0 +1,167 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInController : MvcControllerBase
{
private TextBookInIBLL textBookInIBLL = new TextBookInBLL();
private TextBookInOutIBLL textBookInOutIBLL = new TextbookInOutBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 入库表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormIn()
{
ViewBag.BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 明细查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
/// <summary>
/// 明细删除
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDelete()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookInIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var TextBookInData = textBookInIBLL.GetInEntity(TextBookInOutData.BookCode);

var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookIn = TextBookInData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataEdit(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookInIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity, string strTextBookInList)
{
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
List<TextBookInEntity> textBookInList = strTextBookInList.ToObject<List<TextBookInEntity>>();
textBookInIBLL.SaveEntity(keyValue, entity, textBookInList);
return Success("保存成功!");
}
#endregion

}
}

+ 197
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs View File

@@ -0,0 +1,197 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentController : MvcControllerBase
{
private TextBookIndentIBLL textBookIndentIBLL = new TextBookIndentBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 审批页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
/// <summary>
/// 明细
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDetail()
{
return View();
}
/// <summary>
/// 查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormLook()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookIndentIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookIndentData = textBookIndentIBLL.GetTextBookIndentEntity(keyValue);
var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);

var jsonData = new
{
TextBookIndent = TextBookIndentData,
TextBookIndentDetail = TextBookIndentDetailData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var TextBookIndentData = textBookIndentIBLL.GetEntityByProcessId(processId);
var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);
var jsonData = new
{
TextBookIndent = TextBookIndentData,
TextBookIndentDetail = TextBookIndentDetailData,
};
return Success(jsonData);
}


/// <summary>
/// 学年下拉框(四位)
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetAcademicYear()
{
var data = WebHelper.GenerateNearByYear();
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookIndentIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity,string strTextBookIndentDetailList)
{
TextBookIndentEntity entity = strEntity.ToObject<TextBookIndentEntity>();
List<TextBookIndentDetailEntity> textBookIndentDetail = strTextBookIndentDetailList.ToObject<List<TextBookIndentDetailEntity>>();
textBookIndentIBLL.SaveEntity(keyValue, entity, textBookIndentDetail);
return Success("保存成功!");
}
#endregion

#region 扩展数据
/// <summary>
/// 提交订单
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ModifyStatus(string keyValue, string processId)
{
textBookIndentIBLL.ModifyStatus(keyValue, processId);
return Success("操作成功!");
}
#endregion

}
}

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs View File

@@ -0,0 +1,120 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailController : MvcControllerBase
{
private TextBookIndentDetailIBLL textBookIndentDetailIBLL = new TextBookIndentDetailBLL();
#region 视图功能

/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDetail()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson )
{
var data = textBookIndentDetailIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookIndentDetailIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var data = textBookIndentDetailIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookIndentDetailIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue,TextBookIndentDetailEntity entity)
{
textBookIndentDetailIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion
}
}

+ 166
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs View File

@@ -0,0 +1,166 @@
using System;
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using NPOI.SS.Util;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoController : MvcControllerBase
{
private TextBookInfoIBLL textBookInfoIBLL = new TextBookInfoBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookInfoIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInfoData = textBookInfoIBLL.GetTextBookInfoEntity(keyValue);
var jsonData = new
{
TextBookInfo = TextBookInfoData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookInfoIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
TextBookInfoEntity entity = strEntity.ToObject<TextBookInfoEntity>();

if (string.IsNullOrEmpty(keyValue))
{
entity.IsValid = true;
entity.IsDel = 0;
}
else
{
entity.UpdateUserID = LoginUserInfo.Get().userId;
entity.Updatetime = DateTime.Now;
}

var RepetitionList = textBookInfoIBLL.GetRepetitions(keyValue, entity.TextBookNo, entity.TextBookName, entity.PublishNo, entity.DeptNo, entity.Publisher, entity.TextBookNature, entity.TextBookType, entity.Edition, entity.Impression);

if (RepetitionList != null)
{
return Fail("保存失败请检查数据有重复项!");
}
else
{
textBookInfoIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
}
#endregion

#region 扩展数据

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult EnableEntity(string keyValue, string IsValid)
{
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid);
return Success("启用成功!");
}

/// <summary>
/// 禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DisableEntity(string keyValue, string IsValid)
{
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid);
return Success("禁用成功!");
}
#endregion
}
}

+ 168
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs View File

@@ -0,0 +1,168 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutController : MvcControllerBase
{
private TextBookOutIBLL textBookOutIBLL = new TextBookOutBLL();
private TextBookInOutIBLL textBookInOutIBLL = new TextbookInOutBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 入库表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormOut()
{
ViewBag.BookCode = "CK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 明细查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
/// <summary>
/// 明细删除
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDelete()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookOutIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var TextBookOutData = textBookOutIBLL.GetListByCode(TextBookInOutData.BookCode);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookOut = TextBookOutData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataEdit(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookOutIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity, string strTextBookOutList)
{
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
List<TextBookOutEntity> textBookOutList = strTextBookOutList.ToObject<List<TextBookOutEntity>>();
textBookOutIBLL.SaveEntity(keyValue, entity, textBookOutList);
if (keyValue != null)
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs View File

@@ -0,0 +1,121 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubController : MvcControllerBase
{
private TextBookSolSubIBLL textBookSolSubIBLL = new TextBookSolSubBLL();
private TextBookSolSubDetailIBLL textBookSolSubDetailIBLL = new TextBookSolSubDetailBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookSolSubIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookSolSubData = textBookSolSubIBLL.GetTextBookSolSubEntity(keyValue);
var textBookSolSubDetailData = textBookSolSubDetailIBLL.GetListBySolSubId(TextBookSolSubData.ID);
var jsonData = new
{
TextBookSolSub = TextBookSolSubData,
TextBookSolSubDetail = textBookSolSubDetailData
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookSolSubIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
TextBookSolSubEntity entity = strEntity.ToObject<TextBookSolSubEntity>();
textBookSolSubIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubDetailController.cs View File

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailController : MvcControllerBase
{
private TextBookSolSubDetailIBLL textBookSolSubDetailIBLL = new TextBookSolSubDetailBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookSolSubDetailIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookSolSubDetailData = textBookSolSubDetailIBLL.GetTextBookSolSubDetailEntity( keyValue );
var jsonData = new {
TextBookSolSubDetail = TextBookSolSubDetailData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookSolSubDetailIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
TextBookSolSubDetailEntity entity = strEntity.ToObject<TextBookSolSubDetailEntity>();
textBookSolSubDetailIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

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

@@ -0,0 +1,192 @@
using System;
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
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextBookInOutController : MvcControllerBase
{
private TextBookInOutIBLL textbookInOutIBLL = new TextbookInOutBLL();

#region 视图功能

/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormUse()
{
return View();
}
/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexInOut()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = textbookInOutIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textbookInOutIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormUseData(string keyValue)
{
var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue);
var TextBookInOutDetailData = textbookInOutIBLL.GetInOrOutEntity(TextBookInOutData.BookCode).OrderBy(x => x.CreateTime);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookInOrOut = TextBookInOutDetailData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textbookInOutIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
var loginUserInfo = LoginUserInfo.Get();
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.IsDel = 0;
entity.IsSubmit = 0;
entity.CreateTime = DateTime.Now;
entity.CrateUserID = loginUserInfo.userId;
}
else
{
entity.UpTime = DateTime.Now;
entity.UpUserID = loginUserInfo.userId;
}
textbookInOutIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SubmitForm(string keyValue)
{
textbookInOutIBLL.SubmitEntity(keyValue);
return Success("删除成功!");
}
#endregion

}
}

+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml View File

@@ -0,0 +1,56 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="添加入库单" />
@*<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />*@
<input id="detaildel" type="button" class="btn btn-danger" value="移除入库单" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIn"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/Form.js")

+ 163
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.js View File

@@ -0,0 +1,163 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIn',
title: '申请入库',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormIn',
width: 500,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
//$("#detailedit").on('click', function () {
// var keyValue = $('#TextBookIn').jfGridValue('ID');
// selectedRow = $('#TextBookIn').jfGridGet('rowdata');
// if (learun.checkrow(keyValue)) {
// learun.layerForm({
// id: 'formTextBookIn',
// title: '修改入库单',
// url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormIn?keyValue=' + keyValue,
// width: 600,
// height: 350,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
// }
//});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookIn').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
// order -= tempdatra[key].TeachSum + tempdatra[key].StuSum;
tempdatra.splice(key, 1);
}
});
$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookIn').jfGrid({
headData: [
{ label: '入库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '入库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '入库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataEdit?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIn' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookIn').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含入库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookInList = JSON.stringify($('#TextBookIn').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.cshtml View File

@@ -0,0 +1,55 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
@*<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />*@
<input id="detaildel" type="button" class="btn btn-danger" value="删除入库单" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIn"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.js")

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

@@ -0,0 +1,132 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
var DelkeyValue = request('DelkeyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookIn').jfGrid({
headData: [
{ label: '入库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '入库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '入库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
$("#detaildel").on('click', function () {
var NewkeyValue = $('#TextBookIn').jfGridValue('ID');
if (learun.checkrow(NewkeyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/DeleteForm', { keyValue: NewkeyValue }, function () {
var index = top.layer.getFrameIndex(window.name);
console.log('index', index);
top.layer.close(index);
});
}
});
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIn' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookIn').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含入库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookInList = JSON.stringify($('#TextBookIn').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml View File

@@ -0,0 +1,30 @@
@{
ViewBag.Title = "教材入库";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var InBookCode = "@ViewBag.BookCode";
</script>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="TextBookIn">
<div class="lr-form-item-title">入库单<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIn">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="variate" type="number" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">创建人<font face="宋体">*</font></div>
<input id="CrateUserID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">创建时间<font face="宋体">*</font></div>
<input id="CreateTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="DateTime" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#CreateTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js")

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js View File

@@ -0,0 +1,57 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-03 10:15
* 描 述:教材入库
*/
var acceptClick;
var keyValue = request('keyValue');

var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {

},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
} else {
$("#BookCode").val(InBookCode);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = $('body').lrGetFormData();
if (!!keyValue) {
if (!!selectedRow) {
postData.ID = selectedRow.ID;
}
} else {
postData.ID = learun.newGuid();
}
if (!!callBack) {
callBack(postData);
return true;
}
};
page.init();
}

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml View File

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIn"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/FormView.js")

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.js View File

@@ -0,0 +1,117 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookIn').jfGrid({
headData: [
{ label: '入库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '入库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '入库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIn' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookIn').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含入库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookInList = JSON.stringify($('#TextBookIn').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml View File

@@ -0,0 +1,36 @@
@{
ViewBag.Title = "教材入库";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材入库</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材明细查看</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除明细</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/Index.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js View File

@@ -0,0 +1,128 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-03 10:15
* 描 述:教材入库
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 入库
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/Form?keyValue=' + keyValue,
width: 800,
height: 800,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormView?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formdelete',
title: '删除明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormDelete?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', 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: '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: 'Remark', width: 200, align: "left" },

],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = ' and IsSubmit =1 ';
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Form.cshtml View File

@@ -0,0 +1,58 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var BookCode = "@ViewBag.BookCode";
</script>
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存编码<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">教材<font face="宋体">*</font></div>
<input id="TextBookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">印次</div>
<input id="Impression" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="FinallyNum" type="number" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/Form.js")

+ 112
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Form.js View File

@@ -0,0 +1,112 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
height: 800,
width: 1100,
selectWord: 'textbookname',
value: 'textbookname',
text: 'textbookname',
headData:
[
{ label: "教材号", name: "publishno", width: 150, align: "left" },
{ label: "教材编码", name: "textbookno", width: 150, align: "left" },
{ label: "教材名称", name: "textbookname", width: 150, align: "left" },
{ label: "作者", name: "firstauthor", width: 150, align: "left" },
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" },
{ label: "出版日期", name: "pubdate", width: 100, align: "left" },
{ label: "出版社", name: "publisher", width: 100, align: "left" },
{
label: "教材类型", name: "textbooktype", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "textbooknature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "price", width: 50, align: "left" },
{ label: "版次", name: "edition", width: 100, align: "left" },
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
////赋值
$("#Price").val(item.price);
$("#PublishNo").val(item.publishno);
$("#TextBookNo").val(item.textbookno);
$("#TextBookName").val(item.textbookname);
$("#FirstAuthor").val(item.firstauthor);
$("#OtherAuthor").val(item.otherauthor);
$("#Publisher").val(item.publisher);
$("#Edition").val(item.edition);
$("#Impression").val(item.impression);
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
} else {
$("#BookCode").val(BookCode);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.cshtml View File

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookInOrOut"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.js")


+ 97
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.js View File

@@ -0,0 +1,97 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookInOrOut').jfGrid({
headData: [
{ label: '出/入库', name: 'CKORRK', width: 180, align: 'left' },
{ label: '库存单', name: 'InorOut', width: 180, align: 'left' },
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '出/入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '出库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '出库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetFormUseData?keyValue=' + keyValue, function (data) {
console.log(data,123123)
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookInOrOut').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookInOrOut' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
page.init();
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.cshtml View File

@@ -0,0 +1,32 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout">
<div class="lr-layout-center ">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a> </div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/Index.js")

+ 146
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.js View File

@@ -0,0 +1,146 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/Form',
width: 700,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,不可编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/Form?keyValue=' + keyValue,
width: 700,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,不可删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/DeleteForm', { keyValue: keyValue }, function () {
});
}
});
}
});
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsSubmit = $('#gridtable').jfGridValue('IsSubmit');
if (IsSubmit == 1) {
learun.alert.warning("当前项目已提交,请勿重复提交!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInOut/SubmitForm', { keyValue: keyValue }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ 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: '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: 'Remark', width: 200, align: "left" },

],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = 'and IsDel = 0 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.cshtml View File

@@ -0,0 +1,30 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout">
<div class="lr-layout-center ">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;明细查看</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js")

+ 92
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js View File

@@ -0,0 +1,92 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/FormUse?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ 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: '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: 'Remark', width: 200, align: "left" },

],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = 'and IsDel = 0 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 86
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml View File

@@ -0,0 +1,86 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
@Html.AppendCssFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.css")
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js")
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div>
<div id="TextBookName" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">单价</div>
<input id="Price" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">订购数量</div>
<input id="OrderNum" type="number" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIndentDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/Form.js")

+ 273
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js View File

@@ -0,0 +1,273 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();
var order = 0;

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '新增明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail',
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detailedit").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '编辑明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail?keyValue=' + keyValue,
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
order = 0;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
// order -= tempdatra[key].TeachSum + tempdatra[key].StuSum;
tempdatra.splice(key, 1);
} else {
order += (parseInt(tempdatra[key].TeachSum) + parseInt(tempdatra[key].StuSum));
}
});
$("#OrderNum").val(order);
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#TextBookIndentDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
height: 800,
width: 1100,
selectWord: 'textbookname',
value: 'textbookname',
text: 'textbookname',
headData:
[
{ label: "教材号", name: "publishno", width: 150, align: "left" },
{ label: "教材名称", name: "textbookname", width: 150, align: "left" },
{ label: "作者", name: "firstauthor", width: 150, align: "left" },
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" },
{ label: "出版社", name: "publisher", width: 100, align: "left" },
{
label: "教材类型", name: "textbooktype", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "textbooknature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "price", width: 50, align: "left" },
{ label: "版次", name: "edition", width: 100, align: "left" },
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
////赋值
$("#Price").val(item.price);
$("#PublishNo").val(item.publishno);
$("#FirstAuthor").val(item.firstauthor);
$("#TextBookName").val(item.textbookname);
$("#OtherAuthor").val(item.otherauthor);
$("#Publisher").val(item.publisher);
$("#Edition").val(item.edition);
}
});
$('#Status').val(0);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
//if (data[id].AAPrice) {
// pricecount = data[id].AAPrice;
//}
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}
//订购数量
order = 0;
for (var i = 0; i < tempdatra.length; i++) {
order += (parseInt(tempdatra[i].TeachSum) + parseInt(tempdatra[i].StuSum));
}
$("#OrderNum").val(order);

$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
function sortNumber(a, b) {
return a.StuSum - b.StuSum;
}
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIndent' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
if (!$('.lr-form-wrap').lrValidform()) {
return false;
}
var datas = $('#TextBookIndentDetail').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含明细!请先新增明细!");
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var postData = {};
var formData = $('[data-table="TextBookIndent"]').lrGetFormData();
if (!!processId) {
formData.processId = processId;
}
postData.strEntity = JSON.stringify(formData);
postData.strTextBookIndentDetailList = JSON.stringify($('#TextBookIndentDetail').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
};
page.init();
}

+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml View File

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "TextBookIndentDetail";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">教师人数<font face="宋体">*</font></div>
<input id="TeachSum" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生人数<font face="宋体">*</font></div>
<input id="StuSum" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.js View File

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-27 09:35
* 描 述:TextBookIndentDetail
*/
var acceptClick;
var keyValue = request('keyValue');
var selectedRow;
var bootstrap = function ($, learun) {
"use strict";
selectedRow = top["layer_formTextBookIndent"].selectedRow;
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
//$("#ID").lrlayerselect({
// dataUrl: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetList',
// dataTreeId: 'ID',
// dataValueId: 'ID',
// dataTextId: 'ID',
// grid: [
// {
// label: "班级", name: "ClassNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
// key: value,
// keyId: 'classno',
// callback: function (_data) {
// callback(_data['classname']);
// }
// });
// }
// },
// { label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
// { label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
// { label: '备注', name: 'Remark', width: 100, align: 'left' },
// ],
// select: function (values, texts) {
// if (values && values.length > 0) {
// //绑定
// //$("#AAITId").attr("readonly", "readonly");
// //$("#AAICode").attr("readonly", "readonly");
// //$("#AAIName").attr("readonly", "readonly");
// //$("#AAIUnit").attr("readonly", "readonly");
// //$("#AAIHasDetail").attr("readonly", "readonly");
// $.lrSetForm(top.$.rootUrl + '/TextBookIndentDetail/TextBookIndent/GetFormData?keyValue=' + values[0], function (data) {
// console.log("data" + data.extBookIndentDetailList);
// data = data.extBookIndentDetailList;
// console.log("data" + data)
// $('#ID').lrselectSet(data.IndentId);
// $('#ClassNo').val(data.ClassNo);
// $('#TeachSum').val(data.TeachSum);
// $('#StuSum').lrselectSet(data.StuSum);
// //$('#AAIHasDetail').lrselectSet(data.HasDetail);
// //$('#AAIEName').val(data.AEName);
// //$('#AAIModel').val(data.AModel);
// //$('#AAIManufacturer').val(data.AManufacturer);
// //$('#AAISpecification').val(data.ASpecification);
// });
// }
// },
// unknowselect: function () {
// $('#ID').lrselectSet("");
// $('#ClassNo').val("");
// $('#TeachSum').val("");
// $('#StuSum').lrselectSet("");
// },
// isMultiple: false
//});
},
initData: function () {
if (!!keyValue) {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
//$("#ID").find('span').text(selectedRow.IndentId);
}
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = $('body').lrGetFormData();
if (!!keyValue) {
if (!!selectedRow) {
postData.ID = selectedRow.ID;
}
} else {
postData.ID = learun.newGuid();
}
if (!!callBack) {
callBack(postData);
return true;
}
};
page.init();
}

+ 74
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.cshtml View File

@@ -0,0 +1,74 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
@Html.AppendCssFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.css")
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js")
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div>
<div id="TextBookName" isvalid="yes" checkexpession="NotNull" readonly ></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">订购数量</div>
<input id="OrderNum" type="number" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>*@
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIndentDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.js")

+ 270
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormLook.js View File

@@ -0,0 +1,270 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();
var order = 0;

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '新增明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail',
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detailedit").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '编辑明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail?keyValue=' + keyValue,
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
order = 0;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
// order -= tempdatra[key].TeachSum + tempdatra[key].StuSum;
tempdatra.splice(key, 1);
} else {
order += (parseInt(tempdatra[key].TeachSum) + parseInt(tempdatra[key].StuSum));
}
});
$("#OrderNum").val(order);
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#TextBookIndentDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
height: 800,
width: 1100,
selectWord: 'textbookname',
value: 'textbookname',
text: 'textbookname',
headData:
[
{ label: "教材号", name: "publishno", width: 150, align: "left" },
{ label: "教材名称", name: "textbookname", width: 150, align: "left" },
{ label: "作者", name: "firstauthor", width: 150, align: "left" },
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" },
{ label: "出版社", name: "publisher", width: 100, align: "left" },
{
label: "教材类型", name: "textbooktype", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "textbooknature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "price", width: 50, align: "left" },
{ label: "版次", name: "edition", width: 100, align: "left" },
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
////赋值
$("#PublishNo").val(item.publishno);
$("#FirstAuthor").val(item.firstauthor);
$("#TextBookName").val(item.textbookname);
$("#OtherAuthor").val(item.otherauthor);
}
});
$('#Status').val(0);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
//if (data[id].AAPrice) {
// pricecount = data[id].AAPrice;
//}
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}
//订购数量
order = 0;
for (var i = 0; i < tempdatra.length; i++) {
order += (parseInt(tempdatra[i].TeachSum) + parseInt(tempdatra[i].StuSum));
}
$("#OrderNum").val(order);

$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
function sortNumber(a, b) {
return a.StuSum - b.StuSum;
}
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIndent' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
if (!$('.lr-form-wrap').lrValidform()) {
return false;
}
var datas = $('#TextBookIndentDetail').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含明细!请先新增明细!");
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var postData = {};
var formData = $('[data-table="TextBookIndent"]').lrGetFormData();
if (!!processId) {
formData.processId = processId;
}
postData.strEntity = JSON.stringify(formData);
postData.strTextBookIndentDetailList = JSON.stringify($('#TextBookIndentDetail').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
};
page.init();
}

+ 67
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml View File

@@ -0,0 +1,67 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div>
@*<div id="TextBookName" isvalid="yes" checkexpession="NotNull" readonly></div>*@
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">订购数量</div>
<input id="OrderNum" type="number" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIndentDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js")

+ 140
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js View File

@@ -0,0 +1,140 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#TextBookIndentDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIndent' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = {};
var res = {};
res.code = 200;
if (!!processId) {
formData.AAProcessId = processId;
}
callBack(res, i);
};

page.init();
}

+ 61
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.cshtml View File

@@ -0,0 +1,61 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书号</div>
<input id="PublishNo" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_look" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/Index.js")

+ 288
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js View File

@@ -0,0 +1,288 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'formTextBookIndent',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form',
width: 1000,
height: 700,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
//processId = learun.newGuid();
//res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,不可编辑!");
return;
}
learun.layerForm({
id: 'formTextBookIndent',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form?keyValue=' + keyValue,
width: 1000,
height: 700,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,不可删除!");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/ModifyStatus', { keyValue: keyValue, processId: processId }, function (res) {
if (res.code == '200') {
// 发起流程
var postData = {
schemeCode: 'TextBookIndent',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
refreshGirdData();
});
}
});
}
});

// 查看
$('#lr_look').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormView?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetPageList',
headData: [
//{ label: "主键", name: "ID", width: 200, align: "left" },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorname',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "教材名称", name: "TextBookName", width: 200, align: "left" },
{ label: "书号(物料号)", name: "PublishNo", width: 150, align: "left" },
{ label: "作者", name: "FirstAuthor", width: 100, align: "left" },
{ label: "其他作者", name: "OtherAuthor", width: 150, align: "left" },
{ label: "出版社", name: "Publisher", width: 100, align: "left" },
{ label: "版次", name: "Edition", width: 100, align: "left" },
{ label: "单价", name: "Price", width: 100, align: "left" },
{ label: "订购数量", name: "OrderNum", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == '0') {
return '<span class=\"label label-success\">草稿</span>';
} else if (cellvalue == '1') {
return '<span class=\"label label-danger\">审批中</span>';
} else if (cellvalue == '2') {
return '<span class=\"label label-info\">审批通过</span>';
}
}
},
{ label: "录入时间", name: "CreateTime", width: 100, align: "left" },
{
label: "创建用户", name: "CreateUserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
],
mainId: 'ID',
sidx: 'CreateTime desc,Status desc',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "TextBookIndentDetail";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title">树形目录</div>
<div id="tree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">标题</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.js View File

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-27 09:35
* 描 述:TextBookIndentDetail
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form',
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/Form?keyValue=' + keyValue,
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/DeleteForm', { keyValue: keyValue}, function () {
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/GetPageList',
headData: [
{ label: 'ID', name: 'ID', width: 200, align: "left" },
{ label: 'IndentId', name: 'IndentId', width: 200, align: "left" },
{ label: 'DeptNo', name: 'DeptNo', width: 200, align: "left" },
{ label: 'MajorNo', name: 'MajorNo', width: 200, align: "left" },
{ label: 'ClassNo', name: 'ClassNo', width: 200, align: "left" },
{ label: 'TeachSum', name: 'TeachSum', width: 200, align: "left" },
{ label: 'StuSum', name: 'StuSum', width: 200, align: "left" },
{ label: 'Price', name: 'Price', width: 200, align: "left" },
{ label: 'BookNo', name: 'BookNo', width: 200, align: "left" },
{ label: 'BooName', name: 'BooName', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: 'Remark', name: 'Remark', width: 200, align: "left" },
{ label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" },
{ label: 'CreateUserID', name: 'CreateUserID', width: 200, align: "left" },
{ label: 'LessonNo', name: 'LessonNo', width: 200, align: "left" },
],
mainId:'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 79
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.cshtml View File

@@ -0,0 +1,79 @@
@{
ViewBag.Title = "教材信息管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">教材号<font face="宋体">*</font></div>
<input id="TextBookNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">教材名称<font face="宋体">*</font></div>
<input id="TextBookName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">出版号<font face="宋体">*</font></div>
<input id="PublishNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" >
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" ></div>
</div>*@
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">第一作者<font face="宋体">*</font></div>
<input id="FirstAuthor" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">出版日期<font face="宋体">*</font></div>
<input id="Pubdate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Pubdate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">出版社<font face="宋体">*</font></div>
<input id="Publisher" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">教材类型<font face="宋体">*</font></div>
<div id="TextBookType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">教材性质<font face="宋体">*</font></div>
<div id="TextBookNature" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">价格</div>
<input id="Price" type="text" class="form-control" isvalid="no" checkexpession="PositiveFloatint" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">印次</div>
<input id="Impression" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">是否有练习册</div>
<div id="IsWorkBook"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">是否有教参教辅</div>
<div id="IsTeachConsult"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInfo">
<div class="lr-form-item-title">内容简介</div>
<textarea id="Description" class="form-control" style="height:100px;"></textarea>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInfo" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="Createdate" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Form.js")

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Form.js View File

@@ -0,0 +1,58 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-01-24 12:19
* 描 述:教材信息管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#TextBookType').lrDataItemSelect({ code: 'TextBookType' });
$('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' });
$('#IsWorkBook').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#IsTeachConsult').lrDataItemSelect({ code: 'YesOrNoBit' });
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
$('#Createdate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.cshtml View File

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "教材信息管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材名称</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业部</div>
<div id="DeptNo"></div>
</div>*@
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材类型</div>
<div id="TextBookType"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材性质</div>
<div id="TextBookNature"></div>
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_enabled" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;启用</a>
<a id="lr_disabled" class="btn btn-default"><i class="fa fa-unlock"></i>&nbsp;禁用</a></div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookInfo/Index.js")

+ 243
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js View File

@@ -0,0 +1,243 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-01-24 12:19
* 描 述:教材信息管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
//$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#TextBookType').lrDataItemSelect({ code: 'TextBookType' });
$('#TextBookNature').lrDataItemSelect({ code: 'TextBookNature' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form',
width: 800,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
var IsValid = $('#gridtable').jfGridValue('IsValid');
if (IsValid == "true") {
learun.alert.warning("选中记录中包含已启用项目,已启用项不可编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/Form?keyValue=' + keyValue,
width: 800,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsValid = $('#gridtable').jfGridValue('IsValid');
if (IsValid.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目,已启用项不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//启用
$('#lr_enabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsValid = $('#gridtable').jfGridValue('IsValid');
if (IsValid.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项!");
return;
}
learun.layerConfirm('是否确认启用选中项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/EnableEntity', { keyValue: keyValue, IsValid: '1' }, function () {
refreshGirdData();
});
}
});
}
});
//禁用
$('#lr_disabled').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var IsValid = $('#gridtable').jfGridValue('IsValid');
if (IsValid.indexOf('false') != -1) {
learun.alert.warning("选中记录中包含已启用项!");
return;
}
learun.layerConfirm('是否确认禁用选中项?', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookInfo/DisableEntity', { keyValue: keyValue, IsValid: '0' }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInfo/GetPageList',
headData: [
{ label: "教材号", name: "TextBookNo", width: 150, align: "left" },
{ label: "教材名称", name: "TextBookName", width: 150, align: "left" },
{ label: "出版号", name: "PublishNo", width: 100, align: "left" },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{ label: "第一作者", name: "FirstAuthor", width: 100, align: "left" },
{ label: "其他作者", name: "OtherAuthor", width: 100, align: "left" },
{
label: "出版日期", name: "Pubdate", width: 80, align: "left",
formatter: function (value) {
return learun.formatDate(value, 'yyyy-MM-dd');
}
},
{ label: "出版社", name: "Publisher", width: 100, align: "left" },
{
label: "教材类型", name: "TextBookType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "TextBookNature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "Price", width: 60, align: "left" },
{ label: "版次", name: "Edition", width: 100, align: "left" },
{ label: "印次", name: "Impression", width: 100, align: "left" },
{
label: "是否有练习册", name: "IsWorkBook", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
"<span class=\"label label-danger\">否</span>";
}
},
{
label: "是否有教参教辅", name: "IsTeachConsult", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
"<span class=\"label label-danger\">否</span>";
}
},
{ label: "内容简介", name: "Description", width: 100, align: "left" },
{
label: "录入用户", name: "CreateUserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "录入时间", name: "Createdate", width: 100, align: "left" },
{
label: "修改用户", name: "UpdateUserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "修改时间", name: "Updatetime", width: 100, align: "left" },
{
label: "是否有效", name: "IsValid", width: 80, align: "center",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
}
],
mainId: 'ID',
isPage: true,
isMultiselect: true,
sidx: 'Createdate asc'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = " and Isdel = '0' ";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.cshtml View File

@@ -0,0 +1,55 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="添加出库单" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除出库单" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookOut"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookOut/Form.js")

+ 202
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js View File

@@ -0,0 +1,202 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIn',
title: '申请出库',
url: top.$.rootUrl + '/EducationalAdministration/TextBookOut/FormOut',
width: 800,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookOut').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
tempdatra.splice(key, 1);
}
});
$('#TextBookOut').jfGridSet('refreshdata', tempdatra);
learun.layerClose(window.name);
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '学年', name: 'AcademicYearNo', width: 80, align: 'left' },
{ label: '学期', name: 'Semester', width: 80, align: 'left' },
{ label: '领用人', name: 'Recipient', width: 100, align: 'left' },
{ label: '出库数量', name: 'Variate', width: 100, align: 'left' },
{ label: '出库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '出库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormDataEdit?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookOut').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookOut' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookOut').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含出库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookOutList = JSON.stringify($('#TextBookOut').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 54
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.cshtml View File

@@ -0,0 +1,54 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detaildel" type="button" class="btn btn-danger" value="删除入库单" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookOut"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js")

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

@@ -0,0 +1,162 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
//$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '学年', name: 'AcademicYearNo', width: 80, align: 'left' },
{ label: '学期', name: 'Semester', width: 80, align: 'left' },
{ label: '领用人', name: 'Recipient', width: 100, align: 'left' },
{ label: '出库数量', name: 'Variate', width: 100, align: 'left' },
{ label: '出库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '出库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
$("#detaildel").on('click', function () {
var NewkeyValue = $('#TextBookOut').jfGridValue('ID');
if (learun.checkrow(NewkeyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/DeleteForm', { keyValue: NewkeyValue }, function () {
var index = top.layer.getFrameIndex(window.name);
console.log('index', index);
top.layer.close(index);
});
}
});
}
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookOut').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookOut' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
page.init();
}

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormOut.cshtml View File

@@ -0,0 +1,58 @@
@{
ViewBag.Title = "TextBookOut";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var OutBookCode = "@ViewBag.BookCode";
</script>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="TextBookIn">
<div class="lr-form-item-title">出库单<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="Variate" type="number" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">领用人<font face="宋体">*</font></div>
<input id="Recipient" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">经办人<font face="宋体">*</font></div>
<input id="CrateUserID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">出库时间<font face="宋体">*</font></div>
<input id="CreateTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="DateTime" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#CreateTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookOut/FormOut.js")

+ 122
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormOut.js View File

@@ -0,0 +1,122 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-05 11:17
* 描 述:TextBookOut
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#DeptNo').lrselect({
allowSearch: true,
value: "deptno",
text: "deptname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
select: function (item) {
if (item) {
$('#MajorNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
});
} else {
$('#MajorNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
param: { strWhere: "1=1 AND CheckMark=1" }
});
}

}
});
$('#MajorNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
value: "majorno",
text: "majorname",
param: { strWhere: "1=1 AND CheckMark=1" },
select: function (item) {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1" }
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1" }
});
}
}
});
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1" },
value: "classno",
text: "classname"
});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
} else {
$("#BookCode").val(OutBookCode);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = $('body').lrGetFormData();
if (!!keyValue) {
if (!!selectedRow) {
postData.ID = selectedRow.ID;
}
} else {
postData.ID = learun.newGuid();
}
if (!!callBack) {
callBack(postData);
return true;
}
};
page.init();
}

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.cshtml View File

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookOut"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookOut/FormView.js")

+ 174
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js View File

@@ -0,0 +1,174 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '学年', name: 'AcademicYearNo', width: 80, align: 'left' },
{ label: '学期', name: 'Semester', width: 80, align: 'left' },
{ label: '领用人', name: 'Recipient', width: 100, align: 'left' },
{ label: '出库数量', name: 'Variate', width: 100, align: 'left' },
{ label: '出库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '出库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookOut').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/GetFormData?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookOut' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookOut').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含出库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookOutList = JSON.stringify($('#TextBookOut').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.cshtml View File

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "TextBookOut";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">关键字查询</div>
<input id="keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材出库</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;明细查看</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;明细删除</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookOut/Index.js")

+ 163
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js View File

@@ -0,0 +1,163 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-05 11:17
* 描 述:TextBookOut
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 100, 400);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo',value: 'lessonno',text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 出库
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '出库',
url: top.$.rootUrl + '/EducationalAdministration/TextBookOut/Form?keyValue=' + keyValue,
width: 1000,
height: 800,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});

// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookOut/FormView?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formdelete',
title: '删除明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookOut/FormDelete?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', 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: '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: 'Remark', width: 200, align: "left" },
],
mainId: 'ID',
isPage: true,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
param.SqlParameter = ' and IsSubmit =1 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 84
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Form.cshtml View File

@@ -0,0 +1,84 @@
@{
ViewBag.Title = "教材征订管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">专业部</div>
<div id="DeptNo" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">学期</div>
<div id="Semester" readonly></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">所选书籍</div>
<input id="TextBookName" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">单价</div>
<input id="Price" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">订购数量</div>
<input id="OrderNum" type="number" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSub" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSolSub" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>*@
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookSolSubDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSolSub/Form.js")

+ 96
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Form.js View File

@@ -0,0 +1,96 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-01 17:26
* 描 述:教材征订管理
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学期",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#TextBookSolSubDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Index.cshtml View File

@@ -0,0 +1,57 @@
@{
ViewBag.Title = "教材征订管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书号</div>
<input id="PublishNo" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
@*<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>*@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSolSub/Index.js")

+ 188
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/Index.js View File

@@ -0,0 +1,188 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-01 17:26
* 描 述:教材征订管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 250, 400);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/Form?keyValue=' + keyValue,
width: 1000,
height: 700,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formview',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/Form?keyValue=' + keyValue,
width: 1000,
height: 700,
btn: null,
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetPageList',
headData: [
//{ label: "主键", name: "ID", width: 200, align: "left" },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorname',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "教材名称", name: "TextBookName", width: 200, align: "left" },
{ label: "书号(物料号)", name: "PublishNo", width: 150, align: "left" },
{ label: "作者", name: "FirstAuthor", width: 100, align: "left" },
{ label: "其他作者", name: "OtherAuthor", width: 150, align: "left" },
{ label: "出版社", name: "Publisher", width: 100, align: "left" },
{ label: "版次", name: "Edition", width: 100, align: "left" },
{ label: "单价", name: "Price", width: 100, align: "left" },
{ label: "订购数量", name: "OrderNum", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },
//{
// label: "状态", name: "Status", width: 100, align: "left",
// formatter: function (cellvalue) {
// if (cellvalue == '0') {
// return '<span class=\"label label-success\">草稿</span>';
// } else if (cellvalue == '1') {
// return '<span class=\"label label-danger\">审批中</span>';
// } else if (cellvalue == '2') {
// return '<span class=\"label label-info\">审批通过</span>';
// }
// }
//},
{ label: "录入时间", name: "CreateTime", width: 100, align: "left" },
{
label: "创建用户", name: "CreateUserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
],
mainId: 'ID',
sidx: 'CreateTime desc,Status desc',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Form.cshtml View File

@@ -0,0 +1,11 @@
@{
ViewBag.Title = "教材征订管理明细";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="TextBookSolSubDetail" >
<div class="lr-form-item-title">文本框</div>
<input id="TeachSum" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Form.js")

+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Form.js View File

@@ -0,0 +1,50 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 09:29
* 描 述:教材征订管理明细
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Index.cshtml View File

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "教材征订管理明细";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Index.js")

+ 88
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSubDetail/Index.js View File

@@ -0,0 +1,88 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 09:29
* 描 述:教材征订管理明细
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSubDetail/GetPageList',
headData: [
{ label: "文本框", name: "TeachSum", width: 100, align: "left"},
],
mainId:'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -346,6 +346,14 @@
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_ReceiveDocumentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TeachingPlanController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TeachingPlanItemController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextbookInOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" />
<Compile Include="Areas\EvaluationTeach\EvaluationTeachAreaRegistration.cs" />
<Compile Include="Areas\EvaluationTeach\Controllers\Eval_MainController.cs" />
<Compile Include="Areas\EvaluationTeach\Controllers\Eval_QuestionController.cs" />
@@ -1149,6 +1157,32 @@
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManageView.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\IndexManage.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormDelete.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormDelete.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" />
@@ -7596,6 +7630,32 @@
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\FormUse.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\IndexInOut.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormDelete.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormDelete.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormOut.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\Index.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config View File

@@ -29,6 +29,7 @@
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" />
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" />
<typeAlias alias="FD_PayManageMethod" type="Learun.Application.WorkFlow.FD_PayManageMethod,Learun.Application.WorkFlow" />
<typeAlias alias="TextBookIndentMethod" type="Learun.Application.WorkFlow.TextBookIndentMethod,Learun.Application.WorkFlow" />

<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -68,6 +69,7 @@
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type>
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type>
<type type="IWorkFlowMethod" mapTo="TextBookIndentMethod" name="TextBookIndentMethod"></type>

</container>



+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInMap : EntityTypeConfiguration<TextBookInEntity>
{
public TextBookInMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKIN");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentDetailMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailMap : EntityTypeConfiguration<TextBookIndentDetailEntity>
{
public TextBookIndentDetailMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINDENTDETAIL");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentMap : EntityTypeConfiguration<TextBookIndentEntity>
{
public TextBookIndentMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINDENT");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoMap : EntityTypeConfiguration<TextBookInfoEntity>
{
public TextBookInfoMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINFO");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookOutMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutMap : EntityTypeConfiguration<TextBookOutEntity>
{
public TextBookOutMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKOUT");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubDetailMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailMap : EntityTypeConfiguration<TextBookSolSubDetailEntity>
{
public TextBookSolSubDetailMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKSOLSUBDETAIL");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubMap : EntityTypeConfiguration<TextBookSolSubEntity>
{
public TextBookSolSubMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKSOLSUB");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextBookInOutMap : EntityTypeConfiguration<TextbookInOutEntity>
{
public TextBookInOutMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINOUT");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -104,6 +104,14 @@
<Compile Include="EducationalAdministration\TeachPlanMap.cs" />
<Compile Include="EducationalAdministration\TeachSwitchMap.cs" />
<Compile Include="EducationalAdministration\Teach_attendanceMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetailMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentMap.cs" />
<Compile Include="EducationalAdministration\TextBookInfoMap.cs" />
<Compile Include="EducationalAdministration\TextBookInMap.cs" />
<Compile Include="EducationalAdministration\TextbookInOutMap.cs" />
<Compile Include="EducationalAdministration\TextBookOutMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetailMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubMap.cs" />
<Compile Include="EducationalAdministration\ThermographyMap.cs" />
<Compile Include="EvaluationTeach\Eval_MainMap.cs" />
<Compile Include="EvaluationTeach\Eval_QuestionItemsMap.cs" />


+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInBLL.cs View File

@@ -0,0 +1,173 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInBLL : TextBookInIBLL
{
private TextBookInService textBookInService = new TextBookInService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookInService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookIn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookInEntity GetTextBookInEntity(string keyValue)
{
try
{
return textBookInService.GetTextBookInEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetInEntity(string keyValue)
{
try
{
return textBookInService.GetInEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookInService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookInEntity entity)
{
try
{
textBookInService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookInEntity> textBookInList)
{
try
{
textBookInService.SaveEntity(keyValue, entity, textBookInList);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 135
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInEntity.cs View File

@@ -0,0 +1,135 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 库存单号
/// </summary>
[Column("INOUTCODE")]
public string InOutCode { get; set; }
/// <summary>
/// BookCode
/// </summary>
[Column("BOOKCODE")]
public string BookCode { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// PublishNo
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版日期
/// </summary>
[Column("PUBDATE")]
public DateTime? Pubdate { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建版次
/// </summary>
[Column("CRATEUSERID")]
public string CrateUserID { get; set; }
/// <summary>
/// UpTime
/// </summary>
[Column("UPTIME")]
public DateTime? UpTime { get; set; }
/// <summary>
/// UpUserID
/// </summary>
[Column("UPUSERID")]
public string UpUserID { get; set; }
/// <summary>
/// variate
/// </summary>
[Column("VARIATE")]
public decimal? variate { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInIBLL.cs View File

@@ -0,0 +1,62 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public interface TextBookInIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookInEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookIn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookInEntity GetTextBookInEntity(string keyValue);
/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
IEnumerable<TextBookInEntity> GetInEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookInEntity entity);

/// <summary>
/// 保存实体数据
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
/// <param name="textBookIn"></param>
void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookInEntity> textBookIn);
#endregion

}
}

+ 258
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs View File

@@ -0,0 +1,258 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Learun.Application.TwoDevelopment.LogisticsManagement;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookIn t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["TextBookName"].IsEmpty())
{
dp.Add("TextBookName", queryParam["TextBookName"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookName = @TextBookName ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookIn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookInEntity GetTextBookInEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetInEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(x => x.InOutCode == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? Num = 0;
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInEntity>(x => x.ID == item);
if (entity != null)
{
Num += entity.variate;
var InOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.InOutCode);
if (InOutEntity != null)
{
InOutEntity.FinallyNum = InOutEntity.FinallyNum - Num;
if (InOutEntity.FinallyNum == 0 || InOutEntity.FinallyNum > 0)
{
db.Delete(entity);
db.Update(InOutEntity);
}
else
{
db.Rollback();
}
}
else
{
db.Rollback();
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookInEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity">库存</param>
/// <param name="textbookIndentDateil"></param>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookInEntity> textbookInList)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? variate = 0;
if (textbookInList.Count > 0)
{
for (int i = 0; i < textbookInList.Count; i++)
{
textbookInList[i].InOutCode = entity.BookCode;
textbookInList[i].LessonNo = entity.LessonNo;
textbookInList[i].PublishNo = entity.PublishNo;
textbookInList[i].TextBookNo = entity.TextBookNo;
textbookInList[i].TextBookName = entity.TextBookName;
textbookInList[i].FirstAuthor = entity.FirstAuthor;
textbookInList[i].OtherAuthor = entity.OtherAuthor;
textbookInList[i].Pubdate = entity.Pubdate;
textbookInList[i].Publisher = entity.Publisher;
textbookInList[i].Edition = entity.Edition;
textbookInList[i].Impression = entity.Impression;
textbookInList[i].Impression = entity.Impression;
variate += textbookInList[i].variate;
}
this.BaseRepository("CollegeMIS").Insert(textbookInList);

if (variate != 0 && variate > 0)
{
var newtextInOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.BookCode);
if (newtextInOutEntity != null)
{
newtextInOutEntity.FinallyNum += variate;
db.Update(newtextInOutEntity);
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 217
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs View File

@@ -0,0 +1,217 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentBLL : TextBookIndentIBLL
{
private TextBookIndentService textBookIndentService = new TextBookIndentService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookIndentService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookIndent表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookIndentEntity GetTextBookIndentEntity(string keyValue)
{
try
{
return textBookIndentService.GetTextBookIndentEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TextBookIndentEntity GetEntityByProcessId(string processId)
{
try
{
return textBookIndentService.GetEntityByProcessId(processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Ass_AssetsInfoItemApply表数据
/// <summary>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue)
{
try
{
return textBookIndentService.TextBookIndentDetailList(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookIndentService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookIndentEntity entity,List<TextBookIndentDetailEntity> textbookIndentDateil)
{
try
{
textBookIndentService.SaveEntity(keyValue, entity, textbookIndentDateil);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ModifyStatus(string keyValue, string processId)
{
try
{
textBookIndentService.ModifyStatus(keyValue, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ChangeStatusByProcessId(int pastatus, string processId)
{
try
{
textBookIndentService.ChangeStatusByProcessId(pastatus, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 146
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs View File

@@ -0,0 +1,146 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// 出版号
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }

/// <summary>
/// 订购数量
/// </summary>
[Column("ORDERNUM")]
public int? OrderNum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
///出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 单价
/// </summary>
[Column("PRICE")]
public decimal? Price { get; set; }
/// <summary>
/// Status
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// processId
/// </summary>
[Column("PROCESSID")]
public string processId { get; set; }
/// <summary>
/// ClassSum
/// </summary>
[Column("CLASSSUM")]
public string ClassSum { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs View File

@@ -0,0 +1,75 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public interface TextBookIndentIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookIndent表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookIndentEntity GetTextBookIndentEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
TextBookIndentEntity GetEntityByProcessId(string processId);

IEnumerable <TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue);

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookIndentEntity entity, List<TextBookIndentDetailEntity> textBookIndentDatail);

/// <summary>
/// 提交审核
/// </summary>
/// <param name="keyValue"></param>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
void ModifyStatus(string keyValue, string processId);

/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
void ChangeStatusByProcessId(int pastatus, string processId);


#endregion

}
}

+ 340
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs View File

@@ -0,0 +1,340 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Learun.Application.TwoDevelopment.AssetManagementSystem;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookIndent t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["PublishNo"].IsEmpty())
{
dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PublishNo Like @PublishNo ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookIndent表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookIndentEntity GetTextBookIndentEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TextBookIndentEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(t => t.processId == processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Ass_AssetsInfoApply表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
db.Delete<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
db.Delete<TextBookIndentEntity>(t => t.ID == keyValue);
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}

}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookIndentEntity entity, List<TextBookIndentDetailEntity> textbookIndentDateil)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
db.Update(entity);
db.Delete<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = keyValue;
db.Insert(item);
}
}
else
{
entity.Create();
db.Insert(entity);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = entity.ID;
db.Insert(item);
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void ModifyStatus(string keyValue, string processId)
{
try
{
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.ID == keyValue);
entity.processId = processId;
entity.Status = 1;
this.BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}
}

/// <summary>
/// 审批后修改状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ChangeStatusByProcessId(int pastatus, string processId)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.processId == processId);
entity.Status = pastatus;
db.Update(entity);

if (pastatus == 2)
{
//教材订单明细
var detailList = db.FindList<TextBookIndentDetailEntity>(x => x.IndentId == entity.ID);

//审核通过,添加征订数据
TextBookSolSubEntity textBookSolSub = new TextBookSolSubEntity();
textBookSolSub.Create();
textBookSolSub.TextBookIndentId = entity.ID;
textBookSolSub.DeptNo = entity.DeptNo;
textBookSolSub.MajorNo = entity.MajorNo;
textBookSolSub.LessonNo = entity.LessonNo;
textBookSolSub.AcademicYearNo = entity.AcademicYearNo;
textBookSolSub.Semester = entity.Semester;
textBookSolSub.PublishNo = entity.PublishNo;
textBookSolSub.TextBookNo = entity.TextBookNo;
textBookSolSub.TextBookName = entity.TextBookName;
textBookSolSub.FirstAuthor = entity.FirstAuthor;
textBookSolSub.OtherAuthor = entity.OtherAuthor;
textBookSolSub.OrderNum = entity.OrderNum;
textBookSolSub.Remark = entity.Remark;
textBookSolSub.Publisher = entity.Publisher;
textBookSolSub.Edition = entity.Edition;
textBookSolSub.Price = entity.Price;
textBookSolSub.ClassSum = entity.ClassSum;
db.Insert(textBookSolSub);

foreach (var detail in detailList)
{
TextBookSolSubDetailEntity textBookSolSubDetail = new TextBookSolSubDetailEntity();
textBookSolSubDetail.Create();
textBookSolSubDetail.SolSubId = textBookSolSub.ID;
textBookSolSubDetail.ClassNo = detail.ClassNo;
textBookSolSubDetail.TeachSum = detail.TeachSum;
textBookSolSubDetail.StuSum = detail.StuSum;
textBookSolSubDetail.Remark = detail.Remark;
db.Insert(textBookSolSubDetail);
}
}
db.Commit();
}
catch (Exception e)
{
db.Rollback();
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}

}
#endregion

}
}

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs View File

@@ -0,0 +1,149 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailBLL : TextBookIndentDetailIBLL
{
private TextBookIndentDetailService textBookIndentDetailService = new TextBookIndentDetailService();
private TextBookIndentService textBookIndentService = new TextBookIndentService();
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> GetList( string queryJson )
{
try
{
return textBookIndentDetailService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookIndentDetailService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookIndentDetailEntity GetEntity(string keyValue)
{
try
{
return textBookIndentDetailService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookIndentDetailService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookIndentDetailEntity entity)
{
try
{
textBookIndentDetailService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs View File

@@ -0,0 +1,128 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
/// <returns></returns>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// IndentId
/// </summary>
/// <returns></returns>
[Column("INDENTID")]
public string IndentId { get; set; }
/// <summary>
/// DeptNo
/// </summary>
/// <returns></returns>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
/// <returns></returns>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// TeachSum
/// </summary>
/// <returns></returns>
[Column("TEACHSUM")]
public string TeachSum { get; set; }
/// <summary>
/// StuSum
/// </summary>
/// <returns></returns>
[Column("STUSUM")]
public string StuSum { get; set; }
/// <summary>
/// Price
/// </summary>
/// <returns></returns>
[Column("PRICE")]
public string Price { get; set; }
/// <summary>
/// BookNo
/// </summary>
/// <returns></returns>
[Column("BOOKNO")]
public string BookNo { get; set; }
/// <summary>
/// BooName
/// </summary>
/// <returns></returns>
[Column("BOONAME")]
public string BooName { get; set; }
/// <summary>
/// 出版号
/// </summary>
/// <returns></returns>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// Remark
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// CreateTime
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
/// <returns></returns>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// LessonNo
/// </summary>
/// <returns></returns>
[Column("LESSONNO")]
public string LessonNo { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs View File

@@ -0,0 +1,56 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public interface TextBookIndentDetailIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentDetailEntity> GetList( string queryJson );
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookIndentDetailEntity GetEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookIndentDetailEntity entity);
#endregion

}
}

+ 199
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs View File

@@ -0,0 +1,199 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public TextBookIndentDetailService()
{
fieldSql = @"
t.ID,
t.IndentId,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.TeachSum,
t.StuSum,
t.Price,
t.BookNo,
t.BooName,
t.PublishNo,
t.Remark,
t.CreateTime,
t.CreateUserID,
t.LessonNo
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> GetList(string queryJson)
{
try
{
//参考写法
//var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextBookIndentDetail t ");
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextBookIndentDetail t ");
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookIndentDetailEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentDetailEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<TextBookIndentDetailEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// </summary>
public void SaveEntity(string keyValue, TextBookIndentDetailEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 169
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs View File

@@ -0,0 +1,169 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoBLL : TextBookInfoIBLL
{
private TextBookInfoService textBookInfoService = new TextBookInfoService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookInfoService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookInfoEntity GetTextBookInfoEntity(string keyValue)
{
try
{
return textBookInfoService.GetTextBookInfoEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookInfoService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookInfoEntity entity)
{
try
{
textBookInfoService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="IsValid">状态</param>
public void EnabOrDisabEntity(string keyValue, string IsValid)
{
try
{
textBookInfoService.EnabOrDisabEntity(keyValue, IsValid);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression)
{
try
{
return textBookInfoService.GetRepetitions(keyValue, TextBookNo, TextBookName, PublishNo, DeptNo, Publisher, TextBookNature, TextBookType, Edition, Impression);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
}
}

+ 155
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs View File

@@ -0,0 +1,155 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 出版号
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版日期
/// </summary>
[Column("PUBDATE")]
public DateTime? Pubdate { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 教材类型
/// </summary>
[Column("TEXTBOOKTYPE")]
public string TextBookType { get; set; }
/// <summary>
/// 教材性质
/// </summary>
[Column("TEXTBOOKNATURE")]
public string TextBookNature { get; set; }
/// <summary>
/// 价格
/// </summary>
[Column("PRICE")]
public decimal? Price { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 是否有练习册
/// </summary>
[Column("ISWORKBOOK")]
public bool? IsWorkBook { get; set; }
/// <summary>
/// 是否有教参教辅
/// </summary>
[Column("ISTEACHCONSULT")]
public bool? IsTeachConsult { get; set; }
/// <summary>
/// 内容简介
/// </summary>
[Column("DESCRIPTION")]
public string Description { get; set; }
/// <summary>
/// 是否有效
/// </summary>
[Column("ISVALID")]
public bool? IsValid { get; set; }
/// <summary>
/// Createdate
/// </summary>
[Column("CREATEDATE")]
public DateTime? Createdate { get; set; }
/// <summary>
/// Updatetime
/// </summary>
[Column("UPDATETIME")]
public DateTime? Updatetime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// UpdateUserID
/// </summary>
[Column("UPDATEUSERID")]
public string UpdateUserID { get; set; }
/// <summary>
/// 删除 0 1
/// </summary>
public int? IsDel { get; set; }

#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs View File

@@ -0,0 +1,69 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public interface TextBookInfoIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookInfoEntity GetTextBookInfoEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookInfoEntity entity);
#endregion

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="IsValid"></param>
void EnabOrDisabEntity(string keyValue, string IsValid);
/// <summary>
///
/// </summary>
/// <param name="TextBookName">名称</param>
/// <param name="PublishNo">出版号</param>
/// <param name="DeptNo">专业部</param>
/// <param name="Publisher"></param>
/// <param name="TextBookNature"></param>
/// <param name="TextBookType"></param>
/// <param name="Impression">版次</param>
/// <returns></returns>
TextBookInfoEntity GetRepetitions(string keyValue,string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression);

#endregion
}
}

+ 255
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs View File

@@ -0,0 +1,255 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookInfo t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["TextBookName"].IsEmpty())
{
dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.TextBookName Like @TextBookName ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["TextBookType"].IsEmpty())
{
dp.Add("TextBookType", queryParam["TextBookType"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookType = @TextBookType ");
}
if (!queryParam["TextBookNature"].IsEmpty())
{
dp.Add("TextBookNature", queryParam["TextBookNature"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookNature = @TextBookNature ");
}

if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}
return this.BaseRepository("CollegeMIS").FindList<TextBookInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookInfoEntity GetTextBookInfoEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item);
entity.IsDel = 1;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookInfoEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue"></param>
public void EnabOrDisabEntity(string keyValue, string IsValid)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item);
entity.IsValid = IsValid.ToString() == "1" ? true : false;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 去重
/// </summary>
/// <param name="keyValue"></param>
/// <param name="TextBookNo"></param>
/// <param name="TextBookName"></param>
/// <param name="PublishNo"></param>
/// <param name="DeptNo"></param>
/// <param name="Publisher"></param>
/// <param name="TextBookNature"></param>
/// <param name="TextBookType"></param>
/// <param name="Edition"></param>
/// <param name="Impression"></param>
/// <returns></returns>
public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(
x => x.ID != keyValue && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0);
}
else
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(
x => x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion
}
}

+ 167
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutBLL.cs View File

@@ -0,0 +1,167 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutBLL : TextBookOutIBLL
{
private TextBookOutService textBookOutService = new TextBookOutService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookOutService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable<TextBookOutEntity> GetListByCode(string code)
{
try
{
return textBookOutService.GetListByCode(code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookOutEntity GetTextBookOutEntity(string keyValue)
{
try
{
return textBookOutService.GetTextBookOutEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookOutService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookOutEntity entity)
{
try
{
textBookOutService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookOutEntity> textBookOutList)
{
try
{
textBookOutService.SaveEntity(keyValue, entity, textBookOutList);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 160
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutEntity.cs View File

@@ -0,0 +1,160 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// InOutCode
/// </summary>
[Column("INOUTCODE")]
public string InOutCode { get; set; }
/// <summary>
/// BookCode
/// </summary>
[Column("BOOKCODE")]
public string BookCode { get; set; }
/// <summary>
/// AcademicYearNo
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// Semester
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// DeptNo
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// PublishNo
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建版次
/// </summary>
[Column("CRATEUSERID")]
public string CrateUserID { get; set; }
/// <summary>
/// UpTime
/// </summary>
[Column("UPTIME")]
public DateTime? UpTime { get; set; }
/// <summary>
/// UpUserID
/// </summary>
[Column("UPUSERID")]
public string UpUserID { get; set; }
/// <summary>
/// Variate
/// </summary>
[Column("VARIATE")]
public decimal? Variate { get; set; }
/// <summary>
/// Recipient
/// </summary>
[Column("RECIPIENT")]
public string Recipient { get; set; }

/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutIBLL.cs View File

@@ -0,0 +1,57 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public interface TextBookOutIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<TextBookOutEntity> GetListByCode(string code);
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookOutEntity GetTextBookOutEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookOutEntity entity);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
/// <param name="textBookOut"></param>
void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookOutEntity> textBookOut);

#endregion

}
}

+ 303
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs View File

@@ -0,0 +1,303 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.AcademicYearNo,
t.Semester,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.LessonNo,
t.Variate,
t.Recipient,
t.CreateTime,
t.CrateUserID
");
strSql.Append(" FROM TextBookOut t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) ");
}
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["Recipient"].IsEmpty())
{
dp.Add("Recipient", "%" + queryParam["Recipient"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Recipient Like @Recipient ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public IEnumerable<TextBookOutEntity> GetListByCode(string code)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(x => x.InOutCode == code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookOutEntity GetTextBookOutEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookOutEntity>(x => x.InOutCode == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? Num = 0;
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookOutEntity>(x => x.ID == item);
if (entity != null)
{
Num += entity.Variate;
var InOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.InOutCode);
if (InOutEntity != null)
{
InOutEntity.FinallyNum += Num;
db.Delete(entity);
db.Update(InOutEntity);
}
else
{
db.Rollback();
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookOutEntity entity)
{
try
{
if (keyValue != null)
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity">库存</param>
/// <param name="textbookIndentDateil"></param>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookOutEntity> textbookOutList)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? variate = 0;
if (textbookOutList.Count > 0)
{
for (int i = 0; i < textbookOutList.Count; i++)
{
textbookOutList[i].InOutCode = entity.BookCode;
textbookOutList[i].LessonNo = entity.LessonNo;
textbookOutList[i].PublishNo = entity.PublishNo;
textbookOutList[i].TextBookNo = entity.TextBookNo;
textbookOutList[i].TextBookName = entity.TextBookName;
textbookOutList[i].FirstAuthor = entity.FirstAuthor;
textbookOutList[i].OtherAuthor = entity.OtherAuthor;
textbookOutList[i].Publisher = entity.Publisher;
textbookOutList[i].Edition = entity.Edition;
textbookOutList[i].Impression = entity.Impression;
textbookOutList[i].Impression = entity.Impression;
variate += textbookOutList[i].Variate;
}
this.BaseRepository("CollegeMIS").Insert(textbookOutList);

if (variate != 0 && variate > 0)
{
var newtextInOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.BookCode);
if (newtextInOutEntity != null)
{
newtextInOutEntity.FinallyNum -= variate;
if (newtextInOutEntity.FinallyNum > 0 || newtextInOutEntity.FinallyNum == 0)
{
db.Update(newtextInOutEntity);
}
else
{
db.Rollback();
}
}
else
{
db.Rollback();
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs View File

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubBLL : TextBookSolSubIBLL
{
private TextBookSolSubService textBookSolSubService = new TextBookSolSubService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookSolSubService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookSolSub表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookSolSubEntity GetTextBookSolSubEntity(string keyValue)
{
try
{
return textBookSolSubService.GetTextBookSolSubEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookSolSubService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookSolSubEntity entity)
{
try
{
textBookSolSubService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 158
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs View File

@@ -0,0 +1,158 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 教材订单表ID
/// </summary>
[Column("TEXTBOOKINDENTID")]
public string TextBookIndentId { get; set; }
/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// 出版号
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 序号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 订购数量
/// </summary>
[Column("ORDERNUM")]
public int? OrderNum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// Price
/// </summary>
[Column("PRICE")]
public decimal? Price { get; set; }
/// <summary>
/// Status
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// processId
/// </summary>
[Column("PROCESSID")]
public string processId { get; set; }
/// <summary>
/// ClassSum
/// </summary>
[Column("CLASSSUM")]
public string ClassSum { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUserID = LoginUserInfo.Get().userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs View File

@@ -0,0 +1,48 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public interface TextBookSolSubIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookSolSubEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookSolSub表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookSolSubEntity GetTextBookSolSubEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookSolSubEntity entity);
#endregion

}
}

+ 180
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs View File

@@ -0,0 +1,180 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM TextBookSolSub t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["PublishNo"].IsEmpty())
{
dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PublishNo Like @PublishNo ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookSolSub表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookSolSubEntity GetTextBookSolSubEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookSolSubEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<TextBookSolSubEntity>(t=>t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookSolSubEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 144
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailBLL.cs View File

@@ -0,0 +1,144 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailBLL : TextBookSolSubDetailIBLL
{
private TextBookSolSubDetailService textBookSolSubDetailService = new TextBookSolSubDetailService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookSolSubDetailService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId)
{
try
{
return textBookSolSubDetailService.GetListBySolSubId(SolSubId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取TextBookSolSubDetail表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookSolSubDetailEntity GetTextBookSolSubDetailEntity(string keyValue)
{
try
{
return textBookSolSubDetailService.GetTextBookSolSubDetailEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textBookSolSubDetailService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookSolSubDetailEntity entity)
{
try
{
textBookSolSubDetailService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailEntity.cs View File

@@ -0,0 +1,70 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// SolSubId
/// </summary>
[Column("SOLSUBID")]
public string SolSubId { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// TeachSum
/// </summary>
[Column("TEACHSUM")]
public string TeachSum { get; set; }
/// <summary>
/// StuSum
/// </summary>
[Column("STUSUM")]
public string StuSum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailIBLL.cs View File

@@ -0,0 +1,53 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public interface TextBookSolSubDetailIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookSolSubDetailEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <returns></returns>
IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId);
/// <summary>
/// 获取TextBookSolSubDetail表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookSolSubDetailEntity GetTextBookSolSubDetailEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookSolSubDetailEntity entity);
#endregion

}
}

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailService.cs View File

@@ -0,0 +1,164 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.TeachSum
");
strSql.Append(" FROM TextBookSolSubDetail t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubDetailEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubDetailEntity>(x => x.SolSubId == SolSubId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取TextBookSolSubDetail表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookSolSubDetailEntity GetTextBookSolSubDetailEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookSolSubDetailEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<TextBookSolSubDetailEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookSolSubDetailEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 216
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs View File

@@ -0,0 +1,216 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutBLL : TextBookInOutIBLL
{
private TextbookInOutService textbookInOutService = new TextbookInOutService();

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetList( string queryJson )
{
try
{
return textbookInOutService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textbookInOutService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextbookInOutEntity GetEntity(string keyValue)
{
try
{
return textbookInOutService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取KC实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextbookInOutEntity GetKCEntity(string keyValue)
{
try
{
return textbookInOutService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取KC实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetInOrOutEntity(string keyValue)
{
try
{
return textbookInOutService.GetInOrOutEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
textbookInOutService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextbookInOutEntity entity)
{
try
{
textbookInOutService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void SubmitEntity(string keyValue)
{
try
{
textbookInOutService.SubmitEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save