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

95 lines
4.1 KiB
Plaintext

@{
ViewBag.Title = "疫苗注射记录";
}
<form id="search">
<table class="t1" style="width:850px">
<tr>
<td class="ltd">注射人:</td>
<td class="rtd"><input type="text" id="zsr" name="zsr" style="width:100px" class="l-text" /></td>
<td class="ltd">登记人:</td>
<td class="rtd"><input type="text" id="djr" name="djr" style="width:100px" class="l-text" /></td>
<td class="ltd">登记时间:</td>
<td class="rtd"><input type="text" id="djsjb" name="djsjb" style="width:100px" /></td>
<td class="rtd">至</td>
<td class="rtd"><input type="text" id="djsje" name="djsje" style="width:100px" /></td>
<td class="rtd"><input id="cx" value="查询" type="button" class="l-button" /></td>
</tr>
</table>
</form>
<div id="YMZSGrid">
</div>
@section scripts{
<script src="@Url.Content("~/Scripts/public.js")"></script>
<script>
$(function () {
$("#djsjb").ligerDateEditor({ width: 100 });
$("#djsje").ligerDateEditor({ width: 100 });
$("#zssjb").ligerDateEditor({ width: 100 });
$("#zssje").ligerDateEditor({ width: 100 });
$("#YMZSGrid").ligerGrid({
title: "疫苗登记记录",
param: { djr: "", djsjb: "", djsje: "" },
url: "@Url.Action("getYMDJJL")",
columns: [
{ name: "name", display: "注射人", width: 100, align: "left" },
{ name: "djrxm", display: "登记人", width: 100, align: "left" },
{
name: "djsj", display: "登记时间", width: 80, align: "center", render: function (r, i, v) {
return formatTime(v);
}
},
{ name: "jfzt", display: "缴费状态", width: 80, align: "left" }
, {
name: "zs", display: "注射状态", width: 80, align: "left", render: function (r, i, v) {
if (v == 0) {
return "未注射";
} else {
return "已注射";
}
}
},
{ name: "names", display: "疫苗名称", width: 250, align: "left" },
, {
display: '删除', name: 'del', width: 150, render: function (r, i, v) {
return "<a onclick='delDj(\"" + r.id + "\")' href = '#' style='color:red;font-size:24px'>删除</a>"
}
}
], width: "98%",
height: "100%",
rownumbers: true,
usePager: true,
heightDiff: -20
});
$("#cx").bind("click", function () {
var data = {
zsr: $("#zsr").val(), djr: $("#djr").val(), djsjb: $("#djsjb").val(), djsje: $("#djsje").val()
};
liger.get("YMZSGrid").set("parms", data);
liger.get("YMZSGrid").changePage("first");
liger.get("YMZSGrid").reload();
});
});
function delDj(id) {
$.ligerDialog.confirm("你确定要删除登记吗?", function () {
$.ajax({
url: "@Url.Action("delDj")", type: "post", dataType: "json", data: { id: id },
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.State == 1) {
$.ligerDialog.success(d.Message);
} else {
$.ligerDialog.error(d.Message);
}
liger.get("YMZSGrid").reload();
},
beforeSend: function () {
$.ligerDialog.waitting("正在删除请稍后……");
}
});
});
}
</script>
}