@@ -100,6 +100,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
[HttpGet] | |||||
public ActionResult QRCode() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 打印 | /// 打印 | ||||
/// <summary> | /// <summary> | ||||
@@ -92,6 +92,7 @@ | |||||
@*<a id="lr_switch" class="btn btn-default"><i class="fa fa-braille"></i> 注册开关</a>*@ | @*<a id="lr_switch" class="btn btn-default"><i class="fa fa-braille"></i> 注册开关</a>*@ | ||||
<a id="lr_editDept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改部门、系部</a> | <a id="lr_editDept" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 修改部门、系部</a> | ||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | ||||
<a id="lr_qrcode" class="btn btn-default"><i class="fa fa-linode"></i> 生成二维码</a> | |||||
</div> | </div> | ||||
@*<div class=" btn-group btn-group-sm" learun-authorize="no"> | @*<div class=" btn-group btn-group-sm" learun-authorize="no"> | ||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-print"></i> 导入</a> | <a id="lr_import" class="btn btn-default"><i class="fa fa-print"></i> 导入</a> | ||||
@@ -358,6 +358,27 @@ var bootstrap = function ($, learun) { | |||||
}, "json") | }, "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 () { | $('#lr_print').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('EmpId'); | var keyValue = $('#gridtable').jfGridValue('EmpId'); | ||||
@@ -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> |
@@ -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"> | <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')" /> | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
@@ -7674,6 +7674,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.cshtml" /> | <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\FormRoomTeacher.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.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\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||