123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Import";
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Html.BeginForm("Import", "Department", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
- {
- <div class="p_title">
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Import")</div>
- </div>
- <div class="search_list">
- <table cellpadding="0" cellspacing="1">
- <tr>
- <td>
- <label>
- 文件:</label>
- </td>
- <td>
- <input type="file" name="file" accept="*.xls" value="" />
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center;">
- <span style="color: Red">模板:
- <a id="importExcel" style="color: Red;" href="~/Content/TemplateFile/批量导入教研室信息模板.xls" target="_blank">
- 点击下载...
- </a>
- </span>
- <span id="error" style="display: none; color:red">
-
- <a style="color: Red;" href="@ViewBag.ErrorFile" target="_blank">
- @ViewBag.operationTips
- </a>
- </span>
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
- <script>
- //保存数据
- function Department_ImportSave() {
- var filepath = $("input[name='file']").val();
- if (filepath == "") {
- $.messager.alert("系统提示", "请选择你要导入的Excel文件");
- return;
- }
- //加载中。。。
- $(document.forms[0]).submitWithLoading();
- }
- $(function () {
- var errorFile = '@ViewBag.ErrorFile';
- if (errorFile != '') {
- $('#error').show();
- }
- //批量导入教研室信息模板配置(DepartmentImport),Excel表列名相同无需在Site.xml文件中配置
- var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='DepartmentImport']");
- if (customerUrl.attr("value")) {
- $("#importExcel").attr("href", customerUrl.attr("value"))
- }
- });
- </script>
|