502 lines
24 KiB
Plaintext
502 lines
24 KiB
Plaintext
@{
|
|
ViewBag.Title = "sqfyzc";
|
|
}
|
|
|
|
<div style="width:100%">
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:120px">查询条件:</td>
|
|
<td class="rtd" style="width:120px"><input id="key" class="l-text" /></td>
|
|
<td class="rtd" style="width:150px">@Html.DropDownList("key2", ViewBag.ksD as SelectList, "----请选择科室----", new { @class = "l-text" })</td>
|
|
<td class="rtd"><div id="search" class="l-button">查询</div></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="toolbar"></div>
|
|
<div id="maingrid"></div>
|
|
@using Newtonsoft.Json;
|
|
@section scripts{
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
|
|
<script type="text/javascript">
|
|
var openf;
|
|
function edit(item) {
|
|
var id;
|
|
var url;
|
|
if (item.text.indexOf(">")!=-1) {
|
|
id = "";
|
|
|
|
switch (item.text) {
|
|
case ">出差报销": url = "@Url.Action("sqccbxMessageNew")?id=" + id; break;
|
|
case ">其他报销": url = "@Url.Action("sqqtbxMessageNew")?id=" + id; break;
|
|
case ">物资采购报销": url = "@Url.Action("sqwzcgbxMessageNew")?id=" + id; break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
else if (item.text === "修改") {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
|
|
if (r.zt > 1) {
|
|
$.ligerDialog.alert("审核状态不能操作!");
|
|
return;
|
|
}
|
|
if (r.del != 0) {
|
|
$.ligerDialog.alert("非独立添加不能操作!");
|
|
return;
|
|
}
|
|
|
|
switch (r.hblx) {
|
|
case "出差报销": url = "@Url.Action("sqccbxMessageNew")?id=" + id; break;
|
|
case "其他报销": url = "@Url.Action("sqqtbxMessageNew")?id=" + id; break;
|
|
case "物资采购报销": url = "@Url.Action("sqwzcgbxMessageNew")?id=" + id; break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
|
|
openf = $.ligerDialog.open({
|
|
url: url,
|
|
title: item.text,
|
|
width: 800,
|
|
height: 580
|
|
});
|
|
//window.open(url);
|
|
}
|
|
function view(item) {
|
|
var id;
|
|
var url;
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要查看的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
|
|
switch (r.hblx) {
|
|
case "出差报销": url = "@Url.Action("sqccbxMessageNewView")?type=hidden&id=" + id; break;
|
|
case "其他报销": url = "@Url.Action("sqqtbxMessageNewView")?type=hidden&id=" + id; break;
|
|
case "物资采购报销": url = "@Url.Action("sqwzcgbxMessageNewView")?type=hidden&id=" + id; break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
openf = $.ligerDialog.open({
|
|
url: url,
|
|
title: item.text,
|
|
width: 800,
|
|
height: 580
|
|
});
|
|
//window.open(url)
|
|
}
|
|
|
|
function del(item) {
|
|
var id;
|
|
var url;
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
|
|
if (r.zt > 1) {
|
|
$.ligerDialog.alert("审核状态不能操作!");
|
|
return;
|
|
}
|
|
if (r.del != 0) {
|
|
$.ligerDialog.alert("非独立添加不能操作!");
|
|
return;
|
|
}
|
|
|
|
switch (r.hblx) {
|
|
case "出差报销": url = "@Url.Action("deletesqccbx")"; break;
|
|
case "其他报销": url = "@Url.Action("deletesqqtbx")"; break;
|
|
case "物资采购报销": url = "@Url.Action("deletesqwzcgbx")"; break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
|
|
if (confirm("确定删除") == true) {
|
|
$.ajax({
|
|
url: url, type: "post", dataType: "json", data: { id: id },
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
liger.get("maingrid").reload();
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在保存请稍后……");
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function spgc(item) {
|
|
var id;
|
|
var type;
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
id = r.id;
|
|
|
|
switch (r.hblx) {
|
|
case "出差报销": type = "出差报销"; break;
|
|
case "其他报销": type = "其他报销"; break;
|
|
case "物资采购报销": type = "物资采购报销"; break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
openf = $.ligerDialog.open({
|
|
url: "@Url.Action("chooseSqshView","sq")?type=" + encodeURIComponent(type) + "&sqid=" + id,
|
|
title: item.text,
|
|
width: 800,
|
|
height: 500
|
|
});
|
|
}
|
|
function dy(e, type) {
|
|
var rowindex = e.parentNode.parentNode.parentNode.rowIndex;
|
|
var r = liger.get("maingrid").getRow(rowindex);
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要打印的数据!");
|
|
return;
|
|
}
|
|
dyOne(r, type);
|
|
}
|
|
function dyOne(r, type) {
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|
switch (r.hblx) {
|
|
case "出差报销":
|
|
if (type == 1) {
|
|
if (window.top.Formium.external.Print.finit( "ccbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintCCBXD(r.id, "打印");
|
|
}
|
|
}
|
|
if (type == 2) {
|
|
//项目经费
|
|
if (r.fydh) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(r.fydh, "打印");
|
|
}
|
|
}
|
|
if (r.fydhs) {
|
|
var fydhs2 = r.fydhs.split(',');
|
|
for (var i in fydhs2) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(fydhs2[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type == 3) {
|
|
//三重一大
|
|
if (r.fydh2) {
|
|
if (window.top.Formium.external.Print.finit( "szyd.frx")) {
|
|
window.top.Formium.external.Print.PrintSZYD(r.fydh2, "打印");
|
|
}
|
|
}
|
|
}
|
|
if (type == 4) {
|
|
//对应单号 出差申请
|
|
if (r.dydh) {
|
|
if (window.top.Formium.external.Print.finit( "ccd.frx")) {
|
|
window.top.Formium.external.Print.PrintCCD(r.dydh, "打印");
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case "其他报销":
|
|
if (type == 1) {
|
|
if (window.top.Formium.external.Print.finit( "qtbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintQTBXD(r.id, "打印");
|
|
}
|
|
}
|
|
if (type == 2) {
|
|
//项目经费
|
|
if (r.fydh) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(r.fydh, "打印");
|
|
}
|
|
}
|
|
if (r.fydhs) {
|
|
var fydhs2 = r.fydhs.split(',');
|
|
for (var i in fydhs2) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(fydhs2[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type == 3) {
|
|
//三重一大
|
|
if (r.fydh2) {
|
|
if (window.top.Formium.external.Print.finit( "szyd.frx")) {
|
|
window.top.Formium.external.Print.PrintSZYD(r.fydh2, "打印");
|
|
}
|
|
}
|
|
}
|
|
if (type == 4) {
|
|
//对应单号 费用支出/设备维修/加班用餐/公务接待
|
|
if (r.dydh) {
|
|
switch (r.hblx2) {
|
|
case "费用支出":
|
|
if (window.top.Formium.external.Print.finit( "fyzc.frx")) {
|
|
window.top.Formium.external.Print.PrintFYZC(r.dydh, "打印");
|
|
}
|
|
break;
|
|
case "设备维修":
|
|
if (window.top.Formium.external.Print.finit( "wx.frx")) {
|
|
window.top.Formium.external.Print.PrintWX(r.dydh, "打印");
|
|
}
|
|
break;
|
|
case "加班用餐":
|
|
if (window.top.Formium.external.Print.finit( "jbyc.frx")) {
|
|
window.top.Formium.external.Print.PrintJBYC(r.dydh, "打印");
|
|
}
|
|
break;
|
|
case "公务接待":
|
|
if (window.top.Formium.external.Print.finit( "gwjd.frx")) {
|
|
window.top.Formium.external.Print.PrintGWJD(r.dydh, "打印");
|
|
}
|
|
break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
}
|
|
if (type == 5) {
|
|
//对应单号 费用支出/设备维修/加班用餐/公务接待
|
|
if (r.dydh) {
|
|
switch (r.hblx2) {
|
|
case "公务接待":
|
|
if (window.top.Formium.external.Print.finit( "gwjdbc.frx")) {
|
|
window.top.Formium.external.Print.PrintGWJDbc(r.dydh, "打印");
|
|
}
|
|
break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case "物资采购报销":
|
|
if (type == 1) {
|
|
if (window.top.Formium.external.Print.finit( "wzcgbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintWZCGBXD(r.id, "打印");
|
|
}
|
|
}
|
|
if (r.mx) {
|
|
if (type == 2) {
|
|
//项目经费
|
|
var fydhs = r.mx.split('|')[0].split(',');
|
|
var fydh2s = r.mx.split('|')[1].split(',');
|
|
if (fydhs) {
|
|
for (var i in fydhs) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(fydhs[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
if (fydh2s) {
|
|
for (var i in fydh2s) {
|
|
if (window.top.Formium.external.Print.finit( "jfsp.frx")) {
|
|
window.top.Formium.external.Print.PrintJFSP(fydh2s[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type == 3) {
|
|
//三重一大
|
|
var fydh3s = r.mx.split('|')[2].split(',');
|
|
if (fydh3s) {
|
|
for (var i in fydh3s) {
|
|
if (window.top.Formium.external.Print.finit( "szyd.frx")) {
|
|
window.top.Formium.external.Print.PrintSZYD(fydh3s[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (type == 4) {
|
|
//对应单号 物资入库
|
|
if (r.dydh) {
|
|
var dydhs = r.dydh.split(',');
|
|
if (dydhs) {
|
|
for (var i in dydhs) {
|
|
if (window.top.Formium.external.Print.finit( "rkd.frx")) {
|
|
window.top.Formium.external.Print.PrintRKD(dydhs[i], "打印");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
|
|
function init() {
|
|
liger.get("maingrid").reload();
|
|
//$.ligerDialog.open弹出子窗口 需要关闭 window.open打开新窗口 不需要关闭
|
|
if (openf)
|
|
openf.close();
|
|
}
|
|
$(function () {
|
|
$("#search").click(function () {
|
|
liger.get("maingrid").set("parms", { key: $("#key").val(), key2: $("#key2").val() });
|
|
liger.get("maingrid").changePage("first");
|
|
liger.get("maingrid").reload();
|
|
})
|
|
|
|
$("#toolbar").ligerToolBar({
|
|
items: @Html.Raw(ViewBag.qxlist)
|
|
})
|
|
$("#maingrid").ligerGrid({
|
|
height: '100%',
|
|
columns: [
|
|
{ display: '申请单号', name: 'sqdh', align: 'left', width: 90 },
|
|
{ display: '申请科室', name: 'ksmc', align: 'left', width: 80 },
|
|
{ display: '申请人', name: 'sqr', align: 'left', width: 80 },
|
|
{ display: '申请金额', name: 'je', align: 'right', width: 60 },
|
|
{ display: '申请时间', name: 'sqsj', width: 100, render: function (r, i, v) { if (v) return formatTime(v) } },
|
|
{ display: '备注原因内容理由', name: 'bz', align: 'left', width: 300 },
|
|
{
|
|
display: '状态', name: 'zt', width: 120, render: function (r, i, v) {
|
|
switch (v) {
|
|
case 1: return "等待科室领导审批";
|
|
case 2: return "等待分管领导审批";
|
|
case 3: return "等待内审领导审批";
|
|
case 4: return "等待所有会签审批";
|
|
case 5: return "等待备案领导审批";
|
|
case 6: return "等待财务领导审批";
|
|
case 7: return "等待中心领导审批";
|
|
case 8: return "审核完成";
|
|
case -1: return "科室领导驳回";
|
|
case -2: return "分管领导驳回";
|
|
case -3: return "内审领导驳回";
|
|
case -4: return "会签驳回";
|
|
case -5: return "备案领导驳回";
|
|
case -6: return "财务领导驳回";
|
|
case -7: return "中心领导驳回";
|
|
}
|
|
}
|
|
},
|
|
{
|
|
display: '操作状态', name: 'del', width: 100, render: function (r, i, v) {
|
|
switch (v) {
|
|
case 1: return "等待确认";
|
|
case 0: return "独立添加";
|
|
default: return "关联添加";
|
|
}
|
|
}
|
|
},
|
|
{ display: '合并类型', name: 'hblx', width: 100 },
|
|
@*{
|
|
display: '打印全部', name: '', width: 80,
|
|
render: function () {
|
|
return "<div onclick='dy(this,0)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
},*@
|
|
{
|
|
display: '打印报销单', name: '', width: 80,
|
|
render: function () {
|
|
return "<div onclick='dy(this,1)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
},
|
|
{
|
|
display: '打印项目经费', name: '', width: 80,
|
|
render: function () {
|
|
return "<div onclick='dy(this,2)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
},
|
|
{
|
|
display: '打印三重一大', name: '', width: 80,
|
|
render: function () {
|
|
return "<div onclick='dy(this,3)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
},
|
|
{
|
|
display: '打印申请单', name: '', width: 80,
|
|
render: function () {
|
|
return "<div onclick='dy(this,4)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
},
|
|
{
|
|
display: '打印接待清单', name: '', width: 80,
|
|
render: function (r, i, v) {
|
|
if (r.dydh && r.hblx2 == "公务接待")
|
|
return "<div onclick='dy(this,5)' style='text-align:center'><img style='cursor:hand' src='@Url.Content("~/Content/jingfei/print.gif")'><div>";
|
|
}
|
|
}
|
|
],
|
|
url: "@Url.Action("getbxhbPage")",
|
|
pageSize: 10,
|
|
rownumbers: true,
|
|
usePager: true,
|
|
heightDiff: -20,
|
|
toolbar: {
|
|
items: [
|
|
{ text: '修改', click: edit, icon: 'modify' },
|
|
{ line: true },
|
|
{ text: '删除', click: del, icon: 'delete' },
|
|
{ line: true },
|
|
{ text: '明细', click: view, icon: 'view' },
|
|
{ line: true },
|
|
{ text: '审批过程', click: spgc, icon: 'view' },
|
|
@*{ line: true },
|
|
{
|
|
text: '打印', icon: 'print', click: function () {
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|
if (!r) {
|
|
$.ligerDialog.alert("请选择要修改的数据!");
|
|
return;
|
|
}
|
|
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|
switch (r.hblx) {
|
|
case "出差报销":
|
|
if (window.top.Formium.external.Print.finit( "ccbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintCCBXD(r.id, "打印");
|
|
}
|
|
break;
|
|
case "其他报销":
|
|
if (window.top.Formium.external.Print.finit( "qtbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintQTBXD(r.id, "打印");
|
|
}
|
|
break;
|
|
case "物资采购报销":
|
|
if (window.top.Formium.external.Print.finit( "wzcgbxd.frx")) {
|
|
window.top.Formium.external.Print.PrintWZCGBXD(r.id, "打印");
|
|
}
|
|
break;
|
|
default: $.ligerDialog.alert("未知类型!"); return;
|
|
}
|
|
}
|
|
},*@
|
|
//{ line: true },
|
|
//{
|
|
// text: '打印', icon: 'print', click: function () {
|
|
// var r = liger.get("maingrid").getSelectedRow();
|
|
// if (!r) {
|
|
// $.ligerDialog.alert("请选择要打印的数据!");
|
|
// return;
|
|
// }
|
|
// dyOne(r,0);
|
|
// }
|
|
//}
|
|
]
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
}
|
|
|
|
<div class="dispReport">
|
|
<object classid="clsid:F6A015E2-092A-4006-93DA-4CBDE3AFF4B8" id="window.top.Formium.external.Print" width="300" height="50"></object>
|
|
</div>
|
|
<div style="display:none;"></div>
|
|
|