Browse Source

客户唯一性验证,报告修改

蔡德晨 5 years ago
parent
commit
eb6ac6fbfc

+ 3 - 0
src/main/java/com/jeeplus/modules/workclientinfo/dao/WorkClientInfoDao.java

@@ -26,4 +26,7 @@ public interface WorkClientInfoDao extends CrudDao<WorkClientInfo> {
 
     int countByUscCode(String uscCode);
     int queryCount(WorkClientInfo workClientInfo);
+
+
+    List<WorkClientInfo> findByName(WorkClientInfo workClientInfo);
 }

+ 6 - 0
src/main/java/com/jeeplus/modules/workclientinfo/service/WorkClientInfoService.java

@@ -582,4 +582,10 @@ public class WorkClientInfoService extends CrudService<WorkClientInfoDao, WorkCl
         return page;
     }
 
+
+
+    public List<WorkClientInfo> findByName(WorkClientInfo workClientInfo){
+        return workClientInfoDao.findByName(workClientInfo);
+    }
+
 }

+ 11 - 0
src/main/java/com/jeeplus/modules/workclientinfo/web/WorkClientInfoController.java

@@ -640,4 +640,15 @@ public class WorkClientInfoController extends BaseController {
 		model.addAttribute("page", page);
 		return  "modules/sys/gridselect1";
 	}
+
+	@ResponseBody
+	@RequestMapping("checkClient")
+	public String  checkClient(WorkClientInfo workClientInfo){
+       List<WorkClientInfo> workClientInfos = workClientInfoService.findByName(workClientInfo);
+       if(workClientInfos != null && workClientInfos.size()>0){
+       	   return "false";
+	   }
+       return "true";
+	}
+
 }

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

@@ -367,4 +367,18 @@
     <select id="countByUscCode" resultType="int">
         SELECT count(1) from work_client_info WHERE  usc_code = #{uscCode}
     </select>
+
+	<select id="findByName" resultType="WorkClientInfo">
+		select a.id
+		from work_client_info a
+		<where>
+			name = #{name}
+			<if test="orUnicode != null and orUnicode != ''">
+				AND or_unicode = #{orUnicode}
+			</if>
+			<if test="id != null and id != ''">
+				AND id != #{id}
+			</if>
+		</where>
+	</select>
 </mapper>

+ 24 - 14
src/main/webapp/webpage/modules/projectcontentinfo/reportForm.jsp

@@ -167,18 +167,28 @@
         }
 
         // 确认对话框
