From f63d8ead25bdb3c32dacca817a059bd30390e9bc Mon Sep 17 00:00:00 2001 From: yzh <snbbt@21cn.com> Date: 星期三, 15 六月 2022 22:20:07 +0800 Subject: [PATCH] 1.系统账户数据库优化: 修改“账户类型”的数据类型为VARCHAR2(1024),多个角色时以半角“,”分隔。 加密盐。 密码加密优化;账户登录优化;角色权限管理(作废用户权限); 2.字典类型管理(定义:用户角色) 3.字典数据管理(初始化用户角色数据) 3.角色权限管理 4.系统账户管理,账户类型对应用户角色(可多选)。 --- web/web/GwClient.aspx | 74 ++++++++++++++++++++++++++---------- 1 files changed, 53 insertions(+), 21 deletions(-) diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx index 735e510..987c26f 100644 --- a/web/web/GwClient.aspx +++ b/web/web/GwClient.aspx @@ -18,7 +18,8 @@ var Company = $("#Company").val(); var ClientName = $("#ClientName").val(); var Telephone = $("#Telephone").val(); - var Agent = $("#Agent").val(); + //var Agent = $("#Agent").val(); + var Agent = ""; var Salesman = $("#Salesman").val(); var SupportStaff = $("#SupportStaff").val(); var ProductId = $("#ProductId").val(); @@ -258,25 +259,29 @@ $(document).on("click", ".action-updateProduct", function () { var productIdArray = []; - $("#updateProductDialog #_ProductId").each(function () { - if ($(this).is(":checked")) { - productIdArray.push($(this).val()); - } - }); + mytek.confirm("鏄惁闇�瑕佷慨鏀瑰鎴峰垎閰嶄釜鎬т骇鍝侊紵", "纭鍒嗛厤涓�т骇鍝侊紝璇疯皑鎱庢搷浣滐紒", function (b) { + if (b) { + $("#updateProductDialog #_ProductId").each(function () { + if ($(this).is(":checked")) { + productIdArray.push($(this).val()); + } + }); - //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); - } + //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); + } + } + }); } }); }); @@ -404,6 +409,23 @@ }); }); + //瀵煎嚭鏁版嵁 + $(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 () { @@ -413,6 +435,10 @@ //娣诲姞瀹㈡埛锛氬鍒跺瘑鐮� $(document).on("click", ".action-copyPwd", function () { var value = $("#password").val(); + if (value == "") { + mytek.alert("璇风敓鎴愬瘑鐮侊紒"); + return false; + } // for ie if (window.clipboardData) { window.clipboardData.clearData(); @@ -448,6 +474,11 @@ //淇敼瀵嗙爜锛氬鍒跺瘑鐮� $(document).on("click", ".action-copyNewPwd", function () { var value = $("#newPwd").val(); + if (value == "") { + mytek.alert("璇风敓鎴愬瘑鐮侊紒"); + return false; + } + // for ie if (window.clipboardData) { window.clipboardData.clearData(); @@ -941,6 +972,7 @@ <% 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"> <thead> <tr class="header"> @@ -1029,8 +1061,8 @@ <div class="modal-footer"> <button class="btn-default btn" data-dismiss="modal" aria-hidden="true"> 鍙栨秷</button> - <button class="btn btn-primary action-updateProduct"> - 淇濆瓨</button> + <a class="btn btn-primary action-updateProduct"> + 淇濆瓨</a> </div> </div> </div> -- Gitblit v1.9.1