@@ -18,9 +18,10 @@ | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_temp" class="btn btn-default"><i class="fa fa-plus"></i> 模板管理</a> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
@@ -34,6 +34,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
}); | |||
// 模板管理 | |||
$('#lr_temp').on('click', function () { | |||
learun.layerForm({ | |||
id: 'datalabel', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LR_Desktop/EnrollTemplate/IndexMail', | |||
width: 800, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -47,6 +47,15 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 退档模板 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexMail() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "招生模板配置"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">模板名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add1" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit1" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/EnrollTemplate/IndexMail.js") |
@@ -0,0 +1,121 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-02-23 10:46 | |||
* 描 述:人事模板配置 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add1').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LR_Desktop/EnrollTemplate/Form?type=3', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit1').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LR_Desktop/EnrollTemplate/Form?type=3&keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/EnrollTemplate/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
//文件预览 | |||
$('#lr-preview').on('click', function () { | |||
var keyValue = $("#gridtable").jfGridValue("Id"); | |||
var Path = $("#gridtable").jfGridValue("Path"); | |||
if (keyValue) { | |||
learun.layerForm({ | |||
id: 'PreviewForm', | |||
title: '文件预览', | |||
url: top.$.rootUrl + '/LR_Desktop/EnrollData/PreviewFile?folderid=' + Path, | |||
width: 1080, | |||
height: 850, | |||
btn: null, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
learun.alert.warning('请选择要预览的文件!'); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/EnrollTemplate/GetPageList', | |||
headData: [ | |||
{ label: "模板名称", name: "Name", width: 200, align: "left" }, | |||
{ label: "文件名称", name: "F_FileName", width: 200, align: "left" }, | |||
//{ label: "模板上传", name: "Path", width: 100, align: "left"}, | |||
{ | |||
label: "是否启用", name: "Enabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 200, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.Type = 3; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -1551,6 +1551,7 @@ | |||
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.css" /> | |||
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\EnrollData\IndexPersonnel.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\EnrollTemplate\IndexMail.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\EnrollTemplate\IndexPersonnel.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\FormulaChild\Index.js" /> | |||
@@ -7987,6 +7988,7 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Travel_Apply\Index.cshtml" /> | |||
<Content Include="Content\excel\ArrangeLessonTermImport.xls" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ImportForm.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\EnrollTemplate\IndexMail.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -5,6 +5,9 @@ using Learun.Util; | |||
using Nancy; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.Ask; | |||
using System.Web; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Learun.Application.Base.SystemModule; | |||
namespace Learun.Application.WebApi.Modules | |||
{ | |||
@@ -21,12 +24,16 @@ namespace Learun.Application.WebApi.Modules | |||
: base("/learun/EducationalAdministration/Officermailpage") | |||
{ | |||
Get["/getlist"] = GetList; | |||
//下载模板 | |||
Get["/downtemplate"] = DownTemplate; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
} | |||
//private ArrangeExamTermNewIBLL AeTerm = new ArrangeExamTermNewBLL(); | |||
OfficermailpageIBLL Officermailpage = new OfficermailpageBLL(); | |||
private EnrollTemplateIBLL enrollTemplateIBLL = new EnrollTemplateBLL(); | |||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
/// <summary> | |||
/// 获取学生待考试列表 | |||
@@ -86,5 +93,28 @@ namespace Learun.Application.WebApi.Modules | |||
public string strEntity { get; set; } | |||
} | |||
#endregion | |||
/// <summary> | |||
/// 下载模板 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response DownTemplate(dynamic _) | |||
{ | |||
var enrollTemplate = enrollTemplateIBLL.GetEnabledEntity(3); | |||
if (enrollTemplate == null) | |||
{ | |||
return Fail("无可用模板!"); | |||
} | |||
var data = annexesFileIBLL.GetEntity(enrollTemplate.Path); | |||
string filepath = data.F_FilePath; | |||
if (FileDownHelper.FileExists(filepath)) | |||
{ | |||
FileDownHelper.DownLoadnew(filepath); | |||
} | |||
return Success(""); | |||
} | |||
} | |||
} |