-        function reviewAudits(mess, href,obj,remarks){
-            top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-                console.log(remarks);
-                var remark = $(remarks);
-                remark.val("确认");
-                $("#check1"+obj).attr("style","display:none");
-                $("#check2"+obj).attr("style","display");
-                top.layer.msg("已确认!", {icon: 1});
-                top.layer.close(index);
-            });
-            return false;
-        }
+        // function reviewAudits(mess, href,obj,remarks){
+        //     top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+        //         console.log(remarks);
+        //         var remark = $(remarks);
+        //         remark.val("确认");
+        //         $("#check1"+obj).attr("style","display:none");
+        //         $("#check2"+obj).attr("style","display");
+        //         top.layer.msg("已确认!", {icon: 1});
+        //         top.layer.close(index);
+        //     });
+        //     return false;
+        // }
+
+		function reviewAudits(mess, href,obj,remarks){
+				console.log(remarks);
+				var remark = $(remarks);
+				remark.val("确认");
+				$("#check1"+obj).attr("style","display:none");
+				$("#check2"+obj).attr("style","display");
+				top.layer.msg("已确认!", {icon: 1});
+			return false;
+		}
 
         function addReview(obj) {
             var infoId = $("#id").val();
@@ -198,7 +208,7 @@
                                 "<input id=\"projectReviewList"+i+"_id\" name=\"projectReportData.projectReviewList["+i+"].id\" type=\"hidden\" value=\""+list[i].id+"\"/>" +
                                 "<input id=\"projectReviewList"+i+"_delFalg\" name=\"projectReportData.projectReviewList["+i+"].delFalg\" type=\"hidden\" value=\"1\"/>" +
                                 "<input id=\"projectReviewList"+i+"_remarks\" name=\"projectReportData.projectReviewList["+i+"].remarks\" type=\"hidden\" value=\"\"/>" +
-                                ""+i+1+"" +
+                                ""+(parseInt(i)+1)+"" +
                                 "</td>" +
                                 "<td>" +
                                 ""+list[i].standardDetail+"" +
@@ -746,7 +756,7 @@
 								<input id="projectReviewList${index.index}_id" name="projectReportData.projectReviewList[${index.index}].id" type="hidden" value="${projectReview.id}"/>
 								<input id="projectReviewList${index.index}_delFalg" name="projectReportData.projectReviewList[${index.index}].delFalg" type="hidden" value="1"/>
 								<input id="projectReviewList${index.index}_remarks" name="projectReportData.projectReviewList[${index.index}].remarks" type="hidden" value="${projectReview.remarks}"/>
-									${index.index + 1}
+								${index.index+1}
 							</td>
 							<td>
 									${projectReview.standardDetail}

+ 1 - 1
src/main/webapp/webpage/modules/projectcontentinfo/workReviewStandardList.jsp

@@ -21,7 +21,7 @@
 	<table id="treeTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
 		<thead>
 			<tr>
-				<th  class="sort-column standardDetail" width="70%">标准内容</th>
+				<th  class="sort-column standardDetail" width="70%">复核内容</th>
 				<c:if test="${type == 4}">
 					<th  class="sort-column maxDeduct" width="15%">最多扣分</th>
 					<th  class="sort-column standardDetail" width="15%">审核记录</th>

+ 1 - 1
src/main/webapp/webpage/modules/projectcontroltable/projectControlTableForm.jsp

@@ -48,7 +48,7 @@
                 type : 'date'
             });
             $('#area1Name').on("change", function () {
-                var aname = $("#areaName1").val()
+                var aname = $("#area1Name").val()
                 var code = ''
                 $.getJSON("${ctxStatic}/json/city.json", function (data){
                     $.each(data,function(index,obj){

+ 3 - 3
src/main/webapp/webpage/modules/sys/officeList.jsp

@@ -195,11 +195,11 @@
                 "id":rowId
             },
             success:function (result) {
-                if(result.success&&!result.body.inUse){
+                // if(result.success&&!result.body.inUse){
                     openDialogres('添加下级机构', '${ctx}/sys/office/form?parent.id='+rowId,'95%','95%', '');
                     return;
-                }
-                top.layer.msg("该机构下已经存在用户或者合同信息,不能添加下级机构",{icon:0});
+                // }
+                // top.layer.msg("该机构下已经存在用户或者合同信息,不能添加下级机构",{icon:0});
             }
         })
 

+ 57 - 4
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -39,6 +39,7 @@
     <script src="${ctxStatic}/bootstrap-select-1.12.4/js/bootstrap-select.min.js"></script>
 	<script type="text/javascript">
 		var validateForm;
+		var exitName = true;
 		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 		  if(validateForm.form()){
               var tableObj = document.getElementById('contentTable').rows[1];
@@ -46,6 +47,9 @@
                   parent.layer.msg("请填写联系人信息!", {icon: 5});
                   return false;
               }
+              if(!exitName){
+                  return false;
+              }
 			  $("#inputForm").submit();
 			  return true;
 		  }else {
@@ -152,10 +156,36 @@
             if($("#uscCode").val()!=null&&$("#uscCode").val()!='') {
                 $("#inputForm").validate().element($("#uscCode"));
             }
+            // $("#name").blur(function(){
+            //     checkName();
+            // })
+            $("#name").on("change",function(){
+                var id = $("#id").val();
+                var name = $("#name").val();
+                var uscCode = $("#uscCode").val();
+                $.ajax({
+                    url:"${ctx}/workclientinfo/workClientInfo/checkClient",
+                    type:"post",
+                    data:{"id":id,
+                        "name":name,
+                        "uscCode":uscCode},
+                    success:function(data){
+                        if(data==="false"){
+                            exitName=false
+                            $("#ph").html("该客户已存在");
+                        }else {
+                            exitName=true
+                            $("#ph").html('');
+                        }
+                    }
+                });
+                }
 
+            )
             <%--var arr="${workClientInfo.clientType}".split(',');--%>
             // $('#clientType').selectpicker('val',arr);
            dismissDiv();
+
         });
 
 		function testOurBank(value){
@@ -239,6 +269,28 @@
 
         }
 
+        function checkName() {
+            var id = $("#id").val();
+            var name = $("#name").val();
+            var uscCode = $("#uscCode").val();
+            $.ajax({
+                url:"${ctx}/workclientinfo/workClientInfo/checkClient",
+                type:"post",
+                data:{"id":id,
+                    "name":name,
+                    "uscCode":uscCode},
+                success:function(data){
+                    if(data==="false"){
+                        exitName=false
+                        $("#ph").html("该客户已存在");
+                    }else {
+                        exitName=true
+                        $("#ph").html('');
+                    }
+                }
+            });
+        }
+
         function insertTitle(tValue){
             var list = "${workClientInfo.workAttachments}";
             var size = (list.split('url')).length-1;
@@ -291,7 +343,7 @@
                             "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
                             {"id": id},
                             function (data) {
-                                $("#name").val(data.ENTNAME);
+                                $("#name").val(data.ENTNAME).change();
                                 $("#uscCode").val(data.TAXNUMBER);
                                 $("#registerAddress").val(data.OPLOC);
                             }
@@ -320,7 +372,7 @@
                             "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
                             {"id": id},
                             function (data) {
-                                $("#name").val(data.ENTNAME);
+                                $("#name").val(data.ENTNAME).change();
                                 $("#uscCode").val(data.TAXNUMBER);
                                 $("#registerAddress").val(data.OPLOC);
                             }
@@ -355,8 +407,9 @@
                 <div class="layui-item layui-col-sm6 lw7" id="search">
                     <label class="layui-form-label"><span class="require-item">*</span>客户名称:&nbsp;&nbsp;</label>
                     <div class="layui-input-block">
-                        <form:input path="name" htmlEscape="false" class="form-control required layui-input"/>
+                        <form:input path="name" htmlEscape="false" id="name" class="form-control required layui-input"/>
                         <a onclick="fuzzyQuery()"  class="nav-btn nav-btn-add" style="margin-right: 0px;top:0px;right:1px;position: absolute;height:40px;line-height: 40px;">查询</a>
+                        <span id="ph" style="color:#cc5965"></span>
                     </div>
                     <div id="fuzzyQuerySelect"
                          style="z-index:1;display:none;background-color:white; position: relative; width:333px;left:120px; border: 1px solid gray;">
@@ -382,7 +435,7 @@
                 <div class="layui-item layui-col-sm6 lw7 companyType_uscCode">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>统一社会信用代码:</label>
                     <div class="layui-input-block">
-                        <form:input path="uscCode" htmlEscape="false" class="form-control required isUscCode layui-input" readonly="true"/>
+                        <form:input path="uscCode" htmlEscape="false" id="uscCode" class="form-control required isUscCode layui-input"/>
                         <input type="hidden" id="oldUscCode" value="${workClientInfo.uscCode}"/>
                     </div>
                 </div>

+ 34 - 57
src/main/webapp/webpage/modules/worklog/workLogFormView.jsp

@@ -20,17 +20,17 @@
 		  return false;
 		}
 		$(document).ready(function() {
-			if("${workLog.logType}" == "1"){
-				$("#logType1").iCheck('check')
-			}else if("${workLog.logType}" == "2"){
-				$("#logType2").iCheck('check')
-			}else if("${workLog.logType}" == "3"){
-				$("#logType3").iCheck('check')
-			}else if("${workLog.logType}" == "4"){
-				$("#logType5").iCheck('check')
-			}else if("${workLog.logType}" == "5"){
-				$("#logType5").iCheck('check')
-			}
+			<%--if("${workLog.logType}" == "1"){--%>
+				<%--$("#logType1").iCheck('check')--%>
+			<%--}else if("${workLog.logType}" == "2"){--%>
+				<%--$("#logType2").iCheck('check')--%>
+			<%--}else if("${workLog.logType}" == "3"){--%>
+				<%--$("#logType3").iCheck('check')--%>
+			<%--}else if("${workLog.logType}" == "4"){--%>
+				<%--$("#logType5").iCheck('check')--%>
+			<%--}else if("${workLog.logType}" == "5"){--%>
+				<%--$("#logType5").iCheck('check')--%>
+			<%--}--%>
 
 			// if($("#startDate").val()==null || $("#startDate").val()==''){
 			// 	$("#startDate").val(getNowFormatDate());
@@ -56,62 +56,33 @@
             //     lang: 'zh-CN',
 			// 	height:'300px'
             // });
-            getCurrentDocumentHei();
+            // getCurrentDocumentHei();
+
+			// laydate.render({
+			// 	elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			// 	format: 'yyyy-MM-dd',
+			// 	type : 'date'
+			// });
 
-			laydate.render({
-				elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
-				format: 'yyyy-MM-dd',
-				type : 'date'
-			});
 
-			$("#attachment_btn").click(function () {
-				$("#attachment_file").click();
-			});
 		});
-        function getCurrentDocumentHei(){
-            var height = $(document).outerHeight();
-            parent.$("#controltype").attr("height",height +"px")
-		}
+        // function getCurrentDocumentHei(){
+        //     var height = $(document).outerHeight();
+        //     parent.$("#controltype").attr("height",height +"px")
+		// }
+
 
-		function getNowFormatDate() {
-			var date = new Date();
-			var seperator1 = "-";
-			var seperator2 = ":";
-			var month = date.getMonth() + 1;
-			var strDate = date.getDate();
-			month = (month < 10)?"0"+month:month;
-			strDate = (strDate < 10)?"0"+strDate:strDate;
-			var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
-			return currentdate;
-		}
 
-		function insertTitle(tValue){
-			var list = "${workClientInfo.workAttachments}";
-			var size = (list.split('url')).length-1;
-			var files = $("#attachment_file")[0].files;
-			for(var i = 0;i<files.length;i++) {
-				var file = files[i];
-				var attachmentId = "";
-				var attachmentFlag = "5";
-				console.log(file);
-				var timestamp = new Date().getTime();
 
-				var storeAs = "attachment-file/workClientInfo/" + timestamp + "/" + file['name'];
-				var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
-				/*将这段字符串存到数据库即可*/
-				var divId = "_attachment";
-				$("#addFile" + divId).show();
-				multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
-			}
 		}
 
 
 	</script>
-	<style>
-		.note-editor .panel-heading{
-			padding:3px 5px;
-		}
-	</style>
+	<%--<style>--%>
+		<%--.note-editor .panel-heading{--%>
+			<%--padding:3px 5px;--%>
+		<%--}--%>
+	<%--</style>--%>
 </head>
 <body>
 <div class="single-form">
@@ -172,6 +143,12 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">风向:</label>
+					<div class="layui-input-block">
+						<input id="wind" name="workLog.wind" htmlEscape="false"    class="form-control  layui-input" value="${projectControlTable.workLog.wind}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
 					<label class="layui-form-label"><span class="require-item">*</span>日志主题:</label>
 					<div class="layui-input-block">
 						<input id="theme" name="workLog.theme" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.theme}"/>

