From 097694b2189ba89f32a34ac337cb3c8bcbdb8f29 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 28 Apr 2023 10:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AE=AE=E7=AD=BE=E5=88=B0=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81=E6=89=93=E5=8D=B0=E9=A1=B5=E9=9D=A2=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90-=E5=BE=85=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MeetingManagementController.cs | 5 + .../MeetingManagement/IndexOfMyApply.cshtml | 4 +- .../Views/MeetingManagement/IndexOfMyApply.js | 15 ++ .../Views/MeetingManagement/qrCode.cshtml | 15 ++ .../Views/MeetingManagement/qrCode.js | 138 ++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + 6 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs index 590a8783e..d612b1990 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs @@ -65,6 +65,11 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } + [HttpGet] + public ActionResult qrCode() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml index 374909d61..4b0cb04e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml @@ -4,6 +4,7 @@ ViewBag.Title = "会议管理"; Layout = "~/Views/Shared/_Index.cshtml"; } +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js index 566c29a2e..af5442e65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js @@ -215,6 +215,21 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_print').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '二维码', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/qrCode?keyValue=' + keyValue, + width: 700, + height: 700, + btn: null + }); + } + }); + }, // 初始化列表 initGird: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml new file mode 100644 index 000000000..a820fe367 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+ 打印 +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js") +@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js new file mode 100644 index 000000000..29d731d17 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/qrCode.js @@ -0,0 +1,138 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-02-21 10:07 + * 描 述:会议管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //$('#MeetingPlace').lrselect({ + // allowSearch: true, + // url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetList', + // value: "ID", + // text: "Name" + //}); + //$('#RecordPerson').lrUserSelect(0); + //$('#InternalParticipants').lrUserSelect(1); + $('#subprint').on('click', function () { + $('.box').jqprint(); + //alert(123123) + //if (!$('body').lrValidform()) { + // return false; + //} + //var entity = $('body').lrGetFormData(); + //var selgridtab = $('#selgridtab').jfGridGet('rowdatas'); + //$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/SaveForm', { entity: entity, strStuEntity: JSON.stringify(selgridtab) }, + // function (res) { + // //console.log(res) + // if (res.code == 200) { + // setTimeout(function () { + // location.reload(); + // }, 100) + // } + // // 保存成功后才回调 + // //if (!!callBack) { + // // callBack(res); + // //} + // } + //); + }) + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/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]); + } + //扫码签到 + makeCode(data[id].Id); + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'MeetingManagement' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + if (!!callBack) { + var res = { + code: 200, data: {} + }; + callBack(res, i); + } + }; + page.init(); +} +//扫码签到 +var qrcode = new QRCode(document.getElementById("qrCode"), { + width: 500, + height: 500 +}); +function makeCode(urls) { + qrcode.makeCode(urls); +} 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 426e53adb..f8dbe6f2e 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 @@ -1858,6 +1858,7 @@ + @@ -8105,6 +8106,7 @@ +