|
|
@@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { |
|
|
|
label: '手机号码', name: 'Mobile', width: 100, align: 'left' |
|
|
|
, edit: { |
|
|
|
type: 'input', |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@@ -154,37 +154,46 @@ var bootstrap = function ($, learun) { |
|
|
|
if (!$('body').lrValidform()) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
var flag = true; |
|
|
|
//家庭成员: |
|
|
|
var familyList = $('#StuInfoFreshFamily').jfGridGet('rowdatas'); |
|
|
|
$.each(familyList, function (i, item) { |
|
|
|
//身份证号的验证 |
|
|
|
if (!IsUserCard(item.IdCard)) {//身份证错误 |
|
|
|
learun.alert.warning("家庭成员:" + item.Name + "的身份证号有误!"); |
|
|
|
if (!item.Name) { |
|
|
|
flag = false; |
|
|
|
learun.alert.warning("家庭成员的姓名不可空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//手机号验证 |
|
|
|
if (!item.Mobile) { |
|
|
|
flag = false; |
|
|
|
learun.alert.warning("家庭成员:" + item.Name + "的手机号不可空!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
else if(!IsMobile){ |
|
|
|
else if (!IsMobile(item.Mobile)) { |
|
|
|
flag = false; |
|
|
|
learun.alert.warning("家庭成员:" + item.Name + "的手机号格式有误!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
var postData = {}; |
|
|
|
postData.strEntity = JSON.stringify($('[data-table="StuInfoFresh"]').lrGetFormData()); |
|
|
|
postData.strstuInfoFreshEmergePeopleList = JSON.stringify($('#StuInfoFreshEmergePeople').jfGridGet('rowdatas')); |
|
|
|
postData.strstuInfoFreshFamilyList = JSON.stringify($('#StuInfoFreshFamily').jfGridGet('rowdatas')); |
|
|
|
|
|
|
|
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/SaveForm?keyValue=' + keyValue, postData, function (res) { |
|
|
|
// 保存成功后才回调 |
|
|
|
if (!!callBack) { |
|
|
|
callBack(); |
|
|
|
//身份证号的验证 |
|
|
|
if (!item.IdCard || !IsUserCard(item.IdCard)) {//身份证错误 |
|
|
|
flag = false; |
|
|
|
learun.alert.warning("家庭成员:" + item.Name + "的身份证号有误!"); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
if (flag) { |
|
|
|
var postData = {}; |
|
|
|
postData.strEntity = JSON.stringify($('[data-table="StuInfoFresh"]').lrGetFormData()); |
|
|
|
postData.strstuInfoFreshEmergePeopleList = JSON.stringify($('#StuInfoFreshEmergePeople').jfGridGet('rowdatas')); |
|
|
|
postData.strstuInfoFreshFamilyList = JSON.stringify($('#StuInfoFreshFamily').jfGridGet('rowdatas')); |
|
|
|
|
|
|
|
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/SaveForm?keyValue=' + keyValue, postData, function (res) { |
|
|
|
// 保存成功后才回调 |
|
|
|
if (!!callBack) { |
|
|
|
callBack(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}; |
|
|
|
page.init(); |
|
|
|
} |
|
|
|