NumberImport.cshtml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @model EMIS.ViewModel.ExcelImportResult
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Common.JSON;
  4. @using Bowin.Web.Controls.Mvc;
  5. @{
  6. ViewBag.Title = "NumberImport";
  7. }
  8. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  9. @using (Html.BeginForm("NumberImport", "CertisfierDistribute", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
  10. {
  11. <div class="p_title">
  12. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  13. 存放编号导入
  14. </div>
  15. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("NumberImport")</div>
  16. </div>
  17. <div class="search_list">
  18. <table cellpadding="0" cellspacing="1">
  19. <tr>
  20. <td>
  21. <label>
  22. 导入文件:
  23. </label>
  24. </td>
  25. <td>
  26. <input type="file" name="file" accept="*.xls" value=" " />
  27. </td>
  28. </tr>
  29. <tr>
  30. <td colspan="2" style="text-align: center;">
  31. <span style="color: Red">注:<a id="importExcel" style="color: Red;" href="~/Content/TemplateFile/证书领取存放编号导入模板.xls" target="_blank">模板下载</a>。</span>
  32. <span id="error" style="display: none; color: red">&nbsp;&nbsp;<a style="color: Red;" href="@ViewBag.ErrorFile" target="_blank">@ViewBag.operationTips </a></span>
  33. <br />
  34. <span id="massege" style="color: Red">只能针对待领证状态的数据进行导入</span>
  35. </td>
  36. </tr>
  37. </table>
  38. </div>
  39. }
  40. </div>
  41. <script>
  42. //保存数据
  43. function NumberImportSave() {
  44. var filepath = $("input[name='file']").val();
  45. if (filepath == "") {
  46. $.messager.alert("系统提示", "请选择你要上传的文件。");
  47. return;
  48. }
  49. $(document.forms[0]).submit();
  50. }
  51. $(function () {
  52. var errorFile = '@ViewBag.ErrorFile';
  53. if (errorFile != '') {
  54. $('#error').show();
  55. }
  56. var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='CertisfierDistributeSaveNumberImport']");
  57. if (customerUrl.attr("value")) {
  58. $("#importExcel").attr("href", customerUrl.attr("value"))
  59. }
  60. });
  61. </script>