wzp
2021-08-09 826bce65ac9b1e5dae43fc06974b8b1284f1d12c
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GwSpPrePattern.aspx.cs" Inherits="GwSpPrePattern" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="renderer" content="webkit" /><meta http-equiv="Cache-Control" content="no-siteapp" />
<title>审核报备</title>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="favicon.ico" /><link href="css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet" /><link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet" /><link href="css/plugins/iCheck/custom.css" rel="stylesheet" /><link href="css/animate.min.css" rel="stylesheet" /><link href="css/style.min862f.css?v=4.1.0" rel="stylesheet" /><link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet" /><link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet" /><link href="css/jquery.numberedtextarea.css" rel="stylesheet" />
    <script src="js/loading.js" type="text/javascript"></script>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/json.js"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/content.min.js?v=1.0.0"></script>
    <script src="js/plugins/iCheck/icheck.min.js"></script>
    <script src="js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="/js/jquery-loading.js"></script>
    <script type="text/javascript" src="/js/jquery-form.js"></script>
    <script type="text/javascript" src="/js/jquery.numberedtextarea.js"></script>
    <script type="text/javascript" src="/js/mytek-pager.js"></script>
    <script src="js/mytek-pagination.js?r=11" type="text/javascript"></script>
    <style>
        body { font-size: 12px; color: #111111; }
        .mask { position: absolute; top: 0px; filter: alpha(opacity=60); background-color: #777; z-index: 1002; left: 0px; opacity: 0.5; -moz-opacity: 0.5; text-align: center; display: none; }
        .mask span { height: 70%; display: inline-block; vertical-align: middle; }
        .mask span img { vertical-align: middle; }
    </style>
    <script>
        (function ($) {
            $.ajaxBak = $.ajax;
 
            $.ajax = function (options) {
                options.timeout = 300000;
                options.url = options.url + (options.url.indexOf("?") > 0 ? "&" : "?") + "r=" + Math.random();
 
                options.complete = function (e) {
                    $("body").hideLoading();
                }
 
                if (options.showloading !== false) {
                    $("body").showLoading();
                }
 
                try {
                    return $.ajaxBak.call(this, options);
                } catch (e) {
                    if (options.showloading !== false) {
                        $("body").hideLoading();
                    }
                }
                return this;
            }
        })(jQuery);
 
       $(document).ready(function(){
            $(".icheck-me").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",});
            $(".input-group.date").datepicker({todayBtn:"linked",keyboardNavigation:!1,forceParse:!1,calendarWeeks:!0,autoclose:!0});
            $("[data-toggle='tooltip']").tooltip();
            $("[data-toggle=popover]").popover()
       });
    </script>
    
    <script type="text/javascript">
        $(function () {
 
            var pagination = new Pagination();
            pagination.setPageIndex(1);
            pagination.setPageSize(20);
 
            function loadPageList() {
                var spID = $("#SpID").val();
                var clientID = $("#ClientID").val();
                $.ajax({
                    url: "gwsp.ashx",
                    type: "post",
                    data: { action: "loadPrePatternList", spID: spID, clientID: clientID, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                    success: function (result) {
                        if (result.OK) {
                            $("#gwSpPreTable tbody").html(result.Message.Table);
                            pagination.setRecordCount(result.Message.TotalCount);
                            $("#pagination").html(pagination.getHtml());
                        } else {
                            mytek.alert(result.Message, result.OK);
                        }
                    }
                });
            }
 
            $(document).on("click", "a[data-index]", function () {
                pagination.setPageIndex($(this).attr("data-index"));
                loadPageList();
            });
 
            $(document).on("click", ".action-update-status", function () {
                var patternID = $(this).data("id");
                $("[name='patternID']").val(patternID);
 
                $.post("gwsp.ashx", { action: "getPrePattern", patternID: patternID }, function (r) {
                    if (r.OK) {
                        if (r.Message.AuditStatus != 0 && r.Message.AuditStatus != 3) {
                            return;
                        }
                        $("#spPrePatternDialog").modal("show");
                    }
                    else {
                        mytek.alert(r.Message);
                    }
                }, "json");
            });
 
            $(document).on("click", ".action-modal-status", function () {
                var idArray = [];
 
                $("input[name='checkbox']:checkbox:checked").each(function () {
                    var id = $(this).val();
                    idArray.push(id);
                });
 
                if (idArray.length == 0) {
                    mytek.alert("请选择要审核的内容!", false);
                    return;
                }
 
                $("#spPrePatternDialog").modal("show");
            });
 
            $("#check-all-row").click(function () {
                $("input[name='checkbox']").prop("checked", $(this).is(":checked"));
            });
 
            $(".action-save-status").on("click", function () {
                var idArray = [];
                var auditStatus = 1;
                var patternID = $("[name='patternID']").val();
                var auditRemark = $("[name='auditRemark']").val();
 
                $("input[name='checkbox']:checkbox:checked").each(function () {
                    var id = $(this).val();
                    idArray.push(id);
                });
 
                if (idArray.length == 0) {
                    idArray.push(patternID);
                    if (idArray.length == 0) {
                        mytek.alert("请选择要修改的账号!", false);
                        return;
                    }
                }
 
                $("[name='auditStatus']").each(function () {
                    if ($(this).prop("checked")) {
                        auditStatus = $(this).val();
                    }
                });
 
                $.ajax({
                    url: "gwsp.ashx",
                    type: "post",
                    data: { action: "updatePrePatternStatus", idArray: $.toJSON(idArray), auditStatus: auditStatus, auditRemark: auditRemark },
                    success: function (result) {
                        if (result.OK) {
                            window.location.reload();
                        } else {
                            mytek.alert(result.Message, result.OK);
                        }
                    }
                });
            });
 
            $(".action-query").on("click", function () {
                pagination.setPageIndex(1);
                loadPageList();
            });
 
            loadPageList();
 
        });
    </script>
</head>
<body class="white-bg">
    
    <div class="wrapper wrapper-content table-responsive">
        
    <input type="hidden" id="patternID" name="patternID" />
    <div class="modal inmodal fade" id="spPrePatternDialog" tabindex="-1" role="dialog"
        aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content ">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">
                        审核报备</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <div>
                            <input type="radio" class="icheck-me" name="auditStatus" value="1" checked>通过
                            <input type="radio" class="icheck-me" name="auditStatus" value="2">不通过
                        </div>
                    </div>
                    <div class="form-group">
                        <label class=" control-label">
                            审核备注</label>
                        <div class="">
                            <textarea rows="5" name="auditRemark" id="auditRemark" class="form-control"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">
                        取消</button>&nbsp;&nbsp;
                    <button class="btn btn-primary action-save-status">
                        保存</button>
                </div>
            </div>
        </div>
    </div>
    <form id="gwSpPreForm" method="post" class="form-inline">
    <div class="listCanvas">
        <div class="ibox">
            <div class="input-group m-b">
                <span class="input-group-addon">客户ID</span>
                <input type="text" name="ClientID" id="ClientID" class="form-control col-md-2" />
            </div>
            <div class="input-group m-b">
                <span class="input-group-addon">SPID</span>
                <input type="text" name="SpID" id="SpID" class="form-control col-md-2" />
            </div>
            <div class="input-group m-b">
                <input type="button" value="查询" class="btn btn-primary action-query" />
                <input type="button" value="批量审核" class="btn btn-danger action-modal-status" />
            </div>
        </div>
    </div>
    </form>
    <table class="table table-striped table-bordered table-hover" id="gwSpPreTable">
        <thead>
            <tr class="header">
                <th>
                    <input type="checkbox" name="check-all-row" id="check-all-row" value="" />
                </th>
                <th class="col-md-1">
                    客户ID
                </th>
                <th class="col-md-1">
                    SPID
                </th>
                <th class="col-md-5">
                    报备内容
                </th>
                <th class="col-md-1">
                    创建时间
                </th>
                <th class="col-md-1">
                    审核状态
                </th>
                <th class="col-md-1">
                    审核时间
                </th>
                <th class="col-md-1">
                    审核备注
                </th>
                <th class="col-md-1">
                    审核员
                </th>
                <th class="col-md-1">
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
    <div id="pagination">
    </div>
 
        <div id="mask" class="mask">
            <span></span>
            <img src="img/spinning-circles.svg" alt="载入中..." /></div>
    </div>
</body>
</html>