ComplianceServer/oldcode/WEB/Views/WeiXin/Attendance/index.cshtml

112 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model WX.CRM.Model.Entity.WX_SZZYORDER
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "考勤信息上传";
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
}
@*<script src="/Scripts/jquery-ui-1.8.24.min.js" type="text/javascript"></script>
<script src="/Scripts/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="/Scripts/op/main_op.js" type="text/javascript"></script>
<link href="/Scripts/uploadify/uploadify.css" rel="stylesheet" type="text/css" />*@
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "上传", false, "")
</div>
@using (Html.BeginForm("Upload", "Attendance", null, FormMethod.Post, new { Id = "UploadForm" }))
{
@Html.ValidationSummary(true)
<table class="fromEditTable ">
<tr>
<td></td>
<td>
年:<select id="SltYear">
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
<option>2020</option>
<option>2021</option>
<option>2022</option>
<option>2023</option>
<option>2024</option>
<option>2025</option>
<option>2026</option>
<option>2027</option>
<option>2028</option>
<option>2029</option>
<option>2030</option>
</select>
月:<select id="SltMonth">
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
</td>
</tr>
<tr>
<td style="width:120px;"></td>
<td>
<div class="bas_datagrid">
@*<div id="divUpload">
<p><input id="distributefile" name="distributefile" type="file" /></p>
<p style="margin-top:5px;font-size:14px;font-weight:bold;"><span id="result"></span></p>
</div>*@
@*<div id="divView" style="display:none;">
@Html.Raw(ViewBag.gridTable)
</div>*@
</div>
<input type="file" id="fileData" name="fileData" />
</td>
</tr>
<tr>
<td style="width:120px;">
范例文件
</td>
<td><span style="color:red">请严格按照excel格式填写数据否则数据将上传不成功。请下载范例文件然后填写数据后上传。</span><a href="~/Content/Images/kaoqin.rar" target="_blank">下载</a></td>
</tr>
</table>
}
<script type="text/javascript">
$(function () {
var today = new Date();
$("#SltYear").val(today.getFullYear());
var m = "0000" + today.getMonth() + "";
$("#SltMonth").val(m.substring(m.length - 2));
//上传
$('#btnSave').click(function () {
$("#UploadForm").ajaxSubmit({
url: "/WeiXin/Attendance/Upload?year=" + $('#SltYear').val() + "&month=" + $('#SltMonth').val(),
type: "post",
enctype: 'multipart/form-data',
dataType: 'json',
success: function (data, statusText) {
if (data.Success) {
$.messageBox5s('提示', "上传成功!");
} else {
$.messager.alert("警告", data.Message, "error");
}
}, error: function (data) {
$.messager.alert("警告", "系统出错,请稍后再试!", "error");
}
});
});
});
</script>