Quellcode durchsuchen

修复校区管理无法回显简介的问题

西昌缴费二期
zhangli vor 2 Jahren
Ursprung
Commit
880010996b
2 geänderte Dateien mit 40 neuen und 6 gelöschten Zeilen
  1. +11
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/CompanyController.cs
  2. +29
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Company/Form.js

+ 11
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/CompanyController.cs Datei anzeigen

@@ -51,6 +51,11 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
public ActionResult GetList(string keyword)
{
var data = companyIBLL.GetList(keyword);
foreach (var item in data)
{
item.F_BriefIntroduction = WebHelper.HtmlDecode(item.F_BriefIntroduction);
item.F_EnrollmentInformation = WebHelper.HtmlDecode(item.F_EnrollmentInformation);
}
return JsonResult(data);
}
/// <summary>
@@ -101,9 +106,13 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, CompanyEntity entity)
[ValidateInput(false)]
public ActionResult SaveForm(string keyValue, string strEntity)
{
CompanyEntity entity = strEntity.ToObject<CompanyEntity>();
entity.SyncFlag = false;
entity.F_BriefIntroduction = WebHelper.HtmlEncode(entity.F_BriefIntroduction);
entity.F_EnrollmentInformation = WebHelper.HtmlEncode(entity.F_EnrollmentInformation);
var list = companyIBLL.GetList();
if (!string.IsNullOrEmpty(keyValue))
{
@@ -119,6 +128,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
entity.SyncFlag = false;
}


list = list.Where(m => m.F_CompanyId != keyValue).ToList();
}
if (list.Any(a => a.F_FullName == entity.F_FullName))


+ 29
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Company/Form.js Datei anzeigen

@@ -10,6 +10,8 @@ var acceptClick;
var keyValue = '';
var bootstrap = function ($, learun) {
"use strict";
var F_BriefIntroductionUE;
var F_EnrollmentInformationUE;
var selectedRow = learun.frameTab.currentIframe().selectedRow;
var page = {
init: function () {
@@ -24,15 +26,32 @@ var bootstrap = function ($, learun) {
// 省市区
$('#area').lrAreaSelect();
$('#F_Photo').lrUploader();
var F_BriefIntroductionUE = UE.getEditor('F_BriefIntroduction');
$('#F_BriefIntroduction')[0].ue = F_BriefIntroductionUE;
var F_EnrollmentInformationUE = UE.getEditor('F_EnrollmentInformation');
$('#F_EnrollmentInformation')[0].ue = F_EnrollmentInformationUE;
F_BriefIntroductionUE = UE.getEditor('F_BriefIntroduction');
//$('#F_BriefIntroduction')[0].ue = F_BriefIntroductionUE;

F_EnrollmentInformationUE = UE.getEditor('F_EnrollmentInformation');
//$('#F_EnrollmentInformation')[0].ue = F_EnrollmentInformationUE;
},
initData: function () {
if (!!selectedRow) {
keyValue = selectedRow.F_CompanyId;
$('#form').lrSetFormData(selectedRow);
if (selectedRow.F_BriefIntroduction) {
setTimeout(function () {
F_BriefIntroductionUE.ready(function () {
F_BriefIntroductionUE.setContent(selectedRow.F_BriefIntroduction);
});
}, 100);

};
if (selectedRow.F_EnrollmentInformation) {
setTimeout(function () {
F_EnrollmentInformationUE.ready(function () {
F_EnrollmentInformationUE.setContent(selectedRow.F_EnrollmentInformation);
});
}, 100);

};
}
}
};
@@ -45,7 +64,12 @@ var bootstrap = function ($, learun) {
if (postData["F_ParentId"] == '' || postData["F_ParentId"] == '&nbsp;') {
postData["F_ParentId"] = '0';
}
$.lrSaveForm(top.$.rootUrl + '/LR_OrganizationModule/Company/SaveForm?keyValue=' + keyValue, postData, function (res) {
postData["F_BriefIntroduction"] = F_BriefIntroductionUE.getContent(null, null, true);
postData["F_EnrollmentInformation"] = F_EnrollmentInformationUE.getContent(null, null, true);
var postDatas = {
strEntity: JSON.stringify(postData)
};
$.lrSaveForm(top.$.rootUrl + '/LR_OrganizationModule/Company/SaveForm?keyValue=' + keyValue, postDatas, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();


Laden…
Abbrechen
Speichern