tijian_tieying/web/dccdc/Views/Charge4/etdr.cshtml

59 lines
2.1 KiB
Plaintext
Raw Normal View History

2025-02-20 12:14:39 +08:00

@{
ViewBag.Title = "儿童信息导入";
}
<table class="t1">
<tr>
<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>
</tr>
</table>
@section scripts{
<script src="@Url.Content("~/Scripts/ajaxfileupload.js")"></script>
<script>
$(function () {
$("#sc").click(function () {
$.ligerDialog.waitting("正在上传……");
$.ajaxFileUpload({
url: "@Url.Action("impETDR")",
data: {
"drsj": $("#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("正在上传……"); }
});
});
});
</script>
}