Browse Source

添加筛选条件

zhangding 4 years ago
parent
commit
83571c9cdb

+ 18 - 1
suishenbang-admin/src/main/resources/templates/system/user/selectUser.html

@@ -24,6 +24,9 @@
 								<li>
 									手机号码:<input type="text" name="phonenumber"/>
 								</li>
+								<li>
+									组织名称:<input type="text" name="sysUserExt.orgName"/>
+								</li>
 								<li>
 									用户状态:<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
 										<option value="">所有</option>
@@ -67,6 +70,7 @@
 	<script th:inline="javascript">
 
         var salesLevelDict = [[${@dict.getType('sales_level')}]];//销售人员等级
+        var datas = [[${@dict.getType('sys_yes_no')}]];
 		var prefix = ctx + "system/user";
 
 		$(function() {
@@ -130,7 +134,20 @@
                 {
                     field: 'sysUserExt.orgCode',
                     title: '组织code'
-                }]
+                },
+                    {
+                        field: 'sysUserExt.isCustomerManager',
+                        title: '是否是负责人',
+                        formatter: function(value, row, index) {
+                            if (value==1){
+                                return "是";
+							} else if (value==0){
+                                return "否";
+							} else {
+                                return "-";
+							}
+                        }
+                    }]
 		    };
 		    $.table.init(options);
 		}

+ 5 - 1
suishenbang-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag,
           u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
           d.dept_name, d.leader,
-        suse.sales_level,suse.org_name,suse.org_code,suse.post_name
+        suse.sales_level,suse.org_name,suse.org_code,suse.post_name,suse.is_customer_manager
 		from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		left join sys_company c on u.company_id = c.id
@@ -120,6 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         and sysUserExt.orgCode != ''">
 			AND suse.org_code = #{sysUserExt.orgCode}
 		</if>
+		<if test="sysUserExt != null and sysUserExt.orgName !=null
+        and sysUserExt.orgName != ''">
+			AND suse.org_name like concat('%', #{sysUserExt.orgName}, '%')
+		</if>
 		<if test="userName != null and userName != ''">
 			AND u.user_name like concat('%', #{userName}, '%')
 		</if>