username@email.com
2025-04-27 15eb82df2d6ec539e9d4245bfe08d531e8eb6379
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@{
    ViewBag.Title = "电话费统计录入";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
 
<link href="~/css/jquery-confirm.css" rel="stylesheet">
<link href="~/js/plugins/layer/laydate/theme/default/laydate.css" rel="stylesheet">
<script src="~/js/jquery-confirm.js" type="text/javascript"></script>
<script src="~/js/plugins/layer/laydate/laydate5.js" type="text/javascript"></script>
 
<style>
    /* .laydate_table {
        display: none;
    }*/
 
    .col-base {
        line-height: 35px;
    }
    /*
    #laydate_hms {
        display: none !important;
    }*/
</style>
 
@section headerStyle{
 
    <table style="line-height:35px;margin-top:15px">
        <tr>
            <td width="100"></td>
            <td>查询年份:</td>
            <td width="180">
                <input id="acTime" style="width:150px" class="layui-input" placeholder="yyyy" type="text" />
            </td>
            <td>电话卡号:</td>
            <td width="180">
                <input id="acSim" class="form-control" labtype="txt" addvisible="true" type="text">
            </td>
            <td>
                <a class="btn btn-default btn-outline" href="#" onclick="doSearch()" style="margin-left:20px">
                    <i class="fa fa-search"></i>&nbsp;&nbsp;<span class="bold">查询</span>
                </a>
            </td>
            <td></td>
        </tr>
    </table>
 
    <script type="text/javascript">
 
        gridConfig = { multiselect: false, selectcol: "sim_id" };
        shrinkToFit = true;
        footerrow = true;
 
        dataCol = [
            { label: '序号', name: 'sim_id', labtype: 'txt', hidden: true },
            { label: '年份', name: 'bill_year', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '电话卡号', name: 'sim', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    var simcode = rowObject.sim_id;
                    var url = "/SimCost/Index?year=" + rowObject.bill_year + "&sim=" + simcode;
                    return "<a onclick=\"OpenWindow('电话费','70%','50%','"+url+"' )\"  >" + cellvalue + "</a>";
                }
            },
 
            {
                label: '1月', name: 'Jan', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter
            },
            { label: '2月', name: 'Feb', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter },
            { label: '3月', name: 'Mar', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '4月', name: 'Apr', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '5月', name: 'May', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '6月', name: 'Jun', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '7月', name: 'Jul', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '8月', name: 'Aug', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '9月', name: 'Sept', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '10月', name: 'Oct', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
            { label: '11月', name: 'Nov', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter },
            { label: '12月', name: 'Dece', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter }
        ];
        dataUrl = "/SimCost/GetSimYearList";
        searchCol = [];
 
        var lastsel;
 
        $(function () {
 
            laydate.render({
                elem: '#acTime'
                , type: 'year'
                , value: getNowFormatDate()
            });
 
            //$("#jqGridPager").hide();//隐藏div
 
            //$("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' });
 
            //jQuery("#jqGrid").jqGrid('setGridHeight', 150);
 
        });
 
 
        function getNowFormatDate() {
            var date = new Date();
            var year = date.getFullYear();
            return year;
            }
 
            function currencyFmatter(cellvalue, options, rowObject) {
                var id = rowObject.sim_id;
                var sim = rowObject.sim;
                var m = options.pos - 3;
 
                if (m > rowObject.month) {
                    var y = rowObject.bill_year;
                    var url = "/SimCost/Edit?id=" + id + "&money=" + cellvalue + "&year=" + y + "&month=" + m + "&sim=" + sim;
 
                    return "<a onclick=\"OpenWindow('电话费用录入','30%','50%','" + url + "')\">" + cellvalue + "</a>";
                }
                else {
                    return cellvalue;
                }
        }
 
        function doSearch() {
                       
 
            // $("#jqGrid").trigger('reloadGrid');
            $("#jqGrid").jqGrid('setGridParam', {
                url: "/SimCost/GetSimYearList",
                postData: {
                    searchtime: $('#acTime').val(),
                    searchsim: $('#acSim').val(),
                }
 
            }).trigger("reloadGrid");
 
            }
                    
 
    </script>
 
}