PicImport.cshtml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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", "NewStudentEnter", new
  8. {
  9. MNU = Request["MNU"],
  10. WindowID = Request["WindowID"]
  11. }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  12. {
  13. <div class="p_title">
  14. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  15. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("PicImport")</div>
  16. </div>
  17. @Html.Hidden("importPicType")
  18. <div class="search_list">
  19. <table cellpadding="0" cellspacing="1">
  20. <tr>
  21. <td style="text-align:right;width:65px;">
  22. <label style="color:red;">
  23. 命名方式:
  24. </label>
  25. </td>
  26. <td style="text-align:left;width:65px;height:35px;">
  27. @Html.RadioButton("PicType", "ExamineeNum", true)<label>考生号</label>
  28. </td>
  29. <td style="text-align:left;width:65px;height:35px;">
  30. @Html.RadioButton("PicType", "IDNumber")<label>证件号码</label>
  31. </td>
  32. <td style="text-align:left;width:65px;height:35px;">
  33. @Html.RadioButton("PicType", "StudentNo")<label>学号</label>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td style="text-align:right;width:65px;height:35px;">
  38. <label>
  39. 导入文件:
  40. </label>
  41. </td>
  42. <td colspan="3">
  43. <input type="file" name="file" accept="*.zip;*.rar;" value=" " />
  44. </td>
  45. </tr>
  46. <tr>
  47. <td colspan="4" style="text-align: center;">
  48. <span style="color: Red">
  49. @EMIS.Resources.Strings.NEWSTUDENT_PICIMPORT_TIPS
  50. </span>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td colspan="4" style="text-align: center;">
  55. <span id="error" style="display: none;">
  56. <a style="color: Red;font-weight:bolder;" href="@ViewBag.ErrorFile" target="_blank">
  57. @ViewBag.operationTips
  58. </a>
  59. </span>
  60. </td>
  61. </tr>
  62. </table>
  63. </div>
  64. }
  65. </div>
  66. <script>
  67. $(function () {
  68. var errorFile = '@ViewBag.ErrorFile';
  69. if (errorFile != '') {
  70. $('#error').show();
  71. }
  72. });
  73. //导入保存
  74. function NewStudentEnter_PicImportSave() {
  75. var picTypeValue = $("input[name='PicType']:checked").val();
  76. if (picTypeValue == null || picTypeValue == "" || picTypeValue == undefined) {
  77. $.messager.alert("系统提示", "请选择照片命名方式。");
  78. return;
  79. }
  80. var filepath = $("input[name='file']").val();
  81. if (filepath == "") {
  82. $.messager.alert("系统提示", "请选择你要上传的照片。");
  83. return;
  84. }
  85. $("#importPicType").val(picTypeValue);
  86. $(document.forms[0]).submitWithLoading();
  87. }
  88. </script>