@@ -149,7 +149,7 @@ namespace Learun.Application.Organization | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository().FindEntity<RoleEntity>(t => t.F_FullName == v).F_RoleId; | |||||
return this.BaseRepository().FindEntity<RoleEntity>(t => t.F_FullName == v)?.F_RoleId; | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -98,11 +98,16 @@ var bootstrap = function ($, learun) { | |||||
value: 'CCODE', | value: 'CCODE', | ||||
text: 'CNAME' | text: 'CNAME' | ||||
}); | }); | ||||
$('#RegionNo').lrselectRefresh({ | |||||
} else { | |||||
$('#CityNo').lrselectRefresh({ | |||||
url: "", | url: "", | ||||
data: [] | data: [] | ||||
}); | }); | ||||
} | } | ||||
$('#RegionNo').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
$('#CityNo').lrselect({ | $('#CityNo').lrselect({ | ||||
@@ -58,12 +58,12 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">学校地点</div> | <div class="lr-form-item-title">学校地点</div> | ||||
<div id="area" class="col-xs-6 lr-form-area"> | |||||
<div id="area" class="col-xs-12 lr-form-area"> | |||||
<div id="F_ProvinceId" placeholder="省" class="col-xs-4"></div> | <div id="F_ProvinceId" placeholder="省" class="col-xs-4"></div> | ||||
<div id="F_CityId" placeholder="市" class="col-xs-4"></div> | <div id="F_CityId" placeholder="市" class="col-xs-4"></div> | ||||
<div id="F_CountyId" placeholder="县/区" class="col-xs-4"></div> | <div id="F_CountyId" placeholder="县/区" class="col-xs-4"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-6"> | |||||
<div class="col-xs-12"> | |||||
<input id="F_Address" type="text" placeholder="请输入详细地址" class="form-control" /> | <input id="F_Address" type="text" placeholder="请输入详细地址" class="form-control" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -24,7 +24,44 @@ var bootstrap = function ($, learun) { | |||||
// 上级公司 | // 上级公司 | ||||
$('#F_ParentId').lrCompanySelect(); | $('#F_ParentId').lrCompanySelect(); | ||||
// 省市区 | // 省市区 | ||||
$('#area').lrAreaSelect(); | |||||
$('#F_ProvinceId').lrDataSourceSelect({ | |||||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#F_CityId').lrselectRefresh({ | |||||
url: top.$.rootUrl + "/DIC_CITY/GetListByProvinceCode", | |||||
param: { ProvinceCode: item.pcode }, | |||||
value: 'CCODE', | |||||
text: 'CNAME' | |||||
}); | |||||
} else { | |||||
$('#F_CityId').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
$('#F_CountyId').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
}); | |||||
$('#F_CityId').lrselect({ | |||||
value: 'ccode', text: 'cname', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#F_CountyId').lrselectRefresh({ | |||||
url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", | |||||
param: { cityCode: item.CCODE }, | |||||
value: 'ACODE', | |||||
text: 'ANAME' | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#F_CountyId').lrselect({ | |||||
value: 'ACODE', text: 'ANAME' | |||||
}); | |||||
$('#F_Photo').lrUploader(); | $('#F_Photo').lrUploader(); | ||||
F_BriefIntroductionUE = UE.getEditor('F_BriefIntroduction'); | F_BriefIntroductionUE = UE.getEditor('F_BriefIntroduction'); | ||||
//$('#F_BriefIntroduction')[0].ue = F_BriefIntroductionUE; | //$('#F_BriefIntroduction')[0].ue = F_BriefIntroductionUE; | ||||
@@ -57,7 +94,7 @@ var bootstrap = function ($, learun) { | |||||
if (!$('#form').lrValidform()) { | if (!$('#form').lrValidform()) { | ||||
return false; | return false; | ||||
} | } | ||||
var postData = $('#form').lrGetFormData(keyValue); | |||||
var postData = $('#form').lrGetFormData(); | |||||
if (postData["F_ParentId"] == '' || postData["F_ParentId"] == ' ') { | if (postData["F_ParentId"] == '' || postData["F_ParentId"] == ' ') { | ||||
postData["F_ParentId"] = '0'; | postData["F_ParentId"] = '0'; | ||||
} | } | ||||
@@ -19,7 +19,7 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); | |||||
$('#DepartmentID').lrDepartmentSelect(); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||