+ 26 - 48
src/main/webapp/webpage/modules/worklog/workMeetFormView.jsp

@@ -46,62 +46,34 @@
             //     lang: 'zh-CN',
 			// 	height:'300px'
             // });
-            getCurrentDocumentHei();
+            // getCurrentDocumentHei();
 
-			laydate.render({
-				elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
-				format: 'yyyy-MM-dd',
-				type : 'date'
-			});
+			// laydate.render({
+			// 	elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+			// 	format: 'yyyy-MM-dd',
+			// 	type : 'date'
+			// });
 
-			$("#attachment_btn").click(function () {
-				$("#attachment_file").click();
-			});
+			// $("#attachment_btn").click(function () {
+			// 	$("#attachment_file").click();
+			// });
 		});
-        function getCurrentDocumentHei(){
-            var height = $(document).outerHeight();
-            parent.$("#controltype").attr("height",height +"px")
-		}
+        // function getCurrentDocumentHei(){
+        //     var height = $(document).outerHeight();
+        //     parent.$("#controltype").attr("height",height +"px")
+		// }
+
 
-		function getNowFormatDate() {
-			var date = new Date();
-			var seperator1 = "-";
-			var seperator2 = ":";
-			var month = date.getMonth() + 1;
-			var strDate = date.getDate();
-			month = (month < 10)?"0"+month:month;
-			strDate = (strDate < 10)?"0"+strDate:strDate;
-			var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
-			return currentdate;
-		}
 
