姓名*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js
index 5b97c732c..b6d9557e5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.js
@@ -154,6 +154,12 @@ var bootstrap = function ($, learun) {
$("#Birthday").val(date);
}
});
+
+
+ $('#lr_print').on('click',function() {
+ $('#tab1').print();
+ })
+
},
initData: function () {
if (!!keyValue) {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.cshtml
new file mode 100644
index 000000000..12653cf48
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.cshtml
@@ -0,0 +1,25 @@
+@{
+ ViewBag.Title = "Form";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+
+@Html.AppendCssFile("/Areas/PersonnelManagement/Views/Sal_UserSalary/ImportForm.css")
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.css b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.css
new file mode 100644
index 000000000..04b556b7a
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.css
@@ -0,0 +1,136 @@
+.lr-form-layout-body {
+ padding:0 5px 5px 5px;
+}
+.lr-form-file-queue-wrap {
+ position:relative;
+ width:100%;
+ height:100%;
+ border:1px solid #ddd;
+ border-radius:4px;
+}
+.lr-form-file-queue {
+ position:relative;
+}
+.lr-form-file-queue {
+ position:relative;
+}
+.lr-form-file-queue-item {
+ position:relative;
+ width:100%;
+ height:50px;
+ border-bottom:1px solid #ddd;
+ padding-left:60px;
+
+}
+.lr-file-image {
+ position:absolute;
+ top:5px;
+ left:5px;
+}
+.lr-file-image img {
+ width:40px;
+ height:40px;
+}
+.lr-file-name{
+ line-height:50px;
+
+}
+.lr-msg {
+ position:absolute;
+ top:0;
+ right:5px;
+ font-size: 25px;
+ line-height:50px;
+}
+.lr-msg .fa-check-circle{
+ color: #5cb85c;
+}
+.lr-msg .fa-exclamation-circle {
+ color: #b94a48;
+}
+.lr-msg2 {
+ position:absolute;
+ top:0;
+ right:5px;
+ line-height:50px;
+}
+.lr-msg2 span {
+ color:#333;
+ font-size:14px;
+ margin-right:5px;
+}
+
+.lr-tool-bar {
+ position:absolute;
+ top:0;
+ right:35px;
+ font-size: 25px;
+ line-height:50px;
+ color:#666;
+ cursor:pointer;
+}
+.lr-tool-bar > i {
+ margin-left:8px;
+}
+
+.lr-tool-bar .fa-minus-circle {
+ color: #b94a48;
+}
+.lr-tool-bar .fa-cloud-download {
+ color: #3498db;
+}
+
+.lr-uploader-progress {
+ position:absolute;
+ bottom:2px;
+ left:60px;
+ height:4px;
+ width:500px;
+ width:calc(100% - 90px);
+}
+.lr-uploader-progress-bar {
+ position:relative;
+ height:100%;
+ background-color:#039cfd;
+ border-radius:4px;
+}
+
+
+.lr-form-file-queue-bg {
+ position:absolute;
+ top:50%;
+ left:50%;
+ width:300px;
+ height:30px;
+ line-height:30px;
+
+ margin:-15px 0 0 -150px;
+}
+.lr-form-file-queue-bg h1 {
+ color: #666;
+ font-size: 20px;
+ font-family: Microsoft Yahei;
+ padding-bottom: 2px;
+ margin: 0;
+}
+#lr_down_file_btn {
+ position:absolute;
+ right:5px;
+ background:#fff;
+ border:1px solid #ddd;
+ color:#333;
+}
+#lr_down_file_btn:hover {
+ color:#337ab7;
+}
+/*对百度插件的样式重写*/
+.webuploader-container {
+ position:absolute;
+}
+.webuploader-pick {
+ padding:8px 15px;
+ background-color:#039cfd;
+}
+.webuploader-pick-hover {
+ background-color:#027dcb;
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.js
new file mode 100644
index 000000000..5736eaca8
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/ImportForm.js
@@ -0,0 +1,242 @@
+/*
+ * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:陈彬彬
+ * 日 期:2017.04.11
+ * 描 述:导入Excel
+ */
+var id = request('id');
+
+var keyVaule = '';
+
+var bootstrap = function ($, learun) {
+ "use strict";
+
+ var page1 = {
+ init: function () {
+ page.bind();
+ page.initData();
+ },
+ bind: function () {
+ $('#lr_add_format').on('click', function () {
+ currentColRow = null;
+ learun.layerForm({
+ id: 'FormatForm',
+ title: '添加',
+ url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm',
+ width: 450,
+ height: 310,
+ callBack: function (id) {
+ return top[id].acceptClick(function (data) {
+ $('#gridtable').jfGridSet('addRow', { row: data });
+ });
+ }
+ });
+ });
+ $('#lr_edit_format').on('click', function () {
+ currentColRow = $('#gridtable').jfGridGet('rowdata');
+ var _id = currentColRow ? currentColRow.itemTypeName : '';
+ if (learun.checkrow(_id)) {
+ learun.layerForm({
+ id: 'FormatForm',
+ title: '修改',
+ url: top.$.rootUrl + '/LR_SystemModule/CodeRule/FormatForm',
+ width: 450,
+ height: 310,
+ callBack: function (id) {
+ return top[id].acceptClick(function (data) {
+ $('#gridtable').jfGridSet('updateRow', { row: data });
+ });
+ }
+ });
+ }
+
+ });
+ $('#lr_delete_format').on('click', function () {
+ currentColRow = null;
+ var row = $('#gridtable').jfGridGet('rowdata');
+ var _id = row ? row.itemTypeName : '';
+ if (learun.checkrow(_id)) {
+ learun.layerConfirm('是否确认删除该项!', function (res, index) {
+ if (res) {
+ $('#gridtable').jfGridSet('removeRow');
+ top.layer.close(index); //再执行关闭
+ }
+ });
+ }
+ });
+
+ $('#gridtable').jfGrid({
+ headData: [
+ { label: "前缀", name: "itemTypeName", width: 120, align: "left" },
+ { label: "格式", name: "formatStr", width: 120, align: "left" },
+ { label: "步长", name: "stepValue", width: 100, align: "left" },
+ { label: "初始值", name: "initValue", width: 120, align: "left" },
+ { label: "说明", name: "description", width: 180, align: "left" }
+ ]
+ });
+
+ /*检测重复项*/
+ $('#F_EnCode').on('blur', function () {
+ $.lrExistField(keyValue, 'F_EnCode', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistEnCode');
+ });
+ $('#F_FullName').on('blur', function () {
+ $.lrExistField(keyValue, 'F_FullName', top.$.rootUrl + '/LR_SystemModule/CodeRule/ExistFullName');
+ });
+ },
+ initData: function () {
+ if (!!selectedRow) {
+ keyValue = selectedRow.F_RuleId;
+ $('#form').lrSetFormData(selectedRow);
+ var formatdata = JSON.parse(selectedRow.F_RuleFormatJson);
+ $('#gridtable').jfGridSet('refreshdata', formatdata);
+ }
+ }
+ };
+
+ var fileInfo = {};
+
+ // 触发合并文件碎片
+ var mergeFileChunks = function (file) {
+
+
+ var param = {};
+ param['__RequestVerificationToken'] = $.lrToken;
+ param['fileId'] = fileInfo[file.id].fileGuid;
+ param['chunks'] = fileInfo[file.id].chunks;
+ param['ext'] = file.ext;
+ param['templateId'] = id;
+ learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/EmpInfoImport", param, function (res) {
+ var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id);
+ $fileItem.find('.lr-uploader-progress').remove();
+ if (res.code == learun.httpCode.success) {
+ if (res.data.Success != '0') {
+ learun.alert.success('导入成功' + res.data.Success + '条');
+ }
+ // 文件保存成功后
+ $fileItem.append('
' + res.data.Success + '/' + res.data.Fail + '
');
+ // 如果有失败
+ if (res.data.Fail != '0')
+ {
+ learun.download({ url: top.$.rootUrl + '/LR_SystemModule/ExcelImport/DownImportErrorFile', param: { fileId: fileInfo[file.id].fileGuid, fileName: fileInfo[file.id].name, __RequestVerificationToken: $.lrToken }, method: 'POST' });
+ }
+ }
+ else {
+ $fileItem.append('
');
+ }
+ });
+ }
+ // 触发清楚文件碎片
+ var reomveFileChunks = function (file) {
+ var param = {};
+ param['__RequestVerificationToken'] = $.lrToken;
+ param['fileGuid'] = fileInfo[file.id].fileGuid;
+ param['chunks'] = fileInfo[file.id].chunks;
+ learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/Annexes/MergeAnnexesFile", param, function (res) { });
+ var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id);
+ $fileItem.find('.lr-uploader-progress').remove();
+ $fileItem.append('
');
+ }
+
+ var page = {
+ uploader: null,
+ init: function () {
+ /*模板下载*/
+ $('#lr_down_file_btn').on('click', function () {
+ learun.download({ url: top.$.rootUrl + '/PersonnelManagement/Sal_UserSalary/DownTemplate', param: { keyValue: id, __RequestVerificationToken: $.lrToken }, method: 'POST' });
+ });
+
+
+ if (!WebUploader.Uploader.support()) {
+ alert('Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器');
+ throw new Error('WebUploader does not support the browser you are using.');
+ }
+
+ page.uploader = WebUploader.create({
+ auto: true,
+ swf: top.$.rootUrl + '/Content/webuploader/Uploader.swf',
+ // 文件接收服务端。
+ server: top.$.rootUrl + "/LR_SystemModule/Annexes/UploadAnnexesFileChunk",
+ // 选择文件的按钮。可选。
+ // 内部根据当前运行是创建,可能是input元素,也可能是flash.
+ pick: '#lr_add_file_btn',
+ dnd: '#lr_form_file_queue',
+ paste: 'document.body',
+ disableGlobalDnd: true,
+ accept: {
+ extensions: "xls,xlsx"
+ },
+ multiple: true,
+ // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
+ resize: false,
+ // 文件分片上传
+ chunked: true,
+ chunkRetry: 3,
+ prepareNextFile: true,
+ chunkSize: '1048576',
+ // 上传参数
+ formData: {
+ __RequestVerificationToken: $.lrToken
+ }
+ });
+ page.uploader.on('fileQueued', page.fileQueued);
+ page.uploader.on('uploadStart', page.uploadStart);
+ page.uploader.on('uploadBeforeSend', page.uploadBeforeSend);
+ page.uploader.on('uploadProgress', page.uploadProgress);
+ page.uploader.on('uploadSuccess', page.uploadSuccess);
+ page.uploader.on('uploadError', page.uploadError);
+ page.uploader.on('uploadComplete', page.uploadComplete);
+ page.uploader.on('error', page.error);
+
+ $('#lr_form_file_queue').lrscroll();
+
+ },
+ fileQueued: function (file) {// 文件加载到队列
+ fileInfo[file.id] = { name: file.name };
+ $('#lr_form_file_queue .lr-form-file-queue-bg').hide();
+ // 添加一条文件记录
+ var $item = $('
');
+ $item.append('
');
+ $item.append('
' + file.name + '(' + learun.countFileSize(file.size) + ')');
+
+ $('#lr_form_file_queue_list').append($item);
+ },
+ uploadStart: function (file) {
+ var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id);
+ $fileItem.append('
');
+ },
+ uploadBeforeSend: function (object, data, headers) {
+ data.chunk = data.chunk || 0;
+ data.chunks = data.chunks || 1;
+ fileInfo[data.id].fileGuid = fileInfo[data.id].fileGuid || WebUploader.Base.guid();
+ data.fileGuid = fileInfo[data.id].fileGuid;
+ fileInfo[data.id].chunks = data.chunks;
+ },
+ uploadProgress: function (file, percentage) {
+ var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id);
+ $fileItem.find('.lr-uploader-progress-bar').css('width', (percentage * 100 + '%'));
+ },
+ uploadSuccess: function (file, res) {
+ if (res.code == 200) {// 上传成功
+ mergeFileChunks(file);
+ }
+ else {// 上传失败
+ reomveFileChunks(file);
+ }
+ },
+ uploadError: function (file, code) {
+ reomveFileChunks(file);
+ },
+ uploadComplete: function (file) {
+ },
+ error: function (type) {
+ switch (type) {
+ case 'Q_TYPE_DENIED':
+ learun.alert.error('当前文件类型不允许上传');
+ break;
+ };
+ }
+ };
+ page.init();
+
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
index 773b4a3ae..9d3b55825 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Index.cshtml
@@ -77,7 +77,10 @@
修改部门、系部
打印