124 lines
4.8 KiB
Plaintext
124 lines
4.8 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "sqyscx";
|
|
}
|
|
|
|
<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">
|
|
@if (ViewBag.disabled == "1")
|
|
{
|
|
@Html.DropDownList("ksid", ViewBag.ksD as SelectList, "所有科室", new { @class = "l-text", @disabled = "disabled" })
|
|
}
|
|
else
|
|
{
|
|
@Html.DropDownList("ksid", ViewBag.ksD as SelectList, "所有科室", new { @class = "l-text" })
|
|
}
|
|
</td>
|
|
<td class="rtd" style="width:220px" colspan="2">
|
|
<button type="button" id="search" class="l-button">查询</button>
|
|
</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">
|
|
|
|
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 () {
|
|
$("#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(), ksid: $("#ksid").val() });
|
|
liger.get("maingrid").changePage("first");
|
|
liger.get("maingrid").reload();
|
|
})
|
|
$("#save").click(function () {
|
|
liger.get("maingrid").endEdit();
|
|
var rows = liger.get("maingrid").getData();
|
|
var items = "";
|
|
for (var i in rows) {
|
|
if (rows[i].syje > 0) {
|
|
items += +rows[i].id + "|" + rows[i].syje + ",";
|
|
}
|
|
}
|
|
if (items == "") {
|
|
$.ligerDialog.error("请维护使用金额!");
|
|
return;
|
|
}
|
|
|
|
if (window.parent.selectedYSBX) {
|
|
window.parent.selectedYSBX(items);
|
|
}
|
|
})
|
|
|
|
$("#maingrid").ligerGrid({
|
|
height: '100%',
|
|
columns: [
|
|
{ display: '预算年份', name: 'year', align: 'left', width: 80 },
|
|
{ display: '科室', name: 'ksmc', align: 'left', width: 80 },
|
|
{ display: "经费名称", name: "xmmc", align: "left", width: 100 },
|
|
{ display: "科目名称", name: "kmmc", align: "left", width: 100 },
|
|
{
|
|
display: "使用金额", name: "je", align: "right", width: 80, totalSummary: {
|
|
render: function (suminf, column) {
|
|
return "<span style='color:red'>合计:" + suminf.sum + "</span>";
|
|
}
|
|
}
|
|
},
|
|
{
|
|
display: "剩余预算", name: "je3", align: "right", width: 80, totalSummary: {
|
|
render: function (suminf, column) {
|
|
return "<span style='color:red'>合计:" + suminf.sum + "</span>";
|
|
}
|
|
}
|
|
},
|
|
{ display: '操作员', name: 'czyname', align: 'left', width: 80 },
|
|
{
|
|
display: '操作时间', name: 'czsj', width: 100,
|
|
render: function (r, i, v) {
|
|
return v.split('T')[0];
|
|
}
|
|
}
|
|
],
|
|
url: "@Url.Action("getSqysbxcxPage2")?ksid=@ViewBag.ksid",
|
|
pageSize: 10,
|
|
rownumbers: true,
|
|
usePager: false
|
|
});
|
|
});
|
|
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|