164 lines
6.8 KiB
Plaintext
164 lines
6.8 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "总结报告检查及评价依据维护";
|
|
}
|
|
<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="evaluation_basis_search" class="l-text" /></td>
|
|
<td class="rtd"><div id="search">查询</div></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="summaryreportBasisMaintainList">
|
|
|
|
</div>
|
|
<div id="summaryreportBasisMaintainModify" 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">
|
|
<textarea id="evaluation_basis" name="evaluation_basis" class="l-text" cols="330" rows="5" style="resize:none; width:330px; height:150px;"></textarea>
|
|
|
|
</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("summaryreportBasisMaintainList").set("parms", { key: $("#evaluation_basis_search").val() });
|
|
liger.get("summaryreportBasisMaintainList").changePage("first");
|
|
liger.get("summaryreportBasisMaintainList").reload();
|
|
}
|
|
});
|
|
$("#summaryreportBasisMaintainList").ligerGrid({
|
|
url: "@Url.Action("getSummaryreportBasisMaintainList")",
|
|
toolbar: {
|
|
items: [
|
|
{
|
|
text: '添加', click: itemclick, icon: 'add'
|
|
},
|
|
{ line: true },
|
|
{ text: '修改', click: itemclick, icon: "edit" },
|
|
{ line: true },
|
|
{ text: '删除', click: itemclick, icon: 'delete' }
|
|
]
|
|
},
|
|
title: "总结报告检查及评价依据维护列表",
|
|
parms: { key: $("#evaluation_basis_search").val() },
|
|
columns: [
|
|
{ name: "id", display: "ID", width: 60, align: "left", },
|
|
{ name: "evaluation_basis", display: "依据", width: 380, align: "left" }
|
|
, { name: "status", display: "状态", width: 82, align: "left" }
|
|
, { name: "pinyin_code", display: "拼音", width: 82, align: "left" }
|
|
, { name: "creator", display: "创建者", width: 82, align: "left" }
|
|
, { name: "create_time", display: "创建时间", width: 82, align: "left" }
|
|
], width: "100%",
|
|
height: "100%",
|
|
rownumbers: true,
|
|
usePager: true,
|
|
heightDiff: -20
|
|
});
|
|
|
|
});
|
|
function itemclick(item) {
|
|
if (item.text == "添加") {
|
|
$("#evaluation_basis").val("");
|
|
$("#id").val("0");
|
|
$.ligerDialog.open({
|
|
title: "添加总结报告检查及评价依据", target: $("#summaryreportBasisMaintainModify"), width: 418, height: 255, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
f_save(dialg);
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
});
|
|
}
|
|
else if (item.text == "修改") {
|
|
var r = liger.get("summaryreportBasisMaintainList").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.aler("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
$("#id").val(r.id);
|
|
$("#evaluation_basis").val(r.evaluation_basis);
|
|
$("#status").val(r.status);
|
|
$.ligerDialog.open({
|
|
title: "修改总结报告检查及评价依据", target: $("#summaryreportBasisMaintainModify"), width: 418, height: 255, buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
f_save(dialg);
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
});
|
|
}
|
|
else if (item.text === "删除") {
|
|
var r1 = liger.get("summaryreportBasisMaintainList").getSelectedRow();
|
|
if (!r1) {
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
|
return;
|
|
} else {
|
|
$.ajax({
|
|
url: "@Url.Action("delSummaryreportBasisMaintain")", type: "post", dataType: "json", data: {id:r1.id},
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
liger.get("summaryreportBasisMaintainList").reload();
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
function f_save(dialg) {
|
|
if (!$("#evaluation_basis").val()) {
|
|
$.ligerDialog.alert("依据不能为空!");
|
|
return;
|
|
}
|
|
var data = $("#editform").serializeArray();
|
|
$.ajax(
|
|
{
|
|
url: "@Url.Action("saveSummaryreportBasisMaintain")", type: "post", dataType: "json", data: data,
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
dialg.hidden();
|
|
liger.get("summaryreportBasisMaintainList").reload();
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|