Browse Source

报销申请模糊查询

[user3] 3 years ago
parent
commit
a814b6c3f4

+ 33 - 0
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -87,6 +87,9 @@
 			<if test="project != null and project.id != null and project.id != ''">
 				AND wa.project_id = #{project.id}
 			</if>
+			<if test="project != null and project.projectName != null and project.projectName != ''">
+				AND p.project_name  like concat('%',#{project.projectName},'%')
+			</if>
 			<if test="status != '' and status != null">
 				AND a.status = #{status}
 			</if>
@@ -99,6 +102,9 @@
 					#{officeId}
 				</foreach>
 			</if>
+			<if test="officeId == '' and officeName!=null and officeName!=''">
+				AND sob.name like concat('%',#{officeName},'%')
+			</if>
 			<if test="submitterDate != '' and submitterDate != null">
 				AND a.submitter_date = #{submitterDate}
 			</if>
@@ -111,12 +117,21 @@
 			<if test="handleId != null and handleId != ''">
 				AND a.submitter_id = #{handleId}
 			</if>
+			<if test="handleId == '' and handleName != null and handleName != ''">
+				AND su.name like concat('%',#{handleName},'%')
+			</if>
 			<if test="submitterId != null and submitterId != ''">
 				AND wa.reimbursement_name = #{submitterId}
 			</if>
+			<if test="submitterId == '' and submitterName != null and submitterName != ''">
+				AND sub.name like concat('%',#{submitterName},'%')
+			</if>
 			<if test="businessType != null and businessType != ''">
 				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
+			<if test="businessType == '' and businessTypeName!=null and businessTypeName !=''">
+				AND wrt.standard_detail like concat('%',#{businessTypeName},'%')
+			</if>
 			<if test="projectName != null and projectName != ''">
 				AND pd.number like concat('%',#{projectName},'%')
 			</if>
@@ -148,6 +163,9 @@
 		left join rural_project_records p on p.id = wa.project_id
 		left join work_reimbursement_type_info wrt on wrt.id =wa.type
 		left join project_report_data pd on pd.project_id =wa.project_id
+		left join sys_user su on su.id = a.submitter_id
+		left join sys_user sub on sub.id = wa.reimbursement_name
+		left join sys_office sob on sub.office_id = sob.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="id != null and id != ''">
@@ -156,6 +174,9 @@
 			<if test="project != null and project.id != null and project.id != ''">
 				AND wa.project_id = #{project.id}
 			</if>
+			<if test="project != null and project.projectName != null and project.projectName != ''">
+				AND p.project_name  like concat('%',#{project.projectName},'%')
+			</if>
 			<if test="status != '' and status != null">
 				AND a.status = #{status}
 			</if>
@@ -168,6 +189,9 @@
 					#{officeId}
 				</foreach>
 			</if>
+			<if test="officeId == '' and officeName!=null and officeName!=''">
+				AND sob.name like concat('%',#{officeName},'%')
+			</if>
 			<if test="submitterDate != '' and submitterDate != null">
 				AND a.submitter_date = #{submitterDate}
 			</if>
@@ -180,12 +204,21 @@
 			<if test="handleId != null and handleId != ''">
 				AND a.submitter_id = #{handleId}
 			</if>
+			<if test="handleId == '' and handleName != null and handleName != ''">
+				AND su.name like concat('%',#{handleName},'%')
+			</if>
 			<if test="submitterId != null and submitterId != ''">
 				AND wa.reimbursement_name = #{submitterId}
 			</if>
+			<if test="submitterId == '' and submitterName != null and submitterName != ''">
+				AND sub.name like concat('%',#{submitterName},'%')
+			</if>
 			<if test="businessType != null and businessType != ''">
 				AND (wa.type = #{businessType} or wa.type in (select id from work_reimbursement_type_info where parent_ids like concat('%',#{businessTypeParentIds},'%')))
 			</if>
+			<if test="businessType == '' and businessTypeName!=null and businessTypeName !=''">
+				AND wrt.standard_detail like concat('%',#{businessTypeName},'%')
+			</if>
 			<if test="projectName != null and projectName != ''">
 				AND pd.number like concat('%',#{projectName},'%')
 			</if>

+ 1 - 1
src/main/webapp/WEB-INF/tags/sys/gridselectcallprojectt.tag

@@ -46,7 +46,7 @@ function searchGrid${id}(){
 </script>
 	<input id="${id}Id" name="${name}"  type="hidden" value="${value}"/>
 	<div class="input-group" style="width: 100%">
-		<input id="${id}Name" placeholder="${title}" name="${labelName }" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
+		<input id="${id}Name" placeholder="${title}" name="${labelName }" type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
 		class="${cssClass}" style="${cssStyle}"/>
        		 <span class="input-group-btn">
 	       		 <button type="button" onclick="searchGrid${id}()" id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if>  btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i>

+ 1 - 1
src/main/webapp/WEB-INF/tags/sys/inquireselectUser.tag

@@ -33,7 +33,7 @@
     </div>
 	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
 <script type="text/javascript">
-	$("#${id}Button, #${id}Name").click(function(){
+	$("#${id}Button").click(function(){
 		// 是否限制选择,如果限制,设置为disabled
 		if ($("#${id}Button").hasClass("disabled")){
 			return true;

+ 1 - 1
src/main/webapp/WEB-INF/tags/sys/treeselect.tag

@@ -35,7 +35,7 @@
     </div>
 	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
 <script type="text/javascript">
-	$("#${id}Button, #${id}Name").click(function(){
+	$("#${id}Button").click(function(){
 		// 是否限制选择,如果限制,设置为disabled
 		if ($("#${id}Button").hasClass("disabled")){
 			return true;

+ 4 - 4
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -91,14 +91,14 @@
                             <label class="layui-form-label">经办人:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:inquireselectUser id="handleId" name="handleId" value="${workReimbursement.handleId}" labelName="handleName" labelValue="${workReimbursement.handleName}"
-                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true"/>
                             </div>
                         </div>
                         <div class="layui-item query athird">
                             <label class="layui-form-label">报销人:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:inquireselectUser id="submitterId" name="submitterId" value="${workReimbursement.submitterId}" labelName="submitterName" labelValue="${workReimbursement.submitterName}"
-                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true"/>
                             </div>
                         </div>
                         <div class="layui-item query athird">
@@ -114,14 +114,14 @@
                             <label class="layui-form-label">报销部门:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"
-                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true"/>
                             </div>
                         </div>
                         <div class="layui-item query athird">
                             <label class="layui-form-label">报销类别:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessType}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
-                                                         cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                         cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true"/>
 
                                     <%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
                                     <%--                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff"/>--%>

+ 4 - 4
src/main/webapp/webpage/modules/workreimbursement/workReimbursementList.jsp

@@ -98,7 +98,7 @@
                             <label class="layui-form-label">报销项目:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursement/selectprojectOnList" id="project" name="project.id"  value="${workReimbursement.project.id}"  title="选择报销项目" labelName="project.projectName" cssStyle="background-color:#fff"
-                                                           labelValue="${workReimbursement.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+                                                           labelValue="${workReimbursement.project.projectName}" cssClass="form-control required layui-input"  fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
                             </div>
                         </div>
                         <%--<div class="layui-item query athird">
@@ -147,7 +147,7 @@
                             <label class="layui-form-label">经办人:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:inquireselectUser id="handleId" name="handleId" value="${workReimbursement.handleId}" labelName="handleName" labelValue="${workReimbursement.handleName}"
-                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true" cssStyle="background-color:#fff"/>
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true" allowInput="true" cssStyle="background-color:#fff"/>
                             </div>
                         </div>
                         <div class="layui-item query athird">
@@ -170,14 +170,14 @@
                             <label class="layui-form-label">报销部门:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"
-                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff"/>
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  allowInput="true" cssStyle="background-color:#fff"/>
                             </div>
                         </div>
                         <div class="layui-item query athird">
                             <label class="layui-form-label">报销类别:</label>
                             <div class="layui-input-block with-icon">
                                 <sys:treeselectAccessory id="type" name="businessType" value="${workReimbursement.businessType}" labelName="businessTypeName" labelValue="${workReimbursement.businessTypeName}"
-                                                         cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                                         cssStyle="background-color:#fff" title="报销类别" url="/reimbursementType/reimbursementType/treeData" extId=""  cssClass="form-control  layui-input" allowInput="true" allowClear="true" notAllowSelectParent="true"/>
 
 <%--                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"--%>
 <%--                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"  cssStyle="background-color:#fff"/>--%>