yzh
2022-05-10 07ac2c7ec9680f936a4393b923785242b799daa0
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GwMoRoute.aspx.cs" Inherits="_GwMoRoute" %>
<!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>MoRoute</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">
        $(document).ready(function () {
            var pagination = new Pagination();
            pagination.setPageIndex(1);
            pagination.setPageSize(20);
 
            function loadPageList() {
                var opID = $("#qopID").val();
                var spID = $("#qspID").val();
                var accessCode = $("#qaccessCode").val();
                $.ajax({
                    url: "GwMoRoute.ashx",
                    type: "POST",
                    data: { action: "loadGwMoRoutePageList", opID: opID, spID: spID, accessCode: accessCode, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                    success: function (result) {
                        if (result.OK) {
                            $("#gwclientTable tbody").html(result.Message.Table);
                            pagination.setRecordCount(result.Message.TotalCount);
                            $("#pagination").html(pagination.getHtml());
                        } else {
                            mytek.alert(result.Message, result.OK);
                        }
                    }
                });
            }
 
            $(document).on("click", ".action-query", function () {
                pagination.setPageIndex(1);
                loadPageList();
            });
 
            $(document).on("click", ".action-refresh", function () {
                $.post("GwMoRoute.ashx", { action: "loadRefresh" }, function (r) {
                    mytek.alert(r.Message, r.OK, function () {
                        loadPageList();
                    });
                });
            });
 
            $(document).on("click", "a[data-index]", function () {
                pagination.setPageIndex($(this).attr("data-index"));
                loadPageList();
            });
            loadPageList();
 
            $(document).on("click", ".action-modal-create", function () {
                $("#gwMoRouteDialog .modal-title").text("创建上行路由");
                $("#gwMoRouteDialog input[name=action]").val("save");
                $("#gwMoRouteDialog #priority").val("0");
                $("#gwMoRouteDialog #opID").val("");
                $("#gwMoRouteDialog #accessCode").val("");
                $("#gwMoRouteDialog #spID").val("");
 
                $("#gwMoRouteDialog").modal("show");
            });
 
            $(document).on("click", ".action-modal-edit", function () {
                $("#gwMoRouteDialog .modal-title").text("修改上行路由");
                $("#gwMoRouteDialog input[name=action]").val("update");
                var id = $(this).data("id");
                $.get("GwMoRoute.ashx", { action: "getGwMoRoute", routeID: id }, function (r) {
                    if (r.OK) {
                        try {
                            $("#gwMoRouteDialog #routeID").val(r.Message.RouteID);
                            $("#gwMoRouteDialog #priority").val(r.Message.Priority);
                            if (r.Message.OpID > 0) {
                                $("#gwMoRouteDialog #opID").val(r.Message.OpID);
                            } else {
                                $("#gwMoRouteDialog #opID").val("");
                            }
                            $("#gwMoRouteDialog #accessCode").val(r.Message.AccessCode);
                            $("#gwMoRouteDialog #spID").val(r.Message.SpID);
                        }
                        catch (e) {
                        }
 
                        $("#gwMoRouteDialog").modal("show");
                    }
                    else {
                        mytek.alert(r.Message, r.OK);
                    }
                }, "json");
            });
 
            $(document).on("click", ".action-delete", function () {
                var id = $(this).data("id");
                mytek.confirm("是否需要删除该上行路由?", "上行路由删除后将无法恢复,请谨慎操作!", function (b) {
                    if (b) {
                        $.post("GwMoRoute.ashx", { action: "delete", routeID: id }, function (r) {
                            mytek.alert(r.Message, r.OK, function () {
                                loadPageList();
                            });
                        });
                    }
                });
            });
 
            $("#gwMoRouteForm").ajaxForm({
                success: function (r) {
                    if (r.OK) {
                        mytek.alert(r.Message, r.OK, function () {
                            $("#gwMoRouteDialog").modal("hide");
                            loadPageList();
                        });
                    } else {
                        mytek.alert(r.Message, r.OK);
                    }
                }
            });
 
        });
    </script>
</head>
<body class="white-bg">
   
    <div class="wrapper wrapper-content table-responsive">
        
    <div class="modal inmodal fade" id="gwMoRouteDialog" tabindex="-1" role="dialog" aria-hidden="true">
        <form name="gwMoRouteForm" method="post" action="GwMoRoute.ashx" id="gwMoRouteForm" class="form-horizontal">
        <div class="modal-dialog form-horizontal">
            <div class="modal-content ">
                <input type="hidden" id="routeID" value="" name="routeID" />
                
          <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>
                    <input value="add" name="action" type="hidden" />
                </div>
        
                
                <div class="modal-body">
                    <div class="form-group">
                        <label class="control-label  col-sm-2">
                            优先级
                        </label>
                        <div class="col-sm-10">
                            <select name="priority" id="priority" class="form-control">
                <%
                                    __w.Write("<option value=\"-2\" ");
                                if (this.GwSp.Priority == -2)
                                    __w.Write("selected");
                                __w.Write(">最低</option>\r\n   <option value=\"-1\" ");
                                if (this.GwSp.Priority == -1)
                                    __w.Write("selected");
                                __w.Write(">低</option>\r\n     <option value=\"0\"  ");
                                if (this.GwSp.Priority == 0)
                                    __w.Write("selected");
                                __w.Write(">普通</option>\r\n   <option value=\"1\"  ");
                                if (this.GwSp.Priority == 1)
                                    __w.Write("selected");
                                __w.Write(">高</option>\r\n    <option value=\"2\"  ");
                                if (this.GwSp.Priority == 2)
                                    __w.Write("selected");
                                    __w.Write(">最高</option>\r\n  ");
                                
                      %>
                            </select>
                   
                            
                            
                        </div>                        
                    </div>
                    <div class="form-group">
                        <label class="control-label  col-sm-2">
                            通道
                        </label>
                        <div class="col-sm-10">
                            <select name="opID" id="opID" class="form-control">
 
                             <%__w.Write(this.GenerateOPIDOptions());%>
 
 
                             </select>
                        </div>
                    </div>                 
                    <div class="form-group">
                        <label class="control-label col-sm-2">
                            上行接入号</label>
                        <div class="col-sm-10">
                            <input type="text" name="accessCode" id="accessCode" value="" class="form-control" maxlength="21" placeholder="例如:106908998" />
                        </div>
                    </div>
                    <div class="form-group ">
                        <label class="control-label col-sm-2">
                            帐号
                        </label>
                        <div class="col-sm-10">
                            <select name="spID" id="spID" class="form-control">
                                <%__w.Write(this.GenerateSpIDOptions());%>
                            </select>
                        </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">
                        保存</button>
                </div>
            </div>
        </div>
        </form>
    </div>
    <form name="queryForm" method="post" id="queryForm" class="form-inline">
    <div class="form-group">
        <div class="input-group m-b">
            <span class="input-group-addon">通道</span>
            <select name="qopID" id="qopID" class="form-control">
                <%__w.Write(this.GenerateOPIDOptions());%>
            </select>
        </div>
    </div>
    <div class="form-group">
        <div class="input-group m-b">
            <span class="input-group-addon">帐号</span>
            <select name="qspID" id="qspID" class="form-control">
                <%__w.Write(this.GenerateSpIDOptions());%>
            </select>
        </div>
    </div>
    <div class="form-group">
        <div class="input-group m-b">
        <span class="input-group-addon">上行接入号</span>
            <input id="qaccessCode" class="form-control" name="qaccessCode" value="" type="text" />
        </div>
     </div>
    <div class="form-group">
        <div class="input-group m-b">
            <input type="button" value="查询" class="btn btn-primary action-query" />
            <input class="btn btn-info action-refresh" value="同步到底层" type="button" />
        </div>
    </div>
    </form>
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="gwclientTable">
            <thead>
                <tr class="header">
                    <th>
                        通道
                    </th>
                    <th>
                        上行接入号
                    </th>
                    <th>
                        优先级
                    </th>
                    <th>
                        帐号
                    </th>
                    <th class="col-md-3">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="pagination">
    </div>
    <div class="form-group">
        <input class="btn btn-warning action-modal-create" value="创建上行路由" type="button" />
    </div>
    <div>
        <h4>上行路由配置说明</h4>
        <ul>
            <li class="text-info">用于上行短信SP帐号的匹配;</li>
            <li>上行路由配置匹配顺序由通道升序、上行接入号降序、优先级降序进行排列;</li>
            <li>同一通道上行接入号首先按最长的号码匹配;</li>
            <li>同步到底层:由于底层数据和页面数据之间可能存在不同步而导致上行路由无法匹配的情况,请点击 “同步到底层” 按钮;</li>
        </ul>
    </div>
 
        <div id="mask" class="mask">
            <span></span>
            <img src="img/spinning-circles.svg" alt="载入中..." /></div>
    </div>
</body>
</html>