<%@ 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>
|
<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" />
|
<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>
|