123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- @model EMIS.ViewModel.EducationManage.EducationMissionImportClassView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Import";
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- @using (Html.BeginForm("Import", "ExaminationPlan", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
- {
- @Html.Hidden("QueryParamsDatas")
- @Html.Hidden("selectedIDs")
- <div class="p_title">
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Import")</div>
- </div>
- <div class="search_list">
- <table cellpadding="0" cellspacing="1">
- <tr>
- <td>
- <label>
- 导入文件:</label>
- </td>
- <td>
- <input type="file" name="file" accept="*.xls" value=" " />
- </td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center;">
- <span style="color: Red">注:<a id="importExcel" style="color: Red;" href = "javascript:void(0);" onclick ="ExaminationPlan_AdultExcel()">模板下载</a>。</span>
- <span id="error" style="display: none; color: red"> <a style="color: Red;" href="@ViewBag.ErrorFile" target="_blank">@ViewBag.operationTips </a></span>
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
- <script>
- var mnu = "";
- var windowID;
-
- //保存数据
- function ExaminationPlan_AdultImportSave() {
- var filepath = $("input[name='file']").val();
- if (filepath == "") {
- $.messager.alert("系统提示", "请选择你要上传的文件。");
- return;
- }
- //$(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationPlan/Import?MNU="+mnu);
- $(document.forms[0]).submitWithLoading();
- }
- $(function () {
- windowID = $.SystemGeneral.getUrlParam("WindowID");
- mnu = $.SystemGeneral.getUrlParam("MNU");
- var errorFile = '@ViewBag.ErrorFile';
- if (errorFile != '') {
- $('#error').show();
- }
- });
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- function ExaminationPlan_AdultExcel() {
- var Request = new Object();
- Request = GetRequest();
- var Studentselect = top.$("#" + windowID).data("inputData");
- $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
- Studentselect.selectedIDs = Request["selectedIDs"];
- $("[name='selectedIDs']").val(Studentselect.selectedIDs);
- $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationPlan/AdultImportExcel");
- $(document.forms[0]).submit();
- }
- </script>
|