From c9e082592f292183e4ad14d4a3050f3f8101e3d4 Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 17 May 2021 18:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E8=AE=BF=E5=AE=A2=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E3=80=81=E6=A1=8C=E9=9D=A2=E8=AE=BE=E7=BD=AE=20?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/TeachSwitch/Index.js | 6 +- .../Controllers/VisitorInfoController.cs | 241 +++++++ .../Views/VisitorInfo/Form.cshtml | 39 + .../Views/VisitorInfo/Form.js | 98 +++ .../Views/VisitorInfo/FormAdd.cshtml | 286 ++++++++ .../Views/VisitorInfo/FormAdd2.cshtml | 330 +++++++++ .../Views/VisitorInfo/Index.cshtml | 50 ++ .../Views/VisitorInfo/Index.js | 191 +++++ .../Views/VisitorInfo/fromAdd.css | 354 +++++++++ .../Content/css/fromAdd.css | 670 ++++++++++-------- .../Content/laydate/theme/laydate.css | 2 + .../Content/layui/css/code.css | 2 + .../Controllers/LoginController.cs | 4 + .../Learun.Application.Web.csproj | 10 + .../Views/Login/PageSix.cshtml | 4 + .../Learun.Application.Mapping.csproj | 1 + .../PersonnelManagement/VisitorInfoMap.cs | 29 + .../DBModel/资产系统.PDM | 38 +- .../TeachSwitch/TeachSwitchService.cs | 11 + .../Learun.Application.TwoDevelopment.csproj | 4 + .../VisitorInfo/VisitorInfoBLL.cs | 238 +++++++ .../VisitorInfo/VisitorInfoEntity.cs | 82 +++ .../VisitorInfo/VisitorInfoIBLL.cs | 72 ++ .../VisitorInfo/VisitorInfoService.cs | 330 +++++++++ 24 files changed, 2787 insertions(+), 305 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js index a317d1f94..5e9e959ec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachSwitch/Index.js @@ -71,7 +71,7 @@ var bootstrap = function ($, learun) { headData: [ { label: "开关名称", name: "type", width: 150, align: "left", - formatter: function (val) { + formatter: function(val) { if (val == 'js') { return '教师注册开关'; } else if (val == 'fx') { @@ -80,10 +80,12 @@ var bootstrap = function ($, learun) { return '网上办事大厅开关'; } else if (val == 'wxloginforpc') { return '微信快捷登录PC端'; + } else if (val == 'fk') { + return '访客注册开关'; } } - }, + }, { label: "功能开启", name: "status", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs new file mode 100644 index 000000000..3af53ed22 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/VisitorInfoController.cs @@ -0,0 +1,241 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using Quanjiang.DigitalScholl.SendSms; +using System; +using Learun.Cache.Redis; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public class VisitorInfoController : MvcControllerBase + { + private VisitorInfoIBLL visitorInfoIBLL = new VisitorInfoBLL(); + CacheByRedis _redis = new CacheByRedis(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormAdd() + { + return View(); + } + + #endregion + + #region 获取数据 + /// + /// 生成验证码 + /// + /// + [HttpGet] + public ActionResult VerifyCode() + { + return File(new VerifyCode().GetVerifyCode(), @"image/Gif"); + } + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = visitorInfoIBLL.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 VisitorInfoData = visitorInfoIBLL.GetVisitorInfoEntity(keyValue); + var jsonData = new + { + VisitorInfo = VisitorInfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + /// + /// 验证图片验证码 + /// + /// 验证码 + /// + [HttpPost] + [AjaxOnly] + public ActionResult CheckVerifycode(string verifycode) + { + verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16); + if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString()) + { + return Fail("验证码错误"); + } + return Success(""); + } + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + visitorInfoIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// 图片验证码 + /// 手机验证码 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity, string verifycode, string phonecode) + { + VisitorInfoEntity entity = strEntity.ToObject(); + var VisitorInfoData = visitorInfoIBLL.GetEntityByPhone(entity.VPhone); + if (string.IsNullOrEmpty(keyValue) && VisitorInfoData != null) + return Fail("手机号已存在!"); + else if (!string.IsNullOrEmpty(keyValue) && VisitorInfoData.VID != keyValue) + return Fail("手机号已存在!"); + + //验证图片验证码 + verifycode = Md5Helper.Encrypt(verifycode.ToLower(), 16); + if (Session["session_verifycode"].IsEmpty() || verifycode != Session["session_verifycode"].ToString()) + { + return Fail("验证码错误"); + } + //验证手机验证码 + var type = (SmsType)Enum.Parse(typeof(SmsType), "0"); + var smscode = _redis.Read($"checkcode_{type}_{entity.VPhone}"); + if (!string.IsNullOrEmpty(smscode)) + { + if (smscode != phonecode) + { + return Fail("手机验证码不正确,请核对!"); + } + } + + entity.VState = 0; + entity.VApplyTime = DateTime.Now; + visitorInfoIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + + /// + /// 审核 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Check(string keyValue) + { + var keyValueArr = keyValue.Split(','); + var keyValues = "'" + string.Join("','", keyValueArr) + "'"; + visitorInfoIBLL.Check(keyValues); + + return Success("审核成功!"); + } + + /// + /// 取消审核 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult UnCheck(string keyValue) + { + var keyValueArr = keyValue.Split(','); + var keyValues = "'" + string.Join("','", keyValueArr) + "'"; + visitorInfoIBLL.UnCheck(keyValues); + return Success("取消审核成功!"); + } + + + /// + /// 全部审核 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult CheckAll() + { + visitorInfoIBLL.CheckAll(); + return Success("全部审核成功!"); + } + + /// + /// 生成帐号 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult Generate() + { + visitorInfoIBLL.GenerateAccout(); + return Success("生成成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml new file mode 100644 index 000000000..89f91ef7f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "访客管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + + + 姓名* + + + + 手机号* + + + + 申请理由 + + + + 来访目的 + + + + 备注 + + + + + 验证码 + + + @*~/PersonnelManagement/VisitorInfo/VerifyCode*@ + + + 手机验证码 + + 获取手机验证码 + + +@Html.AppendJsFile("/Areas/PersonnelManagement/Views/VisitorInfo/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js new file mode 100644 index 000000000..06e3646b5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Form.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-17 10:11 + * 描 述:访客管理 + */ +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 () { + // 点击切换验证码 + $("#lr_verifycode_img").click(function () { + $("#verifycode").val(''); + $("#lr_verifycode_img").attr("src", top.$.rootUrl + "/PersonnelManagement/VisitorInfo/VerifyCode?time=" + Math.random()); + }); + var errornum = $('#errornum').val(); + if (errornum >= 3) { + + $(".codeInput").show(); + $("#lr_verifycode_img").trigger('click'); + }; + + //图片验证码 + $("#verifycode").blur(function () { + var postData = { + verifycode: $('#verifycode').val() + }; + //失去焦点时判断验证码是否正确 + $.lrPostForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/CheckVerifycode', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + + }); + //获取手机验证码 + $("#getPhoneCode").on('click', function () { + $.ajax({ + url: $.rootUrl + "/Login/GetCheckCode", + //headers: { __RequestVerificationToken: $.lrToken }, + data: { mobile: $('#VPhone').val(), smsType: 0 }, + type: "post", + dataType: "json", + success: function (res) { + + } + }); + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/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 verifycode = $.trim($("#verifycode").val()); + if ($("#verifycode").is(":visible") && verifycode == "") { + learun.alert.warning('请输入验证码!'); + $verifycode.focus(); + return false; + } + + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()), + verifycode: verifycode, + phonecode: $('#phonecode').val() + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml new file mode 100644 index 000000000..432be3f0e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd.cshtml @@ -0,0 +1,286 @@ +@{ + ViewBag.Title = "FormAdd"; + Layout = null; +} + + + + + + + + + + 数字化校园-访客注册 + + + + + + + + + + + + + + + + + + + 数字化智慧校园 | 访客信息注册 + + + + + + + 注册 + + + + + * 姓名 + + + + + * 手机号 + + + + + 申请理由 + + + + + 来访目的 + + + + + 备注 + + @**@ + + + + + * 图形验证 + + + + + + + + + + * 短信验证 + + + + + + + @* + 图片验证码 + + + + + + + 手机验证码 + + 获取手机验证码 + *@ + + + 提交 + + + + + + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml new file mode 100644 index 000000000..79db305c6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/FormAdd2.cshtml @@ -0,0 +1,330 @@ +@{ + ViewBag.Title = "FormAdd"; + Layout = null; +} + + + + + + + + + + + + + + 数字化校园-教师注册 + + + + + + + + + + + + + + + + + 数字化智慧校园 | 教职工信息注册 + + + + + + + 注册 + + + + + * 姓名 + + + + * 电话 + + + + + + * 图形验证 + + + + + + + + + + * 短信验证 + + + + + + + + * 来访原因 + + + + + * 备注 + + + + 提交 + + + + + + + @* + + *@ + + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml new file mode 100644 index 000000000..f69f81b7d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "访客管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + + + + + + + + + + + + + 姓名 + + + + 手机号 + + + + + + + + + + + + @* 新增 + 编辑*@ + 删除 + 打印 + + + 审核 + 去审 + 审核全部 + 生成账号 + + + + + + + +@Html.AppendJsFile("/Areas/PersonnelManagement/Views/VisitorInfo/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js new file mode 100644 index 000000000..8062dd991 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/Index.js @@ -0,0 +1,191 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-05-17 10:11 + * 描 述:访客管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Form', + width: 600, + height: 450, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('VID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Form?keyValue=' + keyValue, + width: 600, + height: 450, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('VID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //审核 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('VID'); + if (learun.checkrow(keyValue)) { + var VState = $('#gridtable').jfGridValue('VState'); + if (VState.indexOf('1') != -1) { + learun.alert.warning("选中记录中包含已审核项目!"); + return; + } + learun.layerConfirm('是否确认审核该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Check', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //去审 + $('#lr-uncheck').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('VID'); + if (learun.checkrow(keyValue)) { + var VState = $('#gridtable').jfGridValue('VState'); + var VStateArr = VState.split(','); + console.log("VStateArr", VStateArr); + if ($.inArray('0', VStateArr) != -1 || $.inArray('', VStateArr) != -1) { + learun.alert.warning("选中记录中包含未审核项目!"); + return; + } + learun.layerConfirm('是否确认取消审核该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/UnCheck', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //审核全部 + $('#lr-checkall').on('click', function () { + learun.layerConfirm('是否确认全部审核?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/CheckAll', {}, function () { + refreshGirdData(); + }); + } + }); + }); + //生成帐号 + $('#lr_generate').on('click', function () { + learun.layerConfirm('是否确认生成帐号?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/VisitorInfo/Generate', {}, function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/VisitorInfo/GetPageList', + headData: [ + { label: "姓名", name: "VName", width: 100, align: "left"}, + { label: "手机号", name: "VPhone", width: 100, align: "left"}, + { label: "申请理由", name: "VReasons", width: 100, align: "left"}, + { label: "来访目的", name: "VObjective", width: 100, align: "left"}, + { label: "备注", name: "VRemarks", width: 100, align: "left" }, + { + label: "审核标志", name: "VState", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "已审核" : "未审核"; + + } + } + ], + mainId:'VID', + isPage: true, + isMultiselect: true, + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css new file mode 100644 index 000000000..beac17a62 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/VisitorInfo/fromAdd.css @@ -0,0 +1,354 @@ +*{ + box-sizing:border-box; +} +html{ + background: #EEF6F8; +} +body{ + position: relative; +} +#fromBg{ + position: absolute; + bottom: 0; + left: 0; + width: 100% +} +.fromSec{ + width: 1100px; + margin: 0 auto; +} +.header{ + background: #282E3B; + padding: 20px 0; + height: 80px; + line-height: 40px; + font-size: 30px; + color: #fff +} +.header a{ + color: #59A7FF; +} +.headerLine{ + margin: 0 20px; +} +.chickT{ + color: #3E3F3F; + font-size: 24px; + font-weight: bold; + text-align: center; + margin-bottom: 40px +} +.chickForm_sec{ + margin:80px 0 70px; + position: relative; + z-index: 9; +} + +.chickForm_sec .fromSec{ + background: #fff; + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1); + -moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1); + box-shadow: 0 0 10px rgba(0, 0, 0, .1); + border-radius: 4px; + padding: 40px 35px 60px; +} +.chickRemind{ + margin: 0 20px; + height: 40px; + line-height: 38px; + font-size: 12px; + color: #E62D31; + padding: 0 10px; + border: 1px dashed #E62D31; + margin-bottom: 30px; +} +.chickRemind img{ + margin-right: 6px; + width: 20px; + position: relative; + top: -1px; +} +.chickInput{ + margin: 20px auto 0; + width: 720px; + font-size: 14px; + color: #222222; +} +.yz{ + /* width: 60%; */ + position: relative; +} +.chickInput p input{ + width: 50%; +} +.variCode { + position: absolute; + right: 0; + top: 2%; + height: 100%; + width: 110px; + line-height: 0; +} +.variCode img { + width: 100%; + height: 100%; +} +.variCode #btn{ + background: #0094DE; + padding: 7px 17px; +} +.variCode input{ + padding: 0; + color: #fff; +} +.chickInputLable{ + float: left; + width: 20%; + padding-right: 10px; + text-align: right; + line-height: 40px; + color: #6A6A6A +} +.chickInputLable span{ + color: #E62D31; +} +.chickInput > input{ + height: 40px; + width: 80%; + margin-left: 20%; + display: block; + border: 1px solid #DDDDDD; + padding: 7px 12px; + line-height: 24px; +} +.chickInput2 > input{ + width: 530px; +} +.layui-input-inline{ + width: 100%; +} +.chickInputBox .layui-input-inline > img{ + position: absolute; + height: 24px; + right: 5px; + top: 0; + bottom: 0; + margin: auto; + z-index: 0 +} +.chickInputBox{ + line-height: 40px; + color: #666666; + margin-left: 20%; +} +.chickInputTxt{ + font-size: 12px; + color: #E62D31 +} +#chickUpload{ + width: 107px; + height: 107px; + border: 1px solid #E9E9E9; + overflow: hidden; + margin: 0; + cursor: pointer; + text-align: center; +} +#chickUpload img{ + width: 100%; + height: 100%; +} +#chickUpload .layui-upload-img{ + width: 50%; + height: auto; + margin-top: 8px; +} +#chickUpload div{ + font-size: 14px; + color: #DCDBDB; +} +.chickUploadTxt{ + height: 36px; + width: 255px; + line-height: 34px; + text-align: center; + font-size: 12px; + color: #E62D31; + border: 1px solid #E9E9E9; +} +.chickFormSec1Img{ + position: absolute; + top: 12px; + right: 30px; + width: 311px; + max-height: 432px; + border: 1px solid #CCCCCC; + overflow: hidden; + font-size: 0; + display: none; +} +.chickFormSec1Img img{ + width: 100%; +} +.chickLine{ + position: relative; + height: 28px; + line-height: 28px; + overflow: hidden; + margin: 40px 0; +} +.chickLine:after{ + content: ''; + position: absolute; + border-top: 1px #E1E1E1 dashed; + width: 100%; + height: 1px; + left: 0; + top: 0; + bottom: 0; + margin: auto; +} + +.chickLine > *{ + background: #fff; + position: relative; + z-index: 3 +} +.chickLine span{ + color: #E62D31; + font-size: 12px; +} +.chickLine span:first-child{ + padding-right: 15px; + float: left; +} +.chickLineR{ + padding-left: 15px; + float: right; + cursor: pointer; +} +.chickLineR img{ + width: 10px; + margin-right: 5px; + position: relative; + top: -1px; + transition:all .5s; + -moz-transition:all .5s; + -ms-transition:all .5s; + -o-transition:all .5s; + -webkit-transition:all .5s; +} +.chickInputBox .layui-form-select{ + height: 40px; + width: 100%; +} +.chickInputBox > input{ + width: 255px; + float: left; + margin-left: 20px; +} +.chickInputBox > a{ + color: #E62D31; +} +.chickSec2Box .chickInput:first-child{ + margin: 0; +} + +.chickForm_sec2.active .chickLineR img{ + transform:rotate(180deg); + -moz-transform:rotate(180deg); + -ms-transform:rotate(180deg); + -o-transform:rotate(180deg); + -webkit-transform:rotate(180deg); +} +.chickBtn{ + width: 465px; + height: 40px; + border-radius: 8px; + background: #F9A810; + font-size: 16px; + color: #fff; + text-align: center; + line-height: 40px; + margin: 40px auto 0; + cursor: pointer; +} +.footer{ + font-size: 13px; + color: #fff; + padding-bottom: 50px; + position: relative; + z-index: 9; + text-align: center; +} +@media(max-width:1100px) { +.fromSec{ + width: 84% +} +.chickInput{ + width: 80% +} +} +@media(max-width:768px) { +.variCode{ + position: absolute; + right: 0; + top: 12%; + height: 100%; + width: 110px; + line-height: 0; +} +.variCode img { + width: 100%; + height: 100%; + margin-top: 15%; +} +.variCode #btn{ + background: #0094DE; + padding: 7px 17px; + margin-top: 30%; +} +.chickBtn{ + width: 80%; +} +.chickInputLable{ + width: 100%; + float: initial; +} +.chickInput > input,.chickInputBox{ + width: 100%; + margin-left: 0; +} +.header{ + font-size: 18px; + line-height: 24px; + padding: 10px; + height: 44px; +} +.headerLine { + margin: 0 8px; +} +.fromSec { + width: 94%; +} +.chickForm_sec { + margin: 50px 0 30px; + position: relative; + z-index: 9; +} +.chickForm_sec .fromSec { + padding: 30px 0; +} +.chickT { + font-size: 16px; + margin-bottom: 30px; +} +.chickInput { + margin: 15px auto 0; + width: 94%; + font-size: 13px; +} +.footer{ + padding-bottom: 10px; +} +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css index 1e0d1a747..ff092a15d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/css/fromAdd.css @@ -1,309 +1,399 @@ -*{ - box-sizing:border-box; -} -html{ - background: #EEF6F8; -} -body{ - position: relative; -} -#fromBg{ - position: absolute; - bottom: 0; - left: 0; - width: 100% -} -.fromSec{ - width: 1100px; - margin: 0 auto; -} -.header{ - background: #282E3B; - padding: 20px 0; - height: 80px; - line-height: 40px; - font-size: 30px; - color: #fff -} -.header a{ - color: #59A7FF; -} -.headerLine{ - margin: 0 20px; -} -.chickT{ - color: #3E3F3F; - font-size: 24px; - font-weight: bold; - text-align: center; - margin-bottom: 40px -} -.chickForm_sec{ - margin:80px 0 70px; - position: relative; - z-index: 9; -} - -.chickForm_sec .fromSec{ - background: #fff; - -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1); - -moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1); - box-shadow: 0 0 10px rgba(0, 0, 0, .1); - border-radius: 4px; - padding: 40px 35px 60px; -} -.chickRemind{ - margin: 0 20px; - height: 40px; - line-height: 38px; - font-size: 12px; - color: #E62D31; - padding: 0 10px; - border: 1px dashed #E62D31; - margin-bottom: 30px; -} -.chickRemind img{ - margin-right: 6px; - width: 20px; - position: relative; - top: -1px; -} -.chickInput{ - margin: 20px auto 0; - width: 720px; - font-size: 14px; - color: #222222; -} -.chickInputLable{ - float: left; - width: 20%; - padding-right: 10px; - text-align: right; - line-height: 40px; - color: #6A6A6A -} -.chickInputLable span{ - color: #E62D31; -} -.chickInput > input{ - height: 40px; - width: 80%; - margin-left: 20%; - display: block; - border: 1px solid #DDDDDD; - padding: 7px 12px; - line-height: 24px; -} -.chickInput2 > input{ - width: 530px; -} -.layui-input-inline{ - width: 100%; -} -.chickInputBox .layui-input-inline > img{ - position: absolute; - height: 24px; - right: 5px; - top: 0; - bottom: 0; - margin: auto; - z-index: 0 -} -.chickInputBox{ - line-height: 40px; - color: #666666; - margin-left: 20%; -} -.chickInputTxt{ - font-size: 12px; - color: #E62D31 -} -#chickUpload{ - width: 107px; - height: 107px; - border: 1px solid #E9E9E9; - overflow: hidden; - margin: 0; - cursor: pointer; - text-align: center; -} -#chickUpload img{ - width: 100%; - height: 100%; -} -#chickUpload .layui-upload-img{ - width: 50%; - height: auto; - margin-top: 8px; -} -#chickUpload div{ - font-size: 14px; - color: #DCDBDB; -} -.chickUploadTxt{ - height: 36px; - width: 255px; - line-height: 34px; - text-align: center; - font-size: 12px; - color: #E62D31; - border: 1px solid #E9E9E9; -} -.chickFormSec1Img{ - position: absolute; - top: 12px; - right: 30px; - width: 311px; - max-height: 432px; - border: 1px solid #CCCCCC; - overflow: hidden; - font-size: 0; - display: none; -} -.chickFormSec1Img img{ - width: 100%; -} -.chickLine{ - position: relative; - height: 28px; - line-height: 28px; - overflow: hidden; - margin: 40px 0; -} -.chickLine:after{ - content: ''; - position: absolute; - border-top: 1px #E1E1E1 dashed; - width: 100%; - height: 1px; - left: 0; - top: 0; - bottom: 0; - margin: auto; -} - -.chickLine > *{ - background: #fff; - position: relative; - z-index: 3 -} -.chickLine span{ - color: #E62D31; - font-size: 12px; -} -.chickLine span:first-child{ - padding-right: 15px; - float: left; -} -.chickLineR{ - padding-left: 15px; - float: right; - cursor: pointer; -} -.chickLineR img{ - width: 10px; - margin-right: 5px; - position: relative; - top: -1px; - transition:all .5s; - -moz-transition:all .5s; - -ms-transition:all .5s; - -o-transition:all .5s; - -webkit-transition:all .5s; -} -.chickInputBox .layui-form-select{ - height: 40px; - width: 100%; -} -.chickInputBox > input{ - width: 255px; - float: left; - margin-left: 20px; -} -.chickInputBox > a{ - color: #E62D31; -} -.chickSec2Box .chickInput:first-child{ - margin: 0; -} - -.chickForm_sec2.active .chickLineR img{ - transform:rotate(180deg); - -moz-transform:rotate(180deg); - -ms-transform:rotate(180deg); - -o-transform:rotate(180deg); - -webkit-transform:rotate(180deg); -} -.chickBtn{ - width: 465px; - height: 40px; - border-radius: 8px; - background: #F9A810; - font-size: 16px; - color: #fff; - text-align: center; - line-height: 40px; - margin: 40px auto 0; - cursor: pointer; -} -.footer{ - font-size: 13px; - color: #fff; - padding-bottom: 50px; - position: relative; - z-index: 9; - text-align: center; -} -@media(max-width:1100px) { -.fromSec{ - width: 84% -} -.chickInput{ - width: 80% +* { + box-sizing: border-box; } + +html { + background: #EEF6F8; } -@media(max-width:768px) { -.chickBtn{ - width: 80%; + +body { + position: relative; } -.chickInputLable{ - width: 100%; - float: initial; + +#fromBg { + position: absolute; + bottom: 0; + left: 0; + width: 100% } -.chickInput > input,.chickInputBox{ - width: 100%; - margin-left: 0; + +.fromSec { + width: 1100px; + margin: 0 auto; } -.header{ - font-size: 18px; - line-height: 24px; - padding: 10px; - height: 44px; + +.header { + background: #282E3B; + padding: 20px 0; + height: 80px; + line-height: 40px; + font-size: 30px; + color: #fff } + + .header a { + color: #59A7FF; + } + .headerLine { - margin: 0 8px; + margin: 0 20px; } -.fromSec { - width: 94%; + +.chickT { + color: #3E3F3F; + font-size: 24px; + font-weight: bold; + text-align: center; + margin-bottom: 40px } + .chickForm_sec { - margin: 50px 0 30px; + margin: 80px 0 70px; position: relative; z-index: 9; } -.chickForm_sec .fromSec { - padding: 30px 0; -} -.chickT { - font-size: 16px; + + .chickForm_sec .fromSec { + background: #fff; + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1); + -moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1); + box-shadow: 0 0 10px rgba(0, 0, 0, .1); + border-radius: 4px; + padding: 40px 35px 60px; + } + +.chickRemind { + margin: 0 20px; + height: 40px; + line-height: 38px; + font-size: 12px; + color: #E62D31; + padding: 0 10px; + border: 1px dashed #E62D31; margin-bottom: 30px; } + + .chickRemind img { + margin-right: 6px; + width: 20px; + position: relative; + top: -1px; + } + .chickInput { - margin: 15px auto 0; - width: 94%; + margin: 20px auto 0; + width: 720px; + font-size: 14px; + color: #222222; +} + +.yz { + /* width: 60%; */ + position: relative; +} +.chickInput p input { + width: 50%; +} + +.variCode { + position: absolute; + right: 0; + top: 2%; + height: 100%; + width: 110px; + line-height: 0; +} + + .variCode img { + width: 100%; + height: 100%; + } + + .variCode #btn { + background: #0094DE; + padding: 7px 17px; + } + + .variCode #btnCode { + background: #0094DE; + padding: 7px 17px; + margin-top: 30%; + } + + .variCode input { + padding: 0; + color: #fff; + } + +.chickInputLable { + float: left; + width: 20%; + padding-right: 10px; + text-align: right; + line-height: 40px; + color: #6A6A6A +} + + .chickInputLable span { + color: #E62D31; + } + +.chickInput > input { + height: 40px; + width: 80%; + margin-left: 20%; + display: block; + border: 1px solid #DDDDDD; + padding: 7px 12px; + line-height: 24px; +} + +.chickInput2 > input { + width: 530px; +} + +.layui-input-inline { + width: 100%; +} + +.chickInputBox .layui-input-inline > img { + position: absolute; + height: 24px; + right: 5px; + top: 0; + bottom: 0; + margin: auto; + z-index: 0 +} + +.chickInputBox { + line-height: 40px; + color: #666666; + margin-left: 20%; +} + +.chickInputTxt { + font-size: 12px; + color: #E62D31 +} + +#chickUpload { + width: 107px; + height: 107px; + border: 1px solid #E9E9E9; + overflow: hidden; + margin: 0; + cursor: pointer; + text-align: center; +} + + #chickUpload img { + width: 100%; + height: 100%; + } + + #chickUpload .layui-upload-img { + width: 50%; + height: auto; + margin-top: 8px; + } + + #chickUpload div { + font-size: 14px; + color: #DCDBDB; + } + +.chickUploadTxt { + height: 36px; + width: 255px; + line-height: 34px; + text-align: center; + font-size: 12px; + color: #E62D31; + border: 1px solid #E9E9E9; +} + +.chickFormSec1Img { + position: absolute; + top: 12px; + right: 30px; + width: 311px; + max-height: 432px; + border: 1px solid #CCCCCC; + overflow: hidden; + font-size: 0; + display: none; +} + + .chickFormSec1Img img { + width: 100%; + } + +.chickLine { + position: relative; + height: 28px; + line-height: 28px; + overflow: hidden; + margin: 40px 0; +} + + .chickLine:after { + content: ''; + position: absolute; + border-top: 1px #E1E1E1 dashed; + width: 100%; + height: 1px; + left: 0; + top: 0; + bottom: 0; + margin: auto; + } + + .chickLine > * { + background: #fff; + position: relative; + z-index: 3 + } + + .chickLine span { + color: #E62D31; + font-size: 12px; + } + + .chickLine span:first-child { + padding-right: 15px; + float: left; + } + +.chickLineR { + padding-left: 15px; + float: right; + cursor: pointer; +} + + .chickLineR img { + width: 10px; + margin-right: 5px; + position: relative; + top: -1px; + transition: all .5s; + -moz-transition: all .5s; + -ms-transition: all .5s; + -o-transition: all .5s; + -webkit-transition: all .5s; + } + +.chickInputBox .layui-form-select { + height: 40px; + width: 100%; +} + +.chickInputBox > input { + width: 255px; + float: left; + margin-left: 20px; +} + +.chickInputBox > a { + color: #E62D31; +} + +.chickSec2Box .chickInput:first-child { + margin: 0; +} + +.chickForm_sec2.active .chickLineR img { + transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + -webkit-transform: rotate(180deg); +} + +.chickBtn { + width: 465px; + height: 40px; + border-radius: 8px; + background: #F9A810; + font-size: 16px; + color: #fff; + text-align: center; + line-height: 40px; + margin: 40px auto 0; + cursor: pointer; +} + +.footer { font-size: 13px; + color: #fff; + padding-bottom: 50px; + position: relative; + z-index: 9; + text-align: center; +} + +@media(max-width:1100px) { + .fromSec { + width: 84% + } + + .chickInput { + width: 80% + } } -.footer{ - padding-bottom: 10px; + +@media(max-width:768px) { + .chickBtn { + width: 80%; + } + + .chickInputLable { + width: 100%; + float: initial; + } + + .chickInput > input, .chickInputBox { + width: 100%; + margin-left: 0; + } + + .header { + font-size: 18px; + line-height: 24px; + padding: 10px; + height: 44px; + } + + .headerLine { + margin: 0 8px; + } + + .fromSec { + width: 94%; + } + + .chickForm_sec { + margin: 50px 0 30px; + position: relative; + z-index: 9; + } + + .chickForm_sec .fromSec { + padding: 30px 0; + } + + .chickT { + font-size: 16px; + margin-bottom: 30px; + } + + .chickInput { + margin: 15px auto 0; + width: 94%; + font-size: 13px; + } + + .footer { + padding-bottom: 10px; + } } -} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css new file mode 100644 index 000000000..47bdeb0ca --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/laydate/theme/laydate.css @@ -0,0 +1,2 @@ +/** layui-v2.2.6 MIT License By https://www.layui.com */ + .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css new file mode 100644 index 000000000..18c19c2c6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/layui/css/code.css @@ -0,0 +1,2 @@ +/** layui-v2.2.6 MIT License By https://www.layui.com */ + html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs index d26e8b3ee..b4a9fa1fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs @@ -235,6 +235,9 @@ namespace Learun.Application.Web.Controllers //微信快捷登录 var result4 = teachSwitchIBLL.FindFirst("wxloginforpc"); ViewBag.WeixinLoginSwitch = result4; + //访客注册 + var result5 = teachSwitchIBLL.FindFirst("fk"); + ViewBag.VisitorSwitch = result5; //获取在线用户人数 ViewBag.OnlineUserNum = 0; var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum(); @@ -1048,6 +1051,7 @@ namespace Learun.Application.Web.Controllers /// /// [HttpPost] + [AjaxOnly] public async Task GetCheckCode(string mobile, string smsType) { ActionResult actionResult; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 77addf79c..e0f4d6eae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -803,6 +803,7 @@ + @@ -1385,6 +1386,7 @@ + @@ -3082,10 +3084,12 @@ + + @@ -6364,6 +6368,10 @@ + + + + @@ -7164,6 +7172,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml index 863c3355c..466578079 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Login/PageSix.cshtml @@ -69,6 +69,10 @@ { 教师注册 } + @if (ViewBag.VisitorSwitch) + { + 访客注册 + } @if (ViewBag.SSOSystemSwitch) { 网上办事大厅 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index c6fe9b3dc..72e36dd24 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -556,6 +556,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs new file mode 100644 index 000000000..0591bd11c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/VisitorInfoMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public class VisitorInfoMap : EntityTypeConfiguration + { + public VisitorInfoMap() + { + #region 表、主键 + //表 + this.ToTable("VISITORINFO"); + //主键 + this.HasKey(t => t.VID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM index 0562aa491..b67471ce0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM @@ -1,5 +1,5 @@ - + @@ -50645,7 +50645,7 @@ B9AF VisitorInfo 1585292417 edy -1621215037 +1621222930 edy @@ -50732,9 +50732,21 @@ B9AF 申请时间 datetime + +214DE117-8F73-42BF-91D4-7B840E9CF285 +审核状态 +VState +1621215394 +edy +1621224269 +edy +审核状态 +int(11) +11 + - + 1037A1F7-DDFF-475A-99C8-8E7922DF5B86 Key_1 Key_1 @@ -50748,10 +50760,10 @@ B9AF - + - + @@ -50776,7 +50788,7 @@ B9AF - + 81527A47-E565-49C2-AAA7-F0555E81CE72 1553245426 l @@ -50811,7 +50823,7 @@ B9AF - + A3225D9D-069C-4A67-ABF0-43DC2FA55CF0 1553247802 l @@ -50845,7 +50857,7 @@ B9AF - + B458081F-CEE1-4251-9E7A-5E9CC93519D5 1553248376 l @@ -50880,7 +50892,7 @@ B9AF - + 8397C4F6-A728-4D3F-B2F8-FAC56886462B 1553248622 l @@ -50914,7 +50926,7 @@ B9AF - + 2F8BC700-F31E-41CC-9DA8-9505EAC5DA85 1553483161 l @@ -50948,7 +50960,7 @@ B9AF - + 0E2D2049-564F-4247-9F5B-B0AA82F9BE96 1555404296 admin @@ -50965,7 +50977,7 @@ B9AF - + 46EC3E2A-6CBF-421A-9DA8-6BCCEDEC7DF5 PUBLIC PUBLIC @@ -51228,7 +51240,7 @@ B9AF - + B1BAD530-6C69-4A9D-BD41-F62F564CA348 Microsoft SQL Server 2008 MSSQLSRV2008 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs index 97e966393..b91689467 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachSwitch/TeachSwitchService.cs @@ -50,6 +50,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration fxEntity.Create(); this.BaseRepository().Insert(fxEntity); } + //访客注册 + if (!data.Any(a => a.type == "fk")) + { + var fxEntity = new TeachSwitchEntity() + { + status = "0", + type = "fk" + }; + fxEntity.Create(); + this.BaseRepository().Insert(fxEntity); + } //网上办事大厅 if (!data.Any(a => a.type == "ssosystem")) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 4479ea04d..2a14c0427 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1645,6 +1645,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs new file mode 100644 index 000000000..272ca7c10 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoBLL.cs @@ -0,0 +1,238 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public class VisitorInfoBLL : VisitorInfoIBLL + { + private VisitorInfoService visitorInfoService = new VisitorInfoService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return visitorInfoService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取VisitorInfo表实体数据 + /// + /// 主键 + /// + public VisitorInfoEntity GetVisitorInfoEntity(string keyValue) + { + try + { + return visitorInfoService.GetVisitorInfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取VisitorInfo表实体数据 + /// + /// 主键 + /// + public VisitorInfoEntity GetEntityByPhone(string keyValue) + { + try + { + return visitorInfoService.GetEntityByPhone(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + visitorInfoService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, VisitorInfoEntity entity) + { + try + { + visitorInfoService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 审核全部 + /// + /// + public void CheckAll() + { + try + { + visitorInfoService.CheckAll(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 去审 + /// + /// + public void UnCheck(string keyValues) + { + try + { + visitorInfoService.UnCheck(keyValues); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 去审 + /// + /// + public void Check(string keyValues) + { + try + { + visitorInfoService.Check(keyValues); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 生成账号 + /// + /// + public void GenerateAccout() + { + try + { + visitorInfoService.GenerateAccout(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs new file mode 100644 index 000000000..69cd24cac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoEntity.cs @@ -0,0 +1,82 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public class VisitorInfoEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("VID")] + public string VID { get; set; } + /// + /// 姓名 + /// + [Column("VNAME")] + public string VName { get; set; } + /// + /// 手机号 + /// + [Column("VPHONE")] + public string VPhone { get; set; } + /// + /// 申请理由 + /// + [Column("VREASONS")] + public string VReasons { get; set; } + /// + /// 来访目的 + /// + [Column("VOBJECTIVE")] + public string VObjective { get; set; } + /// + /// 备注 + /// + [Column("VREMARKS")] + public string VRemarks { get; set; } + /// + /// 申请时间 + /// + [Column("VAPPLYTIME")] + public DateTime? VApplyTime { get; set; } + + /// + /// 状态 + /// + [Column("VSTATE")] + public int VState { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.VID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.VID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs new file mode 100644 index 000000000..3d79712c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoIBLL.cs @@ -0,0 +1,72 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public interface VisitorInfoIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取VisitorInfo表实体数据 + /// + /// 主键 + /// + VisitorInfoEntity GetVisitorInfoEntity(string keyValue); + /// + /// 根据手机号获取实体数据 + /// + /// + /// + VisitorInfoEntity GetEntityByPhone(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, VisitorInfoEntity entity); + /// + /// 审核全部 + /// + void CheckAll(); + /// + /// 去审 + /// + void UnCheck(string keyValues); + /// + /// 审核 + /// + /// + void Check(string keyValues); + + /// + /// 生成账号 + /// + void GenerateAccout(); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs new file mode 100644 index 000000000..d9ddbea68 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/VisitorInfo/VisitorInfoService.cs @@ -0,0 +1,330 @@ +using Dapper; +using Learun.Application.Base.AuthorizeModule; +using Learun.Application.Organization; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using Learun.Application.Base.SystemModule; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-05-17 10:11 + /// 描 述:访客管理 + /// + public class VisitorInfoService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM VisitorInfo t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.VApplyTime >= @startTime AND t.VApplyTime <= @endTime ) "); + } + if (!queryParam["VName"].IsEmpty()) + { + dp.Add("VName", "%" + queryParam["VName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.VName Like @VName "); + } + if (!queryParam["VPhone"].IsEmpty()) + { + dp.Add("VPhone", "%" + queryParam["VPhone"].ToString() + "%", DbType.String); + strSql.Append(" AND t.VPhone Like @VPhone "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取VisitorInfo表实体数据 + /// + /// 主键 + /// + public VisitorInfoEntity GetVisitorInfoEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取VisitorInfo表实体数据根据手机号 + /// + /// 手机号 + /// + public VisitorInfoEntity GetEntityByPhone(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.VPhone == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + //删除账号 + var entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + this.BaseRepository("BaseDb").ExecuteBySql($"delete LR_Base_User where f_description='访客' and f_account='{entity.VPhone}'"); + + this.BaseRepository("CollegeMIS").Delete(t => t.VID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, VisitorInfoEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 审核全部 + /// + public void CheckAll() + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update VisitorInfo set VState=1 where VState<>1"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 去审 + /// + public void UnCheck(string keyValues) + { + try + { + string sql = $"update VisitorInfo set VState=0 where VID in ({keyValues})"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 审核 + /// + public void Check(string keyValues) + { + try + { + string sql = $"update VisitorInfo set VState=1 where VID in ({keyValues})"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 生成账号 + /// + public void GenerateAccout() + { + //UserRelationIBLL userRelationIBLL = new UserRelationBLL(); + UserIBLL userIBLL = new UserBLL(); + try + { + var infos = BaseRepository("CollegeMIS").FindList(m => m.VState != 0); + var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "访客"); + + var defaultpwd = Config.GetValue("defaultpwd"); + //读取默认密码配置中已启用的密码 + var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity(x => x.IsEnabled == true); + if (Sys_DefaultPwdConfigEntity != null) + { + defaultpwd = Sys_DefaultPwdConfigEntity.Pwd; + } + // var studentList = new List(); + foreach (var tEntity in infos) + { + if (string.IsNullOrEmpty(tEntity.VPhone) || alluserlist.Count(m => m.F_Account == tEntity.VPhone) > 0) + { + continue; + } + + //var annexesFileEntity = this.BaseRepository().FindEntity(a => a.F_FolderId == tEntity.Photo); + var url = ""; + //if (annexesFileEntity != null) + //{ + // url = annexesFileEntity.F_FilePath; + // url = "/" + url.Substring(url.IndexOf("Resource")); + + //} + + UserEntity userbase = new UserEntity(); + userbase.F_Account = tEntity.VPhone; + userbase.F_RealName = tEntity.VName; + userbase.F_EnCode = tEntity.VPhone; + userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(); + userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url; + userbase.F_Gender = 1; + userbase.F_DeleteMark = 0; + userbase.F_EnabledMark = 1; + userbase.F_Mobile = tEntity.VPhone; + userbase.F_Description = "访客"; + //userbase.F_CompanyId = tEntity.F_SchoolId; + //userbase.F_DepartmentId = tEntity.DeptNo; + //userbase.F_IdentityCardNo = tEntity.IdentityCardNo; + userIBLL.SaveEntity(null, userbase); + //studentList.Add(userbase); + } + //if (studentList.Any()) + //{ + // string s = studentList.Select(m => m.F_UserId).Aggregate((current, userEntity) => current + "," + userEntity); + // userRelationIBLL.SaveEntityList2(roleId, 1, s); + //} + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +}
+ * 图形验证 + +
+ * 短信验证 + +