Pārlūkot izejas kodu

新生信息完善

西昌缴费二期
zhangli pirms 3 gadiem
vecāks
revīzija
62d8a750e6
3 mainītis faili ar 681 papildinājumiem un 500 dzēšanām
  1. +232
    -105
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.css
  2. +183
    -144
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html
  3. +266
    -251
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js

+ 232
- 105
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.css Parādīt failu

@@ -1,132 +1,259 @@
.welcome {
padding: 1px 12px 20px;
background: #fff;
height: 100%;
overflow: auto;
}
.welCard{
background-color: #EFF2F3;
height: calc(100% - 50px);
overflow: auto;
padding-bottom: 30px;
}
.welTab {
display: flex;
justify-content: space-between;
align-items: center;
/* position: relative; */
background: #fff;
padding: 1px 12px 0px;
font-size: 14px;
line-height: 40px;
}

.welTab div {
padding: 0 5px;
position: relative;
}

.welTab div:after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 3px;
height: 2px;
}

.welTab div.active {
color: #0C86D8;
}

.welTab div.active:after {
background-color: #0C86D8;
}

.welBox {
display: none;
/* background: #fff; */
/* padding: 0px 12px 20px; */
}
.welbox2{
padding: 0px 12px 0px;
background-color: #fff;
}
.welBox.active {
display: block;
}

.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;
}
padding: 10px 0;
font-weight: bold;
font-size: 16px;
line-height: 26px;
}

.welT2 {
height: 46px;
line-height: 46px;
font-size: 16px;
margin: 0 -12px;
padding: 0 12px;
background-color: #EFF2F3;
}

.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;
height: 7px;
background-color: #EFF2F3;
/* margin: 10px -12px; */
}

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

.welText span {
float: right;
width: 60%;
text-align: right;
}
.welText div {
width: 58px;
display: inline-block;
line-height: 20px;
text-align: justify;
text-align-last: justify;
}

.welText div:after {
overflow: hidden;
width: 100%;
content: '';
}

.welText span {
float: right;
width: 60%;
text-align: right;
line-height: 20px;
}

.welInputBox {
margin: 0 -12px;
}

.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;
}
overflow: hidden;
font-size: 14px;
/* margin-top: 10px; */
height: 46px;
padding: 8px 12px;
border-top: 1px solid #EFF2F3;
}

.welInput:first-child {
border: 0;
}

.welInput span {
float: left;
width: 70px;
text-align: right;
line-height: 30px;
text-align: justify;
text-align-last: justify;
}

.welInput span:after {
overflow: hidden;
width: 100%;
content: '';
}

.welInput .welInputs {
display: block;
margin-left: 80px;
width: calc(100% - 80px);
border: 0px solid #efefef;
border-radius: 4px;
height: 30px;
line-height: 28px;
padding: 0 10px;
margin-bottom: 0;
text-align: right;
}
.welInput .lr-picker {
line-height: 30px;
}
.welCon {
padding: 10px;
border: 1px solid #efefef;
margin-top: 18px;
border-radius: 4px;
position: relative;
margin-top: 18px;
position: relative;
margin: 0 -12px;
}

.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%;
}
background: #EFF2F3;
padding: 5px 12px 10px;
text-align: right;
}

.welImgAdd {
text-align: center;
line-height: 0;
.welDel i,.welAdd i {
text-align: center;
width: 26px;
height: 26px;
line-height: 24px;
border: 2px solid #0C86D8;
border-radius: 3px;
background: #ffff;
color: #0C86D8;
}

.welAdd{
background: #EFF2F3;
margin: 0 -12px;
padding: 5px 12px;
font-size: 14px;
color: #0C86D8;
}

#files {
opacity: 0;
-webkit-opacity: 0;
z-index: 9;
display: none;
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;
}
.welImgAdd{
min-height:110px;
}
#PhotoImg {
width: 110px;
height:110px;
}

.btnBox{
margin-top:20px;
text-align:center;
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;
}

.welImgAdd {
width: 225px;
margin: 60px auto;
border: 1px solid #0C86D8;
border-radius: 6px;
overflow: hidden;
line-height: 0;
}

.welImgAdd img {
width: 100%;
}

/* #PhotoImg {
width: 110px;
height: 110px;
} */
.welImgInfo {
width: 260px;
margin: 0 auto;
color: #888888;
}

.welImgInfoT {
font-size: 16px;
font-weight: bold;
}

.welImgInfoTxt {
font-size: 14px;
margin-top: 10px;
}
.btnBox {
margin-top: 20px;
text-align: center;
}

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

+ 183
- 144
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html Parādīt failu

