230 lines
9.4 KiB
Plaintext
230 lines
9.4 KiB
Plaintext
|
|
|
|||
|
|
@{
|
|||
|
|
ViewBag.Title = "sqwzcgcx";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
<div style="width:100%">
|
|||
|
|
<table class="t1" style="width:100%">
|
|||
|
|
<tr>
|
|||
|
|
<td class="ltd" style="width:80px">开始时间:</td>
|
|||
|
|
<td class="rtd" style="width:150px"><input id="start" class="l-text" /></td>
|
|||
|
|
<td class="ltd" style="width:70px">结束时间:</td>
|
|||
|
|
<td class="rtd" style="width:150px"><input id="end" class="l-text" /></td>
|
|||
|
|
<td class="ltd" style="width:70px">审核状态:</td>
|
|||
|
|
<td class="rtd" style="width:150px">@Html.DropDownList("zt", ViewBag.ztD as SelectList, "----请选择----", new { @class = "l-text" })</td>
|
|||
|
|
<td class="ltd" style="width:70px">进度状态:</td>
|
|||
|
|
<td class="rtd" style="width:150px">@Html.DropDownList("rk", ViewBag.rkD as SelectList, "----请选择----", new { @class = "l-text" })</td>
|
|||
|
|
<td class="rtd"><div id="search" class="l-button">查询</div></td>
|
|||
|
|
</tr>
|
|||
|
|
</table>
|
|||
|
|
</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 sp(item) {
|
|||
|
|
var id;
|
|||
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|||
|
|
if (!r) {
|
|||
|
|
$.ligerDialog.alert("请选择要操作的数据!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
id = r.id;
|
|||
|
|
|
|||
|
|
openf = $.ligerDialog.open({
|
|||
|
|
url: "@Url.Action("sqwzcgMessageNewView")?type=hidden&id=" + id,
|
|||
|
|
title: item.text,
|
|||
|
|
width: 800,
|
|||
|
|
height: 500
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
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: 500
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function cg(item) {
|
|||
|
|
var id;
|
|||
|
|
var r = liger.get("maingrid").getSelectedRow();
|
|||
|
|
if (!r) {
|
|||
|
|
$.ligerDialog.alert("请选择要操作的数据!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
id = r.id;
|
|||
|
|
|
|||
|
|
if (r.zt != 8) {
|
|||
|
|
$.ligerDialog.alert("审核完成才能操作!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (r.cgr || r.rkr) {
|
|||
|
|
$.ligerDialog.alert("已经在进度中!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (confirm("确定采购") == true) {
|
|||
|
|
$.ajax({
|
|||
|
|
url: "@Url.Action("cgwzcg")", 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 init() {
|
|||
|
|
liger.get("maingrid").reload();
|
|||
|
|
openf.close();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function fun_date(days) {
|
|||
|
|
var date1 = new Date(),
|
|||
|
|
time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
|
|||
|
|
var date2 = new Date(date1);
|
|||
|
|
date2.setDate(date1.getDate() + days);
|
|||
|
|
|
|||
|
|
var y = date2.getFullYear();
|
|||
|
|
var m = date2.getMonth() + 1;
|
|||
|
|
m = m < 10 ? '0' + m : m;
|
|||
|
|
var d = date2.getDate();
|
|||
|
|
d = d < 10 ? ('0' + d) : d;
|
|||
|
|
var time2 = y + "-" + m + "-" + d;
|
|||
|
|
return time2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function dy(e, type) {
|
|||
|
|
var rowindex = e.parentNode.parentNode.parentNode.rowIndex;
|
|||
|
|
var r = liger.get("maingrid").getRow(rowindex);
|
|||
|
|
if (!r) {
|
|||
|
|
$.ligerDialog.alert("请选择要打印的数据!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
|
|||
|
|
if (type == 1) {
|
|||
|
|
if (window.top.Formium.external.Print.finit( "wzcgsp.frx")) {
|
|||
|
|
window.top.Formium.external.Print.PrintWZCGSP(r.id, "打印");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$(function () {
|
|||
|
|
$("#start").ligerDateEditor();
|
|||
|
|
$("#end").ligerDateEditor();
|
|||
|
|
$("#start").ligerGetDateEditorManager().setValue(fun_date(-10));
|
|||
|
|
$("#end").ligerGetDateEditorManager().setValue(fun_date(0));
|
|||
|
|
|
|||
|
|
$("#search").click(function () {
|
|||
|
|
liger.get("maingrid").set("parms", { start: $("#start").val(), end: $("#end").val(), zt: $("#zt").val(), rk: $("#rk").val() });
|
|||
|
|
liger.get("maingrid").changePage("first");
|
|||
|
|
liger.get("maingrid").reload();
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
$("#maingrid").ligerGrid({
|
|||
|
|
height: '100%',
|
|||
|
|
columns: [
|
|||
|
|
{ display: '编号', name: 'id', align: 'left', width: 60 },
|
|||
|
|
{ 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: 200 },
|
|||
|
|
{
|
|||
|
|
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: '', width: 120, render: function (r, i, v) {
|
|||
|
|
if (r.rkr) {
|
|||
|
|
return "已入库";
|
|||
|
|
}
|
|||
|
|
else if (r.cgr) {
|
|||
|
|
return "采购中";
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
return "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{ display: '采购人', name: 'cgr', align: 'left', width: 80 },
|
|||
|
|
{ display: '采购时间', name: 'cgtime', width: 100, render: function (r, i, v) { if (v) return formatTime(v) } },
|
|||
|
|
{ display: '入库人', name: 'rkr', align: 'left', width: 80 },
|
|||
|
|
{ display: '入库时间', name: 'rktime', width: 100, render: function (r, i, v) { if (v) return formatTime(v) } },
|
|||
|
|
{
|
|||
|
|
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>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
url: "@Url.Action("getsqwzcgcxPage")?zt=@ViewBag.zt",
|
|||
|
|
pageSize: 10,
|
|||
|
|
rownumbers: true,
|
|||
|
|
usePager: true,
|
|||
|
|
heightDiff: -20,
|
|||
|
|
toolbar: {
|
|||
|
|
items: [
|
|||
|
|
{ text: '明细', click: sp, icon: 'view' },
|
|||
|
|
{ line: true },
|
|||
|
|
{ text: '审批过程', click: spgc, icon: 'view' },
|
|||
|
|
{ line: true },
|
|||
|
|
{ text: '采购', click: cg, icon: 'plus' },
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
</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>
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|