Import.cshtml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @model EMIS.ViewModel.ExcelImportResult
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Common.JSON;
  4. @using Bowin.Web.Controls.Mvc;
  5. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  6. @using (Html.BeginForm("Import", "Score", FormMethod.Post, new { enctype = "multipart/form-data" }))
  7. {
  8. @Html.Hidden("importData", Model.Data.ToJson())
  9. <div class="p_title">
  10. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  11. 学生成绩导入</div>
  12. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Import")</div>
  13. </div>
  14. <div class="search_list">
  15. <table cellpadding="0" cellspacing="1">
  16. <tr>
  17. <td>
  18. <label>
  19. 导入文件:</label>
  20. </td>
  21. <td>
  22. <input type="file" name="file" id="file" accept="*.xls" value=" " />
  23. </td>
  24. </tr>
  25. <tr>
  26. <td colspan="2" style="text-align: center;">
  27. <span id="error" style="@(Model.IsAllSuccess ? "display: none; " : "")color: red">&nbsp;&nbsp;<a style="color: Red;" href="@Model.ErrorFilePath" target="_blank">@Model.Message</a></span>
  28. </td>
  29. </tr>
  30. </table>
  31. </div>
  32. }
  33. </div>
  34. @section scripts{
  35. <script src="~/Scripts/Business/ScoreManage/ScoreEditImport.js" type="text/javascript"></script>
  36. @if (Model.IsAllSuccess && Model.Data != null)
  37. {
  38. <script type="text/javascript">
  39. (function ($) {
  40. $.messager.alert("系统提示", "导入成功。");
  41. top.$("#@Request["WindowID"]").data("resultData", eval("(" + $("[name='importData']").val() + ")"));
  42. top.$("#@Request["WindowID"]").dialog("close");
  43. })(jQuery);
  44. </script>
  45. }
  46. }