149 lines
5.6 KiB
Plaintext
149 lines
5.6 KiB
Plaintext
@{
|
|
ViewBag.Title = "JfGwjdgl";
|
|
}
|
|
@model dccdc.Models.JfGwjdgl
|
|
<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 === "增加") {
|
|
id = "";
|
|
}
|
|
else if (item.text === "修改") {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (r.zt>1 ) {
|
|
$.ligerDialog.alert("审批过程中不能修改数据!");
|
|
return;
|
|
}
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
}
|
|
openf= $.ligerDialog.open({
|
|
url: "@Url.Action("EditJfGwjdgl")?id=" + id,
|
|
title: item.text,
|
|
width: 680,
|
|
height: 480
|
|
});
|
|
}
|
|
|
|
function spgc(item) {
|
|
var id;
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("chooseSqshView","sq")?type=" + encodeURIComponent("公务接待管理") + "&sqid=" + id,
|
|
title: item.text,
|
|
width: 800,
|
|
height: 600
|
|
});
|
|
}
|
|
|
|
function fundel() {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要删除的数据!");
|
|
return;
|
|
}
|
|
if (r.zt == 1) {
|
|
$.ligerDialog.confirm('确定删除选中数据吗?', function (yes) {
|
|
$.ajax({
|
|
type: "post", cache: "false", async: true, dataType: "json",
|
|
url: "@Url.Action("delJfGwjdgl")?id="+r.id,
|
|
success: function (data) {
|
|
$.ligerDialog.alert("删除成功");
|
|
window.init();
|
|
}, error: function (msg) {
|
|
$.ligerDialog.alert(msg);
|
|
return;
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
function init() {
|
|
liger.get("maingrid").reload();
|
|
openf.close();
|
|
}
|
|
$(function() {
|
|
|
|
$("#maingrid").ligerGrid({
|
|
height: '100%',enabledSort:false,
|
|
columns: [
|
|
,{ display: '申请单号', name: 'sqdid', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '科室', name: 'ksmc', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '申请人', name: 'sqrmc', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '申请时间', name: 'sqsj', align: 'left', width: 100, minWidth: 60,type: 'date', format: 'yyyy年MM月dd' }
|
|
, { display: '接待事由', name: 'jdsy', align: 'left', width: 100, minWidth: 60 }
|
|
, { display: '接待时间', name: 'jdsj', align: 'left', width: 100, minWidth: 60, type: 'date', format: 'yyyy年MM月dd' }
|
|
,{ display: '所需费用', name: 'sxfy', align: 'left', width: 100, minWidth: 60 }
|
|
,{ display: '经费来源', name: 'jfly', align: 'left', width: 100, minWidth: 60 }
|
|
, { display: '备注', name: 'bz', align: 'left', width: 100, minWidth: 60 }
|
|
, { display: '办公室审批意见', name: 'bgsspyj', align: 'left', width: 180, minWidth: 60 }
|
|
, { display: '中心领导审批意见', name: 'zxldspyj', align: 'left', width: 180, minWidth: 60 }
|
|
, {
|
|
display: '状态', name: 'zt', align: 'left', width: 100, minWidth: 60, render: function (r, i, v) {
|
|
if (v == 4) {
|
|
return "中心领导审批";
|
|
} else if (v == 1) {
|
|
return "科室领导审批";
|
|
} else if (v == 0) {
|
|
return "申请";
|
|
} else {
|
|
return "完成";
|
|
}
|
|
}
|
|
}
|
|
],
|
|
url: "@Url.Action("GetJfGwjdgl")",
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
toolbar: {
|
|
items: [
|
|
{ text: '增加', click: edit, icon: 'add' },
|
|
{ line: true },
|
|
{ text: '修改', click: edit, icon: 'modify' },
|
|
{ line: true },
|
|
{ text: '删除', click: fundel, icon: 'delete' },
|
|
{ line: true },
|
|
{ text: '审批过程', click: spgc, icon: 'view' },
|
|
{ line: true },
|
|
{
|
|
text: '打印报销单', icon: 'plus', click: function () {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|
if (window.top.Formium.external.Print.finit( "")) {
|
|
window.top.Formium.external.Print.PrintGWJDGL(r.id, "打印");
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|