tijian_tieying/web/dccdc/Views/sq2/szyd_zjsysqView.cshtml

207 lines
8.0 KiB
Plaintext
Raw Normal View History

2025-02-20 12:14:39 +08:00

@{
ViewBag.Title = "szyd_zjsysqView";
}
<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"><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 edit(item) {
var id;
if (item.text === "增加") {
id = "";
}
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;
}
}
openf = $.ligerDialog.open({
url: "@Url.Action("szyd_zjsysqMessageNew")?id=" + id,
title: item.text,
width: 800,
height: 580
});
@*window.open("@Url.Action("szyd_zjsysqMessageNew")?id=" + id);*@
}
function view(item) {
var id;
var r = liger.get("maingrid").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要修改的数据!");
return;
}
id = r.id;
openf = $.ligerDialog.open({
url: "@Url.Action("szyd_zjsysqMessageNewView")?type=hidden&id=" + id,
title: item.text,
width: 800,
height: 580
});
@*window.open("@Url.Action("szyd_zjsysqMessageNew")?type=hidden&id=" + id);*@
}
function del(item) {
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;
}
if (confirm("确定删除") == true) {
$.ajax({
url: "@Url.Action("deleteSzyd")", 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 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 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() });
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: 'zjxz', align: 'left', width: 110 },
{ display: '结算方式', name: 'cgfs', align: 'left', width: 90 },
{ display: '申请金额', name: 'je', align: 'right', width: 60 },
{ display: '申请时间', name: 'sqsj', width: 100, render: function (r, i, v) { if (v) return formatTime(v) } },
{ display: '使用时间', name: 'yjsysj', width: 100, render: function (r, i, v) { if (v) return formatTime(v) } },
{ display: '申请内容', name: 'nr', align: 'left', width: 200 },
{
display: '状态', name: 'zt', width: 120, render: function (r, i, v) {
if (v) {
var json=@Html.Raw(JsonConvert.SerializeObject(ViewBag.ztD));
for(i in json){
if(json[i]["Value"]==v)
return json[i]["Text"];
}
}
}
},
{ display: '操作状态', name: 'sort', width: 120 }
],
url: "@Url.Action("getszyd_sqPage")",
pageSize: 10,
rownumbers: true,
usePager: true,
heightDiff: -20,
toolbar: {
items: [
{ text: '增加', click: edit, icon: 'add' },
{ line: true },
{ 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("~/"))";
if (window.top.Formium.external.Print.finit( "szyd.frx")) {
window.top.Formium.external.Print.PrintSZYD(r.id, "打印");
}
}
}
]
}
});
});
</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>