From 318d349fc009011a135dbce5a25e392b492c0718 Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期五, 20 五月 2022 16:49:20 +0800
Subject: [PATCH] 客户分配个性产品 系统数据权限隔离

---
 web/web/GwClient.aspx |   94 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 91 insertions(+), 3 deletions(-)

diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx
index 9b9d919..0c8c2fc 100644
--- a/web/web/GwClient.aspx
+++ b/web/web/GwClient.aspx
@@ -72,8 +72,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");
 
@@ -185,6 +185,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();
+                        });
+                    }
+                });
+            });
 
 
 
@@ -495,7 +549,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,6 +560,9 @@
         <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>
@@ -533,6 +591,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