username@email.com
2021-12-14 18db26a9759c18cac8fa3df420ff80d9f0de1ed9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@{
    ViewBag.Title = "FiAccount";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@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 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 _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 _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
 
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
}
    </script>
}