tijian_tieying/web/dccdc/Views/sq2/oaIndex.cshtml
2025-02-20 12:14:39 +08:00

157 lines
6.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<body>
<div style="padding:10px">
<div id="maingrid" style="width:100%;" lay-filter="toolbar"></div>
</div>
</body>
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script type="text/javascript" src="@Url.Content("~/layuiadmin/layui/layui.js")"></script>
<link type="text/css" rel="stylesheet" href="@Url.Content("~/layuiadmin/layui/css/layui.css")" />
<script type="text/javascript">
layui.use('table',
function() {
var table = layui.table;
//展示已知数据
table.render({
elem: '#maingrid',
autoSort: true,
cols: [
[//标题栏
//{ field: 'sqdh', title: '待办单号', width: "25%" },
{ field: 'ksmc', title: '申请科室', width: "25%" },
{ field: 'sqr', title: '申请人', width: "25%" },
{ field: 'je', title: '申请金额', width: "15%" },
{ field: 'sqsj', title: '申请时间', width: "30%" }
//{ field: 'bz', title: '备注', width: "20%" },
//{ field: 'zt', title: '状态', width: "20%" },
//{ field: 'del', title: '操作状态', width: "20%" },
//{ field: 'hblx', title: '合并类型', width: "20%" }
]
],
url: "@Url.Action("getsqshhb")?type=@ViewBag.type",
method: 'post',
id:"testReload",
done: function(res, curr, count) {
$("[data-field = 'zt']").children().each(function() {
switch ($(this).text()) {
case "1":
$(this).text("等待科室领导审批");
case "2":
$(this).text("等待分管领导审批");
case "3":
$(this).text("等待内审领导审批");
case "4":
$(this).text("等待所有会签审批");
case "5":
$(this).text("等待备案领导审批");
case "6":
$(this).text("等待财务领导审批");
case "7":
$(this).text("等待中心领导审批");
case "8":
$(this).text("审核完成");
case "-1":
$(this).text("科室领导驳回");
case "-2":
$(this).text("分管领导驳回");
case "-3":
$(this).text("内审领导驳回");
case "-4":
$(this).text("会签驳回");
case "-5":
$(this).text("备案领导驳回");
case "-6":
$(this).text("财务领导驳回");
case "-7":
$(this).text("中心领导驳回");
}
});
$("[data-field = 'del']").children().each(function() {
switch ($(this).text()) {
case 1:
$(this).text("等待确认");
case 0:
$(this).text("独立添加");
default:
$(this).text("关联添加");
}
});
},
even: true
});
//监听行单击事件双击事件为rowDouble
table.on('row(toolbar)',
function(obj) {
var data = obj.data;
var id = data.id;
var type = data.hblx;
switch (type) {
case "出差报销":
window.open("/dccdc/sq2/sqccbxshMessageNew?id=" + id.toString());
break;
case "其他报销":
window.open("/dccdc/sq2/sqqtbxshMessageNew?id=" + id.toString());
break;
case "物资采购报销":
window.open("/dccdc/sq2/sqwzcgbxshMessageNew?id=" + id.toString());
break;
case "项目经费":
window.open("/dccdc/sq2/sqspMessageNew?id=" + id.toString());
break;
case "三重一大":
window.open("/dccdc/sq2/szyd_zjspMessageNew?id=" + id.toString());
break;
case "费用支出":
window.open("/dccdc/sq2/sqfyzcshMessageNew?id=" + id.toString());
break;
case "物资采购":
window.open("/dccdc/sq2/sqwzcgshMessageNew?id=" + id.toString());
break;
case "设备维修":
window.open("/dccdc/sq2/sqwxshMessageNew?id=" + id.toString());
break;
case "加班用餐":
window.open("/dccdc/sq2/sqjbycshMessageNew?id=" + id.toString());
break;
case "公务接待":
window.open("/dccdc/sq2/sqgwjdshMessageNew?id=" + id.toString());
break;
case "出差":
window.open("/dccdc/sq2/chuchai_spMessageNew?id=" + id.toString());
break;
case "预算":
window.open("/dccdc/sq2/sqysspMessage?id=" + id.toString());
break;
case "借款":
window.open("/dccdc/sq2/sqjkshMessage?id=" + id.toString());
break;
}
});
var $ = layui.$, active = {
reload: function(){
//执行重载
table.reload('testReload', {
page: {
curr: 1 //重新从第 1 页开始
}
}, 'data');
}
};
});
</script>