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

98 lines
3.5 KiB
Plaintext

@{
ViewBag.Title = "健康证发证统计";
}
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script>
var search = [
{ id: 'startdate', display: "发证日期", name: "startdate", newline: true, type: "date", format: "MM/dd/yyyy" },
{ id: 'enddate', display: "到", name: "enddate", newline: false, type: "date", format: "MM/dd/yyyy" },
{
display: "体检方案", name: "person_type", newline: false, type: "select", options: {
url: "@Url.Action("getTJFA")",
valueField: "id",
textField: "medical_scheme"
}
}@*,
{
display: "所属区域", name: "area_name", newline: false, type: "select", options: {
url: "@Url.Action("getSSQY")",
valueField: "area_name",
textField: "area_name"
}
}*@
];
$(function () {
$("#layout").ligerLayout({
topHeight: 60
});
$("#searchForm").ligerForm({
inputWidth: 140, labelWidth: 80, space: 10, labelAlign: "right", validate: true,
fields: search
});
liger.get("startdate").setValue(new Date());
liger.get("enddate").setValue(new Date());
$("#maingrid").ligerGrid({
height: '97%',
columns: [
{ display: '类别名称', name: 'categoryName', align: 'left', width: 120 },
{ display: '未选择', name: 'wxz', align: 'right', width: 120 },
{ display: '监督一科', name: 'jdyk', align: 'right', width: 120 },
{ display: '监督二科', name: 'jdrk', align: 'right', width: 120 },
{ display: '职业卫生科', name: 'zywsk', align: 'right', width: 120 },
{ display: '新湖街道办', name: 'xhjdb', align: 'right', width: 120 },
{ display: '新华街道办', name: 'xhjdb2', align: 'right', width: 120 },
{ display: '广川街道办', name: 'gcjdb', align: 'right', width: 120 },
{ display: '天衢街道办', name: 'thjdb', align: 'right', width: 120 },
{ display: '黄河涯镇', name: 'hhtz', align: 'right', width: 120 },
{ display: '二屯镇', name: 'etz', align: 'right', width: 120 }
],
toolbar: {
items: [
{ text: "查询", click: fn_fetch }, { line: true },
{ text: "导出", click: fn_fetch }
]
}
});
});
function fn_fetch() {
var data = liger.get("searchForm").getData();
data.startdate = data.startdate.format("yyyy-MM-dd hh:mm:ss");
data.enddate = data.enddate.format("yyyy-MM-dd hh:mm:ss");
if(data.startdate==null||data.startdate==""||data.enddate==null||data.enddate==""){
alert("选择开始和结束时间!");
return;
}
$.ajax({
type: "post", cache: "false", async: true, dataType: "json",
url: "@Url.Action("GetJKZFTTJXX")",
data:data,
success: function (result) {
liger.get("maingrid").options.data = result;
liger.get("maingrid").reload();
},
error: function (msg) {
return;
}
});
}
</script>
}
<div id="layout">
<div position="top">
<div id="searchForm">
</div>
</div>
<div position="center">
<div id="maingrid">
</div>
</div>
</div>