53 lines
1.8 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 版 本 PIT-ADMS V7.0.3 敏捷开发框架
* Copyright (c) 2013-2018 Hexagon PPM
* 创建人:力软-前端开发组
* 日 期2017.04.11
* 描 述:个人中心-联系方式
*/
var baseinfo;
var bootstrap = function ($, learun) {
"use strict";
var getBaseinfo = function (callback) {
baseinfo = learun.frameTab.currentIframe().baseinfo;
if (!baseinfo) {
setTimeout(function () { getBaseinfo(callback) }, 100);
}
else {
callback();
}
};
var page = {
init: function () {
getBaseinfo(function () {
page.bind();
page.initData();
});
},
bind: function () {
$('#lr_save_btn').on('click', function () {
var phone = $('#F_Mobile').val();
if (phone != "") {
if (!(/^1[3456789]\d{9}$/.test(phone))) {
$.lrValidformMessage($("#F_Mobile"), "联系方式有误,请重填!");
$('#F_Mobile').click();
return false;
}
}
var postData = $('#form').lrGetFormData();
postData.F_CompanyId = baseinfo.companyId;
postData.F_Account = baseinfo.account;
postData.Role = null;
$.lrSaveForm(top.$.rootUrl + '/LR_OrganizationModule/User/SaveForm?keyValue=' + baseinfo.userId, postData, function (res) { });
});
},
initData: function () {
$('#F_Mobile').val(baseinfo.mobile);
$('#F_Email').val(baseinfo.email);
$('#F_WeChat').val(baseinfo.weChat);
$('#F_OICQ').val(baseinfo.oICQ);
}
};
page.init();
}