wzp
2023-03-02 374ce4ffd0c459bb4067e8d5765f972668aff9b1
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
<%@ Page Language="C#" masterpagefile="~/Main.master"  AutoEventWireup="true" CodeFile="GwRm.aspx.cs" Inherits="_GwRm" %>
<asp:Content runat="server" ID="Content1" ContentPlaceHolderID="head">
    <script>
        $(function () {
 
            var pagination = new Pagination();
            pagination.setPageIndex(1);
            pagination.setPageSize(20);
 
            var time = '<%=string.Format("{0}",DateTime.Today.ToString("yyyy-MM-dd"))  %>';
            var begionTimeHH = '<%=this.SelectedBeginTime%>';
            var EndTimeHH = '<%=this.SelectedEndTime%>';
            function loadPageList() {
                var SelectedApID = $("#ApID").val();
                var SelectedOpID = $("#OpID").val();
                var SelectedSpID = $("#SpID").val();
                var SelectedDestnationID = $("#DestnationID").val();
                var clientID = $("#clientID").val();
                var SelectedDate = $("#queryDate").val();
                var beginTime = $("#beginTime").val();
                var endTime = $("#endTime").val();
                if (SelectedDate == null || SelectedDate == "") {
                    $("#queryDate").val(time);
                }
                if (beginTime == null || beginTime == "") {
                    $("#beginTime").val(begionTimeHH);
                }
                if (endTime == null || endTime == "") {
                    $("#endTime").val(EndTimeHH);
                }
                $.ajax({
                    url: "GwRm.ashx",
                    type: "POST",
                    data: { action: "loadGwRmPageList", SelectedApID: SelectedApID, SelectedOpID: SelectedOpID, SelectedSpID: SelectedSpID, SelectedDestnationID: SelectedDestnationID, clientID: clientID, SelectedDate: SelectedDate, beginTime: beginTime, endTime: endTime, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                    beforeSend: function () {
                        $("#mask").css("height", $(document).height());
                        $("#mask").css("width", $(document).width());
                        $("#mask").show();
                    },
                    success: function (result) {
                        if (result.OK) {
                            $("#gwRmTable tbody").html(result.Message.Table);
                            pagination.setRecordCount(result.Message.TotalCount);
                            $("#pagination").html(pagination.getHtml());
                            $("#mask").hide();
                        } else {
                            mytek.alert(result.Message, result.OK);
                            $("#mask").hide();
                        }
                    }
                });
            }
 
            $(document).ready(function () {
 
                $(document).on("click", "a[data-index]", function () {
                    pagination.setPageIndex($(this).attr("data-index"));
                    loadPageList();
                });
 
                $(document).on("click", ".action-query", function () {
                    pagination.setPageIndex(1);
                    loadPageList();
                });
 
                $(document).on("click", ".action-push", function () {
                    var SelectedApID = $("#ApID").val();
                    var SelectedOpID = $("#OpID").val();
                    var SelectedSpID = $("#SpID").val();
                    var SelectedDestnationID = $("#DestnationID").val();
                    var SelectedDate = $("#queryDate").val();
                    var beginTime = $("#beginTime").val();
                    var endTime = $("#endTime").val();
                    if (SelectedDate == null || SelectedDate == "") {
                        $("#queryDate").val(time);
                    }
                    if (beginTime == null || beginTime == "") {
                        $("#beginTime").val(begionTimeHH);
                    }
                    if (endTime == null || endTime == "") {
                        $("#endTime").val(EndTimeHH);
                    }
                    mytek.confirm("确定重新推送状态?", "状态推送时会占用客户账号通道,请谨慎操作!", function (b) {
                        if (b) {
                            $.ajax({
                                url: "GwRm.ashx",
                                type: "POST",
                                data: { action: "gwRmPushList", SelectedApID: SelectedApID, SelectedOpID: SelectedOpID, SelectedSpID: SelectedSpID, SelectedDestnationID: SelectedDestnationID, SelectedDate: SelectedDate, beginTime: beginTime, endTime: endTime },
                                beforeSend: function () {
                                    $("#mask").css("height", $(document).height());
                                    $("#mask").css("width", $(document).width());
                                    $("#mask").show();
                                },
                                success: function (result) {
                                    if (result.OK) {
                                        mytek.alert(result.Message, result.OK, function () {
                                            $("#mask").hide();
                                        })
                                    } else {
                                        mytek.alert(result.Message, result.OK);
                                        $("#mask").hide();
                                    }
                                }
                            });
                        }
                    });
                });
 
                loadPageList();
 
            });
 
        })
    </script>
 </asp:Content> 
<asp:Content runat="server" ID="Content2" ContentPlaceHolderID="title">状态报告记录</asp:Content> 
<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="Server">
  
    <form name="Form_ID" method="post" action="GwRm.ashx?action=loadGwRmPageList" id="Form_ID"
    class="form-inline">
    <div class="ibox">
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">APID</span>
                <input type="text" class="form-control" name="ApID" id="ApID" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">ClientID</span>
                <input type="text" class="form-control" name="clientID" id="clientID" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">SPID</span>
                <input type="text" class="form-control" name="SpID" id="SpID" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">OPID</span>
                <input type="text" class="form-control" name="OpID" id="OpID" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group m-b">
                <span class="input-group-addon">接收号码</span>
                <input type="text" class="form-control" name="DestnationID" id="DestnationID" />
            </div>
        </div>
        <div class="form-group">
            <div class="input-group date m-b">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input name="queryDate" id="queryDate" class="form-control col-md-1" value="<%=this.SelectedDate%>"
                    type="text">
            </div>
            <div class="input-group m-b">
                <input type="text" size="8" class="form-control" name="beginTime" id="beginTime"
                    value="<%=this.SelectedBeginTime%>" />
                <span class="input-group-addon">-</span>
                <input type="text" size="8" class="form-control" name="endTime" id="endTime" value="<%=this.SelectedEndTime%>" />
            </div>
        </div>
        
        <div class="form-group">
            <div class="input-group m-b">
                <input type="button" value="查询" class="btn btn-primary action-query" />&nbsp;&nbsp;
                <input type="button" class="  action-push btn  btn-danger" value="重推报告" />
            </div>
        </div>
    </div>
    </form>
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="gwRmTable">
            <thead>
                <tr class="header">
                    <th>
                        AP消息ID
                    </th>
                    <th>
                        OP消息ID
                    </th>
                    <th>
                        CLIENTID
                    </th>
                    <th>
                        SPID
                    </th>
                    <th>
                        APID
                    </th>
                    <th>
                        OPID
                    </th>
                    <th>
                        下发号码
                    </th>
                    <th>
                        接收号码
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        提交时间
                    </th>
                    <th>
                        处理时间
                    </th>
                    <th>
                        状态报告时间
                    </th>
                    <th>
                        扩展消息
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="pagination">
    </div>
    
 
        <div id="mask" class="mask">
            <span></span>
            <img src="img/spinning-circles.svg" alt="载入中..." /></div>
    </div>
  </asp:Content>