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

113 lines
4.9 KiB
Plaintext

@{
ViewBag.Title = "EmploymentInspectionLeak";
}
@section scripts{
<script type="text/javascript">
$(function () {
var form1 = $("#form1").ligerForm();
$("#start").ligerGetDateEditorManager().setValue(fun_date(-7));
$("#end").ligerGetDateEditorManager().setValue(fun_date(0));
$("#grid1").ligerGrid({
height: '100%',
columns: [
{ display: '体检编码', name: 'physical_num', align: 'left', width: 120 },
{ display: '姓名', name: 'person_name', align: 'left', width: 100 },
{ display: '企业', name: 'util_name', align: 'left', width: 120 },
{ display: '登记日期', name: 'register_date', align: 'left', width: 120 },
{ display: '联系电话', name: 'phone', align: 'left', width: 100 }
],
url: "@Url.Action("GetLeakData")",
pageSize: 30,
rownumbers: true,
usePager: false
});
$("#button1").click(function () {
var status = $('input[name="sort"]:checked').val();
var type = $('#ddltype').val();
var start = $('#start').val();
var end = $('#end').val();
liger.get("grid1").set("parms", { start: start, end: end, type: type, status: status,flag:@(string.IsNullOrEmpty(Request.QueryString["flag"])?"false":"true")});
liger.get("grid1").reload();
});
$("#button2").click(function () {
var status = $('input[name="sort"]:checked').val();
var type = $('#ddltype').val();
var start = $('#start').val();
var end = $('#end').val();
$.ajax({
type: "post", cache: false, dataType: "json",
url: "@Url.Action("exportLeak")",
data: { start: start, end: end, type: type, status: status,flag:@(string.IsNullOrEmpty(Request.QueryString["flag"])?"false":"true")},
success: function (result) {
$.ligerDialog.closeWaitting();
if (result.State == 1)
$("#export").attr("src", "@Url.Action("downLeak")?file=" + result.Message);
else
$.ligerDialog.error(result.Message);
},
error: function (msg) {
$.ligerDialog.closeWaitting();
$.ligerDialog.error("操作失败,请重新操作");
return false;
},
beforeSend: function () { $.ligerDialog.waitting("正在导出,请稍候……"); }
});
});
});
function fun_date(days) {
var date1 = new Date(),
time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
var date2 = new Date(date1);
date2.setDate(date1.getDate() + days);
var y = date2.getFullYear();
var m = date2.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = date2.getDate();
d = d < 10 ? ('0' + d) : d;
var time2 = y + "-" + m + "-" + d;
return time2;
}
</script>
}
<div style="display:none">
<iframe id="export" src="about:blank"></iframe>
</div>
<div class="l-clear"></div>
<form id="form1">
<table cellpadding="0" cellspacing="0" class="l-table-edit">
<tr>
<td align="left" class="l-table-edit-td"><input name="start" type="text" id="start" ltype="date" /></td>
<td align="left" class="l-table-edit-td"><input name="end" type="text" id="end" ltype="date" /></td>
<td align="left" class="l-table-edit-td">
<select name="ddltype" id="ddltype" ltype="select">
<option value="全部">全部</option>
<option value="正常登记">正常登记</option>
<option value="复检登记">复检登记</option>
</select>
</td>
</tr>
<tr>
<td align="left" class="l-table-edit-td">
<input id="sort1" type="radio" name="sort" value="未判断" checked="checked" /><label for="sort1">未判断</label>
<input id="sort2" type="radio" name="sort" value="已判断" /><label for="sort2">已判断</label>
</td>
<td align="left" class="l-table-edit-td" colspan="2">
<input type="button" id="button1" value="查询" class="l-button" />
<input type="button" id="button2" value="导出" class="l-button" />
</td>
</tr>
</table>
</form>
<div id="grid1"></div>
<div style="display:none;"></div>