Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

[user3] 4 éve
szülő
commit
cbb5b41782

+ 18 - 0
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientInfo.java

@@ -46,6 +46,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
     private WorkClientLinkman workClientLinkman;        //联系人信息
 	private String companyId;
 	private String officeId;
+	private String officeName;
 	private String workLinkName; 	//联系人查询条件
 	private String param; 	//联系人查询条件
 	private List<WorkClientLinkman> workClientLinkmanList = Lists.newArrayList();		// 子表列表
@@ -65,6 +66,7 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 	private String unitIntroduction;
 	private String createName;   //创建人
 	private String createNameStr;   //创建人
+	private String createOffice;   //创建人部门
 	private String createId;     //创建人id
 
 	private String jobTypeStr;
@@ -550,4 +552,20 @@ public class WorkClientInfo extends DataEntity<WorkClientInfo> {
 	public void setJobTypeShow(Integer jobTypeShow) {
 		this.jobTypeShow = jobTypeShow;
 	}
+
+	public String getCreateOffice() {
+		return createOffice;
+	}
+
+	public void setCreateOffice(String createOffice) {
+		this.createOffice = createOffice;
+	}
+
+	public String getOfficeName() {
+		return officeName;
+	}
+
+	public void setOfficeName(String officeName) {
+		this.officeName = officeName;
+	}
 }

+ 8 - 2
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -1477,7 +1477,9 @@ public class WorkContractInfoController extends BaseController {
      * 选择客户ID
      */
     @RequestMapping(value = "selectclientAhref")
-    public String selectclientAhref(WorkClientInfo client, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, String searchLabel1, String searchKey1, HttpServletRequest request, HttpServletResponse response, Model model) {
+    public String selectclientAhref(WorkClientInfo client, String url, String fieldLabels, String fieldKeys,
+                                    String searchLabel, String searchKey, String searchLabel1, String searchKey1,
+                                    HttpServletRequest request, HttpServletResponse response, Model model) {
         Page<WorkClientInfo> page = workClientInfoService.findPageByContract(new Page<WorkClientInfo>(request, response), client);
         try {
             fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
@@ -1500,6 +1502,10 @@ public class WorkContractInfoController extends BaseController {
         model.addAttribute("searchLabel1", searchLabel1);
         model.addAttribute("searchKey1", searchKey1);
         model.addAttribute("obj", client);
+        model.addAttribute("createId", client.getCreateId());
+        model.addAttribute("createNameStr", client.getCreateNameStr());
+        model.addAttribute("officeId", client.getOfficeId());
+        model.addAttribute("officeName", client.getOfficeName());
         model.addAttribute("page", page);
         return "modules/sys/gridselectAhref";
     }
@@ -2047,4 +2053,4 @@ public class WorkContractInfoController extends BaseController {
         }
         return "redirect:" + Global.getAdminPath() + "/workcontractinfo/workContractInfo/workContractList/?repage";
     }
-}
+}

+ 9 - 0
src/main/resources/mappings/modules/workclientinfo/WorkClientInfoDao.xml

@@ -76,9 +76,11 @@
 		SELECT
 			<include refid="workClientInfoColumns"/>
 			,su.name as "userName"
+			,so.name as "officeName"
 		FROM work_client_info a
 		<include refid="workClientInfoJoinsLink"/>
 		left join sys_user su on su.id = a.create_by
+		left join sys_office so on so.id = su.office_id
 		<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
 			LEFT JOIN work_client_linkman b ON a.id = b.client_id
 		</if>
@@ -131,6 +133,9 @@
 			<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
 				AND (a.create_by = #{createId} or su.name like concat('%',#{createNameStr},'%'))
 			</if>
+			<if test="officeId != null and officeId != ''">
+				AND so.id = #{officeId}
+			</if>
             AND a.company_id = #{currentUser.company.id}
 			${sqlMap.dsf}
 			<choose>
@@ -304,6 +309,7 @@
         </if>
 		left join work_client_job_type_info c on c.work_client_id=a.id
 		left join sys_user su on su.id = a.create_by
+		left join sys_office so on so.id = su.office_id
         <where>
             a.del_flag = #{DEL_FLAG_NORMAL}
             <if test="name != null and name != ''">
@@ -348,6 +354,9 @@
 			<if test="(createId != null and createId != '') or (createNameStr != null and createNameStr != '')">
 				AND (a.create_by = #{createId} or su.name = #{createNameStr})
 			</if>
+			<if test="officeId != null and officeId != ''">
+				AND so.id = #{officeId}
+			</if>
             AND a.company_id = #{currentUser.company.id}
 			${sqlMap.dsf}
             <choose>

+ 29 - 11
src/main/webapp/webpage/modules/sys/gridselectAhref.jsp

@@ -5,11 +5,11 @@
 	<meta name="decorator" content="default"/>
 	<script type="text/javascript">
 		$(document).ready(function() {
-			    $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
+			    $('#contentTable thead tr th input.i-checks').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
 			    	  $('#contentTable tbody tr td input.i-checks').iCheck('check');
 			    	});
 
-			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
+			    $('#contentTable thead tr th input.i-checks').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定
 			    	  $('#contentTable tbody tr td input.i-checks').iCheck('uncheck');
 			    	});
 		});
