Procházet zdrojové kódy

教师信息管理添加二维码代码

西昌缴费二期
ndbs před 2 roky
rodič
revize
fdf7c13451
5 změnil soubory, kde provedl 94 přidání a 1 odebrání
  1. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
  3. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js
  4. +63
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/QRCode.cshtml
  5. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/EmpInfoController.cs Zobrazit soubor

@@ -100,6 +100,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}

[HttpGet]
public ActionResult QRCode()
{
return View();
}

/// <summary>
/// 打印
/// <summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml Zobrazit soubor

@@ -92,6 +92,7 @@
@*<a id="lr_switch" class="btn btn-default"><i class="fa fa-braille"></i>&nbsp;注册开关</a>*@
<a id="lr_editDept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;修改部门、系部</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i>&nbsp;生成二维码</a>
</div>
@*<div class=" btn-group btn-group-sm" learun-authorize="no">
<a id="lr_import" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;导入</a>


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.js Zobrazit soubor

@@ -358,6 +358,27 @@ var bootstrap = function ($, learun) {
}, "json")
});

//生成二维码
$("#lr_qrcode").on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EmpNo');
var EmpName = $('#gridtable').jfGridValue('EmpName');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录生成!");
return;
}
learun.layerForm({
id: 'formcard',
title: '生成二维码',
url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/QRCode?keyValue=' + keyValue + '&EmpName=' + escape(EmpName),
width: 700,
height: 300,
btn: null,
end: function () { refreshGirdData(); }
});
}

})
//打印
$('#lr_print').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EmpId');


+ 63
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/QRCode.cshtml Zobrazit soubor

@@ -0,0 +1,63 @@
<!DOCTYPE html>


<html>

<head>
<meta name="viewport" content="width=device-width" />
<title>CardPrint</title>
@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js")
<script src="/Content/js/qrcode.min.js"></script>
<script src="~/PhonePage/server.js"></script>
<link href="~/Content/cardprint/CardPrint.css" rel="stylesheet" />
<script>
function request(d) {
for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) {
var b = c[a].split("=");
if (b[0] == d)
if ("undefined" == unescape(b[1])) break;
else return unescape(b[1])
}
return ""
};
</script>
</head>

<body style="">
<div id="qrcodeBox" style="text-align:center;margin-top:20px;">
<div class="qrcodeBox" style="display:inline-block">
<div id="qrcode" style="margin:0 auto 5px;"></div>
<div class="qrcodeTxt" style="font-size:12px;"></div>
</div>

</div>
<!--<div id="btnprint" type="button" class="btns" value="打印">打印</div>-->
<script>
//标签打印
var qrcode = new QRCode(document.getElementById("qrcode"), {
width: 80,
height: 80
});
var keyValue = request('keyValue');//二维码
var EmpName = request('EmpName');
$('.qrcodeTxt').html(unescape(EmpName));
$(function () {
var url = currentUrl + '/EducationalAdministration/StuEnrollPhone/Link?EmpNo=' + keyValue;
qrcode.makeCode(url);
//$("#btnprint").on("click", function () {
// AddPrintContent3()
//});


});
// 打印表单
function AddPrintContent3() {
$('#btnprint').css('display', 'none')
window.print();
$('#btnprint').css('display', 'block')
}
</script>
</body>

</html>

+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Zobrazit soubor

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -7674,6 +7674,7 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\EmpInfo\QRCode.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


Načítá se…
Zrušit
Uložit