From d6aab6ba754bd4d19e0c421b58cbc9c25d46d761 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 22 Dec 2021 22:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95=20?= =?UTF-8?q?=E6=8A=A5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuVolunteerController.cs | 42 ---- .../StuVolunteerPhoneController.cs | 189 ++++++++++++++++++ .../Views/StuVolunteer/IndexAccount.js | 3 +- .../FormApply.cshtml | 6 +- .../Link.cshtml | 4 +- .../Views/StuVolunteerPhone/QRCode.cshtml | 61 ++++++ .../Search.cshtml | 8 +- .../SearchResult.cshtml | 81 ++------ .../server.js | 2 +- .../Learun.Application.Web.csproj | 20 +- 10 files changed, 287 insertions(+), 129 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/{StuVolunteer => StuVolunteerPhone}/FormApply.cshtml (99%) rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/{StuVolunteer => StuVolunteerPhone}/Link.cshtml (91%) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/QRCode.cshtml rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/{StuVolunteer => StuVolunteerPhone}/Search.cshtml (95%) rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/{StuVolunteer => StuVolunteerPhone}/SearchResult.cshtml (62%) rename Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/{StuVolunteer => StuVolunteerPhone}/server.js (88%) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs index ce3701096..a8e3f48ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerController.cs @@ -114,48 +114,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - - /// - /// 生成二维码 - /// - /// - [HttpGet] - public ActionResult Link() - { - return View(); - } - - /// - /// 报名 - /// - /// - [HttpGet] - public ActionResult FormApply() - { - return View(); - } - - /// - /// 查询报名 - /// - /// - [HttpGet] - public ActionResult Search() - { - return View(); - } - - - /// - /// 查询报名 - /// - /// - [HttpGet] - public ActionResult SearchResult() - { - return View(); - } - #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs new file mode 100644 index 000000000..f08e5b0a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuVolunteerPhoneController.cs @@ -0,0 +1,189 @@ +using System; +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; +using Learun.Application.Organization; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-12-16 10:14 + /// 描 述:长阳迎新 + /// + public class StuVolunteerPhoneController : MvcControllerBaseNoLogin + { + private StuVolunteerIBLL stuVolunteerIBLL = new StuVolunteerBLL(); + + #region 视图功能 + /// + /// 生成二维码 + /// + /// + [HttpGet] + public ActionResult QRCode() + { + return View(); + } + + /// + /// 生成二维码 + /// + /// + [HttpGet] + public ActionResult Link() + { + return View(); + } + + /// + /// 报名 + /// + /// + [HttpGet] + public ActionResult FormApply() + { + return View(); + } + + /// + /// 查询报名 + /// + /// + [HttpGet] + public ActionResult Search() + { + return View(); + } + + + /// + /// 查询报名 + /// + /// + [HttpGet] + public ActionResult SearchResult() + { + return View(); + } + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuVolunteerIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var StuVolunteerData = stuVolunteerIBLL.GetStuVolunteerEntity(keyValue); + var jsonData = new + { + StuVolunteer = StuVolunteerData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + #endregion + + + #region 扩展数据 + + /// + /// 报名草稿 + /// + /// + /// + /// + public ActionResult DraftForm(string keyValue, string strEntity) + { + StuVolunteerEntity entity = strEntity.ToObject(); + entity.IsSubmit = false; + stuVolunteerIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + + /// + /// 提交选择专业 + /// + /// + /// + /// + public ActionResult SubmitForm(string keyValue, string strEntity) + { + StuVolunteerEntity entity = strEntity.ToObject(); + entity.IsSubmit = true; + stuVolunteerIBLL.SaveEntity(keyValue, entity); + return Success("提交成功!"); + } + + + public ActionResult Search(string CardNo, string txtPass) + { + var StuVolunteerData = stuVolunteerIBLL.IsEnrollByCard(CardNo); + if (StuVolunteerData != null) + { + var jsonData = new + { + StuVolunteer = StuVolunteerData, + }; + return Success(jsonData); + } + else + { + return Success(null); + } + } + + public ActionResult SearchForm(string CardNo, string txtPass) + { + var StuVolunteerData = stuVolunteerIBLL.IsEnrollByCard(CardNo); + if (StuVolunteerData != null) + { + var jsonData = new + { + StuVolunteer = StuVolunteerData, + }; + return Success(jsonData); + } + else + { + return Success(null); + } + } + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexAccount.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexAccount.js index 6bae44391..77fab9c77 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexAccount.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/IndexAccount.js @@ -24,11 +24,10 @@ var bootstrap = function ($, learun) { //生成二维码 $("#lr_qrcode").on('click', function () { - var kayValue = $('#gridtable').jfGridValue('IsEnroll'); learun.layerForm({ id: 'formcard', title: '扫描二维码', - url: top.$.rootUrl + '/EducationalAdministration/StuVolunteer/QRCode?EmpNo' + kayValue, + url: top.$.rootUrl + '/EducationalAdministration/StuVolunteerPhone/QRCode', width: 700, height: 300, btn: null, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormApply.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/FormApply.cshtml similarity index 99% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormApply.cshtml rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/FormApply.cshtml index ad4b0851d..d55c75b08 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/FormApply.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/FormApply.cshtml @@ -299,9 +299,9 @@ //} var strEntity = JSON.stringify(data.field); - strEntity.CardId = CardId; + //strEntity.CardNo = CardNo; $.ajax({ - url: '/EducationalAdministration/StuVolunteer/DraftForm?keyValue=&IDCARD=' + CardId, + url: '/EducationalAdministration/StuVolunteerPhone/DraftForm', data: { strEntity: strEntity }, type: "POST", dataType: "json", @@ -310,7 +310,7 @@ success: function (data) { if (data.code == 200) { alert('报名成功,请等待考试通知'); - location.href = '/EducationalAdministration/StuVolunteer/Link?CardId=' + CardId; + location.href = '/EducationalAdministration/StuVolunteer/Link?CardNo=' + CardNo; } else { return alert(data.data); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Link.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Link.cshtml similarity index 91% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Link.cshtml rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Link.cshtml index 3860ab2c0..c0f3de2fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Link.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Link.cshtml @@ -25,9 +25,9 @@ $(function () { var CardNo = request('CardNo'); //报名 - $('#stuenroll').attr('href', '/EducationalAdministration/StuVolunteer/FormApply?EmpNo=' + CardNo); + $('#stuenroll').attr('href', '/EducationalAdministration/StuVolunteerPhone/FormApply?EmpNo=' + CardNo); //查询录取结果 - $('#res').attr('href', '/EducationalAdministration/StuVolunteer/Search'); + $('#res').attr('href', '/EducationalAdministration/StuVolunteerPhone/Search'); }) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/QRCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/QRCode.cshtml new file mode 100644 index 000000000..b971a77f2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/QRCode.cshtml @@ -0,0 +1,61 @@ + + + + + + + + CardPrint + @Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js") + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js") + + + + + + +
+
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Search.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Search.cshtml similarity index 95% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Search.cshtml rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Search.cshtml index fa6fb09a7..b6408eb49 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteer/Search.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuVolunteerPhone/Search.cshtml @@ -35,11 +35,11 @@
* 密码 - +
-
提交
+
登录
@@ -50,7 +50,7 @@ @**@ - + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js") - @**@ - + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteerPhone/server.js")