| | |
| | | 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(); |
| | |
| | | $(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); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | |
| | | }); |
| | | }); |
| | | |
| | | //导出数据 |
| | | $(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 () { |
| | |
| | | //添加客户:复制密码 |
| | | $(document).on("click", ".action-copyPwd", function () { |
| | | var value = $("#password").val(); |
| | | if (value == "") { |
| | | mytek.alert("请生成密码!"); |
| | | return false; |
| | | } |
| | | // for ie |
| | | if (window.clipboardData) { |
| | | window.clipboardData.clearData(); |
| | |
| | | //修改密码:复制密码 |
| | | $(document).on("click", ".action-copyNewPwd", function () { |
| | | var value = $("#newPwd").val(); |
| | | if (value == "") { |
| | | mytek.alert("请生成密码!"); |
| | | return false; |
| | | } |
| | | |
| | | // for ie |
| | | if (window.clipboardData) { |
| | | window.clipboardData.clearData(); |
| | |
| | | <% 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"> |