PicImport.cshtml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @{
  4. ViewBag.Title = "PicImport";
  5. }
  6. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  7. @using (Html.BeginForm("PicImport", "Students", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  8. {
  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. 导入文件:
  20. </label>
  21. </td>
  22. <td>
  23. <input type="file" name="file" accept="*.zip;*.rar;" value=" " />
  24. </td>
  25. </tr>
  26. <tr>
  27. <td colspan="2" style="text-align: center; color: Red;">
  28. @EMIS.Resources.Strings.STUDENT_PICIMPORT_TIPS
  29. </td>
  30. </tr>
  31. <tr>
  32. <td colspan="2" style="text-align: center;">
  33. <span id="error" style="display: none;">&nbsp;&nbsp;<a href="@ViewBag.ErrorFile" target="_blank">错误数据下载</a></span>
  34. </td>
  35. </tr>
  36. </table>
  37. </div>
  38. }
  39. </div>
  40. <script>
  41. function Student_EditImport() {
  42. var filepath = $("input[name='file']").val();
  43. if (filepath == "") {
  44. $.messager.alert("系统提示", "请选择你要上传的文件。");
  45. return;
  46. }
  47. $(document.forms[0]).submitWithLoading();
  48. }
  49. $(function () {
  50. var errorFile = '@ViewBag.ErrorFile';
  51. if (errorFile != '') {
  52. $('#error').show();
  53. }
  54. var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='StudentsImport']");
  55. if (customerUrl.attr("value")) {
  56. $("#importExcel").attr("href", customerUrl.attr("value"))
  57. }
  58. });
  59. </script>