@using DTO;
|
@{
|
ViewBag.Title = "FiAccount";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
|
List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
|
}
|
@section headerStyle{
|
<script type="text/javascript">
|
var accounttype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.accounttype))';
|
var qiyongstatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.qiyongstatus))';
|
dataCol = [
|
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
|
{ label: '账户类型', name: 'AccounttypeName', labtype: 'txt', hidden: false },
|
{
|
label: '账户', name: 'Account', labtype: 'txt', hidden: false ,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/FiAccount/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>";
|
}
|
},
|
{ label: '户名', name: 'Accountname', labtype: 'txt', hidden: false },
|
{ label: '责任人', name: 'Zzr', labtype: 'txt', hidden: false },
|
{ label: '是否启用', name: 'QiyongStatusName', labtype: 'txt', hidden: false },
|
{ label: '总收入', name: 'AllIncome', labtype: 'txt', hidden: false },
|
{ label: '总支出', name: 'AllExpenses', labtype: 'txt', hidden: false },
|
{ label: '余额', name: 'Balance', labtype: 'txt', hidden: false },
|
{
|
label: '流水账', name: 'Remark', labtype: 'txt', hidden: false,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a class=\"Liushuizhang\" style=\"display: none;\" onclick=\"OpenWindow('" + rowObject.Accountname + "','98%','100%', '/FiAccount/Liushuizhang?id=" + rowObject.Id + "')\" >流水账</a>";
|
}
|
},
|
|
{ label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
|
{ label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
|
{ label: '创建时间', name: 'Createtimetxt', labtype: 'txt', hidden: true },
|
{ label: '修改人', name: 'Modifier', labtype: 'txt', hidden: true },
|
{ label: '修改时间', name: 'Modifytimetxt', labtype: 'txt', hidden: true }
|
];
|
dataUrl = "/FiAccount/GetList";
|
searchCol = [
|
|
|
|
{ label: '账户类型', name: 'Accounttype', labtype: 'combox', hidden: false, data: JSON.parse(accounttype) },
|
{ label: '账户', name: 'Accountname', labtype: 'txt', hidden: false },
|
{ label: '是否启用', name: 'QiyongStatus', labtype: 'combox', hidden: false, data: JSON.parse(qiyongstatus) },
|
|
|
];
|
var _pageAdd = function () {
|
OpenWindow("新增账户", "98%", "90%", "/FiAccount/Edit/");
|
}
|
var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
|
|
var _afterLoadDataload = function (xhr) {
|
|
//var rows = jQuery("#jqGrid").jqGrid("getRowData"), total_shouru = 0, total_zhuchu = 0, total_yue = 0;
|
//for (var i = 0, l = rows.length; i < l; i++) {
|
// total_shouru += (rows[i].AllIncome - 0);
|
// total_zhuchu += (rows[i].AllExpenses - 0);
|
// total_yue += (rows[i].Balance - 0);
|
//}
|
|
jQuery("#jqGrid").jqGrid("footerData", "set", { QiyongStatusName: "<font color='darkgoldenrod'>--当页合计--</font> </br> <font color='darkgoldenrod'>--合计--</font>", AllIncome: "<font color='darkgoldenrod'>" + xhr.DangyeHeji1 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji1 + "</font>", AllExpenses: "<font color='darkgoldenrod'>" + xhr.DangyeHeji2 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji2 + "</font>", Balance: "<font color='darkgoldenrod'>" + xhr.DangyeHeji3 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji3 + "</font>" });
|
|
var data = JSON.parse(ActionInfo22);
|
for (var o in data) {
|
//alert(o);
|
//alert(data[o]);
|
/* alert("PageShortcut:" + data[o].PageShortcut + " PageName:" + data[o].PageName);*/
|
$("." + data[o].PageShortcut).show();
|
|
}
|
|
};
|
|
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
|
|
|
|
</script>
|
}
|