Browse Source

Merge branch '娄底高职分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 娄底高职分支

娄底高职分支
dyy 2 years ago
parent
commit
119e27be2b
30 changed files with 3157 additions and 304 deletions
  1. +174
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/RecruitStuPlanController.cs
  2. +134
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuNoticeController.cs
  3. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.cshtml
  4. +64
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js
  5. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml
  6. +72
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js
  7. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.cshtml
  8. +213
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/Index.js
  9. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.cshtml
  10. +219
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js
  11. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.cshtml
  12. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Form.js
  13. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.cshtml
  14. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuNotice/Index.js
  15. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  16. +74
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs
  17. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.cs
  18. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.cs
  19. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  20. +170
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs
  21. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanEntity.cs
  22. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.cs
  23. +271
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs
  24. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs
  25. +80
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeEntity.cs
  26. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeIBLL.cs
  27. +208
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs
  28. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  29. +345
    -304
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue
  30. +215
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue

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

@@ -0,0 +1,174 @@
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-12-14 16:36
/// 描 述:RecruitStuPlan
/// </summary>
public class RecruitStuPlanController : MvcControllerBase
{
private RecruitStuPlanIBLL recruitStuPlanIBLL = new RecruitStuPlanBLL();

#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 IndexPlan()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormPlan()
{
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 = recruitStuPlanIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListPlan(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = recruitStuPlanIBLL.GetPageListPlan(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 RecruitStuPlanData = recruitStuPlanIBLL.GetRecruitStuPlanEntity(keyValue);
var jsonData = new
{
RecruitStuPlan = RecruitStuPlanData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
recruitStuPlanIBLL.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)
{
RecruitStuPlanEntity entity = strEntity.ToObject<RecruitStuPlanEntity>();
recruitStuPlanIBLL.SaveEntity(keyValue, entity);
if (keyValue != null)
{
}
return Success("保存成功!");
}
#endregion

#region 扩展数据
/// <summary>
/// 启用/禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]

public ActionResult Lock(string keyValue, string status)
{
recruitStuPlanIBLL.DisableEntity(keyValue, status);
return Success("操作成功!");
}
#endregion

}
}

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

@@ -0,0 +1,134 @@
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-12-14 19:11
/// 描 述:StuNotice
/// </summary>
public class StuNoticeController : MvcControllerBase
{
private StuNoticeIBLL stuNoticeIBLL = new StuNoticeBLL();

#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 = stuNoticeIBLL.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 StuNoticeData = stuNoticeIBLL.GetStuNoticeEntity(keyValue);
var jsonData = new
{
StuNotice = StuNoticeData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
stuNoticeIBLL.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)
{
StuNoticeEntity entity = strEntity.ToObject<StuNoticeEntity>();
stuNoticeIBLL.SaveEntity(keyValue, entity);
if (keyValue != null)
{
}
return Success("保存成功!");
}

/// <summary>
/// 启用/禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]

public ActionResult Lock(string keyValue, string status)
{
stuNoticeIBLL.EnableEntity(keyValue, status);
return Success("操作成功!");
}

#endregion

}
}

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

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "RecruitStuPlan";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">计划年月<font face="宋体">*</font></div>
<div id="PlanYearMonth" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">招生科类<font face="宋体">*</font></div>
<div id="RecruitStuSubject" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">省份<font face="宋体">*</font></div>
<div id="ProvinceNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<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="RecruitStuPlan">
<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="RecruitStuPlan">
<div class="lr-form-item-title">教务专业码</div>
<input id="GovMajorNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">教委专业名称</div>
<input id="GovMajorName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">计划招生人数<font face="宋体">*</font></div>
<input id="RecruitNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/Form.js")

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

@@ -0,0 +1,64 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 16:36
* 描 述:RecruitStuPlan
*/
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 () {
//学年
$('#PlanYearMonth').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' });
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]);
}
}
});
}
$('#RecruitNum').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('#form').lrGetFormData())
};
console.log(postData,"postData")
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.cshtml View File

