From 3b18a48485f7207438d9d0eb3038d979e069431d Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期四, 26 五月 2022 17:58:18 +0800
Subject: [PATCH] 优化产品及产品分类,订单,对称加密,IP转地区名称

---
 web/web/GwClient.aspx |  148 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 132 insertions(+), 16 deletions(-)

diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx
index 9b9d919..b148960 100644
--- a/web/web/GwClient.aspx
+++ b/web/web/GwClient.aspx
@@ -20,11 +20,12 @@
                 var Telephone = $("#Telephone").val();
                 var Agent = $("#Agent").val();
                 var Salesman = $("#Salesman").val();
+                var SupportStaff = $("#SupportStaff").val();
                 var ProductId = $("#ProductId").val();
                 $.ajax({
                     url: "GwClient.ashx",
                     type: "POST",
-                    data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, ProductId: ProductId , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") },
+                    data: { action: "loadGwClientPageList", ClientID: ClientID, Company: Company, ClientName: ClientName, Telephone: Telephone, Agent: Agent, Salesman: Salesman, SupportStaff: SupportStaff, ProductId: ProductId , pageSize: $("#pager").Pager("getPageSize"), pageIndex: $("#pager").Pager("getPageIndex") },
                     success: function (result) {
                         if (result.OK) {
                             $("#gwclientTable tbody").html(result.Message.Table);
@@ -72,8 +73,8 @@
                     $("#clientDialog #mmsStatusReport").val("");
                     $("#clientDialog #customerManager").val("");
                     $("#clientDialog #salesman").val("");
-                    $("#clientDialog #supportStaff").val(r.Message.SupportStaff);
-                    $("#clientDialog #financialStaff").val(r.Message.FinancialStaff);
+                    $("#clientDialog #supportStaff").val("");
+                    $("#clientDialog #financialStaff").val("");
                     $("#clientDialog #remark").val("");
                     $("#clientDialog input[name=permissionData]").iCheck("uncheck");
 
@@ -169,6 +170,20 @@
                     });
                 });
 
+                //閲嶇疆瀵嗙爜
+                $(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();
+                                });
+                            });
+                        }
+                    });
+                });
+
                 $("#blackForm,#whiteForm").ajaxForm({
                     success: function (r) {
                         mytek.alert(r.Message, r.OK, function () {
@@ -185,6 +200,60 @@
                     }
                 });
             })
+
+            //鍏ㄩ��
+            $("#checkAll").click(function () {
+                $("input[name='checkbox']").prop("checked", $(this).is(":checked"));
+            });
+
+            //鎵归噺鍒嗛厤涓�т骇鍝�
+            $(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();
+                        });
+                    }
+                });
+            });
 
 
 
@@ -262,7 +331,7 @@
                     <div class="modal-header">
                         <button type="button" class="close" data-dismiss="modal">
                             <span aria-hidden="true">&times;</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="" />
@@ -280,7 +349,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" />
@@ -298,11 +367,12 @@
                             </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">
-                                瀹㈡埛鍚嶇О <span style="color:red">*</span>
+                                鑱旂郴浜� <span style="color:red">*</span>
                             </label>
                             <div class="col-sm-4">
                                 <input type="text" name="clientName" id="clientName" value="" class="form-control" />
@@ -348,6 +418,7 @@
                                     </select>
                             </div>
                         </div>
+                        <!--
                         <div class="form-group">
                             <label class="control-label  col-sm-2">
                                 褰╀俊鏄惁鏀寔鏄剧ず鐘舵�佹姤鍛� <span style="color:red">*</span>
@@ -360,6 +431,7 @@
                                     </select>
                             </div>
                         </div>
+                        -->
                         <!--
                         <div class="form-group">
                             <label class="control-label  col-sm-2">
@@ -392,7 +464,7 @@
                         </div>
                         <div class="form-group">
                             <label class="control-label  col-sm-2">
-                                褰掑睘瀹㈡埛浜哄憳 <span style="color:red">*</span>
+                                褰掑睘瀹㈡湇浜哄憳 <span style="color:red">*</span>
                             </label>
                             <div class="col-sm-4">
                                     <select name="supportStaff" id="supportStaff" class="form-control">
@@ -410,27 +482,27 @@
                                     </select>
                             </div>
                         </div>
-                        <!--
                         <div class="form-group">
                             <label class="control-label col-sm-2">钀ヤ笟鎵х収</label>
                             <div class="col-sm-4">
                                 <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">
                                 澶囨敞
@@ -466,7 +538,7 @@
         </div>
         <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="ClientName" id="ClientName" class="form-control" />
             </div>
         </div>
@@ -486,6 +558,14 @@
         </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("")%>
@@ -495,7 +575,8 @@
         <div class="form-group">
             <div class="input-group m-b">
                 <input type="button" value="鏌ヨ" class="btn btn-primary action-query" />&nbsp
-            <input class="btn btn-success action-modal-create" value="鍒涘缓瀹㈡埛" type="button" />
+            <input class="btn btn-success action-modal-create" value="鍒涘缓瀹㈡埛" type="button" />&nbsp
+            <input class="btn btn-danger action-modal-setProduct" value="鎵归噺鍒嗛厤涓�т骇鍝�" type="button" />
             </div>
 
         </div>
@@ -505,22 +586,27 @@
         <table class="table table-striped table-bordered table-hover" id="gwclientTable">
             <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>绱鍏呭��(鍏�)
                     </th>
 
                     <th>涓氬姟鍛�
                     </th>
+                    <!--
                     <th>璁よ瘉鐘舵��
                     </th>
+                    -->
                     <th>鎿嶄綔
                     </th>
                 </tr>
@@ -533,6 +619,36 @@
     <div id="pager">
     </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">
+                    <h3>
+                        鎵归噺鍒嗛厤涓�т骇鍝�</h3>
+                    </span><a class="close" data-dismiss="modal" aria-hidden="true">脳</a> <span class="text-muted">
+                        鎵归噺鍒嗛厤涓�т骇鍝佸皢浼氭洿鏂版墍鏈夐�変腑鐨勮处鍙风殑瀹㈡埛锛�<br />
+                        纭畾鍒嗛厤涓嶈兘鍙栨秷锛岃璋ㄦ厧鎿嶄綔锛�<br />
+                </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>&nbsp;&nbsp;
+                    <input class="btn btn-primary action-update-setProduct" value="纭畾淇敼" type="button" />
+                </div>
+            </div>
+        </div>
 
 </asp:Content>
 

--
Gitblit v1.9.1