tijian_tieying/web/dccdc/Views/DataInput/crbsj.cshtml
2025-02-20 12:14:39 +08:00

212 lines
7.6 KiB
Plaintext
Raw Permalink 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.

@{
ViewBag.Title = "传染病数据导入";
}
<table>
<tr>
<td class="ltd">导入传染病数据:</td>
<td class="ltd"><input id="oldfile" name="oldfile" type="file" /></td>
<td class="rtd"><div id="upload">上传</div></td>
</tr>
<tr>
<td class="ltd">姓名:</td>
<td class="rtd"><input id="txt_name" /></td>
<td colspan="2" class="rtd"><input type="button" id="choseqy2" value="查询" /></td>
</tr>
</table>
<div id="olddate"></div>
<script src="@Url.Content("~/Scripts/public.js")"></script>
@section scripts{
<script src="@Url.Content("~/Scripts/ajaxfileupload.js")"></script>
<script type="text/javascript">
var dia;
$(function () {
$("#txt_name").ligerTextBox();
$("#olddate").ligerGrid(
{
title: "传染病报告",
url: "@Url.Action("getcrbsj")",
parms: { key: "" },
columns: [{
display: '卡片编码',
name: 'kpdm',
align: 'left',
width: 80
}, {
display: '患者姓名',
name: 'hzxm',
align: 'left',
width: 80
}, {
display: '家长姓名',
name: 'jzxm',
align: 'left',
width: 80
}, {
display: '有效证件号',
name: 'yxzjh',
align: 'left',
width: 40
}, {
display: '性别',
name: 'xb',
align: 'left',
width: 100
}
, {
display: '出生日期',
name: 'csrq',
align: 'left',
width: 80
}, {
display: '年龄',
name: 'nl',
align: 'left',
width: 100
}, {
display: '工作单位',
name: 'hzdw',
align: 'left',
width: 100
}, {
display: '联系电话',
name: 'lxdh',
align: 'left',
width: 100
},
{
display: "住址编码",
name: "zzbm",
align: "left",
width: 100
},
{
display: "详细住址",
name: "xxdz",
align: "left",
width: 100
},
{
display: "人群分类",
name: "rqfl",
align: "left",
width: 100
},
{
display: "诊断",
name: "zd",
align: "left",
width: 100
},
{
display: "诊断时间",
name: "zd",
align: "left",
width: 100
},
{
display: "添卡医生",
name: "tkys",
align: "left",
width: 100
},
{
display: "报告单位",
name: "bgdw",
align: "left",
width: 100
},
{
display: "报卡录入时间",
name: "bklrsj",
align: "left",
width: 100
},
{
display: "导入时间",
name: "drsj",
align: "left",
width: 100,
render: function (r, i, v) {
if (v == null) {
return "";
}
return formatTime(v);
}
},
{
display: "导入人",
name: "drr",
align: "left",
width: 100
},
], height: '100%',
rownumbers: true,
usePager: true, pageSize:30
}
);
$("#cx").ligerButton({
click: function () {
var g = liger.get("olddate");
g.setParm("key", cId);
g.reload();
}
});
$("#choseqy2").ligerButton({
click: function () {
var g = liger.get("olddate");
g.setParm("key", liger.get("txt_name").getValue());
g.changePage("first");
g.reload();
}
});
$("#download").ligerButton({
click: function () {
window.open("@Url.Content("~/report/传染病报告.xls")");
}
});
$("#upload").ligerButton({
click: function () {
if (!$("#oldfile").val()) {
$.ligerDialog.warn("请选择要上传的传染病报告!");
return;
}
$.ligerDialog.waitting("正在上传传染病报告……");
$.ajaxFileUpload({
url: "@Url.Action("uploadcrbsjHistory")",
type: "post",
secureuri: false, //一般设置为false
fileElementId: "oldfile", // 上传文件的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", $("#txt_name").val());
g.reload();
},
beforeSend: function () { $.ligerDialog.waitting("正在上传传染病报告……"); }
});
}
});
});
</script>
}