@@ -0,0 +1,43 @@
@{
ViewBag.Title = "RecruitStuPlan";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">计划年月<font face="宋体">*</font></div>
<div id="PlanYearMonth" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">年级<font face="宋体">*</font></div>
<div id="Grade" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">招生科类<font face="宋体">*</font></div>
<div id="RecruitStuSubject" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<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="RecruitStuPlan">
<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="RecruitStuPlan">
<div class="lr-form-item-title">教务专业码</div>
<input id="GovMajorNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">教委专业名称</div>
<input id="GovMajorName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">本专科</div>
<div id="CollegeScience"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="RecruitStuPlan">
<div class="lr-form-item-title">计划招生人数<font face="宋体">*</font></div>
<input id="RecruitNum" type="text" class="form-control" isvalid="yes" checkexpession="Num" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js")

+ 72
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/FormPlan.js View File

@@ -0,0 +1,72 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 16:36
* 描 述:RecruitStuPlan
*/
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 () {
//学年
$('#PlanYearMonth').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' });
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE',value: 'pcode',text: 'pname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' });
$('#CollegeScience').lrDataItemSelect({ code: 'CollegeType' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/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]);
}
}
});
}
$('#RecruitNum').val('0');
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

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

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "RecruitStuPlan";
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="PlanYearMonth"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">招生科类</div>
<div id="RecruitStuSubject"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">省份</div>
<div id="ProvinceNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></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_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;审核</a>
<a id="lr_unlock" 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/RecruitStuPlan/Index.js")

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

@@ -0,0 +1,213 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 16:36
* 描 述:RecruitStuPlan
*/
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);
//学年
$('#PlanYearMonth').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' });
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () {
refreshGirdData();
});
}
});
}
});
//去审核
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 1) {
learun.alert.warning("选中记录中包含未审核审核项目!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageList',
headData: [
{ label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", },
{
label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'MidTermSubject',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "省份编码", name: "ProvinceNo", width: 100, align: "left", },
{
label: "省份", name: "ProvinceNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
key: value,
keyId: 'pcode',
callback: function (_data) {
callback(_data['pname']);
}
});
}
},
{
label: "系部编号", name: "DeptNo", 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: "MajorNo", width: 100, align: "left",
},
{
label: "专业名称", name: "MajorNo", width: 100, 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: "GovMajorNo", width: 100, align: "left" },
{ label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" },
{ label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" },
{
label: "状态", name: "CheckMark", width: 100, align: "left",
formatter: function (cellvalue) {
//return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
return cellvalue == true ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
}
},

],
mainId: 'PlanID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

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

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "RecruitStuPlan";
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="PlanYearMonth"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">招生科类</div>
<div id="RecruitStuSubject"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">省份</div>
<div id="ProvinceNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></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_lock" class="btn btn-default"><i class="fa fa-lock"></i>&nbsp;审核</a>
<a id="lr_unlock" 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/RecruitStuPlan/IndexPlan.js")

+ 219
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/RecruitStuPlan/IndexPlan.js View File

@@ -0,0 +1,219 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 16:36
* 描 述:RecruitStuPlan
*/
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);
//学年
$('#PlanYearMonth').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//年级
$('#Grade').lrselect({
placeholder: "请选择年级",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetGradeData',
value: 'value',
text: 'text'
});
$('#RecruitStuSubject').lrDataItemSelect({ code: 'MidTermSubject' });
$('#ProvinceNo').lrDataSourceSelect({ code: 'DIC_PROVINCE', value: 'pcode', text: 'pname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/FormPlan?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark.indexOf('true') != -1) {
learun.alert.warning("选中记录中包含已启用项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '1' }, function () {
refreshGirdData();
});
}
});
}
});
//去审核
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('PlanID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('CheckMark');
if (CheckMark != 1) {
learun.alert.warning("选中记录中包含未审核审核项目!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/Lock', { keyValue: keyValue, status: '0' }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/RecruitStuPlan/GetPageListPlan',
headData: [
{ label: "计划年月", name: "PlanYearMonth", width: 100, align: "left", },
{
label: "招生科类", name: "RecruitStuSubject", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'MidTermSubject',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "系部代码", name: "DeptNo", 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: "MajorNo", width: 100, align: "left",
},
{
label: "专业名称", name: "MajorNo", width: 100, 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: "CollegeScience", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'CollegeType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "教务专业码", name: "GovMajorNo", width: 100, align: "left" },
{ label: "教委专业名称", name: "GovMajorName", width: 100, align: "left" },
{ label: "计划招生人数", name: "RecruitNum", width: 100, align: "left" },
//{
// label: "状态", name: "CheckMark", width: 100, align: "left",
// formatter: function (cellvalue) {
// //return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
// return cellvalue == true ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
// }
//},

],
mainId: 'PlanID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

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

@@ -0,0 +1,31 @@
@{
ViewBag.Title = "StuNotice";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">学号<font face="宋体">*</font></div>
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">姓名<font face="宋体">*</font></div>
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">身份证号<font face="宋体">*</font></div>
<input id="CardId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">毕业证号</div>
<input id="NoticeId" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">地址<font face="宋体">*</font></div>
<input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="StuNotice" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuNotice/Form.js")

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

@@ -0,0 +1,50 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 19:11
* 描 述:StuNotice
*/
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/StuNotice/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/StuNotice/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

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

@@ -0,0 +1,49 @@
@{
ViewBag.Title = "StuNotice";
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="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">姓名</div>
<input id="StuName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">毕业证号</div>
<input id="NoticeId" 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>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_lock" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 审核</a>
<a id="lr_unlock" 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/StuNotice/Index.js")

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

@@ -0,0 +1,149 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-12-14 19:11
* 描 述:StuNotice
*/
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_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/StuNotice/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)) {
var CheckMark = $('#gridtable').jfGridValue('Status');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/StuNotice/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)) {
var CheckMark = $('#gridtable').jfGridValue('Status');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//审核
$('#lr_lock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('Status');
if (CheckMark != 0) {
learun.alert.warning("选中记录中包含已审核项目!");
return;
}
learun.layerConfirm('是否确认审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/Lock', { keyValue: keyValue, status: '1' }, function () {
refreshGirdData();
});
}
});
}
});
//去审核
$('#lr_unlock').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var CheckMark = $('#gridtable').jfGridValue('Status');
if (CheckMark != 1) {
learun.alert.warning("选中记录中包含未审核审核项目!");
return;
}
learun.layerConfirm('是否确认去审核该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuNotice/Lock', { keyValue: keyValue, status: '0' }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/StuNotice/GetPageList',
headData: [
{ label: "学号", name: "StuNo", width: 200, align: "left" },
{ label: "姓名", name: "StuName", width: 200, align: "left" },
{ label: "身份证号", name: "CardId", width: 200, align: "left" },
{ label: "毕业证号", name: "NoticeId", width: 200, align: "left" },
{ label: "地址", name: "Address", width: 200, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>"
: "<span class=\"label label-danger\">未审核</span>";
}
},
],
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();
}

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

