-
-
- 姓名
-
-
-
- 与本人关系
-
-
-
- 手机号码
-
-
-
- 座机号码
-
-
-
- 联系地址
-
-
-
+
+
-
-
+
+
+
家庭成员(直系家属)
+
+
+
+ 姓名
+
+
+
+
+ 年龄
+
+
+
+
+
+
+
添加家庭成员
+
+
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js
index e7a127e16..a580dac62 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js
@@ -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 = '
';
- var EmergePeopleHtml = '
';
-
-
- 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 = '
';
+ var EmergePeopleHtml = '
';
- 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('#PhotoImg').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 = '
';
$('#StuInfoFreshFamily').append(html);
- });
+ });}
//紧急联系人
+ if(data['StuInfoFreshEmergePeopleList'].length>0){
$('#StuInfoFreshEmergePeople').html("");
$.each(data['StuInfoFreshEmergePeopleList'], function(i, item) {
var html = '
';
$('#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;
})();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html
index f7d954142..9bf901e5d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/workspace/workspace.html
@@ -1,4 +1,4 @@
-
+
+
+