-		function insertTitle(tValue){
-			var list = "${workClientInfo.workAttachments}";
-			var size = (list.split('url')).length-1;
-			var files = $("#attachment_file")[0].files;
-			for(var i = 0;i<files.length;i++) {
-				var file = files[i];
-				var attachmentId = "";
-				var attachmentFlag = "5";
-				console.log(file);
-				var timestamp = new Date().getTime();
 
-				var storeAs = "attachment-file/workClientInfo/" + timestamp + "/" + file['name'];
-				var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
-				/*将这段字符串存到数据库即可*/
-				var divId = "_attachment";
-				$("#addFile" + divId).show();
-				multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, size);
-			}
-		}
 
 
 	</script>
-	<style>
-		.note-editor .panel-heading{
-			padding:3px 5px;
-		}
-	</style>
+	<%--<style>--%>
+		<%--.note-editor .panel-heading{--%>
+			<%--padding:3px 5px;--%>
+		<%--}--%>
+	<%--</style>--%>
 </head>
 <body>
 <div class="single-form">
@@ -153,7 +125,13 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>日志主题:</label>
+					<label class="layui-form-label">风向:</label>
+					<div class="layui-input-block">
+						<input id="wind1" name="workMeeting.wind" htmlEscape="false"    class="form-control  layui-input" value="${projectControlTable.workMeeting.wind}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>会议主题:</label>
 					<div class="layui-input-block">
 						<input id="theme" name="workLog.theme" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.theme}"/>
 					</div>

