@@ -64,13 +64,15 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
$('#lr_qrcode').on('click', function () { | $('#lr_qrcode').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('ID'); | var keyValue = $('#gridtable').jfGridValue('ID'); | ||||
var BookName = $('#gridtable').jfGridValue('BookName'); | |||||
var BookCode = $('#gridtable').jfGridValue('BookCode'); | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'viewform', | id: 'viewform', | ||||
title: '二维码', | title: '二维码', | ||||
url: top.$.rootUrl + '/EducationalAdministration/BookInfo/qrCode?keyValue=' + keyValue, | |||||
url: top.$.rootUrl + '/EducationalAdministration/BookInfo/qrCode?keyValue=' + keyValue + '&BookName=' + escape(BookName) + '&BookCode=' + escape(BookCode), | |||||
width: 500, | width: 500, | ||||
height: 450, | |||||
height: 500, | |||||
btn: null | btn: null | ||||
}); | }); | ||||
} | } | ||||
@@ -1,23 +1,40 @@ | |||||
@{ | |||||
@*@using Learun.Application.TwoDevelopment.EducationalAdministration*@ | |||||
@{ | |||||
ViewBag.Title = "会议管理"; | ViewBag.Title = "会议管理"; | ||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<script src="~/Content/jquery/qrcode.min.js"></script> | <script src="~/Content/jquery/qrcode.min.js"></script> | ||||
@*<div id="subprint" style="margin:0 auto;cursor:pointer;margin-bottom:10px; position:relative; width:80px; height:28px;line-height:28px;border-radius:4px; background:#039cfd;color:#FFF;text-align:center;"> | |||||
<div id="subprint" style="margin:0 auto;cursor:pointer;margin-bottom:16px;margin-top:15px;overflow:hidden; position:relative; width:80px; height:28px;line-height:28px;border-radius:4px; background:#039cfd;color:#FFF;text-align:center;"> | |||||
打印 | 打印 | ||||
</div>*@ | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Book_info"> | |||||
<div class="lr-form-item-title">书籍名称</div> | |||||
<input id="BookName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Book_info"> | |||||
<div class="lr-form-item-title">书籍编号<font face="宋体">*</font></div> | |||||
<input id="BookCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col lr-form-item" data-table="Book_info"> | |||||
<div id="qrCode" style="text-align:center"></div> | |||||
</div> | |||||
<div id="form" style="display: flex;justify-content:center;align-items:center;margin-top:40px;"> | |||||
<div> | |||||
<div style="display: flex;justify-content:center;align-items:center;margin-bottom: 15px;"> | |||||
<div id="qrCode"></div> | |||||
</div> | |||||
<div style="text-align:center;margin-bottom: 8px;"> | |||||
书籍名称 : <span id="BookName"></span> | |||||
</div> | |||||
<div style="text-align:center;"> | |||||
书籍编号 : <span id="BookCode"></span> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookInfo/QrCode.js") | |||||
<script> | |||||
var keyValue = request('keyValue'); | |||||
var BookName = request('BookName'); | |||||
var BookCode = request('BookCode'); | |||||
let myDiv = document.getElementById("BookName"); | |||||
myDiv.innerText = BookName; | |||||
let myDiv1 = document.getElementById("BookCode"); | |||||
myDiv1.innerText = BookCode; | |||||
var qrcode = new QRCode(document.getElementById("qrCode"), { | |||||
width: 300, | |||||
height: 300 | |||||
}); | |||||
qrcode.makeCode(keyValue); | |||||
$('#subprint').on('click', function () { | |||||
$('#form').jqprint(); | |||||
}) | |||||
</script> | |||||
@Html.AppendJsFile("/Content/jquery/jquery-1.10.2.min.js", "/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js", "/Content/js/qrcode.min.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") |
@@ -1,107 +0,0 @@ | |||||
/* * 版 本 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 () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookInfo/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 + '/EducationalAdministration/BookInfo/GetFormData?processId=' + processId, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id] && data[id].length > 0) { | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
if (id == 'Book_info' && 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: 300, | |||||
height: 300 | |||||
}); | |||||
function makeCode(urls) { | |||||
qrcode.makeCode(urls); | |||||
} |
@@ -1017,7 +1017,6 @@ | |||||
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\Index.js" /> | <Content Include="Areas\AssetManagementSystem\Views\FundsApply\Index.js" /> | ||||
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\StatsIndex.js" /> | <Content Include="Areas\AssetManagementSystem\Views\FundsApply\StatsIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\BookInfo\QRCode.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | <Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | ||||