Procházet zdrojové kódy

增加扫码报到界面

中职版本
liangkun před 4 roky
rodič
revize
0147c8704b
7 změnil soubory, kde provedl 728 přidání a 0 odebrání
  1. +99
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.css
  2. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.html
  3. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.js
  4. +130
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.css
  5. +140
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.html
  6. +212
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.js
  7. +79
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs

+ 99
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.css Zobrazit soubor

@@ -0,0 +1,99 @@
.lr-contact-page {
position: relative;
height: 100%;
width: 100%;
}

.lr-contact-page .searchBox {
position: relative;
top: 0;
left: 0;
height: 50px;
padding: 10px;
width: 100%;
background: #f5f5f5;
}

.lr-contact-page .searchBox i {
position: absolute;
top: 19px;
left: 30px;
color: #999;
z-index: 1;
font-size: 12px;
}

.lr-contact-page .searchBox .search {
position: relative;
width: 100%;
height: 100%;
border-radius: 3px;
line-height: 30px;
font-size: 14px;
background-color: #fff;
padding-left: 42px;
color: #999;
}

.lr-contact-page .lr-user-list {
position: relative;
width: 100%;
}

.lr-contact-page .lr-list-item:after {
display: none;
}

.lr-contact-page .lr-list-item {
min-height: 36px;
line-height: 36px;
}

.lr-contact-page .lr-list-item.user {
position: relative;
height: 43px;
line-height: 43px;
padding-left: 40px;
}

.lr-contact-page .lr-list-item.user img {
position: absolute;
top: 6px;
left: 0;
width: 30px;
height: 30px;
border-radius: 50%;
}

.InputBtnBox {
margin: 0 15px;
}

.scbottom {
padding-top: 15px;
padding-bottom: 10px;
width: 100%;
color: #FFFFF4;
text-align: center;
font-size: 14px;
background-color: #242424;
position: absolute;
bottom: 0;
left: 0;
}

#bcid {
background-color: #242424;
width: 100%;
height: 100%;
}

.bcidBox {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 999;
display: none;
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.html Zobrazit soubor

@@ -0,0 +1,8 @@
<div class="lr-page lr-WelcomNewStudentsConfirmStudentsCheckIn-page">
<div class="lr-form-container">
<div class="btnBox">
<div>点击开始扫描按钮对准学生二维码扫描</div>
<button id="btnscan" type="button" class="lr-btn-primary lr-btn-block">开始扫描</button>
</div>
</div>
</div>

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/ConfirmStudentsCheckIn.js Zobrazit soubor

@@ -0,0 +1,60 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2020-04-21 09:27
* 描 述:扫码报到
*/
(function () {
var page = {
grid: null,
init: function ($page) {
$page.find('#btnscan').on('tap', function () {
var ua = navigator.userAgent.toLowerCase();
if (/(html5plus)/i.test(ua)) {
//if (false) {
$('.bcidBox').css('display', 'block');
var scan = new plus.barcode.Barcode('bcid');
scan.onmarked = function onmarked(type, result) {
scan.close();
$('.bcidBox').css('display', 'none');
learun.layer.loading(true, '正在读取学生数据');
learun.nav.closeCurrent();
learun.nav.go({ path: 'WelcomNewStudents/ConfirmStudentsCheckIn/form', title: '确认报到', param: { StuNo: result }, isBack: true, isHead: true });
};
scan.start();
} else if (/micromessenger/.test(ua)) {
$.ajax({
url: config.webapi + "weixinapi/getweixinwebaccess_token?url=" + encodeURIComponent(window.location.href),
type: "get",
success: function (res) {
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: res.data.appid, // 必填,公众号的唯一标识
timestamp: res.data.timestamp, // 必填,生成签名的时间戳
nonceStr: res.data.noncestr, // 必填,生成签名的随机串
signature: res.data.certificate, // 必填,签名
jsApiList: ["scanQRCode"] // 必填,需要使用的JS接口列表
});

wx.ready(function () {
wx.scanQRCode({
needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
success: function (res) {
learun.layer.loading(true, '正在读取学生数据');
learun.nav.closeCurrent();
learun.nav.go({ path: 'WelcomNewStudents/ConfirmStudentsCheckIn/form', title: '确认报到', param: { StuNo: res.resultStr }, isBack: true, isHead: true });
}
});
});
}
});
} else {
learun.layer.warning('请下载app或者到微信浏览器打开网页');
}
});
}
};
return page;
})();