@@ -1,157 +1,196 @@
<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 class="welcome">
<div class="welTab">
<div class="active">基本信息</div>
<div>采集照片</div>
<div>籍贯/通讯</div>
<div>账户信息</div>
<div>家庭成员</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">
<!--<div id="welImgBtn">上传照片</div>-->
<img id="PhotoImg" src="" alt="">
</div>
<!--<div class="welText">说明:近期两寸免冠正面彩色照小于100K</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 class="welLine" style="margin-top: 0;"></div>
<div class="welCard">
<div class="welBox active">
<div class="welbox2" style="padding-bottom: 20px;">
<div class="welT">基本信息</div>
<input type="hidden" name="ID" value="" id="ID" />
<div class="welText">
<div>学号</div>
<span id="StuNo"></span>
</div>
<div class="welText">
<div>准考证号</div>
<span id="zkzh"></span>
</div>
<div class="welText">
<div>考生号</div>
<span id="ksh"></span>
</div>
<div class="welText">
<div>姓名</div>
<span id="StuName"></span>
</div>
<div class="welText">
<div>性别</div>
<span id="GenderNo"></span>
</div>
<div class="welText">
<div>系别</div>
<span id="DeptNo"></span>
</div>
<div class="welText">
<div>专业</div>
<span id="MajorNo"></span>
</div>
<div class="welText">
<div>班级</div>
<span id="ClassNo"></span>
</div>
<div class="welText">
<div>身份证号</div>
<span id="IdentityCardNo"></span>
</div>
<div class="welText">
<div>出生日期</div>
<span id="Birthday"></span>
</div>
<div class="welText">
<div>户口类别</div>
<span id="ResidenceNo"></span>
</div>
<div class="welText">
<div>政治面貌</div>
<span id="PartyFaceNo"></span>
</div>
</div>
</div>

<div data-table="StuInfoBasic">
<span>基础信息</span>
<div class="welInput">
<span>开户银行</span>
<!-- <input id="DepositBank" type="text" placeholder="请选择开户银行" /> -->
<div id="DepositBank" placeholder="请选择开户银行"></div>
</div>
<div class="welInput ">
<span>银行卡账号</span>
<input id="BankCard" type="text" placeholder="请填写银行卡号"/>
<div class="welBox ">
<div class="welbox2" style="padding-bottom: 20px;">
<div class="welT">采集照片</div>
<input type="hidden" id="Photo" value="" />
<input id="files" type="file" accept="image/*">
<div class="welImgAdd">
<!--<div id="welImgBtn">上传照片</div>-->
<img id="PhotoImg" src="../../images/wel1.png" alt="">
</div>
<div class="welImgInfo">
<div class="welImgInfoT">照片要求:</div>
<div class="welImgInfoTxt">1 . 单色背景,正面,免冠近期证件照</div>
<div class="welImgInfoTxt">2 . 文件格式JPG</div>
<div class="welImgInfoTxt">3 . 文件大小165320KB以下</div>
</div>
</div>
<div class="welInput ">
<span>开户行位置</span>
<input id="BankLocation" type="text" placeholder="请填写开户行位置" />
<div class="btnBox">
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button>
</div>
</div>
<div class="welLine"></div>
<div class="welT">家庭成员(直系家属) <i title="家庭成员(直系家属)" class="iconfont icon-add"></i></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 class="welBox ">
<div class="welbox2">
<div class="welT2">自然信息</div>
<div class="welInputBox">
<div class="welInput">
<span>籍贯</span>
<input class="welInputs" id="RegionNo" type="text" placeholder="请填写籍贯" />
</div>
</div>
<div class="welT2">通讯信息</div>
<div class="welInputBox">
<div class="welInput">
<span>家庭住址</span>
<input class="welInputs" id="FamilyAddress" type="text" placeholder="按XX省XX市XX县XX街道填写" />
</div>
<div class="welInput">
<span>联系电话</span>
<input class="welInputs" id="telephone" type="text" placeholder="请填写联系电话(重要)" />
</div>
</div>
<div class="welT2">紧急联系人</div>
<div class="welUrgent" id="StuInfoFreshEmergePeople">
<div class="welCon">
<div class="welInput">
<span>姓名</span>
<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />
</div>
<div class="welInput">
<span>与本人关系</span>
<div name="Relation" value=""></div>
</div>
<div class="welInput">
<span>手机号码</span>
<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" />
</div>
<div class="welInput">
<span>座机号码</span>
<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" />
</div>
<div class="welInput">
<span>联系地址</span>
<input class="welInputs" type="text" name="Address" placeholder="请填写联系地址" />
</div>
<div class="welDel"> <i class="iconfont icon-move"></i> </div>
</div>
</div>
<div class="welAdd"><i title="紧急联系人" class="iconfont icon-add"></i> 添加紧急联系人</div>
</div>
<div class="btnBox">
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button>
</div>
</div>
<div class="welLine"></div>
<div class="welT">紧急联系人 <i title="紧急联系人" class="iconfont icon-add"></i></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 class="welBox ">
<div class="welbox2">
<div class="welInputBox">
<div class="welInput">
<span>开户银行</span>
<div name="DepositBank" id="DepositBank" placeholder="请选择开户银行" value=""></div>
</div>
<div class="welInput">
<span>银行卡号</span>
<input class="welInputs" id="BankCard" type="text" placeholder="银行卡号" />
</div>
<div class="welInput">
<span>开 户 行</span>
<input class="welInputs" id="BankLocation" type="text" placeholder="开户行" />
</div>
</div>
</div>
<div class="btnBox">
<button id="saveBtn1" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button>
</div>
</div>

