From 94f6f81692eee7567e24be26e63bc30460307cbd Mon Sep 17 00:00:00 2001
From: yzh <snbbt@21cn.com>
Date: 星期一, 23 五月 2022 13:48:20 +0800
Subject: [PATCH] 客户归属权限优化
---
web/web/GwClient.aspx | 99 +++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 94 insertions(+), 5 deletions(-)
diff --git a/web/web/GwClient.aspx b/web/web/GwClient.aspx
index 9b9d919..ee6bba0 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");
@@ -186,6 +186,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();
+ });
+ }
+ });
+ });
+
});
@@ -280,7 +334,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 +352,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-generate-password ">澶嶅埗瀵嗙爜</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" />
@@ -495,7 +550,8 @@
<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" />
+ <input class="btn btn-success action-modal-create" value="鍒涘缓瀹㈡埛" type="button" /> 
+ <input class="btn btn-danger action-modal-setProduct" value="鎵归噺鍒嗛厤涓�т骇鍝�" type="button" />
</div>
</div>
@@ -505,6 +561,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 +592,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>
+ <input class="btn btn-primary action-update-setProduct" value="纭畾淇敼" type="button" />
+ </div>
+ </div>
+ </div>
</asp:Content>
--
Gitblit v1.9.1