PicImport.cshtml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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", "NewStudent", 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. </tr>
  33. <tr>
  34. <td style="text-align:right;width:65px;height:35px;">
  35. <label>
  36. 导入文件:
  37. </label>
  38. </td>
  39. <td colspan="2">
  40. <input type="file" name="file" accept="*.zip;*.rar;" value=" " />
  41. </td>
  42. </tr>
  43. <tr>
  44. <td colspan="3" style="text-align: center;">
  45. <span style="color: Red">
  46. @EMIS.Resources.Strings.NEWSTUDENT_PICIMPORT_TIPS
  47. </span>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td colspan="3" style="text-align: center;">
  52. <span id="error" style="display: none;">
  53. <a style="color: Red;font-weight:bolder;" href="@ViewBag.ErrorFile" target="_blank">
  54. @ViewBag.operationTips
  55. </a>
  56. </span>
  57. </td>
  58. </tr>
  59. </table>
  60. </div>
  61. }
  62. </div>
  63. <script>
  64. $(function () {
  65. var errorFile = '@ViewBag.ErrorFile';
  66. if (errorFile != '') {
  67. $('#error').show();
  68. }
  69. });
  70. //导入保存
  71. function NewStudent_PicImportSave() {
  72. var picTypeValue = $("input[name='PicType']:checked").val();
  73. if (picTypeValue == null || picTypeValue == "" || picTypeValue == undefined) {
  74. $.messager.alert("系统提示", "请选择照片命名方式。");
  75. return;
  76. }
  77. var filepath = $("input[name='file']").val();
  78. if (filepath == "") {
  79. $.messager.alert("系统提示", "请选择你要上传的照片。");
  80. return;
  81. }
  82. $("#importPicType").val(picTypeValue);
  83. $(document.forms[0]).submitWithLoading();
  84. }
  85. </script>