tijian_tieying/web/dccdc/Views/QueryStatistics/HYLBQuery.cshtml

74 lines
2.6 KiB
Plaintext
Raw Normal View History

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

@{
ViewBag.Title = "HYLBQuery";
}
@section scripts{
<script type="text/javascript">
$(function () {
$("#start").ligerDateEditor();
$("#end").ligerDateEditor();
$("#start").ligerGetDateEditorManager().setValue(fun_date(-14));
$("#end").ligerGetDateEditorManager().setValue(fun_date(0));
cx();
})
function cx() {
var data = $("#searchForm").serializeArray();
$.ajax({
url: "@Url.Action("getHYLBList")", data: data, type: "post", dataType: "json",
success: function (data) {
$("#grid1").ligerGrid({
height: '98%',
width: '98%',
isScroll: true,
dataAction: "local",
selectRowButtonOnly: true,
data: data.data,
columns: data.columns,
alternatingRow: false,
usePager: false
});
liger.get("grid1").reRender();
}
});
}
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>
}
<form id="searchForm">
<table class="t1" style="width:100%">
<tr>
<td width="70" class="ltd">主检日期</td>
<td width="150" class="rtd"><input type="text" id="start" name="start"></td>
<td width="20" class="ltd">到</td>
<td width="150" class="rtd"><input type="text" id="end" name="end"></td>
<td width="70" class="ltd">所属区域</td>
<td width="150" class="rtd">@Html.DropDownList("ssqy", ViewBag.ssqy as SelectList, "----请选择----")</td>
<td width="70" class="ltd">行业类别</td>
<td width="150" class="rtd">@Html.DropDownList("hylb", ViewBag.hylb as SelectList, "----请选择----")</td>
<td width="100" class="rtd"><input type="button" value="查询" onclick="cx();" class="l-button" /></td>
</tr>
</table>
</form>
<div id="grid1"></div>