| | |
| | | |
| | | function loadPageList() { |
| | | var ClientID = $("#ClientID").val(); |
| | | var Company = $("#Company").val(); |
| | | var ClientName = $("#ClientName").val(); |
| | | var Telephone = $("#Telephone").val(); |
| | | var Agent = $("#Agent").val(); |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "loadGwClientPageList", ClientID: ClientID, ClientName: ClientName, Telephone: Telephone, Agent: Agent, pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") }, |
| | | data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") }, |
| | | success: function(result) { |
| | | if (result.OK) { |
| | | $("#gwclientTable tbody").html(result.Message.Table); |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //待推送账户产品-显示账户列表 |
| | | function loadClientList() { |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "loadGwClientAllPageList", pageSize: $("#clientProductPager").Pager("getPageSize"), pageIndex: $("#clientProductPager").Pager("getPageIndex") }, |
| | | success: function (result) { |
| | | if (result.OK) { |
| | | $("#gwclientProductTable tbody").html(result.Message.Table); |
| | | $("#clientProductPager").Pager("setTotalCount", result.Message.TotalCount); |
| | | } else { |
| | | mytek.alert(result.Message, result.OK); |
| | | } |
| | | } |
| | | }); |
| | | $("#clientProductDialog .modal-title").text("推送账户产品"); |
| | | $("#clientProductDialog input[name=action]").val("loadGwClientAllPageList"); |
| | | $("#clientProductDialog").modal("show"); |
| | | } |
| | | |
| | | //全选 |
| | | $("#checkAll").click(function () { |
| | | $("input[name='checkbox']").prop("checked", $(this).is(":checked")); |
| | | }); |
| | | |
| | | //保存待推送的账户 |
| | | $(document).on("click", ".action-client-save", 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 false; |
| | | } |
| | | |
| | | var product_id = $("#product_id").val(); |
| | | if (product_id == "") { |
| | | mytek.alert("请选择要分配的产品!", false); |
| | | return false; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: "GwClient.ashx", |
| | | type: "POST", |
| | | data: { action: "saveClientProduct", idArray: $.toJSON(idArray), product_id: product_id }, |
| | | success: function (result) { |
| | | if (r.OK) { |
| | | $("#clientProductDialog").modal("show"); |
| | | } |
| | | else { |
| | | mytek.alert(r.Message, r.OK); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | | function randomString(len) { |
| | | len = len || 32; |
| | |
| | | $("#clientDialog input").attr("readonly", false); |
| | | $("#clientDialog input[name=action]").val("save"); |
| | | $("#clientDialog").modal("show"); |
| | | }); |
| | | |
| | | //推送账户产品 |
| | | $(document).on("click", ".action-modal-client-product", function () { |
| | | loadClientList(); |
| | | }); |
| | | |
| | | $(document).on("click", ".action-generate-password", function() { |
| | |
| | | </form> |
| | | </div> |
| | | |
| | | <!--推送账户产品面板 --> |
| | | <div class="modal inmodal fade" id="clientProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> |
| | | <form name="clientProductForm" method="post" action="gwclient.ashx" id="clientProductForm" class="form-horizontal"> |
| | | <div class="modal-dialog modal-lg"> |
| | | <div class="modal-content "> |
| | | <input name="action" value="client-product" type="hidden" /> |
| | | <div class="modal-header"> |
| | | <button type="button" class="close" data-dismiss="modal"> |
| | | <span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| | | <h4 class="modal-title"> |
| | | 推送账户产品 |
| | | </h4> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-4 control-label"> |
| | | 选择产品</label> |
| | | <div class="col-sm-6 input-group"> |
| | | <select class="form-control" name="product_id" id="product_id"> |
| | | <%=GetGwProductOptionsAll() %> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="table-responsive"> |
| | | <table class="table table-striped table-bordered table-hover" id="gwclientProductTable"> |
| | | <thead> |
| | | <tr class="header"> |
| | | <th> |
| | | <input type='checkbox' name='checkAll' id='checkAll' /> |
| | | </th> |
| | | <th> |
| | | 客户账号 |
| | | </th> |
| | | <th>公司名称</th> |
| | | <th> |
| | | 联系人 |
| | | </th> |
| | | <th> |
| | | 联系电话 |
| | | </th> |
| | | <th> |
| | | 累计充值 |
| | | </th> |
| | | |
| | | <th> |
| | | 业务员 |
| | | </th> |
| | | <th> |
| | | 认证状态 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | </tbody> |
| | | |
| | | </table> |
| | | </div> |
| | | <div id="clientProductPager"> |
| | | </div> |
| | | |
| | | <div class="modal-footer"> |
| | | <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> |
| | | 取消</button> |
| | | <button class="btn btn-primary action-client-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"> |
| | |
| | | </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-success action-modal-create" value="创建客户" type="button" /> |
| | | <input type="button" value="查询" class="btn btn-primary action-query" /> |
| | | <input class="btn btn-success action-modal-create" value="创建客户" type="button" /> |
| | | <input class="btn btn-success action-modal-client-product" value="推送账户产品" type="button" /> |
| | | </div> |
| | | |
| | | </div> |