194 lines
7.4 KiB
Plaintext
194 lines
7.4 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "小组位置维护";
|
|
}
|
|
<!--
|
|
|
|
ExamGroupLocalMaintain
|
|
-->
|
|
<div style="width:100%">
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">小组名称:</td>
|
|
<td class="rtd" style="width:120px"><input id="s_checkType" class="l-text" /></td>
|
|
<td class="rtd"><div id="search">查询</div></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="ExamGroupLocalMaintainList">
|
|
<!--
|
|
|
|
ExamGroupLocalMaintainList
|
|
|
|
ExamGroupLocalMaintainModify
|
|
|
|
-->
|
|
|
|
</div>
|
|
<div id="ExamGroupLocalMaintainModify" style="display:none">
|
|
<form id="editform">
|
|
<input id="id" type="hidden" name="id" value="0" />
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" width="100px">小组名称:</td>
|
|
<td class="rtd">
|
|
@Html.DropDownList("exam_group_maintain_id", ViewData["group"] as SelectList, "----请选择----", new { id = "exam_group_maintain_id" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="100px">体检室:</td>
|
|
<td class="rtd"><input id="check_room" class="l-text" name="check_room" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">是否启用:</td>
|
|
<td class="rtd">
|
|
<select id="status" name="status">
|
|
<option value="是">是</option>
|
|
<option value="否">否</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#search").ligerButton({
|
|
click: function () {
|
|
liger.get("ExamGroupLocalMaintainList").set("parms", { key: $("#s_checkType").val() });
|
|
liger.get("ExamGroupLocalMaintainList").changePage("first");
|
|
liger.get("ExamGroupLocalMaintainList").reload();
|
|
}
|
|
});
|
|
$("#ExamGroupLocalMaintainList").ligerGrid({
|
|
url: "@Url.Action("getExamGroupLocalMaintainList")",
|
|
toolbar: {
|
|
items: [
|
|
{
|
|
text: '添加', click: itemclick, icon: 'add'
|
|
},
|
|
{ line: true },
|
|
{ text: '修改', click: itemclick, icon: "edit" },
|
|
{ line: true },
|
|
{ text: '删除', click: itemclick, icon: 'delete' }
|
|
|
|
]
|
|
},
|
|
title: "小组位置列表",
|
|
parms: { key: $("#s_checkType").val() },
|
|
columns: [
|
|
{ name: "team_name", display: "小组名称", width: 60, align: "left", },
|
|
{ name: "exam_group_maintain_id", display: "小组id", width: 60, align: "left", },
|
|
{ name: "check_room", display: "体检室", width: 180, align: "left" },
|
|
{ name: "status", display: "启用状态", width: 80, align: "left" }
|
|
, { name: "creator", display: "创建者", width: 82, align: "left" }
|
|
, { name: "create_time", display: "创建时间", width: 82, align: "left" }
|
|
|
|
], width: "98%",
|
|
height: "100%",
|
|
rownumbers: true,
|
|
usePager: true,
|
|
fixedCellHeight: false,
|
|
heightDiff: -20
|
|
});
|
|
|
|
});
|
|
function itemclick(item) {
|
|
if (item.text == "添加") {
|
|
f_clear();
|
|
$("#id").val("0");
|
|
$.ligerDialog.open({
|
|
title: "添加小组位置", target: $("#ExamGroupLocalMaintainModify"), width: 418, height: 155, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
f_save(dialg);
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
});
|
|
}
|
|
else if (item.text == "修改") {
|
|
var r = liger.get("ExamGroupLocalMaintainList").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
$("#id").val(r.id);
|
|
$("#exam_group_maintain_id").val(r.exam_group_maintain_id);
|
|
$("#check_room").val(r.check_room);
|
|
$("#status").val(r.status);
|
|
|
|
$.ligerDialog.open({
|
|
title: "修改小组位置信息", target: $("#ExamGroupLocalMaintainModify"), width: 418, height: 155, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
f_save(dialg);
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
});
|
|
}
|
|
else if (item.text === "删除") {
|
|
var r1 = liger.get("ExamGroupLocalMaintainList").getSelectedRow();
|
|
if (!r1) {
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
|
return;
|
|
} else {
|
|
$.ajax({
|
|
url: "@Url.Action("delExamGroupLocal")", type: "post", dataType: "json", data: {id:r1.id},
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
liger.get("ExamGroupLocalMaintainList").reload();
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
function f_save(dialg) {
|
|
if (!$("#exam_group_maintain_id").val()) {
|
|
$.ligerDialog.alert("小组位置名称不能为空!");
|
|
return;
|
|
}
|
|
if (!$("#check_room").val()) {
|
|
$.ligerDialog.alert("体检室不能为空!");
|
|
return;
|
|
}
|
|
var data = $("#editform").serializeArray();
|
|
var node= {"name":"team_name","value":$("#exam_group_maintain_id option:checked").text()};
|
|
data.push(node);
|
|
|
|
$.ajax(
|
|
{
|
|
url: "@Url.Action("saveExamGroupLocalMaintain")", type: "post", dataType: "json", data: data,
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
dialg.hidden();
|
|
liger.get("ExamGroupLocalMaintainList").reload();
|
|
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
function f_clear()
|
|
{
|
|
$("#id").val("0");
|
|
$("#check_room").val("");
|
|
$("#status").val("是");
|
|
|
|
}
|
|
</script>
|
|
}
|