+ 130
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.css Zobrazit soubor

@@ -0,0 +1,130 @@
.welcome {
padding: 1px 12px 20px;
background: #fff;
}

.welT {
font-size: 16px;
margin-bottom: 10px;
line-height: 26px;
}

.welT i {
width: 26px;
height: 26px;
line-height: 24px;
border: 1px solid #efefef;
border-radius: 4px;
float: right;
text-align: center;
color: #999;
}

.welLine {
height: 1px;
background: #efefef;
margin: 10px -12px;
}

.welText {
overflow: hidden;
font-size: 14px;
margin-top: 5px;
}

.welText span {
float: right;
width: 60%;
text-align: right;
}

.welInput {
overflow: hidden;
font-size: 14px;
margin-top: 10px;
}

.welInput span {
float: left;
width: 26%;
text-align: right;
line-height: 30px;
}

.welInput input {
display: block;
margin-left: 28%;
width: 72%;
border: 1px solid #efefef;
border-radius: 4px;
height: 30px;
line-height: 28px;
padding: 0 10px;
margin-bottom: 0;
}

.welCon {
padding: 10px;
border: 1px solid #efefef;
margin-top: 18px;
border-radius: 4px;
position: relative;
}

.welDel {
position: absolute;
top: -8px;
left: -8px;
background: #fff;
}

.welDel i {
text-align: center;
width: 26px;
height: 26px;
display: block;
line-height: 24px;
border: 1px solid #efefef;
border-radius: 50%;
}

.welImgAdd {
text-align: center;
line-height: 0;
}

#files {
opacity: 0;
-webkit-opacity: 0;
z-index: 9;
display: none;
}

#welImgBtn {
display: block;
width: 110px;
height: 30px;
text-align: center;
line-height: 26px;
border: 2px solid #efefef;
border-radius: 4px;
font-size: 14px;
color: #999;
margin: 10px auto;
cursor: pointer;
}

#PhotoImg {
width: 110px;
}

.btnBox {
margin-top: 20px;
text-align: center;
}

#saveBtn {
margin: auto;
margin-top: 25px;
width: 92%;
}

+ 140
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.html Zobrazit soubor