+ 2 - 2
src/main/webapp/webpage/modules/workreview/workReviewStandardList.jsp

@@ -30,7 +30,7 @@
 
 					<div class="commonQuery">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">标准内容:</label>
+							<label class="layui-form-label">复核内容:</label>
 							<div class="layui-input-block with-icon">
 								<form:input path="standardDetail" htmlEscape="false" class=" form-control layui-input"></form:input>
 							</div>
@@ -65,7 +65,7 @@
 					<table id="treeTable" class="table table-bordered table-hover list-table">
 						<thead>
 							<tr>
-								<th  width="40%">标准内容</th>
+								<th  width="40%">复核内容</th>
 								<th  >最多扣分</th>
 								<th >序号</th>
 								<th width="240px">操作</th>

+ 3 - 3
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoForm.jsp

@@ -477,14 +477,14 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
-                    <label class="layui-form-label"><span class="require-item">*</span>职    级:</label>
+                    <label class="layui-form-label">职    级:</label>
                     <div class="layui-input-block with-icon">
                         <sys:treeselectJobGrade id="jobGrade" name="jobGrade.id" value="${workStaffBasicInfo.jobGrade.id}" labelName="jobGrade.name" labelValue="${workStaffBasicInfo.jobGrade.name}"
-                                                title="职级类型" url="/workjobgrade/workJobGrade/treeData"  cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
+                                                title="职级类型" url="/workjobgrade/workJobGrade/treeData"  cssClass="form-control layui-input " allowClear="true" notAllowSelectParent="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
-                    <label class="layui-form-label"><span class="require-item">*</span>基本工资:</label>
+                    <label class="layui-form-label">基本工资:</label>
                     <div class="layui-input-block with-icon">
                         <input id="salary" htmlEscape="false" readonly value="<fmt:formatNumber pattern="#,##0.00#" value="${workStaffBasicInfo.salary}"/>" class="form-control layui-input"/>
                     </div>