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
<%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="GwTransfer.aspx.cs" Inherits="GwTransfer"%>
 
<asp:Content ID="Content1" ContentPlaceHolderID="title" Runat="Server">
 
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
    $(document).ready(function() {
        var pagination = new Pagination();
        pagination.setPageIndex(1);
        pagination.setPageSize(20);
 
        function loadPageList() {
            var mobile = $("#qmobile").val();
            $.ajax({
                url: "GwTransfer.ashx",
                type: "POST",
                data: { action: "loadGwTransfer", mobile: mobile, pageIndex: pagination.getPageIndex(), pageSize: pagination.getPageSize() },
                success: function(result) {
                    if (result.OK) {
                        $("#gwTransferTable tbody").html(result.Message.Table);
                        pagination.setRecordCount(result.Message.TotalCount);
                        $("#pagination").html(pagination.getHtml());
                    } else {
                        mytek.alert(result.Message, result.False);
                    }
                }
            });
        }
 
 
 
        $(document).on("click", ".action-query", function() {
            pagination.setPageIndex(1);
            loadPageList();
        });
 
 
        $(document).on("click", "a[data-index]", function() {
            pagination.setPageIndex($(this).attr("data-index"));
            loadPageList();
        });
        loadPageList();
 
        //创建
        $(document).on("click", ".action-modal-create", function() {
            $("#AddPhoneDialog .modal-title").text("创建");
            $("#AddPhoneDialog input[name=action]").val("save");
            $("#AddPhoneDialog #telphone").val("");
 
            $("#AddPhoneDialog").modal("show");
        });
 
 
        $("#gwBlackPoolForm").ajaxForm({
            success: function(r) {
                if (r.OK) {
                    mytek.alert(r.Message, r.OK, function() {
                    $("#AddPhoneDialog").modal("hide");
                        loadPageList();
                    });
                } else {
                    mytek.alert(r.Message, r.False);
                }
            }
        });
 
        $(document).on("click", ".action-delete", function() {
            var id = $(this).data("id");
            mytek.confirm("是否确认删除该号码?", "删除后号码不在生效,请谨慎操作!", function(b) {
                if (b) {
                    $.post("GwTransfer.ashx", { action: "deleteMobile", mobileId: id }, function(r) {
                        mytek.alert(r.Message, r.OK, function() {
                            loadPageList();
                        });
                    });
                }
            });
        });
 
 
    });
    </script>
    <style>
        .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: 100%; display: inline-block; vertical-align: middle; }
        .mask span img { vertical-align: middle; }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="content" Runat="Server">
 
 
    <div class="modal inmodal fade" id="AddPhoneDialog" tabindex="-1" role="dialog" aria-hidden="false">
        <form name="gwBlackPoolForm" method="post" action="GwTransfer.ashx" id="gwBlackPoolForm"
        class="form-horizontal">
        <div class="modal-dialog form-horizontal">
            <div class="modal-content ">
                <input type="hidden" id="poolID" value="" name="poolID" />
                <div class="modal-header">
                    
                    <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-3">
                            手机号码</label>
                        <div class="col-sm-8">
                            <input type="text" name="telphone" id="telphone" value="" class="form-control" maxlength="12" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-sm-3">
                            运营商</label>
                        <div class="col-sm-4">
                            <select id="selectId" name="selectId" style="height:30px;">
                            <option selected value="中国移动" >中国移动</option>
                            <option value="中国联通">中国联通</option>
                            <option value="中国电信" >中国电信</option>
                            </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">
    <input type="text" style="display: none" />
    <div class="form-group">
        <div class="input-group m-b">
            <span class="input-group-addon">手机号码</span>
            <input id="qmobile" class="form-control" name="qmobile" 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" />&nbsp; &nbsp; 
            <input class="btn btn-warning action-modal-create" value="添加号码" type="button" />
        </div>
    </div>
    </form>
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="gwTransferTable">
            <thead>
                <tr class="header">
                    <th>
                        号码
                    </th>
                    <th>
                        运营商
                    </th>
                    <th class="col-md-3">
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="pagination">
    </div>
    <div class="form-group">
    </div>
    <div id="mask" class="mask">
        <span></span>
        <img src="img/spinning-circles.svg" alt="载入中..." />
    </div>
</asp:Content>