1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- @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", "EducationMissionClassScheduleAdult", new { MNU = Request["MNU"], WindowID = Request["WindowID"] }, FormMethod.Post, new { enctype = "multipart/form-data" }))
- {
- <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>@Html.LabelFor(x=>x.SchoolyearCode)
- </td>
- <td>
- @Html.DropdownListFor(x => x.SchoolyearID, new DropdownListOptions { ItemSourceUrl = "~/SchoolYear/DropDown", TextField = "Text", ValueField = "Value", })
- </td>
- </tr>
- <tr>
- <td>
- <label>
- 导入文件:</label>
- </td>
- <td>
- <input type="file" name="file" accept="*.xls" value=" " />
- </td>
- </tr>
- <tr>
- <td colspan="2" style=" text-align: center;">
- @*<a id="importExcel" style="color: Red;" href="~/Content/TemplateFile/批量导入教学任务模板.xls" target="_blank">模板下载</a>。*@
- <span id="remake" style="display:block;color: Red">注:先进行排课导出,获取模板及信息后再进行导入!</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>
- //保存数据
- function EducationMissionClassScheduleAudlt_ImportSave() {
- var nonSelect = "@DropdownList.SELECT_ALL";
- var schoolYearID = $("#SchoolyearID").combobox("getValue");
- if (schoolYearID == nonSelect) {
- $.messager.alert("系统提示", "请选择你要排课的学年学期。");
- return;
- }
- var filepath = $("input[name='file']").val();
- if (filepath == "") {
- $.messager.alert("系统提示", "请选择你要上传的文件。");
- return;
- }
- $(document.forms[0]).submitWithLoading();
- }
- $(function () {
- var errorFile = '@ViewBag.ErrorFile';
- if (errorFile != '') {
- $('#error').show();
- $('#remake').hide();
- }
- var customerUrl = $(CMS_SystemConfig.GetConfig()).find("configuration>customUrls>add[key='EducationMissionImport']");
- if (customerUrl.attr("value")) {
- $("#importExcel").attr("href", customerUrl.attr("value"))
- }
- });
- </script>
|