186 lines
7.8 KiB
Plaintext
186 lines
7.8 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "管理健康证到期催办设置";
|
|
}
|
|
<div class="l-clear"></div>
|
|
<div id="list"></div>
|
|
<div style="display:none;" id="edit">
|
|
<input type="hidden" id="id" value="0" />
|
|
<table class="t1">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">标题:</td>
|
|
<td class="rtd" style="width:300px"><input type="text" style="width:250px" class="l-text" id="bt" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">提前提醒天数:</td>
|
|
<td class="rtd"><input type="number" class="l-text" id="txts" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">微信提醒:</td>
|
|
<td class="rtd"><input type="checkbox" class="l-checkbox" id="wxtx" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">短信提醒:</td>
|
|
<td class="rtd"><input type="checkbox" class="l-checkbox" id="dxtx" /></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
@section scripts{
|
|
|
|
<script type="text/javascript">
|
|
var openf;
|
|
function edit(item) {
|
|
var id;
|
|
if (item.text === "增加") {
|
|
$("#id").val("0");
|
|
$.ligerDialog.open({
|
|
title: "编辑健康证到期通知设置",
|
|
target: $("#edit"),
|
|
title: item.text,
|
|
width: 380,
|
|
height: 220, buttons: [
|
|
{
|
|
text: "确定", onclick: function (item, diag) {
|
|
$.ajax("@Url.Action("savetxsz")", {
|
|
type: "post", dataType: "json", data: { id: $("#id").val(), bt: $("#bt").val(), txts: $("#txts").val(), wxtx: $("#wxtx").prop("checked") ? 1 : 0, dxtx: $("#dxtx").prop("checked") ? 1 : 0 },
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
},
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(data.Message);
|
|
if (data.State == "1") {
|
|
liger.get("list").reload();
|
|
diag.hidden();
|
|
}
|
|
},
|
|
error: function () {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert("操作失败!");
|
|
}
|
|
});
|
|
|
|
}
|
|
},
|
|
{ text: "取消", onclick: function (item, diag) { diag.hidden(); } }
|
|
]
|
|
});
|
|
}
|
|
else if (item.text === "修改") {
|
|
var r = liger.get("list").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
$("#id").val(r.id);
|
|
$("#bt").val(r.bt);
|
|
$("#txts").val(r.txts);
|
|
if (r.wxtx==1)
|
|
$("#wxtx").prop("checked", true);
|
|
else
|
|
{
|
|
$("#wxtx").prop("checked", false);
|
|
}
|
|
if (r.dxtx == 1)
|
|
$("#dxtx").prop("checked", true);
|
|
else {
|
|
$("#dxtx").prop("checked", false);
|
|
}
|
|
|
|
$.ligerDialog.open({
|
|
title: "编辑健康证到期通知设置",
|
|
target: $("#edit"),
|
|
title: item.text,
|
|
width: 380,
|
|
height: 220, buttons: [
|
|
{
|
|
text: "确定", onclick: function (item, diag) {
|
|
$.ajax("@Url.Action("savetxsz")", {
|
|
type: "post", dataType: "json", data: { id: $("#id").val(), bt: $("#bt").val(), txts: $("#txts").val(), wxtx: $("#wxtx").prop("checked") ? 1 : 0, dxtx: $("#dxtx").prop("checked") ? 1 : 0 },
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
},
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(data.Message);
|
|
if (data.State == "1") {
|
|
liger.get("list").reload();
|
|
diag.hidden();
|
|
}
|
|
},
|
|
error: function () {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert("操作失败!");
|
|
}
|
|
});
|
|
|
|
}
|
|
},
|
|
{ text: "取消", onclick: function (item, diag) { diag.hidden(); } }
|
|
]
|
|
});
|
|
}
|
|
else if (item.text == "删除") {
|
|
|
|
var r = liger.get("list").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
|
return;
|
|
}
|
|
|
|
|
|
$.ajax("@Url.Action("deltxsz")", {
|
|
type: "post", dataType: "json", data: { id: r.id },
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在删除请稍后……");
|
|
},
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(data.Message);
|
|
if (data.State == "1") {
|
|
liger.get("list").reload();
|
|
diag.hidden();
|
|
}
|
|
},
|
|
error: function () {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert("操作失败!");
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
$(function () {
|
|
|
|
$("#list").ligerGrid({
|
|
height: '100%',
|
|
columns: [
|
|
{ display: '编码', name: 'id', align: 'left', width: 100, minWidth: 60, hide: true },
|
|
{
|
|
display: '标题', name: 'bt', align: 'left', width: 300
|
|
}
|
|
,
|
|
{ display: '提前提醒天数', name: 'txts' }
|
|
,
|
|
{ display: '微信提醒', name: 'wxtx', minWidth: 100, render: function (r, i, v) { if (v == 1) { return "是" } else { return "否" } } },
|
|
{ display: '短信提醒', name: 'dxtx', minWidth: 100, render: function (r, i, v) { if (v == 1) { return "是" } else { return "否" } } }
|
|
],
|
|
url: "@Url.Action("gettxszlist")",
|
|
pageSize: 100,
|
|
rownumbers: true,
|
|
toolbar: {
|
|
items: [
|
|
{ text: '增加', click: edit, icon: 'add' },
|
|
{ line: true },
|
|
{ text: '修改', click: edit, icon: 'modify' },
|
|
{ line: true },
|
|
{ text: '删除', click: edit, icon: 'delete' }
|
|
]
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
} |