diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs index b32f179b3..4b3fa730c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OfficeEquipmentController.cs @@ -37,7 +37,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - + /// + /// 生成二维码 + /// + /// + [HttpGet] + public ActionResult QRCode(string keyValue) + { + return View(); + } #endregion #region 获取数据 @@ -112,6 +120,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("保存成功!"); } + public ActionResult Search(string keyValue) + { + var OfficeEquipmentData = officeEquipmentIBLL.GetOfficeEquipmentEntity(keyValue); + var jsonData = new + { + OfficeEquipment = OfficeEquipmentData, + }; + return Success(jsonData); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml index 40f6922a6..b369ddf71 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.cshtml @@ -34,7 +34,8 @@  新增  编辑  删除 -  打印 + @* 打印*@ +  二维码 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js index f00018980..9adb7d3ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/Index.js @@ -17,7 +17,7 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 220, 400); $('#Name').lrDataSourceSelect({ code: 'TeacherInfo',value: 'f_encode',text: 'f_realname' }); - $('#Department').lrDataSourceSelect({ code: 'classdata',value: 'f_encode',text: 'name' }); + $('#Department').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -69,12 +69,12 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { learun.layerForm({ - id: 'formcardprint', + id: 'formqrCode', title: '二维码', - url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/FormPrint?keyValue=' + keyValue, + url: top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/qrCode?keyValue=' + keyValue, width: 700, - height: 300, - btn: null, + height: 900, + btn: null, end: function () { refreshGirdData(); } }); } @@ -105,7 +105,7 @@ var bootstrap = function ($, learun) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', key: value, - keyId: 'f_encode', + keyId: 'id', callback: function (_data) { callback(_data['name']); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml new file mode 100644 index 000000000..75b04ceda --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +@*
+ 打印 +
*@ +
+
+
名称*
+
+
+
+
部门*
+
+
+
+
设备名称*
+ +
+
+
配置描述*
+ +
+
+
备注
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js") +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuVolunteer/server.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/EducationalAdministration/Views/OfficeEquipment/qrCode.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js new file mode 100644 index 000000000..a3a598252 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OfficeEquipment/qrCode.js @@ -0,0 +1,114 @@ +/* * 版 本 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 () { + $('#Name').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_encode', text: 'f_realname' }); + $('#Department').lrselect({ + type: 'tree', + allowSearch: true, + url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTreeNoCheck', + param: {}, + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OfficeEquipment/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: 550, + height: 550 +}); +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 bd09d7564..81cf4f6e1 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 @@ -1081,6 +1081,7 @@ + @@ -1372,6 +1373,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs index 6caa7a051..aa3f84c7a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OfficeEquipment/OfficeEquipmentService.cs @@ -44,7 +44,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["DeviceName"].IsEmpty()) { dp.Add("DeviceName", "%" + queryParam["DeviceName"].ToString() + "%", DbType.String); - strSql.Append(" AND t.DeviceName = @DeviceName "); + strSql.Append(" AND t.DeviceName like @DeviceName "); } if (!queryParam["Department"].IsEmpty()) {