94 lines
3.3 KiB
Plaintext
94 lines
3.3 KiB
Plaintext
|
|
@{ViewBag.Title = "体检条码维护"; }
|
||
|
|
@model dccdc.Models.DictionariesViewModel.BarCodeMaintain
|
||
|
|
<div class="l-clear"></div>
|
||
|
|
<div id="maingrid"></div>
|
||
|
|
<div style="display:none;">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@section scripts{
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
var openf;
|
||
|
|
function edit(item) {
|
||
|
|
var id;
|
||
|
|
if (item.text === "删除") {
|
||
|
|
var r1 = liger.get("maingrid").getSelectedRow();
|
||
|
|
if (!r1) {
|
||
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
||
|
|
return;
|
||
|
|
} else {
|
||
|
|
$.ajax({
|
||
|
|
url: "@Url.Action("delBarCode")", type: "post", dataType: "json", data: { id: r1.id },
|
||
|
|
success: function (d) {
|
||
|
|
$.ligerDialog.closeWaitting();
|
||
|
|
$.ligerDialog.alert(d.Message, function () {
|
||
|
|
if (d.State == 1) {
|
||
|
|
liger.get("maingrid").reload();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
},
|
||
|
|
beforeSend: function () {
|
||
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
if (item.text === "增加") {
|
||
|
|
id = "";
|
||
|
|
}
|
||
|
|
else if (item.text === "修改") {
|
||
|
|
var r = liger.get("maingrid").getSelectedRow();
|
||
|
|
if (!r) {
|
||
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
id = r.id;
|
||
|
|
}
|
||
|
|
openf= $.ligerDialog.open({
|
||
|
|
url: "@Url.Action("EditBarCodeMaintain")?id=" + id,
|
||
|
|
title: item.text,
|
||
|
|
width: 380,
|
||
|
|
height: 200
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
function init() {
|
||
|
|
liger.get("maingrid").reload();
|
||
|
|
openf.close();
|
||
|
|
}
|
||
|
|
$(function() {
|
||
|
|
|
||
|
|
$("#maingrid").ligerGrid({
|
||
|
|
height: '100%',
|
||
|
|
columns: [
|
||
|
|
{ display: 'ID', name: 'id', align: 'left', width: 100, minWidth: 60 },
|
||
|
|
{ display: '名称', name: 'code_name', align: 'left', width: 100, minWidth: 60 },
|
||
|
|
{ display: '是否打印', name: 'is_print', minWidth: 140 },
|
||
|
|
{ display: '是否启用', name: 'status', minWidth: 140 },
|
||
|
|
{ display: '创建者', name: 'creator', minWidth: 120 },
|
||
|
|
{ display: '创建时间', name: 'create_time', minWidth: 120 }
|
||
|
|
],
|
||
|
|
url: "@Url.Action("GetBCMResultAll")",
|
||
|
|
pageSize: 30,
|
||
|
|
rownumbers: true,
|
||
|
|
toolbar: {
|
||
|
|
items: [
|
||
|
|
{ text: '增加', click: edit, icon: 'add' },
|
||
|
|
{ line: true },
|
||
|
|
{ text: '修改', click: edit, icon: 'modify' },
|
||
|
|
{ line: true },
|
||
|
|
{ text: '删除', click: edit, icon: 'delete' }
|
||
|
|
]
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|