<div class="btnBox">
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block">保存</button>
<div class="welBox">
<div class="welbox2">
<div class="welT2">家庭成员(直系家属)</div>
<div class="welUrgent" id="StuInfoFreshFamily">
<div class="welCon">
<div class="welInput">
<span>姓名</span>
<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />
</div>
<div class="welInput">
<span>与本人关系</span>
<div name="Relation" value=""></div>
</div>
<div class="welInput">
<span>年龄</span>
<input class="welInputs" type="text" name="Age" placeholder="请填写年龄" />
</div>
<div class="welInput">
<span>政治面貌</span>
<div name="Politicy" value=""></div>
</div>
<div class="welDel"> <i class="iconfont icon-move"></i> </div>
</div>
</div>
<div class="welAdd"><i title="家庭成员" class="iconfont icon-add"></i> 添加家庭成员</div>
</div>
<div class="btnBox">
<button id="saveBtn" type="button" class="lr-btn-primary lr-btn-block saveBtn">保存</button>
</div>
</div>

</div>


</div>

+ 266
- 251
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js Parādīt failu

@@ -1,103 +1,122 @@
(function() {
var colDataItemArr = ['GenderNo'];
var colDataItemCode = ['usersex'];
(function () {
var colDataItemArr = ['GenderNo'];
var colDataItemCode = ['usersex'];
var colDataItemBank = ['DepositBank'];

var page = {
isScroll: false,
init: function($page) {
// 获取登录者信息
var userinfo = learun.storage.get('userinfo');

//增加联系人
$page.find('.welT i').on('tap', function() {
var FamilyHtml = '<div class="welCon"><form class="welConForm">' +
'<div class="welInput">' +
'<span>姓名</span>' +
'<input type="text" name="Name" placeholder="请填写姓名" />' +
'</div>' +
'<div class="welInput">' +
'<span>与本人关系</span>' +
'<div name="Relation" value=""></div>' +
'</div>' +
'<div class="welInput">' +
'<span>性别</span>' +
'<div name="Sex" value=""></div>' +
'</div>' +
'<div class="welInput">' +
'<span>年龄</span>' +
'<input type="text" name="Age" placeholder="请填写年龄" />' +
'</div>' +
'<div class="welInput">' +
'<span>政治面貌</span>' +
'<div name="Politicy" value=""></div>' +
'</div>' +
//'<div class="welInput">' +
//'<span>身份证号</span>' +
//'<input type="text" name="IdCard" placeholder="请填写身份证号" />' +
//'</div>' +
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' +
'</form></div>';
var EmergePeopleHtml = '<div class="welCon"><form class="welConForm">' +
'<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>' +
'</form></div>';


var obj = $(this).parent().next();
if ($(this).attr('title') == '紧急联系人') {
obj.append(EmergePeopleHtml);
} else {
obj.append(FamilyHtml);
}
var page = {
isScroll: false,
init: function ($page) {
// 获取登录者信息
var userinfo = learun.storage.get('userinfo');
//tab切换
$page.find('.welTab div').on('tap', function () {
var ind = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$('.welBox').css('display', 'none').eq(ind).fadeIn()
})
//增加联系人
$page.find('.welAdd i').on('tap', function () {
var FamilyHtml = '<div class="welCon"><form class="welConForm">' +
'<div class="welInput">' +
'<span>姓名</span>' +
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />' +
'</div>' +
'<div class="welInput">' +
'<span>与本人关系</span>' +
'<div name="Relation" value=""></div>' +
'</div>' +
'<div class="welInput">' +
'<span>年龄</span>' +
'<input class="welInputs" type="text" name="Age" placeholder="请填写年龄" />' +
'</div>' +
'<div class="welInput">' +
'<span>政治面貌</span>' +
'<div name="Politicy" value=""></div>' +
'</div>' +
//'<div class="welInput">' +
//'<span>身份证号</span>' +
//'<input type="text" name="IdCard" placeholder="请填写身份证号" />' +
//'</div>' +
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' +
'</form></div>';
var EmergePeopleHtml = '<div class="welCon"><form class="welConForm">' +
'<div class="welInput">' +
'<span>姓名</span>' +
'<input class="welInputs" type="text" name="Name" placeholder="请填写姓名" />' +
'</div>' +
'<div class="welInput">' +
'<span>与本人关系</span>' +
'<div name="Relation" value=""></div>' +
'</div>' +
'<div class="welInput">' +
'<span>手机号码</span>' +
'<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" />' +
'</div>' +
'<div class="welInput">' +
'<span>座机号码</span>' +
'<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" />' +
'</div>' +
'<div class="welInput">' +
'<span>联系地址</span>' +
'<input class="welInputs" type="text" name="Address" placeholder="请填写联系地址" />' +
'</div>' +
'<div class="welDel"> <i class="iconfont icon-move"></i> </div>' +
'</form></div>';


page.bind($page);
})
//删除联系人
$page.find('.welBox').on('tap', '.welDel i', function() {
var parents = $(this).parents('.welCon')
learun.layer.confirm('是否删除此联系人?', function(_index) {
_index == 1 ? parents.remove() : ''
}, '提示', ['否', '是']);
})
//上传照片
var inputNode = $page.find('#files');
$page.find('#welImgBtn').on('tap', function() {
var evt = new MouseEvent("click", {
bubbles: false,
cancelable: true,
view: window
var obj = $(this).parents('.welBox').find('.welUrgent');
if ($(this).attr('title') == '紧急联系人') {
obj.append(EmergePeopleHtml);
} else {
obj.append(FamilyHtml);
//政治面貌
var Politicy = $(obj).find('[name="Politicy"]:last');
Politicy.lrpickerex({
code: 'BCdPartyFace',
type: 'sourceData',
ivalue: 'partyfaceno',
itext: 'partyface'
});
//赋值
Politicy.lrpickerSet(Politicy.attr('value'));
}
//与本人关系
var Relation = $(obj).find('[name="Relation"]:last');
Relation.lrpickerex({
code: 'FamilyRelation',
type: 'dataItem'
});
inputNode[0].dispatchEvent(evt);
})
inputNode.on('change', function() {
previewFile();
});

//数据绑定
//赋值
Relation.lrpickerSet(Relation.attr('value'));
// page.bind($page);
})
//删除联系人
$page.find('.welBox').on('tap', '.welDel i', function () {
var parents = $(this).parents('.welCon')
learun.layer.confirm('是否删除此联系人?', function (_index) {
_index == 1 ? parents.remove() : ''
}, '提示', ['否', '是']);
})
//上传照片
var inputNode = $page.find('#files');
$page.find('#welImgBtn').on('tap', function () {
var evt = new MouseEvent("click", {
bubbles: false,
cancelable: true,
view: window
});
inputNode[0].dispatchEvent(evt);
})
inputNode.on('change', function () {
previewFile();
});
//数据绑定
learun.layer.loading(true, '获取数据中');
learun.httpget(config.webapi + "StuInfoFresh/stuInfoFreshEntity", userinfo.baseinfo.account, (
data) => {
//console.log('datadata',data);
if (data) {
//基本信息
for (var id in data['StuInfoFreshEntity']) {
@@ -126,16 +145,16 @@
}
});
}
// if (id == "#DepositBank") {
// learun.clientdata.get('sourceData', {
// code: 'DepositBank',
// key: data['StuInfoFreshEntity']['' + id + ''],
// keyId: 'DepositBank',
// callback: function(data, op) {
// $("#DepositBank").html(data.text);
// }
// });
// }
if (id == "#DepositBank") {
learun.clientdata.get('sourceData', {
code: 'DepositBank',
key: data['StuInfoFreshEntity']['' + id + ''],
keyId: 'DepositBank',
callback: function(data, op) {
$("#DepositBank").html(data.text);
}
});
}
} else if (dom.tagName.toLowerCase() == "input") {
$('#' + id).val(data['StuInfoFreshEntity']['' + id + '']);
}
@@ -146,79 +165,71 @@
$("#DepositBank").lrpickerSet(data.StuInfoFreshEntity.DepositBank);
//头像
$('#PhotoImg').attr('src', config.web + data['Url']);
//家庭成员
if(data['StuInfoFreshFamilyList'].length>0){
$('#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="' +
'<input class="welInputs" 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="' +
'<input class="welInputs" 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);

});
});}

//紧急联系人
if(data['StuInfoFreshEmergePeopleList'].length>0){
$('#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="' +
'<input class="welInputs" 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="Telephone" placeholder="请填写手机号码" value="' +
'<input class="welInputs" type="text" name="Telephone" placeholder="请填写手机号码" value="' +
item.Telephone + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>座机号码</span>' +
'<input type="text" name="Mobile" placeholder="请填写座机号码" value="' +
'<input class="welInputs" type="text" name="Mobile" placeholder="请填写座机号码" value="' +
item.Mobile + '"/>' +
'</div>' +
'<div class="welInput">' +
'<span>联系地址</span>' +
'<input type="text" name="Address" placeholder="请填写联系地址" value="' +
item.Address + '"/>' +
'<input class="welInputs" 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);
learun.layer.loading(false);
@@ -227,8 +238,9 @@

});

//保存
$page.find('#saveBtn').on('tap', function() {
//保存
$page.find('.saveBtn').on('tap', function () {
var postdata = {
ID: $('#ID').val(),
RegionNo: $('#RegionNo').val(),
@@ -241,135 +253,138 @@
StuInfoFreshFamilyEntities: family(),
StuInfoFreshEmergePeopleEntities: emergePeople()
};
console.log(postdata)
// return
learun.layer.loading(true, '正在提交数据');
learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, (
data) => {
learun.layer.loading(false);
if (data) {
learun.layer.toast('保存成功');
location.reload();
}
});
//console.log(postdata)
//return
learun.layer.loading(true, '正在提交数据');
learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, (data) => {
learun.layer.loading(false);
if (data) {
learun.layer.toast('保存成功');
location.reload();
}
});

});
});

page.bind($page);
},
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: 'BCdPartyFace',
type: 'sourceData',
ivalue: 'partyfaceno',
itext: 'partyface'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
//与本人关系
$.each($page.find('[name="Relation"]'), function (i, item) {
$page.find(item).lrpickerex({
code: 'FamilyRelation',
type: 'dataItem'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
//开户银行
$page.find('#DepositBank').lrpickerex({
code: 'DepositBank',
type: 'dataItem'
});
/* $.each($page.find('[name="DepositBank"]'), function (i, item) {
$page.find(item).lrpickerex({
code: 'DepositBank',
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;
}

},
bind: function($page) {
//性别
$.each($page.find('[name="Sex"]'), function(i, item) {
$page.find(item).lrpickerex({
code: 'usersex',
type: 'dataItem'
});
//赋值
$(item).lrpickerSet($(item).attr('value'));
});
$page.find('#DepositBank').lrpickerex({
code: 'DepositBank',
type: 'dataItem'
});
//政治面貌
$.each($page.find('[name="Politicy"]'), function(i, item) {
$page.find(item).lrpickerex({
code: 'BCdPartyFace',
type: 'sourceData',
ivalue: 'partyfaceno',
itext: 'partyface'
});
//赋值
$(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.DepositBank = $(item).find('[name="DepositBank"]').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;
}

$.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 previewFile() {
var html = '';
var file = document.querySelector('input[type=file]').files[0];
var reader = new FileReader();
reader.onloadend = function() {
//$('#PhotoImg').attr('src', reader.result);
var postData = {
Base64Url: reader.result
}
learun.httppost(config.webapi + "StuInfoFresh/savePhoto", postData, (data) => {
if (data) {
$('#Photo').val(data.AnnexesFileId);
$('#PhotoImg').attr('src', config.web + data.Url);
} else {
learun.layer.toast('采集照片信息失败!');
}
});
}
if (file) {
reader.readAsDataURL(file);
}
}
//上传照片
function previewFile() {
var html = '';
var file = document.querySelector('input[type=file]').files[0];
var reader = new FileReader();
reader.onloadend = function () {
//$('#PhotoImg').attr('src', reader.result);
var postData = {
Base64Url: reader.result
}
learun.httppost(config.webapi + "StuInfoFresh/savePhoto", postData, (data) => {
if (data) {
$('#Photo').val(data.AnnexesFileId);
$('#PhotoImg').attr('src', config.web + data.Url);
} else {
learun.layer.toast('采集照片信息失败!');
}
});
}
if (file) {
reader.readAsDataURL(file);
}
}

//产生随机数
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;
}
//产生随机数
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;
return page;
})();

Notiek ielāde…
Atcelt
Saglabāt