From 374ce4ffd0c459bb4067e8d5765f972668aff9b1 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期四, 02 三月 2023 14:56:23 +0800 Subject: [PATCH] 变更oracle访问组件 --- web/web/GwClient.aspx | 958 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 808 insertions(+), 150 deletions(-) diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx index 7218cb1..b9deaa8 100644 --- a/web/web/GwClient.aspx +++ b/web/web/GwClient.aspx @@ -1,162 +1,530 @@ 锘�<%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="GwClient.aspx.cs" Inherits="_GwClient" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> + <script type="text/javascript" src="/web/js/jquery.min.js?v=2.1.4"></script> <%--<link href="css/plugins/bootstrap-fileinput/fileinput.min.css" rel="stylesheet"/> <script src="js/plugins/bootstrap-fileinput/fileinput.min.js" type="text/javascript"></script>--%> - <script> - $(function () { + <script type="text/javascript"> + $(document).ready(function () { + $("textarea").numberedtextarea(); - $("#pager").Pager({ - pageSize: 20, - onChange: function (pageIndex, pageSize) { - loadPageList(); + //鍏ㄩ�� + $("#checkAll").click(function () { + $("input[name='checkbox']").prop("checked", $(this).is(":checked")); + }); + + $(document).on("click", ".action-query", function () { + loadPageList(); + }); + loadPageList(); + + $(document).on("click", ".action-modal-create", function () { + $("#clientDialog .modal-title").text("鍒涘缓瀹㈡埛淇℃伅"); + $("#clientDialog input").attr("readonly", false); + $("#clientDialog input[name=action]").val("save"); + + //$("#clientDialog #id").val(""); + $("#clientDialog #clientID").val(""); + $("#clientDialog #company").val(""); + $("#clientDialog #clientName").val(""); + $("#clientDialog #agent").val(""); + $("#clientDialog #address").val(""); + $("#clientDialog #telephone").val(""); + $("#clientDialog #chargeType").val(""); + $("#clientDialog #smsStatusReport").val(""); + $("#clientDialog #mmsStatusReport").val(""); + $("#clientDialog #customerManager").val(""); + $("#clientDialog #salesman").val(""); + $("#clientDialog #supportStaff").val(""); + $("#clientDialog #financialStaff").val(""); + $("#clientDialog #remark").val(""); + $("#clientDialog input[name=permissionData]").iCheck("uncheck"); + + $("#clientDialog input[name=isEnableWhite][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isEnableBlack][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isRemoteLoginNotice][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isMobileCaptcha][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isHideMobile][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isDisplayStatus][value='" + 0 + "']").iCheck("check"); + $("#clientDialog input[name=isLoginIpRestrict][value='" + 0 + "']").iCheck("check"); + + $("#clientDialog #isLoginIpAllowGather").val(""); + $("#clientDialog input[name=isLoginCityRestrict][value='" + 0 + "']").iCheck("check"); + $("#clientDialog #isLoginCityAllowGather").val(""); + + $("#clientDialog").modal("show"); + + //鍒锋柊涓�娆¢殢鏈哄瘑鐮� + $("#password").val(randomString(8)); + + $(".pwdCss").show(); + + }); + + //缂栬緫 + $(document).on("click", ".action-modal-edit", function () { + $("#clientDialog .modal-title").text("淇敼瀹㈡埛璧勬枡"); + $("#clientDialog input[name=action]").val("update"); + var id = $(this).data("id"); + $.get("gwclient.ashx?action=get", { clientID: id }, function (r) { + if (r.OK) { + try { + $("#clientDialog #id").val(r.Message.Id); + $("#clientDialog #clientID").val(r.Message.ClientID); + $("#clientDialog #company").val(r.Message.Company); + //$("#clientDialog #password").val(r.Message.Password); + $("#clientDialog #password").val(""); + //缂栬緫鏃跺瘑鐮佹闅愯棌 + $(".pwdCss").hide(); + + $("#clientDialog #clientName").val(r.Message.ClientName); + $("#clientDialog #agent").val(r.Message.Agent); + $("#clientDialog #address").val(r.Message.Address); + $("#clientDialog #telephone").val(r.Message.Telephone); + $("#clientDialog #chargeType").val(r.Message.ChargeType); + $("#clientDialog #smsStatusReport").val(r.Message.SmsStatusReport); + $("#clientDialog #mmsStatusReport").val(r.Message.MmsStatusReport); + $("#clientDialog #customerManager").val(r.Message.CustomerManager); + $("#clientDialog #salesman").val(r.Message.Salesman); + $("#clientDialog #supportStaff").val(r.Message.SupportStaff); + $("#clientDialog #financialStaff").val(r.Message.FinancialStaff); + $("#clientDialog #remark").val(r.Message.Remark); + var permissionData = $.evalJSON(r.Message.PermissionData); + $("#clientDialog input[name=permissionData]").iCheck("uncheck"); + $.each(permissionData, function (i) { + $("#clientDialog input[name=permissionData][value='" + this + "']").iCheck("check"); + }); + + //$("#clientDialog #isEnableWhite").val(r.Message.IsEnableWhite); + $("#clientDialog input[name=isEnableWhite]").iCheck("uncheck"); + $("#clientDialog input[name=isEnableWhite][value='" + r.Message.IsEnableWhite + "']").iCheck("check"); + + //$("#clientDialog #isEnableBlack").val(r.Message.IsEnableBlack); + $("#clientDialog input[name=isEnableBlack]").iCheck("uncheck"); + $("#clientDialog input[name=isEnableBlack][value='" + r.Message.IsEnableBlack + "']").iCheck("check"); + //$("#clientDialog #isRemoteLoginNotice").val(r.Message.IsRemoteLoginNotice); + $("#clientDialog input[name=isRemoteLoginNotice]").iCheck("uncheck"); + $("#clientDialog input[name=isRemoteLoginNotice][value='" + r.Message.IsRemoteLoginNotice + "']").iCheck("check"); + //$("#clientDialog #isMobileCaptcha").val(r.Message.IsMobileCaptcha); + $("#clientDialog input[name=isMobileCaptcha]").iCheck("uncheck"); + $("#clientDialog input[name=isMobileCaptcha][value='" + r.Message.IsMobileCaptcha + "']").iCheck("check"); + //$("#clientDialog #isHideMobile").val(r.Message.IsHideMobile); + $("#clientDialog input[name=isHideMobile]").iCheck("uncheck"); + $("#clientDialog input[name=isHideMobile][value='" + r.Message.IsHideMobile + "']").iCheck("check"); + //$("#clientDialog #isDisplayStatus").val(r.Message.IsDisplayStatus); + $("#clientDialog input[name=isDisplayStatus]").iCheck("uncheck"); + $("#clientDialog input[name=isDisplayStatus][value='" + r.Message.IsDisplayStatus + "']").iCheck("check"); + //$("#clientDialog #isLoginIpRestrict").val(r.Message.IsLoginIpRestrict); + $("#clientDialog input[name=isLoginIpRestrict]").iCheck("uncheck"); + $("#clientDialog input[name=isLoginIpRestrict][value='" + r.Message.IsLoginIpRestrict + "']").iCheck("check"); + + $("#clientDialog #isLoginIpAllowGather").val(r.Message.IsLoginIpAllowGather); + //$("#clientDialog #isLoginCityRestrict").val(r.Message.IsLoginCityRestrict); + $("#clientDialog input[name=isLoginCityRestrict]").iCheck("uncheck"); + $("#clientDialog input[name=isLoginCityRestrict][value='" + r.Message.IsLoginCityRestrict + "']").iCheck("check"); + $("#clientDialog #isLoginCityAllowGather").val(r.Message.IsLoginCityAllowGather); + } + catch (e) { + } + + $("#clientDialog").modal("show"); + } + else { + mytek.alert(r.Message, r.OK); + } + }, "json"); + }); + + //鍏嶅瘑鐧诲綍 + $(document).on("click", ".action-modal-login", function () { + var url = $(this).data("url"); + var id = $(this).data("id"); + + var milliseconds = new Date().getTime(); //鑾峰緱褰撳墠鏃堕棿鐨勬绉掑�� + url += "&t=" + milliseconds; + //console.log(url); + window.open(url, "_blank"); + + + }); + + //榛戝悕鍗� + $(document).on("click", ".action-modal-black", function () { + var id = $(this).data("id"); + $.get("gwclient.ashx?action=getBlack", { clientID: id }, function (r) { + if (r.OK) { + $("#blackDialog input[name='clientID']").val(id); + $("#blackDialog textarea").val(r.Message); + $("#blackDialog").modal("show"); + } + else { + mytek.alert(r.Message, r.OK); + } + }, "json"); + }); + + //鐧藉悕鍗� + $(document).on("click", ".action-modal-white", function () { + var id = $(this).data("id"); + $.get("gwclient.ashx?action=getWhite", { clientID: id }, function (r) { + if (r.OK) { + $("#whiteDialog input[name='clientID']").val(id); + $("#whiteDialog textarea").val(r.Message); + $("#whiteDialog").modal("show"); + } + else { + mytek.alert(r.Message, r.OK); + } + }, "json"); + }); + + //闈㈡澘椤垫彁浜わ細闅愯棌闈㈡澘锛堢櫧鍚嶅崟锛岄粦鍚嶅崟锛屼慨鏀瑰瘑鐮侊級 + $("#blackForm, #whiteForm").ajaxForm({ + success: function (r) { + mytek.alert(r.Message, r.OK, function () { + $("#whiteDialog, #blackDialog").modal("hide"); + }); } }); - function loadPageList() { - var ClientID = $("#ClientID").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") }, - success: function (result) { - if (result.OK) { - $("#gwclientTable tbody").html(result.Message.Table); - $("#pager").Pager("setTotalCount", result.Message.TotalCount); - } else { - mytek.alert(result.Message, result.OK); - } - } - }); - } - - function randomString(len) { - len = len || 32; - var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****榛樿鍘绘帀浜嗗鏄撴贩娣嗙殑瀛楃oOLl,9gq,Vv,Uu,I1****/ - var maxPos = $chars.length; - var pwd = ''; - for (i = 0; i < len; i++) { - pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); + //闈㈡澘椤垫彁浜わ細閲嶆柊鍔犺浇鍒楄〃 + $("#clientForm, #updatePwdForm").ajaxForm({ + success: function (r) { + mytek.alert(r.Message, r.OK, function () { + r.OK && (window.location.reload()); + }); } - return pwd; - } + }); - $(document).ready(function () { - $("textarea").numberedtextarea(); + //淇敼瀵嗙爜锛氭墦寮�鐣岄潰 + $(document).on("click", ".action-modal-updatePwd", function () { + //$("#updatePwdDialog .modal-title").text("淇敼瀹㈡埛璧勬枡"); + $("#updatePwdDialog input[name=action]").val("updatePwd"); + var id = $(this).data("id"); - $(document).on("click", ".action-query", function () { - loadPageList(); - }); - loadPageList(); + $("#updatePwdDialog input[name='clientID']").val(id); + $("#updatePwdDialog #newPwd").val(""); - $(document).on("click", ".action-modal-create", function () { - $("#clientDialog .modal-title").text("鍒涘缓瀹㈡埛璐︽埛"); - $("#clientDialog input").attr("readonly", false); - $("#clientDialog input[name=action]").val("save"); - $("#clientDialog").modal("show"); - }); + $("#updatePwdDialog").modal("show"); - $(document).on("click", ".action-generate-password", function () { - $("#password").val(randomString(8)); - }); + }); - $(document).on("click", ".action-modal-edit", function () { - $("#clientDialog .modal-title").text("淇敼瀹㈡埛璧勬枡"); - $("#clientDialog input[name=action]").val("update"); - var id = $(this).data("id"); - $.get("gwclient.ashx?action=get", { clientID: id }, function (r) { - if (r.OK) { - try { - $("#clientDialog #id").val(r.Message.Id); - $("#clientDialog #clientID").val(r.Message.ClientID); - $("#clientDialog #company").val(r.Message.Company); - $("#clientDialog #password").val(r.Message.Password); - $("#clientDialog #clientName").val(r.Message.ClientName); - $("#clientDialog #agent").val(r.Message.Agent); - $("#clientDialog #address").val(r.Message.Address); - $("#clientDialog #telephone").val(r.Message.Telephone); - $("#clientDialog #remark").val(r.Message.Remark); - var permissionData = $.evalJSON(r.Message.PermissionData); - $("#clientDialog input[name=permissionData]").iCheck("uncheck"); - $.each(permissionData, function (i) { - $("#clientDialog input[name=permissionData][value='" + this + "']").iCheck("check"); - }); - } - catch (e) { - } + //淇敼鍒嗛厤涓�т骇鍝侊細鏄剧ず瀹㈡埛瀵瑰簲鐨勫垎閰嶄釜鎬т骇鍝� + $(document).on("click", ".action-modal-updateProduct", function () { + var clientId = $(this).data("id"); + $.get("GwClient.ashx", { action: "getPersonalityProduct", clientId: clientId }, function (result) { + if (!result.OK) { + mytek.alert(result.Message, result.OK); + } + else { + $("#updateProductDialog input[name='clientID']").val(clientId); + $("#updateProductDialog #_ProductId").prop("checked", false); + $.each(result.Message, function (i) { + $("#updateProductDialog #_ProductId[value='" + this + "']").prop("checked", true); + }); + } + $("#updateProductDialog").modal("show"); + }, "json"); + }); - $("#clientDialog").modal("show"); - } - else { - mytek.alert(r.Message, r.OK); - } - }, "json"); - }); - - $(document).on("click", ".action-modal-black", function () { - var id = $(this).data("id"); - $.get("gwclient.ashx?action=getBlack", { clientID: id }, function (r) { - if (r.OK) { - $("#blackDialog input[name='clientID']").val(id); - $("#blackDialog textarea").val(r.Message); - $("#blackDialog").modal("show"); - } - else { - mytek.alert(r.Message, r.OK); - } - }, "json"); - }); - - $(document).on("click", ".action-modal-white", function () { - var id = $(this).data("id"); - $.get("gwclient.ashx?action=getWhite", { clientID: id }, function (r) { - if (r.OK) { - $("#whiteDialog input[name='clientID']").val(id); - $("#whiteDialog textarea").val(r.Message); - $("#whiteDialog").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("gwclient.ashx", { action: "delete", clientID: id }, function (r) { - mytek.alert(r.Message, r.OK, function () { - window.location.reload(); - }); - }); + //淇敼鍒嗛厤涓�т骇鍝侊細淇敼纭 + $(document).on("click", ".action-updateProduct", function () { + var productIdArray = []; + //mytek.confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵", "纭鍒嗛厤涓�т骇鍝侊紝璇疯皑鎱庢搷浣滐紒", function (b) { + //if (b) { + if (confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵") == true) { + $("#updateProductDialog #_ProductId").each(function () { + if ($(this).is(":checked")) { + productIdArray.push($(this).val()); } }); - }); - $("#blackForm,#whiteForm").ajaxForm({ - success: function (r) { - mytek.alert(r.Message, r.OK, function () { - $("#whiteDialog,#blackDialog").modal("hide"); + //var clientId = $("#updateProductDialog").data("id"); + var clientId = $("#updateProductDialog input[name='clientID']").val(); + $.ajax({ + url: "GwClient.ashx", + type: "POST", + data: { action: "updateProduct", clientId: clientId, productIdArray: $.toJSON(productIdArray) }, + success: function (result) { + if (result.OK) { + $("#updateProductDialog").modal("hide"); + loadPageList(); + } else { + mytek.alert(result.Message, result.OK); + } + } + }); + + //swal.close(); + //} + //}); + } + }); + + + //鍏呭�� + $(document).on("click", ".action-modal-orderCreate", function () { + var clientId = $(this).data("id"); //瀹㈡埛璐﹀彿 + //window.open("gwOrderCreate.aspx?spId=" + spID, 'gwOrderCreate'); + window.location.href = "gwOrderCreate.aspx?clientId=" + clientId; + }); + + //鍏呭�兼棩蹇� + $(document).on("click", ".action-modal-orderLog", function () { + var clientId = $(this).data("id"); + window.location.href = "GwOrderList.aspx?clientId=" + clientId + ""; + }); + + //鍚敤鎴栧仠鐢� + $(document).on("click", ".action-modal-updateStatus", function () { + //data鐨勫睘鎬у弬鏁颁笉鑳藉惈鏈夊ぇ鍐欏瓧姣嶃�� + var clientId = $(this).data("id"); + var isEnable = $(this).data("status"); + var statusMsg = ""; + if (isEnable == 0) { + statusMsg = "銆愬仠鐢ㄣ��"; + } + else { + statusMsg = "銆愬惎鐢ㄣ��"; + } + mytek.confirm("鏄惁闇�瑕�" + statusMsg + "璇ヤ俊鎭紵", "纭鏇存柊淇℃伅鐘舵�侊紝璇疯皑鎱庢搷浣滐紒", function (b) { + if (b) { + $.post("gwclient.ashx", { "action": "updateStatus", clientId: clientId, isEnable: isEnable }, function (r) { + mytek.alert(r.Message, r.OK, function () { + loadPageList(); + }); }); } }); + }); - $("#clientForm").ajaxForm({ - success: function (r) { - mytek.alert(r.Message, r.OK, function () { - r.OK && (window.location.reload()); + //鍒犻櫎 + $(document).on("click", ".action-delete", function () { + var id = $(this).data("id"); + mytek.confirm("鏄惁闇�瑕佸垹闄よ瀹㈡埛锛�", "瀹㈡埛鍒犻櫎鍚庡皢鏃犳硶鎭㈠锛岃璋ㄦ厧鎿嶄綔锛�", function (b) { + if (b) { + $.post("gwclient.ashx", { action: "delete", clientID: id }, function (r) { + mytek.alert(r.Message, r.OK, function () { + window.location.reload(); + }); }); } }); - }) + }); + + /** + //閲嶇疆瀵嗙爜 + $(document).on("click", ".action-modal-resetPwd", function () { + var id = $(this).data("id"); + mytek.confirm("閲嶇疆瀵嗙爜锛�", "鏄惁閲嶇疆瀵嗙爜锛熻璋ㄦ厧鎿嶄綔锛�", function (b) { + if (b) { + $.post("gwclient.ashx", { action: "resetPwd", clientID: id }, function (r) { + mytek.alert(r.Message, r.OK, function () { + window.location.reload(); + }); + }); + } + }); + }); + **/ + + }) + $("#pager").Pager({ + pageSize: 20, + onChange: function (pageIndex, pageSize) { + loadPageList(); + } + }); + + function loadPageList() { + var ClientID = $("#ClientID").val(); + var Company = $("#Company").val(); + var ClientName = $("#ClientName").val(); + var Telephone = $("#Telephone").val(); + //var Agent = $("#Agent").val(); + var Agent = ""; + var Salesman = $("#Salesman").val(); + var SupportStaff = $("#SupportStaff").val(); + var ProductId = $("#ProductId").val(); + var IsEnable = <%=IsEnable%>; + $.ajax({ + url: "GwClient.ashx", + type: "POST", + data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, SupportStaff: SupportStaff, ProductId: ProductId, IsEnable: IsEnable , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") }, + success: function (result) { + if (result.OK) { + $("#gwclientTable tbody").html(result.Message.Table); + $("#pager").Pager("setTotalCount", result.Message.TotalCount); + } else { + mytek.alert(result.Message, result.OK); + } + } + }); + } + + function randomString(len) { + len = len || 32; + var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****榛樿鍘绘帀浜嗗鏄撴贩娣嗙殑瀛楃oOLl,9gq,Vv,Uu,I1****/ + var maxPos = $chars.length; + var pwd = ''; + for (i = 0; i < len; i++) { + pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); + } + return pwd; + } + + + + + + //鎵归噺鍒嗛厤涓�т骇鍝�:鎵撳紑鐣岄潰 + $(document).on("click", ".action-modal-setProduct", 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; + } + + $("#selected-op-box").text(idArray.join(",")); + + $("#setProductDialog").modal("show"); + }); + + //鎵归噺鍒嗛厤瀹㈡埛涓�т骇鍝�--纭淇敼 + $(document).on("click", ".action-update-setProduct", 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; + } + + var productId = $("#productId").val(); + + $.ajax({ + url: "GwClient.ashx", + method: "POST", + data: { idArray: $.toJSON(idArray), productId: productId, action: "batchUpdateClientProduct" }, + success: function (result) { + mytek.alert(result.Message, result.OK, function () { + $("#setProductDialog #productId").val(""); + $("#setProductDialog").modal("hide"); + loadPageList(); + }); + } + }); + }); + + //瀵煎嚭鏁版嵁 + $(document).on("click", ".action-export", function () { + var ClientID = $("#ClientID").val(); + var Company = $("#Company").val(); + var ClientName = $("#ClientName").val(); + var Telephone = $("#Telephone").val(); + //var Agent = $("#Agent").val(); + var Agent = ""; + var Salesman = $("#Salesman").val(); + var SupportStaff = $("#SupportStaff").val(); + var ProductId = $("#ProductId").val(); + var IsEnable = <%=IsEnable%>; + var url = "ExportDocument.aspx?action=exportGwClient&ClientID=" + ClientID + "&Company=" + Company + "&ClientName=" + ClientName + "&Telephone=" + Telephone + "&Agent=" + Agent + "&Salesman=" + Salesman + "&SupportStaff=" + SupportStaff + "&ProductId=" + ProductId + "&IsEnable=" + IsEnable + ""; + + window.location.href = url; + }); + + + //娣诲姞瀹㈡埛锛氱敓鎴愬瘑鐮� + $(document).on("click", ".action-generate-password", function () { + $("#password").val(randomString(8)); + }); + + //娣诲姞瀹㈡埛锛氬鍒跺瘑鐮� + $(document).on("click", ".action-copyPwd", function () { + var value = $("#password").val(); + if (value == "") { + mytek.alert("璇风敓鎴愬瘑鐮侊紒"); + return false; + } + // for ie + if (window.clipboardData) { + window.clipboardData.clearData(); + window.clipboardData.setData('text', value); + } + // for modern browser + else if (document.execCommand) { + var element = document.createElement('SPAN'); + element.textContent = value; + document.body.appendChild(element); + if (document.selection) { + var range = document.body.createTextRange(); + range.moveToElementText(element); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNode(element); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + document.execCommand('copy'); + element.remove ? element.remove() : element.removeNode(true); + } + mytek.alert("澶嶅埗鎴愬姛锛�", true); }); + + //淇敼瀵嗙爜锛氱敓鎴愬瘑鐮� + $(document).on("click", ".action-generate-newPwd", function () { + $("#newPwd").val(randomString(8)); + }); + + //淇敼瀵嗙爜锛氬鍒跺瘑鐮� + $(document).on("click", ".action-copyNewPwd", function () { + var value = $("#newPwd").val(); + if (value == "") { + mytek.alert("璇风敓鎴愬瘑鐮侊紒"); + return false; + } + + // for ie + if (window.clipboardData) { + window.clipboardData.clearData(); + window.clipboardData.setData('text', value); + } + // for modern browser + else if (document.execCommand) { + var element = document.createElement('SPAN'); + element.textContent = value; + document.body.appendChild(element); + if (document.selection) { + var range = document.body.createTextRange(); + range.moveToElementText(element); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNode(element); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + document.execCommand('copy'); + element.remove ? element.remove() : element.removeNode(true); + } + mytek.alert("澶嶅埗鎴愬姛锛�", false); + + }); + </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="title" runat="Server">瀹㈡埛淇℃伅</asp:Content> @@ -222,7 +590,47 @@ </form> </div> - <!--鍒涘缓瀹㈡埛璐︽埛闈㈡澘 --> + <!--閲嶇疆瀵嗙爜鎴栦慨鏀瑰瘑鐮� --> + <div class="modal inmodal fade" id="updatePwdDialog" tabindex="-1" role="dialog" aria-hidden="true"> + <form name="updatePwdForm" method="post" action="gwclient.ashx?action=updatePwd" id="updatePwdForm" + class="form-horizontal"> + <div class="modal-dialog modal-lg"> + <div class="modal-content "> + <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="modal-body"> + <input type="hidden" value="" name="clientID" /> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鐧诲綍瀵嗙爜 <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <input type="password" name="newPwd" id="newPwd" value="" class="form-control" /> + </div> + <div class="col-sm-6"> + <a class="btn btn-xs btn-primary action-generate-newPwd ">鐢熸垚瀵嗙爜</a> + <a class="btn btn-xs btn-success action-copyNewPwd " >澶嶅埗瀵嗙爜</a> + </div> + </div> + </div> + <div class="modal-footer"> + <button class="btn btn-warning" data-dismiss="modal" aria-hidden="true"> + 鍙栨秷</button> + <button class="btn btn-primary action-save"> + 淇濆瓨</button> + </div> + </div> + </div> + </form> + </div> + + + <!--鍒涘缓瀹㈡埛淇℃伅闈㈡澘 --> <div class="modal inmodal fade" id="clientDialog" tabindex="-1" role="dialog" aria-hidden="true"> <form name="clientForm" method="post" action="gwclient.ashx" id="clientForm" class="form-horizontal"> <div class="modal-dialog modal-lg"> @@ -230,7 +638,7 @@ <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 class="modal-title">鍒涘缓/淇敼瀹㈡埛淇℃伅 </h4> <input name="action" value="add" type="hidden" /> <input name="id" id="id" type="hidden" value="" /> @@ -238,7 +646,7 @@ <div class="modal-body"> <div class="form-group"> <label class="control-label col-sm-2"> - 鐧诲綍璐︽埛 + 鐧诲綍璐︽埛 <span style="color:red">*</span> </label> <div class="col-sm-4"> <input type="text" name="clientID" id="clientID" value="" class="form-control" /> @@ -248,7 +656,7 @@ <div class="form-group"> <label class="control-label col-sm-2"> - 鍏徃鍚嶇О(鍏ㄧО) + 鍏徃鍚嶇О锛堝叏绉帮級 <span style="color:red">*</span> </label> <div class="col-sm-4"> <input type="text" name="company" id="company" value="" class="form-control" /> @@ -257,27 +665,29 @@ </div> - <div class="form-group"> + <div class="form-group pwdCss"> <label class="control-label col-sm-2"> - 鐧诲綍瀵嗙爜 + 鐧诲綍瀵嗙爜 <span style="color:red">*</span> </label> <div class="col-sm-4"> - <input type="text" name="password" id="password" value="123456" class="form-control" /> + <input type="password" name="password" id="password" value="123456" class="form-control" /> </div> <div class="col-sm-6"> <a class="btn btn-xs btn-primary action-generate-password ">鐢熸垚瀵嗙爜</a> + <a class="btn btn-xs btn-success action-copyPwd " >澶嶅埗瀵嗙爜</a> </div> </div> <div class="form-group"> <label class="control-label col-sm-2"> - 鑱旂郴浜�</label> + 鑱旂郴浜� <span style="color:red">*</span> + </label> <div class="col-sm-4"> <input type="text" name="clientName" id="clientName" value="" class="form-control" /> </div> </div> <div class="form-group "> <label class="control-label col-sm-2"> - 鑱旂郴鐢佃瘽 + 鑱旂郴鐢佃瘽 <span style="color:red">*</span> </label> <div class="col-sm-4"> <input type="text" name="telephone" id="telephone" value="" class="form-control" /> @@ -293,10 +703,67 @@ </div> <div class="form-group"> <label class="control-label col-sm-2"> - 褰掑睘涓氬姟鍛� + 缁撹垂鏂瑰紡 <span style="color:red">*</span> </label> <div class="col-sm-4"> - <input type="text" name="agent" id="agent" value="" class="form-control" /> + <select name="chargeType" id="chargeType" class="form-control"> + <option value="" ></option> + <option value="1" >棰勪粯璐�</option> + <option value="2" >鍚庝粯璐�</option> + </select> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鐭俊鏄惁鏄剧ず鐘舵�佹姤鍛� <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <select name="smsStatusReport" id="smsStatusReport" class="form-control"> + <option value="0" >涓嶆樉绀�</option> + <%--<option value="1" >鍙樉绀烘彁浜ゅけ璐ヤ负鍙戦�佸け璐ョ姸鎬�</option>--%> + <option value="2" >鏄剧ず</option> + </select> + </div> + </div> + + <div class="form-group"> + <label class="control-label col-sm-2"> + 褰掑睘瀹㈡埛缁忕悊 <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <select name="customerManager" id="customerManager" class="form-control"> + <%=customerManagerOptions(0)%> + </select> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 褰掑睘涓氬姟鍛� <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <select name="salesman" id="salesman" class="form-control"> + <%=salesmanOptions(0)%> + </select> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 褰掑睘瀹㈡湇浜哄憳 <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <select name="supportStaff" id="supportStaff" class="form-control"> + <%=supportStaffOptions(0)%> + </select> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 褰掑睘璐㈠姟浜哄憳 <span style="color:red">*</span> + </label> + <div class="col-sm-4"> + <select name="financialStaff" id="financialStaff" class="form-control"> + <%=financialStaffOptions(0)%> + </select> </div> </div> <div class="form-group"> @@ -305,16 +772,112 @@ <input type="file" name="txt_file" id="txt_file" class="file-loading" /> </div> </div> - + <!-- <div class="form-group"> <label class="control-label col-sm-2"> 鏉冮檺绠$悊 </label> <div class="col-sm-10"> <input type="checkbox" class="icheck-me" value="GwClientList.aspx" name="permissionData" />浠g悊鍟嗙鐞�(*鏄惁鏀寔鍒涘缓涓嬬骇浠g悊) + <!//-- <input type="checkbox" class="icheck-me" value="LgSmsDetailReport.aspx" name="permissionData" />鏌ョ湅鐘舵�佹姤鍛� <input type="checkbox" class="icheck-me" value="1" name="permissionData" />鍙戦�佹潈闄� <input type="checkbox" class="icheck-me" value="2" name="permissionData" />鏌ョ湅鏁版嵁鏉冮檺 + --//> + </div> + </div> + --> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鍚敤鐧藉悕鍗� + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isEnableWhite" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isEnableWhite" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鍚敤榛戝悕鍗� + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isEnableBlack" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isEnableBlack" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁寮傚湴鐧诲綍閫氱煡 + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isRemoteLoginNotice" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isRemoteLoginNotice" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鍚敤鎵嬫満楠岃瘉鐮� + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isMobileCaptcha" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isMobileCaptcha" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁闅愯棌瀹㈡埛绔墜鏈哄彿 + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isHideMobile" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isHideMobile" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鏄剧ず鐘舵�佹帴鍙� + </label> + <div class="col-sm-8"> + <input type="radio" class="icheck-me" name="isDisplayStatus" value="0" checked="checked" /><label>涓嶆樉绀�</label> + <input type="radio" class="icheck-me" name="isDisplayStatus" value="1" /><label>鍙樉绀烘彁浜ゅけ璐ヤ负鍙戦�佸け璐ョ姸鎬�</label> + <input type="radio" class="icheck-me" name="isDisplayStatus" value="2" /><label>鏄剧ず鍏ㄩ儴鐘舵�佺姸鎬�</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鍚敤鐧诲綍IP闄愬埗 + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isLoginIpRestrict" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isLoginIpRestrict" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鐧诲綍IP鍏佽闆嗗悎 + </label> + <div class="col-sm-4"> + <textarea class="form-control" name="isLoginIpAllowGather" id="isLoginIpAllowGather" rows="4" ></textarea> + <!--<span class="help-block m-b-none">閰嶅悎鏄惁鍚敤鐧诲綍IP闄愬埗涓�璧蜂娇鐢紝澶氫釜闄愬埗IP鏃讹紝鎸夊崐瑙掗�楀彿","鍒嗛殧銆傚彲浣跨敤IP娈碉紝濡傦細202.203.1.*銆�</span>--> + <span class="help-block m-b-none">閰嶅悎鏄惁鍚敤鐧诲綍IP闄愬埗涓�璧蜂娇鐢紝澶氫釜闄愬埗IP鏃讹紝姣忎竴琛屼负1涓狪P銆傚彲浣跨敤IP娈碉紝濡傦細202.203.1.*銆�</span> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鏄惁鍚敤鐧诲綍鍦板尯锛堝煄甯傦級闄愬埗 + </label> + <div class="col-sm-4"> + <input type="radio" class="icheck-me" name="isLoginCityRestrict" value="0" checked="checked" /><label>绂佺敤</label> + <input type="radio" class="icheck-me" name="isLoginCityRestrict" value="1" /><label>鍚敤</label> + </div> + </div> + <div class="form-group"> + <label class="control-label col-sm-2"> + 鐧诲綍鍦板尯锛堝煄甯傦級鍏佽闆嗗悎 + </label> + <div class="col-sm-4"> + <textarea class="form-control" name="isLoginCityAllowGather" id="isLoginCityAllowGather" rows="4" ></textarea> + <!--<span class="help-block m-b-none">閰嶅悎鏄惁鍚敤鐧诲綍鍩庡競闄愬埗涓�璧蜂娇鐢紝澶氫釜闄愬埗鍦板尯鏃讹紝鎸夊崐瑙掗�楀彿","鍒嗛殧銆� </span>--> + <span class="help-block m-b-none">閰嶅悎鏄惁鍚敤鐧诲綍鍩庡競闄愬埗涓�璧蜂娇鐢紝澶氫釜闄愬埗鍦板尯鏃讹紝姣忎竴琛屼负1涓湴鍖猴紙鍩庡競锛夈�� </span> </div> </div> <div class="form-group"> @@ -337,10 +900,11 @@ </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> + <span class="input-group-addon">瀹㈡埛璐︽埛</span> <input type="text" name="ClientID" id="ClientID" class="form-control" /> </div> </div> @@ -364,38 +928,75 @@ </div> <div class="form-group"> <div class="input-group m-b"> - <span class="input-group-addon">涓氬姟鍛�</span> - <input type="text" name="Agent" id="Agent" class="form-control" style="width: 100px" /> + <span class="input-group-addon">褰掑睘涓氬姟鍛�</span> + <select name="Salesman" id="Salesman" class="form-control"> + <%=salesmanOptions(-1)%> + </select> + </div> + </div> + <div class="form-group"> + <div class="input-group m-b"> + <span class="input-group-addon">褰掑睘瀹㈡湇浜哄憳</span> + <select name="SupportStaff" id="SupportStaff" class="form-control"> + <%=supportStaffOptions(-1)%> + </select> + </div> + </div> + <div class="form-group"> + <div class="input-group m-b"> + <span class="input-group-addon">宸插垎閰嶆縺娲讳骇鍝�</span> + <select name="ProductId" id="ProductId" class="form-control"> + <%=GetProductOptions("")%> + </select> </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-success action-modal-create" value="鍒涘缓瀹㈡埛" type="button" /> + + <% if(IsEnable==1) { %> + <input class="btn btn-success action-modal-create" value="鍒涘缓瀹㈡埛" type="button" />  + <%} %> </div> </div> </form> + <!-- 鍒楄〃 --> <div class="table-responsive"> - <table class="table table-striped table-bordered table-hover" id="gwclientTable"> + <% if(IsEnable==1) { %> + <input class="btn btn-danger action-modal-setProduct" value="鎵归噺鍒嗛厤涓�т骇鍝�" type="button" /> + <%} %> + <input class="btn btn-info action-export" value="瀵煎嚭鏁版嵁" type="button" /> + <table class="table table-striped table-bordered table-hover" id="gwclientTable" style="margin:10px 0 0 0;"> <thead> <tr class="header"> - <th>瀹㈡埛璐﹀彿 + <th> + <input type='checkbox' name='checkAll' id='checkAll' /> + </th> + <th>瀹㈡埛璐︽埛 </th> <th>鍏徃鍚嶇О</th> <th>鑱旂郴浜� </th> <th>鑱旂郴鐢佃瘽 </th> - <th>璐︽埛浣欓 + <th>璐︽埛浣欓(鍏�) </th> - <th>绱鍏呭�� + <th>绱鍏呭��(鍏�) </th> <th>涓氬姟鍛� </th> + + <th>宸插垎閰嶄釜鎬т骇鍝�(澶氫釜鎸夆��,鈥濆垎闅�) + </th> + <!-- <th>璁よ瘉鐘舵�� + </th> + --> + + <th>鐘舵�� </th> <th>鎿嶄綔 </th> @@ -406,9 +1007,66 @@ </table> </div> - <div id="pager"> + <div id="pager" style="margin:10px 0 0 0;"> </div> + <!--鎵归噺淇敼涓�т骇鍝� --> + <div class="modal inmodal fade" id="setProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-dialog form-horizontal"> + <div class="modal-content animated "> + <div class="modal-header"> + <span class="title"><h3>鎵归噺鍒嗛厤涓�т骇鍝�</h3></span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a> + <span class="text-muted"> + 鎵归噺鍒嗛厤涓�т骇鍝佸皢浼氭洿鏂版墍鏈夐�変腑鐨勮处鎴风殑瀹㈡埛锛�<br /> + 纭畾鍒嗛厤涓嶈兘鍙栨秷锛岃璋ㄦ厧鎿嶄綔锛�<br /> + </span> + </div> + <div class="modal-body"> + <div class="form-group"> + <label class="col-sm-2 control-label"> + 涓�т骇鍝� + </label> + <div class="col-sm-10"> + <select name="productId" id="productId" class="form-control"> + <%=GetPersonalityProductOptions("")%> + </select> + </div> + </div> + </div> + <div class="modal-footer"> + <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> + 鍙栨秷</button> + <input class="btn btn-primary action-update-setProduct" value="纭畾淇敼" type="button" /> + </div> + </div> + </div> + </div> + <!-- 瀹㈡埛淇敼涓�т骇鍝� --> + <div class="modal inmodal fade" id="updateProductDialog" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content animated bounceInRight"> + <input type="hidden" value="" name="clientID" /> + <div class="modal-header"> + <span class="title">璁剧疆瀹㈡埛涓�т骇鍝�</span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a> + </div> + <div class="modal-body"> + <%=ClientProductAll() %> + </div> + <div class="modal-footer"> + <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> + 鍙栨秷</button> + <button class="btn btn-primary action-updateProduct" data-dismiss="modal" aria-hidden="true"> + 淇濆瓨</button> + </div> + </div> + </div> + </div> + + <!-- footBar --> + <div id="mask" class="mask"> + <span></span> + <img src="img/spinning-circles.svg" alt="杞藉叆涓�..." /> + </div> </asp:Content> -- Gitblit v1.9.1