211 lines
8.2 KiB
Plaintext
211 lines
8.2 KiB
Plaintext
@{
|
|
/**/
|
|
|
|
ViewBag.Title = "体检情况查询";
|
|
}
|
|
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">开始时间:</td>
|
|
<td class="rtd" style="width:160px"><input name="start" type="text" id="start" ltype="date" /></td>
|
|
<td class="ltd" style="width:100px">结束时间:</td>
|
|
<td class="rtd" style="width:160px"><input name="end" type="text" id="end" ltype="date" /></td>
|
|
@*<td class="rtd"><input type="button" value="查询" class="l-button" id="cx" /></td>*@
|
|
<td class="rtd"><div id="search">查询</div></td>
|
|
</tr>
|
|
</table>
|
|
<div id="gzList"></div>
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:10%">已预约(月):</td>
|
|
<td class="rtd" style="width:12%"><input id="monthOne" class="l-text" value="@ViewBag.monthOne" readonly /></td>
|
|
<td class="ltd" style="width:10%">已体检(月):</td>
|
|
<td class="rtd" style="width:12%"><input id="monthTwo" class="l-text" value="@ViewBag.monthTwo" readonly /></td>
|
|
<td class="ltd" style="width:10%">已预约(总):</td>
|
|
<td class="rtd" style="width:12%"><input id="allOne" class="l-text" value="@ViewBag.allOne" readonly /></td>
|
|
<td class="ltd" style="width:10%">已体检(总):</td>
|
|
<td class="rtd" style="width:12%"><input id="allTwo" class="l-text" value="@ViewBag.allTwo" readonly /></td>
|
|
</tr>
|
|
</table>
|
|
<div style="display:none">
|
|
<iframe id="down" src="about:blank"></iframe>
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
function init() {
|
|
liger.get("gzList").reload()
|
|
$("#gzList").ligerDateEditor();
|
|
openf.close();
|
|
}
|
|
$(function () {
|
|
$("#start").ligerDateEditor();
|
|
$("#end").ligerDateEditor();
|
|
$("#search").ligerButton({
|
|
click: function () {
|
|
liger.get("gzList").set("parms", { start: $("#start").val(), end: $("#end").val() });
|
|
liger.get("gzList").changePage("first");
|
|
liger.get("gzList").reload();
|
|
}
|
|
});
|
|
$("#gzList").ligerGrid({
|
|
title: "体检情况查询", parms: {}, url: "@Url.Action("getData")",
|
|
columns: [
|
|
{ name: "name", display: "姓名", width: 100, align: "left" }
|
|
, { name: "birth", display: "出生日期", width: 100, align: "left",type:'date',Format:'yyyy-MM-dd HH:mm:ss' }
|
|
, { name: "phone", display: "电话", width: 100, align: "left" }
|
|
, { name: "unit", display: "所属单位", width: 100, align: "left" }
|
|
, { name: "ident", display: "身份证", width: 200, align: "left" }
|
|
, { name: "order_date", display: "预约时间", width: 100, align: "left", type: 'date', Format: 'yyyy-MM-dd HH:mm:ss' }
|
|
, {
|
|
name: "state", display: "体检状态", width: 80, align: "left", render: function (r, i, v) {
|
|
if (v == 0) {
|
|
return "已预约";
|
|
}
|
|
else if (v == 1) {
|
|
return "已体检";
|
|
} else {
|
|
return "已取消";
|
|
}
|
|
}
|
|
}
|
|
], width: "98%",
|
|
height: "100%",
|
|
rownumbers: true,
|
|
usePager: true,
|
|
isSingleCheck: true,
|
|
heightDiff: -20,
|
|
toolbar: {
|
|
items: [
|
|
//{ text: '修改', click: edit1, icon: 'modify' },
|
|
//{ line: true },
|
|
{ text: '取消预约', click: edit2, icon: 'delete' },
|
|
{ line: true },
|
|
{ text: "导出", click: fn_fetch, icon: 'down'},
|
|
{ line: true }
|
|
//{ text: '新增', click: add, icon: 'add' },
|
|
//{ line: true }
|
|
]
|
|
}
|
|
});
|
|
|
|
//$("#cx").bind("click", function () {
|
|
// liger.get("gzList").set("parms", { start: $("#start").val(), end: $("#end").val() });
|
|
// liger.get("gzList").set("page", 1);
|
|
// liger.get("gzList").reload();
|
|
//});
|
|
});
|
|
//修改
|
|
function edit1(item) {
|
|
var r = liger.get("gzList").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要操作的数据!");
|
|
return;
|
|
}
|
|
var id = r.id;
|
|
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("PhysicalExaminationQuery")?id=" + id,
|
|
title: item.text,
|
|
width: 500,
|
|
height: 450
|
|
});
|
|
}
|
|
//新增
|
|
function add(item) {
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("PhysicalExaminationAdd")",
|
|
title: item.text,
|
|
width: 880,
|
|
height: 600
|
|
});
|
|
}
|
|
//取消预约
|
|
function edit2(item) {
|
|
var r = liger.get("gzList").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要操作的数据!");
|
|
return;
|
|
}
|
|
if (r.state != "0") {
|
|
$.ligerDialog.alert("请选择已预约的数据数据!");
|
|
return;
|
|
}
|
|
var id = r.id;
|
|
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("PhysicalExaminationAbolish")?id=" + id,
|
|
title: item.text,
|
|
width: 500,
|
|
height: 290
|
|
});
|
|
}
|
|
//导出
|
|
function fn_fetch() {
|
|
var start = $('#start').val();
|
|
var end = $('#end').val();
|
|
$.ajax({
|
|
url: "@Url.Action("Export")?start=" + start + "&end=" + end,
|
|
async: true,
|
|
type: "post",
|
|
cache: false,
|
|
success: function (result) {
|
|
if (result.State == "0") {
|
|
//exportExcel(result.Path);
|
|
$("#down").attr("src", result.Path);
|
|
}
|
|
else {
|
|
$.ligerDialog.alert(result.Message);
|
|
}
|
|
},
|
|
error: function (msg) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.error("操作失败,请重新操作");
|
|
return false;
|
|
},
|
|
});
|
|
}
|
|
|
|
function excelExport(path) {
|
|
window.location.href = path;
|
|
}
|
|
|
|
function exportExcel(filePath) {
|
|
$.ajaxFileUpload({
|
|
url: "@Url.Action("down")?file=" + filePath,
|
|
type:"POST",
|
|
secureuri:false,
|
|
fileElementId:'imgUpload',
|
|
dataType:"JSON",
|
|
cache:false,
|
|
error:function(data){
|
|
layer.open({
|
|
title:'提示信息',
|
|
content:'表单数据不合法!'
|
|
});
|
|
},
|
|
success:function(data){
|
|
}
|
|
});
|
|
}
|
|
|
|
//时间格式
|
|
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>
|
|
}
|
|
|