@@ -847,6 +847,8 @@
<Compile Include="Areas\EducationalAdministration\Controllers\WorkStaffController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TalentsJoinInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\SunshineEducationController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\RecruitStuPlanController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuNoticeController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1063,6 +1065,8 @@
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\PracticeBase\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\FormPlan.js" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\IndexPlan.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\ClassReport.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\DeptReport.js" />
<Content Include="Areas\EducationalAdministration\Views\R_EnterBuilding\Form.js" />
@@ -6410,6 +6414,14 @@
<Content Include="Areas\EducationalAdministration\Views\TalentsJoinInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\StuNotice\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuNotice\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\StuNotice\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuNotice\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" />
@@ -7707,6 +7719,8 @@
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\IndexSuggest.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\UserForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\SunshineEducation\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\FormPlan.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\RecruitStuPlan\IndexPlan.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 74
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/BookBorrowApi.cs View File

@@ -23,6 +23,10 @@ namespace Learun.Application.WebApi.Modules
: base("/Learun/adms/EducationalAdministration/BookBorrow")
{
Get["/pagelist"] = GetPageList;
//Get["/list"] = GetList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

@@ -44,6 +48,76 @@ namespace Learun.Application.WebApi.Modules
};
return Success(jsonData);
}

///// <summary>
///// 获取页面显示列表数据
///// <summary>
///// <param name="_"></param>
///// <returns></returns>
//public Response GetList(dynamic _)
//{
// string queryJson = this.GetReqData();
// var data = bookBorrowIBLL.GetPageList(queryJson);
// return Success(data);
//}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var Book_borrowinfoData = bookBorrowIBLL.GetBook_borrowinfoEntity(keyValue);
var jsonData = new
{
Book_borrowinfo = Book_borrowinfoData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
bookBorrowIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Book_borrowinfoEntity entity = parameter.strEntity.ToObject<Book_borrowinfoEntity>();
bookBorrowIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/RecruitStuPlanMap.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-12-14 16:36
/// 描 述:RecruitStuPlan
/// </summary>
public class RecruitStuPlanMap : EntityTypeConfiguration<RecruitStuPlanEntity>
{
public RecruitStuPlanMap()
{
#region 表、主键
//表
this.ToTable("RECRUITSTUPLAN");
//主键
this.HasKey(t => t.PlanID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuNoticeMap.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-12-14 19:11
/// 描 述:StuNotice
/// </summary>
public class StuNoticeMap : EntityTypeConfiguration<StuNoticeEntity>
{
public StuNoticeMap()
{
#region 表、主键
//表
this.ToTable("STUNOTICE");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


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

@@ -603,6 +603,8 @@
<Compile Include="EducationalAdministration\WorkStaffMap.cs" />
<Compile Include="EducationalAdministration\TalentsJoinInfoMap.cs" />
<Compile Include="EducationalAdministration\SunshineEducationMap.cs" />
<Compile Include="EducationalAdministration\RecruitStuPlanMap.cs" />
<Compile Include="EducationalAdministration\StuNoticeMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 170
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanBLL.cs View File

@@ -0,0 +1,170 @@
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-12-14 16:36
/// 描 述:RecruitStuPlan
/// </summary>
public class RecruitStuPlanBLL : RecruitStuPlanIBLL
{
private RecruitStuPlanService recruitStuPlanService = new RecruitStuPlanService();

#region 获取数据

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

/// <summary>
/// 获取RecruitStuPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue)
{
try
{
return recruitStuPlanService.GetRecruitStuPlanEntity(keyValue);
}
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<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson)
{
try
{
return recruitStuPlanService.GetPageListPlan(pagination, queryJson);
}
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
{
recruitStuPlanService.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, RecruitStuPlanEntity entity)
{
try
{
recruitStuPlanService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

}
}

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanEntity.cs View File

@@ -0,0 +1,121 @@
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-12-14 16:36
/// 描 述:RecruitStuPlan
/// </summary>
public class RecruitStuPlanEntity
{
#region 实体成员
/// <summary>
/// 唯一键
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("PLANID")]
public int? PlanID { get; set; }
/// <summary>
/// PlanYearMonth计划年月
/// </summary>
[Column("PLANYEARMONTH")]
public string PlanYearMonth { get; set; }
/// <summary>
/// 招生科类(关联表CdRecruitStuSubject)
/// </summary>
[Column("RECRUITSTUSUBJECT")]
public string RecruitStuSubject { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 专业代码
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 专业名称
/// </summary>
[Column("MAJORNAME")]
public string MajorName { get; set; }
/// <summary>
/// 系所代码
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 系名
/// </summary>
[Column("DEPTNAME")]
public string DeptName { get; set; }
/// <summary>
/// 教委专业代码
/// </summary>
[Column("GOVMAJORNO")]
public string GovMajorNo { get; set; }
/// <summary>
/// 教委专业名称
/// </summary>
[Column("GOVMAJORNAME")]
public string GovMajorName { get; set; }
/// <summary>
/// 省市码
/// </summary>
[Column("PROVINCENO")]
public string ProvinceNo { get; set; }
/// <summary>
/// 省市简称
/// </summary>
[Column("PROVINCEBRIEF")]
public string ProvinceBrief { get; set; }
/// <summary>
/// 招生人数
/// </summary>
[Column("RECRUITNUM")]
public int? RecruitNum { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 审查标志
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
/// <summary>
/// 本专科
/// </summary>
[Column("COLLEGESCIENCE")]
public string CollegeScience { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{

}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.PlanID = Convert.ToInt32(keyValue);
}
#endregion
#region 扩展字段
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanIBLL.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-12-14 16:36
/// 描 述:RecruitStuPlan
/// </summary>
public interface RecruitStuPlanIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<RecruitStuPlanEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson);
/// <summary>
/// 获取RecruitStuPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
RecruitStuPlanEntity GetRecruitStuPlanEntity(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, RecruitStuPlanEntity entity);
void DisableEntity(string keyValue, string status);

#endregion

}
}

+ 271
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/RecruitStuPlan/RecruitStuPlanService.cs View File

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

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

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

/// <summary>
/// 获取RecruitStuPlan表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public RecruitStuPlanEntity GetRecruitStuPlanEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(keyValue.ToInt());
}
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<RecruitStuPlanEntity> GetPageListPlan(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append(@"select PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName,
DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience, count(RecruitNum) as RecruitNum from RecruitStuPlan t");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["PlanYearMonth"].IsEmpty())
{
dp.Add("PlanYearMonth", queryParam["PlanYearMonth"].ToString(), DbType.String);
strSql.Append(" AND t.PlanYearMonth = @PlanYearMonth ");
}
if (!queryParam["RecruitStuSubject"].IsEmpty())
{
dp.Add("RecruitStuSubject", queryParam["RecruitStuSubject"].ToString(), DbType.String);
strSql.Append(" AND t.RecruitStuSubject = @RecruitStuSubject ");
}
if (!queryParam["ProvinceNo"].IsEmpty())
{
dp.Add("ProvinceNo", queryParam["ProvinceNo"].ToString(), DbType.String);
strSql.Append(" AND t.ProvinceNo = @ProvinceNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
strSql.Append(@"group by PlanYearMonth, RecruitStuSubject, Grade, MajorNo, MajorName,
DeptNo, DeptName, GovMajorNo, GovMajorName,CollegeScience ");
return this.BaseRepository("CollegeMIS").FindList<RecruitStuPlanEntity>(strSql.ToString(), dp, pagination);
}
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
{
var Id = keyValue.ToInt();
this.BaseRepository("CollegeMIS").Delete<RecruitStuPlanEntity>(t => t.PlanID == Id);
}
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, RecruitStuPlanEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
entity.CheckMark = "0";
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DisableEntity(string keyValue, string status)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
List<string> Ids = keyValue.Split(',').ToList();
List<RecruitStuPlanEntity> AwardandPEntity = new List<RecruitStuPlanEntity>();
if (status == "1")
{
foreach (var item in Ids)
{
var ID = item.ToInt();
var list = this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(x => x.PlanID == ID);
if (list != null)
{
list.CheckMark = status;
AwardandPEntity.Add(list);
}
}
}
else
{
foreach (var item in Ids)
{
var ID = item.ToInt();
var list = this.BaseRepository("CollegeMIS").FindEntity<RecruitStuPlanEntity>(x => x.PlanID == ID);
if (list != null)
{
list.CheckMark = status;
AwardandPEntity.Add(list);
}
}
}
db.Update(AwardandPEntity);
db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeBLL.cs View File

@@ -0,0 +1,148 @@
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-12-14 19:11
/// 描 述:StuNotice
/// </summary>
public class StuNoticeBLL : StuNoticeIBLL
{
private StuNoticeService stuNoticeService = new StuNoticeService();

#region 获取数据

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

/// <summary>
/// 获取StuNotice表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuNoticeEntity GetStuNoticeEntity(string keyValue)
{
try
{
return stuNoticeService.GetStuNoticeEntity(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
{
stuNoticeService.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, StuNoticeEntity entity)
{
try
{
stuNoticeService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

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

}
}

+ 80
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeEntity.cs View File

@@ -0,0 +1,80 @@
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-12-14 19:11
/// 描 述:StuNotice
/// </summary>
public class StuNoticeEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// StuNo
/// </summary>
[Column("STUNO")]
public string StuNo { get; set; }
/// <summary>
/// StuName
/// </summary>
[Column("STUNAME")]
public string StuName { get; set; }
/// <summary>
/// CardId
/// </summary>
[Column("CARDID")]
public string CardId { get; set; }
/// <summary>
/// NoticeId
/// </summary>
[Column("NOTICEID")]
public string NoticeId { get; set; }
/// <summary>
/// Address
/// </summary>
[Column("ADDRESS")]
public string Address { get; set; }
/// <summary>
/// Status
/// </summary>
[Column("STATUS")]
public string Status { 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
}
}


+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeIBLL.cs View File

@@ -0,0 +1,50 @@
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-12-14 19:11
/// 描 述:StuNotice
/// </summary>
public interface StuNoticeIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuNoticeEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取StuNotice表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
StuNoticeEntity GetStuNoticeEntity(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, StuNoticeEntity entity);

void EnableEntity(string keyValue, string status);
#endregion

}
}

+ 208
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuNotice/StuNoticeService.cs View File

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

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

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

/// <summary>
/// 获取StuNotice表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public StuNoticeEntity GetStuNoticeEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<StuNoticeEntity>(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<StuNoticeEntity>(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, StuNoticeEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
entity.Status = "0";
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// 注册
/// </summary>
/// <param name="keyValue">主键</param>
public void EnableEntity(string keyValue, string status)
{
var db = BaseRepository("CollegeMIS").BeginTrans();
try
{
List<string> Ids = keyValue.Split(',').ToList();
List<StuNoticeEntity> StuNoticeEntity = new List<StuNoticeEntity>();
if (status == "1")
{
foreach (var item in Ids)
{
var list = this.BaseRepository("CollegeMIS").FindEntity<StuNoticeEntity>(x => x.ID == item);
if (list != null)
{
list.Status = "1";
StuNoticeEntity.Add(list);
}
}
}
else
{
foreach (var item in Ids)
{
var list = this.BaseRepository("CollegeMIS").FindEntity<StuNoticeEntity>(x => x.ID == item);
if (list != null)
{
list.Status = "0";
StuNoticeEntity.Add(list);
}
}
}
db.Update(StuNoticeEntity);
db.Commit();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

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

@@ -1847,6 +1847,14 @@
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationService.cs" />
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationIBLL.cs" />
<Compile Include="EducationalAdministration\SunshineEducation\SunshineEducationBLL.cs" />
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanEntity.cs" />
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanService.cs" />
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanBLL.cs" />
<Compile Include="EducationalAdministration\RecruitStuPlan\RecruitStuPlanIBLL.cs" />
<Compile Include="EducationalAdministration\StuNotice\StuNoticeEntity.cs" />
<Compile Include="EducationalAdministration\StuNotice\StuNoticeService.cs" />
<Compile Include="EducationalAdministration\StuNotice\StuNoticeBLL.cs" />
<Compile Include="EducationalAdministration\StuNotice\StuNoticeIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 345
- 304
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/list.vue View File

@@ -1,304 +1,345 @@
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>
<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">
<l-customlist :tips="loadState" showTips>
<!-- 单条记录 -->
<view class="customlist-item" v-for="item of list" :key="item.ID">
<view class="customlist-item-field">
<text class="customlist-item-field-title">借书时间:</text>
{{ displayListItem(item, 'BorrowTime') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">还书时间:</text>
{{ displayListItem(item, 'ReturnTime') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">借书证:</text>
{{ displayListItem(item, 'LibraryCard') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">图书编号:</text>
{{ displayListItem(item, 'BookID') }}
</view>
<!-- <l-customlist-action showEdit @edit="action('edit', item.ID)" showDelete @delete="action('delete', item.ID)" @view="action('view', item.ID)" /> -->
</view>
</l-customlist>
</l-scroll-list>
</view>
<!-- 关闭侧边抽屉按钮 -->
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose">
<l-icon type="pullright" color="blue" />
</view>
<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<view v-if="ready" class="padding">
<l-customlist-sidepage-datefilter
v-model="dateRange"
@change="searchChange"
title="按时间日期查询: "
ref="datefilter"
class="margin-bottom"
/>
<l-input
v-model="queryData.LibraryCard"
@change="searchChange"
title ="借书证"
placeholder="按借书证查询"
/>
<l-input
v-model="queryData.BookID"
@change="searchChange"
title ="图书编号"
placeholder="按图书编号查询"
/>
<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
</view>
</view>
</scroll-view>
<!-- <l-customlist-add v-if="!sideOpen" @click="action('add')" /> -->
</view>
</template>
<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-14 11:43
* 描 述:1111
*/
/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/BookBorrow/list", "style": { "navigationBarTitleText": "表单列表页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'
export default {
data() {
return {
// 数据项的数据类型、结构
scheme: {
BorrowTime: { type: 'text' },
ReturnTime: { type: 'text' },
LibraryCard: { type: 'text' },
BookID: { type: 'text' },
},
// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
LibraryCard: '',
BookID: '',
},
// 数据源
dataSource: {
},
// 时间查询参数
dateRange: null,
// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
sideOpen: false,
// 列表与分页信息
page: 1,
total: 2,
list: []
}
},
async onLoad() {
await this.init()
},
onUnload() {
this.OFF('EducationalAdministrationBookBorrow-list-change')
},
methods: {
// 页面初始化
async init() {
this.ON('EducationalAdministrationBookBorrow-list-change', this.refreshList)
// 拉取加载列表和数据源
await Promise.all([
() => {}
])
await this.fetchList()
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
},
// 拉取列表
async fetchList(isConcat=true) {
if (this.page > this.total) { return }
const result = await this.HTTP_GET(
'learun/adms/EducationalAdministration/BookBorrow/pagelist',
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'ID', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'
)
if (!result) { return }
this.total = result.total
this.page = result.page + 1
this.list = isConcat?this.list.concat(result.rows):result.rows;
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项`
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多'
},
// 刷新清空列表
async refreshList(isConcat=true) {
this.page = 1
this.total = 2
this.list = []
await this.fetchList(isConcat)
},
// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.list.stopPullDown()
})
},
// 设置搜索条件
async searchChange() {
const result = {}
// 时间查询相关参数
if (this.dateRange) {
result.StartTime = this.dateRange.start
result.EndTime = this.dateRange.end
}
// 将其他查询项添加到查询 JSON 中
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t))
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t)))
this.searchData = result
await this.refreshList(false)
},
// 点击「清空查询条件」按钮
reset() {
this.queryData = this.COPY(this.defaultQueryData)
this.$refs.datefilter.changeDateRange('all')
// this.searchChange()
},
// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
return
case 'add':
this.NAV_TO('./single?type=create')
return
case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
return
case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) {
return
}
this.HTTP_POST('learun/adms/EducationalAdministration/BookBorrow/delete', id, '删除失败').then(success => {
if(!success) { return }
this.TOAST('删除成功', 'success')
this.refreshList()
})
return
default:
return
}
},
// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]
switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, '')
case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
return get(selectItem, 'text', '')
case 'checkbox':
if (!value || value.split(',').length <= 0) { return '' }
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(',')
case 'datetime':
if (!value) { return '' }
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm')
default: return value === null || value === undefined ? '' : value
}
}
}
}
</script>
<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
</style>
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>

<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">
<l-customlist :tips="loadState" showTips>
<!-- 单条记录 -->
<view class="customlist-item" v-for="item of list" :key="item.ID">

<view class="customlist-item-field">
<text class="customlist-item-field-title">借书时间:</text>
{{ displayListItem(item, 'BorrowTime') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">还书时间:</text>
{{ displayListItem(item, 'ReturnTime') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">借书证:</text>
{{ displayListItem(item, 'LibraryCard') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">图书编号:</text>
{{ displayListItem(item, 'BookID') }}
</view>


<view class="customlist-banner-action">
<view @click="action('delete', item.ID)"
class="customlist-banner-action-btn line-red text-sm"
style="border: currentColor 1px solid">
<l-icon type="delete" />
删除
</view>

<view @click="action('edit', item.ID)"
class="customlist-banner-action-btn line-blue text-sm"
style="border: currentColor 1px solid">
<l-icon type="edit" />
编辑
</view>

</view>

<!-- <l-customlist-action showEdit @edit="action('edit', item.ID)" showDelete @delete="action('delete', item.ID)" @view="action('view', item.ID)" /> -->
</view>
</l-customlist>
</l-scroll-list>
</view>

<!-- 关闭侧边抽屉按钮 -->
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose">
<l-icon type="pullright" color="blue" />
</view>

<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<view v-if="ready" class="padding">

<l-customlist-sidepage-datefilter v-model="dateRange" @change="searchChange" title="按时间日期查询: "
ref="datefilter" class="margin-bottom" />

<l-input v-model="queryData.LibraryCard" @change="searchChange" title="借书证" placeholder="按借书证查询" />
<l-input v-model="queryData.BookID" @change="searchChange" title="图书编号" placeholder="按图书编号查询" />

<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
</view>
</view>
</scroll-view>

<l-customlist-add v-if="!sideOpen" @click="action('add')" />

</view>
</template>


<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-14 11:43
* 描 述:1111
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/BookBorrow/list", "style": { "navigationBarTitleText": "表单列表页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'

export default {
data() {
return {
// 数据项的数据类型、结构
scheme: {
BorrowTime: {
type: 'text'
},
ReturnTime: {
type: 'text'
},
LibraryCard: {
type: 'text'
},
BookID: {
type: 'text'
},
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
LibraryCard: '',
BookID: '',
},

// 数据源
dataSource: {},

// 时间查询参数
dateRange: null,

// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
sideOpen: false,

// 列表与分页信息
page: 1,
total: 2,
list: []
}
},

async onLoad() {
await this.init()
},
onUnload() {
this.OFF('EducationalAdministrationBookBorrow-list-change')
},

methods: {
// 页面初始化
async init() {
this.ON('EducationalAdministrationBookBorrow-list-change', this.refreshList)

// 拉取加载列表和数据源
await Promise.all([


() => {}
])
await this.fetchList()
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
},

// 拉取列表
async fetchList(isConcat = true) {
if (this.page > this.total) {
return
}

const result = await this.HTTP_GET(
'learun/adms/EducationalAdministration/BookBorrow/pagelist', {
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: {
rows: 10,
page: this.page,
sidx: 'ID',
sord: 'DESC'
},
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'
)

if (!result) {
return
}

this.total = result.total
this.page = result.page + 1
this.list = isConcat ? this.list.concat(result.rows) : result.rows;

this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项`
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多'
},

// 刷新清空列表
async refreshList(isConcat = true) {
this.page = 1
this.total = 2
this.list = []

await this.fetchList(isConcat)
},

// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.list.stopPullDown()
})
},

// 设置搜索条件
async searchChange() {
const result = {}

// 时间查询相关参数
if (this.dateRange) {
result.StartTime = this.dateRange.start
result.EndTime = this.dateRange.end
}

// 将其他查询项添加到查询 JSON 中
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t))
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t)))

this.searchData = result
await this.refreshList(false)
},

// 点击「清空查询条件」按钮
reset() {
this.queryData = this.COPY(this.defaultQueryData)
this.$refs.datefilter.changeDateRange('all')
// this.searchChange()
},

// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
return

case 'add':
this.NAV_TO('./single?type=create')
return

case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
return

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) {
return
}

this.HTTP_POST('learun/adms/EducationalAdministration/BookBorrow/delete', id, '删除失败').then(
success => {
if (!success) {
return
}
this.TOAST('删除成功', 'success')
this.refreshList()
})
return

default:
return
}
},

// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]

switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType),
`${value}.name`, '')

case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
return get(selectItem, 'text', '')

case 'checkbox':
if (!value || value.split(',').length <= 0) {
return ''
}
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(
',')

case 'datetime':
if (!value) {
return ''
}
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' :
'YYYY-MM-DD HH:mm')

default:
return value === null || value === undefined ? '' : value
}
}

}
}
</script>


<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';

.customlist-banner-action {
margin-top: 20rpx;
text-align: right;

.customlist-banner-action-btn {
display: inline-block;
padding: 4px 6px;
margin: 0 3px;
border-radius: 3px;
text-align: center;
}
}
</style>

+ 215
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/BookBorrow/single.vue View File

@@ -0,0 +1,215 @@
<template>
<view class="page">
<view v-if="ready">
<l-datetime-picker
@input="setValue('Book_borrowinfo.BorrowTime', $event)"
:value="getValue('Book_borrowinfo.BorrowTime')"
:disabled="!edit"
title="借书时间"
/>
<l-datetime-picker
@input="setValue('Book_borrowinfo.ReturnTime', $event)"
:value="getValue('Book_borrowinfo.ReturnTime')"
:disabled="!edit"
title="借书时间"
/>
<l-input
@input="setValue('Book_borrowinfo.LibraryCard', $event)"
:value="getValue('Book_borrowinfo.LibraryCard')"
:disabled="!edit"
title="借书证"
/>
<l-input
@input="setValue('Book_borrowinfo.BookID', $event)"
:value="getValue('Book_borrowinfo.BookID')"
:disabled="!edit"
title="图书编号"
/>
</view>
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
提交保存
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
编辑本页
</l-button>
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block>
取消编辑
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</view>
</view>
</template>
<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-20 09:25
* 描 述:活动安排
*/
/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/BookBorrow/single", "style": { "navigationBarTitleText": "表单详情页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import get from 'lodash/get'
import set from 'lodash/set'
import moment from 'moment'
import customPageMixins from '@/common/custompage.js'
export default {
mixins: [customPageMixins],
data() {
return {
// 页面相关参数
id: null,
mode: null,
edit: null,
ready: false,
// 表单数据
current: {},
origin: {},
// 表单项数据结构
scheme: {
Book_borrowinfo: {
BorrowTime: { type: 'datetime', title: '时间', dateformat: '1' },
ReturnTime: { type: 'datetime', title: '时间', dateformat: '1' },
LibraryCard: { type: 'text', title: '借书证' },
BookID: { type: 'text', title: '图书编号' },
},
},
// 数据源
dataSource: {
Book_borrowinfo: {
},
}
}
},
async onLoad({ type, id }) {
await this.init(type, id)
},
methods: {
// 页面初始化
async init(type, id) {
this.LOADING('加载数据中...')
this.id = id
this.mode = type
this.edit = ['create', 'edit'].includes(this.mode)
// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([
() => {}
])
await this.fetchForm()
this.ready = true
this.HIDE_LOADING()
},
// 加载表单数据
async fetchForm() {
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
} else {
const result = await this.HTTP_GET('learun/adms/EducationalAdministration/BookBorrow/form', this.id)
console.log(result)
this.origin = await this.formatFormData(result)
}
this.current = this.COPY(this.origin)
console.log(this.current)
},
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
async action(type) {
switch (type) {
case 'edit':
this.edit = true
break
case 'reset':
this.current = this.COPY(this.origin)
this.edit = false
break
case 'save':
const verifyResult = this.verifyForm()
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
}
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
return
}
this.LOADING('正在提交...')
const postData = await this.getPostData(this.id)
this.HTTP_POST('learun/adms/EducationalAdministration/BookBorrow/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.EMIT('EducationalAdministrationBookBorrow-list-change')
this.NAV_BACK()
this.TOAST('提交保存成功')
})
break
case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) {
return
}
this.LOADING('提交删除中...')
this.HTTP_POST('learun/adms/EducationalAdministration/BookBorrow/delete', this.id, '删除失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.EMIT('EducationalAdministrationBookBorrow-list-change')
this.NAV_BACK()
this.this.TOAST('删除成功', 'success')
})
break
default: break
}
},
// 获取表单值
getValue(path) {
return get(this.current, path)
},
// 设置表单值
setValue(path, val) {
set(this.current, path, val)
}
}
}
</script>

Loading…
Cancel
Save