username@email.com
2022-08-22 827b416782eda317a6b24e0afb88c788e483b86d
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
@{
    ViewBag.Title = "FiAccountIncome";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@section headerStyle{
    <script type="text/javascript">
        var accounttype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.accounttype))';
        var FiSubject = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.FiSubject))';
        var RecordTypeId = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.RecordTypeId))';
        loseherght = 50;
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            
            { label: '记录类型', name: 'RecordTypeName', labtype: 'txt', hidden: false, width: 100 },
            { label: '账户类型', name: 'AccounttypeName', labtype: 'txt', hidden: false, width: 100  },
            {
                label: '账户名称', name: 'AccountName', labtype: 'txt', hidden: false, width: 100 
            },
            { label: '科目名称', name: 'SubjectName', labtype: 'txt', hidden: false, width: 100  },
            { label: '金额', name: 'Money', labtype: 'txt', hidden: false, width: 100  },
            { label: '余额', name: 'Balance', labtype: 'txt', hidden: false, width: 100 },
            { label: '收(支)款单位', name: 'PaymentUnit', labtype: 'txt', hidden: false, width: 200 },
            { label: '操作人', name: 'CreaterName', labtype: 'txt', hidden: false, width: 60 },
            { label: '摘要', name: 'OperationalMatters', labtype: 'txt', hidden: false, width: 200 },
            { label: '订单号', name: 'Remark', labtype: 'txt', hidden: false, width: 60 },
            { label: '操作时间', name: 'CreatetimeName', labtype: 'txt', hidden: false, width: 100 },
             
        ];
        dataUrl = "/FiAccountIncome/GetListPrint";
        searchCol = [
            { label: '操作时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '账户类型', name: 'Accounttype', labtype: 'combox', hidden: false, data: JSON.parse(accounttype) },
            { label: '账户名称', name: 'AccountId', labtype: 'combox', hidden: false, data: JSON.parse('[]'),},
            { label: '科目名称', name: 'SubjectId', labtype: 'combox', hidden: false, data: JSON.parse(FiSubject) },
            { label: '记录类型', name: 'RecordTypeId', labtype: 'combox', hidden: false, data: JSON.parse(RecordTypeId) },
            { label: '摘要', name: 'OperationalMatters', labtype: 'txt', hidden: false },
            { label: '订单号', name: 'Remark', labtype: 'txt', hidden: false },
            { label: '付款人(单位)', name: 'PaymentUnit', labtype: 'txt', hidden: false },
            { label: '操作人', name: 'CreaterName', labtype: 'txt', hidden: false },
 
            
 
 
        ];
        var _pagePrint = function () {
 
            
            var Accounttype = $("#PBSAccounttype").val();
            var AccountId = $("#PBSAccountId").val();
            var SubjectId = $("#PBSSubjectId").val();
            var RecordTypeId = $("#PBSRecordTypeId").val();
            var OperationalMatters = $("#PBSOperationalMatters").val();
            var PaymentUnit = $("#PBSPaymentUnit").val();
            var CreaterName = $("#PBSCreaterName").val();
 
            var Remark = $("#PBSRemark").val();
 
            var Createtimestart = $("#PBSCreatetimestart").val();
 
            var Createtimeend = $("#PBSCreatetimeend").val();
            var Createtime = '';
            if (Createtimestart != '' && Createtimeend != '') {
                Createtime = Createtimestart + '|' + Createtimeend;
            }
 
 
            var url = "/FiAccountIncome/print?Accounttype=" + Accounttype + "&AccountId=" + AccountId + "&SubjectId=" + SubjectId + "&RecordTypeId=" + RecordTypeId + "&OperationalMatters=" + OperationalMatters + "&PaymentUnit=" + PaymentUnit + "&CreaterName=" + CreaterName + "&Createtime=" + Createtime + "&Remark=" + Remark;
            var me = window.open(url, "打印");  //打开新窗口
 
 
        }
 
      
 
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
 
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
}
    </script>
}
 
 
@section footerScripts{
    <script type="text/javascript">
 
        function send() {
 
            var msg = $("#PBSAccounttype");
 
 
            if (msg.length > 0) {
                $("#PBSAccounttype").change(function () {
                    var Accounttype = $("#PBSAccounttype").val();
                    $.ajax({
                        type: "GET",
                        url: "/FiAccountIncome/getAccount?Accounttype=" + Accounttype,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
 
                            var city = $("#PBSAccountId");
                            city.find('option').remove();
                            var aaa = '<option value="" hassubinfo="true">&nbsp;</option>';
                            city.append(aaa);
                            if (data.length > 0) {
                                for (var i = 0; i < data.length; i++) {
 
                                    var o = '<option value="' + data[i].Id + '" hassubinfo="true">' + data[i].Accountname + '</option>';
                                    city.append(o);
                                }
                            }
                            $("#PBSAccountId").trigger('chosen:updated');//更新选项
                        },
                        error: function () {
 
 
                            parent.layer.msg('失败', { icon: 5 });
                        }
                    });
                });
 
            } else {
                setTimeout(send, 1000);
            }
        }
 
 
        send();
 
        function send1() {
 
            var msg = $("#PBSRecordTypeId");
 
 
            if (msg.length > 0) {
                $("#PBSRecordTypeId").val('@ViewBag.RecordTypeId1');
                _pageSearch();
            } else {
                setTimeout(send1, 200);
            }
        }
 
 
        send1();
 
 
 
 
    </script>
}