@@ -27,7 +27,7 @@
 					return "-1";
 				  }
 			    var id =  $("#contentTable tbody tr td input.i-checks:checkbox:checked").attr("id");
-			    
+
 				var label = $("#contentTable tbody tr td input.i-checks:checkbox:checked").parent().parent().parent().find(".codelabel").html();
 				return id+"_item_"+label;
 		}
@@ -58,13 +58,27 @@
 					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
 
 					<div class="commonQuery">
-						<div class="layui-item query athird">
+						<div class="layui-item query athird " style="width:25%;">
 							<span class="layui-form-label">客户名称:</span>
 							<div class="layui-input-block">
 								<form:input path="${searchKey}" htmlEscape="false" maxlength="50" class=" form-control layui-input"/>
 							</div>
 						</div>
-						<div class="layui-item athird fr">
+						<div class="layui-item query athird" style="width:25%;">
+							<label class="layui-form-label">登记人:</label>
+							<div class="layui-input-block  with-icon">
+								<sys:inquireselectUserNotReadolny id="create" name="createId" value="${createId}" labelName="createNameStr" labelValue="${createNameStr}"
+																  title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
+						<div class="layui-item query athird" style="width:25%;">
+							<label class="layui-form-label">部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="officeId" name="officeId" value="${officeId}" labelName="officeName" labelValue="${officeName}"
+												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+							</div>
+						</div>
+						<div class="layui-item athird fr" style="width:25%;">
 							<div class="input-group">
 								<button id="searchReset" class="fixed-btn searchReset fr" style="margin-right: 0px;" onclick="resetSearch()">重置</button>
 								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
@@ -83,10 +97,12 @@
 						<th  width="50px"></th>
 						<c:forEach items="${labelNames}" var="name"  varStatus="status">
 						<th>客户名称</th>
-						<th>客户性质</th>
-						<th>客户行业</th>
-						<th>客户类型</th>
-						<th>统一社会信用代码</th>
+						<th style="width: 100px">客户性质</th>
+						<th style="width: 100px">客户行业</th>
+						<th style="width: 150px">客户类型</th>
+						<th style="width: 100px">登记人</th>
+						<th style="width: 100px">部门</th>
+						<th style="width: 200px">统一社会信用代码</th>
 						</c:forEach>
 
 					</tr>
@@ -110,13 +126,15 @@
 								<td class="codelabel">${fns:getMainDictLabel(obj.companyType, 'company_type', '')}</td>
 								<td class="codelabel">${fns:getMainDictLabel(obj.companyIndustry, 'company_industry', '')}</td>
 								<td class="codelabel">${obj.jobTypeStr}</td>
+								<td class="codelabel">${obj.userName}</td>
+								<td class="codelabel">${obj.officeName}</td>
 								<td class="codelabel">${obj.uscCode}</td>
 							</tr>
 						</c:forEach>
 					</c:when>
 					<c:otherwise>
 						<tr>
-							<td colspan="5" align="center">
+							<td colspan="8" align="center">
 								暂无数据
 							</td>
 						</tr>
@@ -131,4 +149,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>

+ 2 - 2
src/main/webapp/webpage/modules/sys/sysIndex.jsp

@@ -176,7 +176,7 @@
                                 <span class="clear">
                                <span class="block m-t-xs" style="font-size: 14px;cursor:default">${fns:getUser().name}</span>
                                <%--<span class="text-muted text-xs block m-t-xs" style="font-size: 12px;">${companyName}<b class="caret"></b></span>--%>
-                                     <span class="text-muted text-xs block m-t-xs" style="font-size: 12px;margin-top:8px;cursor:default">${companyName}</span>
+                                     <span class="text-muted text-xs block m-t-xs" style="font-size: 12px;margin-top:8px;cursor:default">${fns:getUser().office.name}</span>
                                 </span>
                         <%--</a>--%>
                         <ul class="dropdown-menu animated fadeInRight m-t-xs" style="display:none;">
@@ -740,4 +740,4 @@
 
 </script>--%>
 
-</html>
+</html>

+ 2 - 2
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -830,7 +830,7 @@
 									<tbody id="file_attachment">
 									<c:forEach items="${workContractInfo.workAttachments}" var = "workClientAttachment" varStatus="status">
 										<tr>
-											
+
 												<%-- <td>${status.index + 1}</td>--%>
 											<c:choose>
 												<c:when test="${workContractInfo.uploadMode == 2}">
@@ -948,4 +948,4 @@
 	</script>
 </div>
 </body>
-</html>
+</html>