@@ -0,0 +1,140 @@
<div class="welcome">
<div class="welT">基本信息</div>
<div class="welBox">
<input type="hidden" name="ID" value="" id="ID" />
<div class="welText">
学号
<span id="StuNo"></span>
</div>
<div class="welText">
准考证号
<span id="zkzh"></span>
</div>
<div class="welText">
考生号
<span id="ksh"></span>
</div>
<div class="welText">
姓名 <span id="StuName"></span>
</div>
<div class="welText">
性别
<span id="GenderNo"></span>
</div>
<div class="welText">
系别
<span id="DeptNo"></span>
</div>
<div class="welText">
专业
<span id="MajorNo"></span>
</div>
<div class="welText">
班级
<span id="ClassNo"></span>
</div>
<div class="welText">
身份证号
<span id="IdentityCardNo"></span>
</div>
<div class="welText">
出生日期
<span id="Birthday"></span>
</div>
<div class="welText">
户口类别
<span id="ResidenceNo"></span>
</div>
<div class="welText">
政治面貌
<span id="PartyFaceNo"></span>
</div>
</div>
<div class="welLine"></div>
<div class="welT">采集照片信息</div>
<div class="welBox">
<input type="hidden" id="Photo" value="" />
<input id="files" type="file" accept="image/*">
<div class="welImgAdd">
<img id="PhotoImg" src="" alt="">
</div>
</div>
<div class="welLine"></div>
<div class="welT">自然信息</div>
<div class="welBox">
<div class="welInput">
<span>籍贯</span>
<input id="RegionNo" type="text" placeholder="请填写籍贯" />
</div>
</div>
<div class="welLine"></div>
<div class="welT">通讯信息</div>
<div class="welBox">
<div class="welInput">
<span>家庭住址</span>
<input id="FamilyAddress" type="text" placeholder="按XX省XX市XX县XX街道填写" />
</div>
<div class="welInput">
<span>联系电话</span>
<input id="telephone" type="text" placeholder="请填写联系电话" />
</div>
</div>
<div class="welLine"></div>
<div class="welT">家庭成员(直系家属)</div>
<div class="welBox" id="StuInfoFreshFamily">
<div class="welCon">
<div class="welInput">
<span>姓名</span>
<input type="text" name="Name" placeholder="请填写姓名" />
</div>
<div class="welInput">
<span>与本人关系</span>
<input type="text" name="Relation" placeholder="请填写与本人关系" />
</div>
<div class="welInput">
<span>性别</span>
<input type="text" name="Sex" placeholder="请填写性别" />
</div>
<div class="welInput">
<span>年龄</span>
<input type="text" name="Age" placeholder="请填写年龄" />
</div>
<div class="welInput">
<span>政治面貌</span>
<input type="text" name="Politicy" placeholder="请填写政治面貌" />
</div>
<div class="welDel"> <i class="iconfont icon-move"></i> </div>
</div>
</div>
<div class="welLine"></div>
<div class="welT">紧急联系人</div>
<div class="welBox" id="StuInfoFreshEmergePeople">
<div class="welCon">
<div class="welInput">
<span>姓名</span>
<input type="text" name="Name" placeholder="请填写姓名" />
</div>
<div class="welInput">
<span>与本人关系</span>
<input type="text" name="Relation" placeholder="请填写与本人关系" />
</div>
<div class="welInput">
<span>手机号码</span>
<input type="text" name="Telephone" placeholder="请填写手机号码" />
</div>
<div class="welInput">
<span>座机号码</span>
<input type="text" name="Mobile" placeholder="请填写座机号码" />
</div>
<div class="welInput">
<span>联系地址</span>
<input type="text" name="Address" placeholder="请填写联系地址" />
</div>
<div class="welDel"> <i class="iconfont icon-move"></i> </div>
</div>
</div>

<div class="btnBox">
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block">保存</button>
</div>
</div>

+ 212
- 0
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/WelcomNewStudents/ConfirmStudentsCheckIn/form/form.js Zobrazit soubor

