84 lines
2.8 KiB
Plaintext
84 lines
2.8 KiB
Plaintext
|
||
@{
|
||
ViewBag.Title = "体检预约数据导入";
|
||
}
|
||
|
||
<table class="t1">
|
||
<tr>
|
||
<td class="ltd" style="width:100px">体检日期:</td>
|
||
<td class="rtd" style="width:160px"><input id="tjrq" /></td>
|
||
<td class="ltd" style="width:100px">选择文件:</td>
|
||
<td class="rtd" style="width:400px"><input type="file" name="yywj" id="yywj" /></td>
|
||
<td class="rtd"><input type="button" class="l-button" value="上传" id="sc" /></td>
|
||
<td class="rtd"><div id="download">下载模板</div></td>
|
||
</tr>
|
||
</table>
|
||
@section scripts
|
||
{
|
||
<script src="@Url.Content("~/Scripts/ajaxfileupload.js")"></script>
|
||
<script>
|
||
$(function ()
|
||
{
|
||
$("#tjrq").ligerDateEditor();
|
||
|
||
$("#sc").click(function ()
|
||
{
|
||
if(!$("#tjrq").val())
|
||
{
|
||
$.ligerDialog.alert("请选择要体检的日期!");
|
||
return;
|
||
}
|
||
|
||
$.ligerDialog.waitting("正在上传预约信息……");
|
||
|
||
$.ajaxFileUpload({
|
||
url: "@Url.Action("impYYXX")",
|
||
|
||
data: {
|
||
"yyrq": $("#tjrq").val()
|
||
},
|
||
|
||
type: "post",
|
||
|
||
secureuri: false, //一般设置为false
|
||
|
||
fileElementId: "yywj", // 上传文件的id、name属性名
|
||
|
||
dataType: "json", //返回值类型,一般设置为json、application/json
|
||
|
||
//elementIds: elementIds, //传递参数到服务器
|
||
|
||
success: function (data, status)
|
||
{
|
||
$.ligerDialog.closeWaitting();
|
||
if (data.State == 1)
|
||
{
|
||
$.ligerDialog.success(data.Message);
|
||
}
|
||
else
|
||
{
|
||
$.ligerDialog.warn(data.Message);
|
||
}
|
||
},
|
||
error: function (data, status, e)
|
||
{
|
||
$.ligerDialog.closeWaitting();
|
||
$.ligerDialog.warn(data.responseText);
|
||
},
|
||
complete: function ()
|
||
{
|
||
//var g = liger.get("olddate");
|
||
//g.setParm("key", cId);
|
||
//g.reload();
|
||
},
|
||
beforeSend: function () { $.ligerDialog.waitting("正在上传预约信息……"); }
|
||
});
|
||
});
|
||
$("#download").ligerButton({
|
||
click: function () {
|
||
location.href = "@Url.Content("~/report/importModel.xls")";
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
} |