@@ -0,0 +1,212 @@
(function () {
var colDataItemArr = ['GenderNo', 'PartyFaceNo'];
var colDataItemCode = ['usersex', 'PolityStatus'];

var page = {
isScroll: false,
init: function ($page,param) {
//数据绑定
learun.httpget(config.webapi + "StuInfoFresh/stuInfoFreshEntityByStuNo", '\''+param.StuNo+'\'', (data) => {
if (data) {
//基本信息
for (var id in data['StuInfoFreshEntity']) {
var dom = $('#' + id)[0];
if (dom) {
if (dom.tagName.toLowerCase() == "span") {
$('#' + id).html(data['StuInfoFreshEntity']['' + id + '']);
//数据字典
if ($.inArray(id, colDataItemArr) >= 0) {
learun.clientdata.get('dataItem', {
code: colDataItemCode[$.inArray(id, colDataItemArr)],
key: data['StuInfoFreshEntity']['' + id + ''],
callback: function (data, op) {
$('#' + id).html(data.text);
}
});
}

} else if (dom.tagName.toLowerCase() == "input") {
$('#' + id).val(data['StuInfoFreshEntity']['' + id + '']);
}
}
}
//头像
$('#PhotoImg').attr('src', config.web + data['Url']);
//家庭成员
$('#StuInfoFreshFamily').html("");
$.each(data['StuInfoFreshFamilyList'], function (i, item) {
var html = '<div class="welCon"><form class="welConForm">' +
'<div class="welInput">' +
'<span>姓名</span>' +
'<input type="text" name="Name" placeholder="请填写姓名" value="' + item.Name + '"/>' +
'</div >' +
'<div class="welInput">' +
'<span>与本人关系</span>' +
//'<input type="text" name="Relation" placeholder="请填写与本人关系" value="' + item.Relation + '"/>' +
'<div name="Relation" value="' + item.Relation + '"></div>' +
'</div>' +
'<div class="welInput">' +
'<span>性别</span>' +
//'<input type="text" name="Sex" placeholder="请填写性别" value="' + item.Sex + '"/>' +
'<div name="Sex" value="' + item.Sex + '"></div>' +
'</div>' +
'<div class="welInput">' +
'<span>年龄</span>' +
'<input type="text" name="Age" placeholder="请填写年龄" value="' + item.Age + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>政治面貌</span>' +
//'<input type="text" name="Politicy" placeholder="请填写政治面貌" value="' + item.Politicy + '"/>' +
'<div name="Politicy" value="' + item.Politicy + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>身份证号</span>' +
'<input type="text" name="IdCard" placeholder="请填写身份证号" value="' + item.IdCard + '"/>' +
'</div>' +
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' +
'</form></div> ';
$('#StuInfoFreshFamily').append(html);

});

//紧急联系人
$('#StuInfoFreshEmergePeople').html("");
$.each(data['StuInfoFreshEmergePeopleList'], function (i, item) {
var html = '<div class="welCon"><form class="welConForm">' +
'<div class="welInput">' +
'<span>姓名</span>' +
'<input type="text" name="Name" placeholder="请填写姓名" value="' + item.Name + '"/>' +
'</div >' +
'<div class="welInput">' +
'<span>与本人关系</span>' +
'<input type="text" name="Relation" placeholder="请填写与本人关系" value="' + item.Relation + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>手机号码</span>' +
'<input type="text" name="Telephone" placeholder="请填写手机号码" value="' + item.Telephone + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>座机号码</span>' +
'<input type="text" name="Mobile" placeholder="请填写座机号码" value="' + item.Mobile + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>联系地址</span>' +
'<input type="text" name="Address" placeholder="请填写联系地址" value="' + item.Address + '"/>' +
'</div>' +
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' +
'</form></div > ';
$('#StuInfoFreshEmergePeople').append(html);

});

page.bind($page);


}

});

//保存
$page.find('#saveBtn').on('tap', function () {
var postdata = {
ID: $('#ID').val(),
RegionNo: $('#RegionNo').val(),
FamilyAddress: $('#FamilyAddress').val(),
telephone: $('#telephone').val(),
Photo: $('#Photo').val(),
StuInfoFreshFamilyEntities: family(),
StuInfoFreshEmergePeopleEntities: emergePeople()
};
learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, (data) => {
if (data) {
learun.layer.toast('保存成功');
location.reload();
}
});

});


},
bind: function ($page) {
//性别
$.each($page.find('[name="Sex"]'), function (i, item) {
$page.find(item).lrpickerex({
code: 'usersex',
type: 'dataItem'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
//政治面貌
$.each($page.find('[name="Politicy"]'), function (i, item) {
$page.find(item).lrpickerex({
code: 'PolityStatus',
type: 'dataItem'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
//与本人关系
$.each($page.find('#StuInfoFreshFamily').find('[name="Relation"]'), function (i, item) {
$page.find(item).lrpickerex({
code: 'FamilyRelation',
type: 'dataItem'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
}
};
//数据处理
function family() {
var list = new Array();
$.each($('#StuInfoFreshFamily').children('.welCon'), function (i, item) {
var o = $(item).children(".welConForm").serializeObject();
o.Sex = $(item).find('[name="Sex"]').lrpickerGet();
o.Politicy = $(item).find('[name="Politicy"]').lrpickerGet();
o.Relation = $(item).find('[name="Relation"]').lrpickerGet();
list.push(o);
});
return list;
}
function emergePeople() {
var list = new Array();
$.each($('#StuInfoFreshEmergePeople').children('.welCon'), function (i, item) {
var o = $(item).children(".welConForm").serializeObject();
list.push(o);
});
return list;
}

$.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
}

//产生随机数
function GenerateRandom() {
var retstr = "";
var date = new Date();
retstr = date.getFullYear().toString() + "-" + date.getMonth().toString() + "-" + date.getDate().toString() + "-" + date.getUTCHours().toString() + "-" + date.getUTCMinutes() + "-" + date.getUTCSeconds().toString();
var Num = "";
for (var i = 0; i < 6; i++) {
Num += Math.floor(Math.random() * 10);
}
return retstr + Num;
}

return page;
})();

+ 79
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs Zobrazit soubor

@@ -18,6 +18,7 @@ namespace Learun.Application.WebApi.Modules
: base("/StuInfoFresh")
{
Get["/stuInfoFreshEntity"] = GetStuInfoFreshEntity;
Get["/stuInfoFreshEntityByStuNo"] = GetStuInfoFreshEntityByStuNo;
Get["/saveStuInfoFresh"] = GetSaveStuInfoFresh;
Post["/savePhoto"] = GetSavePhoto;
Get["/payFeeDetail"] = GetPayFeeDetail;
@@ -116,6 +117,84 @@ namespace Learun.Application.WebApi.Modules

return Success(result);
}
private Response GetStuInfoFreshEntityByStuNo(dynamic _)
{
var url = Config.GetValue("defaultheadimg");
var StuInfoFreshFamilyList = new List<StuInfoFreshFamilyEntity>();
var StuInfoFreshEmergePeopleList = new List<StuInfoFreshEmergePeopleEntity>();

var StuInfoFreshEntity = stuInfoFreshIBLL.GetStuInfoFreshEntityByStuNo(GetReqData());
if (StuInfoFreshEntity != null)
{
//处理数据源
StuInfoFreshEntity.MajorNo = cdMajorIBLL.GetCdMajorEntityByMajorNo(StuInfoFreshEntity.MajorNo).MajorName;
StuInfoFreshEntity.DeptNo = cdDeptIBLL.GetCdDeptEntityByNo(StuInfoFreshEntity.DeptNo).DeptName;

var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(StuInfoFreshEntity.ClassNo);
if (classInfoEntity != null)
{
StuInfoFreshEntity.ClassNo = classInfoEntity.ClassName;
StuInfoFreshEntity.ClassTutorNo = classInfoEntity.ClassTutorNo;
var empInfoEntity = empInfoIBLL.GetEmpInfoEntityByEmpNo(classInfoEntity.ClassTutorNo);
if (empInfoEntity != null)
{
StuInfoFreshEntity.ClassTutorName = empInfoEntity.EmpName;
StuInfoFreshEntity.ClassTutorMobile = empInfoEntity.mobile;
}
}
if (StuInfoFreshEntity.PayFeeStatus == "1")
{
StuInfoFreshEntity.PayFeeStatus = "已缴费";
}
else
{
StuInfoFreshEntity.PayFeeStatus = "未缴费";
}
if (StuInfoFreshEntity.CollectFileStatus == "1")
{
StuInfoFreshEntity.CollectFileStatus = "已提交";
}
else
{
StuInfoFreshEntity.CollectFileStatus = "未提交";
}
if (StuInfoFreshEntity.GetKeyStatus == "1")
{
StuInfoFreshEntity.GetKeyStatus = "已领取";
}
else
{
StuInfoFreshEntity.GetKeyStatus = "未领取";
}

//获取头像地址
if (StuInfoFreshEntity.IsPhoto == true && !string.IsNullOrEmpty(StuInfoFreshEntity.Photo))
{
var annexesFileEntity = annexesFileIBLL.GetEntity(StuInfoFreshEntity.Photo);
if (annexesFileEntity != null)
{
url = annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource"));
}
}
StuInfoFreshEntity.DormitoryName = accdormitoryIBLL.GetDormitoryInfoByPlanStuNo(StuInfoFreshEntity.ID);

//是否完善信息
StuInfoFreshFamilyList = stuInfoFreshIBLL.GetStuInfoFreshFamilyList(StuInfoFreshEntity.ID).ToList();
StuInfoFreshEmergePeopleList = stuInfoFreshIBLL.GetStuInfoFreshEmergePeopleList(StuInfoFreshEntity.ID).ToList();
StuInfoFreshEntity.ClassTutorNo = StuInfoFreshFamilyList.Any() ? "已完善" : "未完善";

}

var result = new
{
StuInfoFreshEntity = StuInfoFreshEntity,
StuInfoFreshFamilyList = StuInfoFreshFamilyList,
StuInfoFreshEmergePeopleList = StuInfoFreshEmergePeopleList,
Url = url
};

return Success(result);
}
/// <summary>
/// 保存个人信息
/// </summary>


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