Parcourir la source

项目修改,项目类型展示

user5 il y a 4 ans
Parent
commit
804442e86b

+ 8 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java

@@ -381,10 +381,18 @@ public class RuralCostProjectRecordsController extends BaseController {
 		projectRecordsService.queryProjectDetail(projectRecords);
 		ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
 		projectPlanInfo.setProjectId(projectRecords.getId());
+		if(null != projectRecords.getWorkContractInfo()){
+			if(null != projectRecords.getWorkContractInfo().getContractTypeDoc()){
+				projectRecords.getWorkContractInfo().setContractType(DictUtils.getMainDictLabel(String.valueOf(projectRecords.getWorkContractInfo().getContractTypeDoc()),"contract_info_type",""));
+			}
+		}
 		//获取项目计划信息
 		List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
 		//项目计划附件信息
 		List<WorkClientAttachment> projectPlanAttachment = projectPlanService.getWorkAttachment(projectRecords.getId());
+		//获取工程类型
+		ProjectEngineeringInfo engineeringInfos=engineeringService.get(projectRecords.getEngineeringType());
+		model.addAttribute("engineeringInfo", engineeringInfos);
 		projectRecords.setProjectPlanList(projectPlanList);
 		projectRecords.setWorkAttachments(projectPlanAttachment);
 		model.addAttribute("projectRecords", projectRecords);

+ 8 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java

@@ -391,10 +391,18 @@ public class RuralProjectRecordsController extends BaseController {
 		projectRecordsService.queryProjectDetail(projectRecords);
 		ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
 		projectPlanInfo.setProjectId(projectRecords.getId());
+		if(null != projectRecords.getWorkContractInfo()){
+			if(null != projectRecords.getWorkContractInfo().getContractTypeDoc()){
+				projectRecords.getWorkContractInfo().setContractType(DictUtils.getMainDictLabel(String.valueOf(projectRecords.getWorkContractInfo().getContractTypeDoc()),"contract_info_type",""));
+			}
+		}
 		//获取项目计划信息
 		List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
 		//项目计划附件信息
 		List<WorkClientAttachment> projectPlanAttachment = projectPlanService.getWorkAttachment(projectRecords.getId());
+		//获取工程类型
+		ProjectEngineeringInfo engineeringInfos=engineeringService.get(projectRecords.getEngineeringType());
+		model.addAttribute("engineeringInfo", engineeringInfos);
 		projectRecords.setProjectPlanList(projectPlanList);
 		projectRecords.setWorkAttachments(projectPlanAttachment);
 		model.addAttribute("projectRecords", projectRecords);

+ 6 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -626,6 +626,12 @@
 		    ending_date =  #{endingDate},
 		    estimate_total_fees = #{estimateTotalFees},
 		    attachment_project_sort = #{attachmentProjectSort}
+			<if test="engineeringType != null and engineeringType != ''">
+				,engineering_type =#{engineeringType}
+			</if>
+			<if test="submitMoney != null and submitMoney != ''">
+				,submit_money =#{submitMoney}
+			</if>
 		WHERE id = #{id}
 	</update>
 

+ 48 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsAdminModify.jsp

@@ -8,6 +8,8 @@
     <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
 	<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
 	<style>
         .disables {
             pointer-events: none;
@@ -83,6 +85,25 @@
                         $("#divv3").hide();
                     }
                 });
+                $.ajax({
+                    type : "POST",
+                    url : "${ctx}/ruralProject/ruralProjectRecords/engineeringTreeMenu",
+                    //请求成功
+                    success : function(result) {
+                        var s='{"title": "menu item 4","id": "4"}'
+                        var str=jQuery.parseJSON(result);
+                        //工程类型树形菜单
+                        layui.dropdown.render({
+                            elem: '#demo100'
+                            ,style: 'width: 450px;'
+                            ,data:str
+                            ,click: function(item){
+                                $("#demo100").find("span").html(item.title)
+                                $("#demo100").find("#engineeringType").val(item.id)
+                            }
+                        });
+                    }
+                });
             });
             var radioVal ;
             validateForm = $("#inputForm").validate({
@@ -634,7 +655,7 @@
                         <div class="layui-item layui-col-sm6 lw7">
                             <label class="layui-form-label">合同类型:</label>
                             <div class="layui-input-block">
-                                <input htmlEscape="false"  readonly="true" id="constructionProjectType"  class="form-control layui-input" value="${ruralProjectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                                <input htmlEscape="false"  readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${projectRecords.workContractInfo.contractType}"/>
                             </div>
                         </div>
                     </div>
@@ -765,7 +786,7 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目责人:</label>
+                    <label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
                     </div>
@@ -776,6 +797,30 @@
                         <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${projectRecords.officeName}"/>
                     </div>
                 </div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label">项目负责人:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${projectRecords.projectMasterName}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>工程类型:</label>
+                    <div class="layui-input-block">
+                        <button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">
+                            <span>${engineeringInfo.engineeringName}</span>
+                            <input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+                            <i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
+                        </button>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>送审规模:</label>
+                    <div class="layui-input-block">
+                        <c:forEach items="${fns:getMainDictListOnProjectAdvent('attachment_project_approval_money')}" var="v">
+                            <input type="radio" name="submitMoney" id="submitMoney" value="${v.value}" title="${v.label}" <c:if test="${ruralProjectRecords.submitMoney==v.value}">checked</c:if>>
+                        </c:forEach>
+                    </div>
+                </div>
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">工作开始日期:</label>
                     <div class="layui-input-block">
@@ -1147,4 +1192,4 @@
 </div>
 
 </body>
-</html>
+</html>

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp

@@ -945,7 +945,7 @@
 <%--                        </select>--%>
                         <button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">
                             <span>${engineeringInfo.engineeringName}</span>
-                            <input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.engineeringName}"/>
+                            <input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
                             <i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
                         </button>
                     </div>

+ 111 - 21
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAdminModify.jsp

@@ -4,8 +4,12 @@
 <head>
 	<title>项目管理</title>
 	<meta name="decorator" content="default"/>
-	<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
-	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+    <script type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
 	<style>
         .disables {
             pointer-events: none;
@@ -37,10 +41,70 @@
 		  }else{
               parent.layer.msg("信息未填写完整!", {icon: 5});
           }
-	
+
 		  return false;
 		}
-		$(document).ready(function() {
+        $(document).ready(function() {
+            var id;
+            var name;
+            var cname;
+            var cprice;
+            var ccname;
+            var cptype;
+            if ($("#contractIdId").val()!=null || $("#contractIdId").val()!=''){
+                id=$("#contractIdId").val();
+                name=$("#contractIdName").val();
+                cname=$("#contractName").val();
+                cprice=$("#contractPrice").val();
+                ccname=$("#contractClientName").val();
+                cptype=$("#constructionProjectType").val();
+            }
+            layui.use(['form', 'layer'], function () {
+                var form = layui.form;
+                //有无合同监听器
+                layui.form.on('radio(ext)', function(data){
+                    var span=data.value;
+                    if(span==0){
+                        $("#contractIdId").val(id);
+                        $("#contractIdName").val(name);
+                        $("#contractName").val(cname);
+                        $("#contractPrice").val(cprice);
+                        $("#contractClientName").val(ccname);
+                        $("#constructionProjectType").val(cptype);
+                        $("#divv").show();
+                        $("#divv3").show();
+                    }else{
+                        var h=$("#d1").html();
+                        $("#contractIdId").val("");
+                        $("#contractIdName").val("");
+                        $("#contractName").val("");
+                        $("#contractPrice").val("");
+                        $("#contractClientName").val("");
+                        $("#constructionProjectType").val("");
+                        $("#divv").hide();
+                        $("#divv3").hide();
+                    }
+                });
+                $.ajax({
+                    type : "POST",
+                    url : "${ctx}/ruralProject/ruralProjectRecords/engineeringTreeMenu",
+                    //请求成功
+                    success : function(result) {
+                        var s='{"title": "menu item 4","id": "4"}'
+                        var str=jQuery.parseJSON(result);
+                        //工程类型树形菜单
+                        layui.dropdown.render({
+                            elem: '#demo100'
+                            ,style: 'width: 450px;'
+                            ,data:str
+                            ,click: function(item){
+                                $("#demo100").find("span").html(item.title)
+                                $("#demo100").find("#engineeringType").val(item.id)
+                            }
+                        });
+                    }
+                });
+            });
             var radioVal ;
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
@@ -97,18 +161,20 @@
             });
 
             //自动选择合同状态
-            if ($("#projectName").val() != null) {
+            if ($("#projectName").val() != "") {
                 if ($("#contractName").val() == "") {
                     $("#ext1").iCheck("check");
+                }else{
+                    $("#ext").iCheck("check");
                 }
             }
 
             <%--$('#scaleType').editableSelect({--%>
-                <%--effects: 'slide'--%>
+            <%--effects: 'slide'--%>
             <%--});--%>
             <%--$('#scaleType').val("${projectRecords.scaleType}")--%>
             <%--$('#scaleUnit').editableSelect({--%>
-                <%--effects: 'slide'--%>
+            <%--effects: 'slide'--%>
             <%--});--%>
             <%--$('#scaleUnit').val("${projectRecords.scaleUnit}")--%>
             $('#areaId').on("change", function () {
@@ -161,15 +227,15 @@
                 elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                 event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                 type : 'date'
-, trigger: 'click'
+                , trigger: 'click'
             });
             laydate.render({
                 elem: '#endingDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
                 event: 'focus', //响应事件。如果没有传入event,则按照默认的click
                 type : 'date'
-, trigger: 'click'
+                , trigger: 'click'
             });
-		});
+        });
 
         function setContractValue(obj){
             var clientId = $("#contractClientId").val();
@@ -304,7 +370,7 @@
                 }
             }
         }
-		
+
         function existConstructionLinkman(obj,length) {
             for (var i=0;i<length;i++) {
                 var val = $('#workConstructionLinkmanList'+i+'_id').val();
@@ -335,7 +401,7 @@
         function addFile() {
             $("#attachment_file").click();
         }
-        
+
         function addRow(list, idx, tpl, row){
             // var idx1 = $("#workClientLinkmanList tr").length;
                 bornTemplete(list, idx, tpl, row, idx);
@@ -538,7 +604,7 @@
 <body >
 <div class="single-form">
     <div class="container">
-		<form:form id="inputForm" modelAttribute="projectRecords" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectRecords/adminUpdate" method="post" class="form-horizontal">
+		<form:form id="inputForm" modelAttribute="projectRecords" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectRecords/adminUpdate" method="post" class="form-horizontal layui-form">
 		    <form:hidden path="id"/>
             <form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
             <input type="hidden" id="flagFile" value="">
@@ -550,10 +616,10 @@
                     <div class="layui-item layui-col-sm6 lw7">
                         <label class="layui-form-label">合同情况:</label>
                         <div class="layui-input-block">
-                            <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
-                            <label for="ext">有合同</label>
-                            <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
-                            <label for="ext1">无合同</label>
+                            <input type="radio" title="有合同" lay-filter="ext" name="ext" checked id="ext" value="0">
+                                <%--                            <label for="ext">有合同</label>--%>
+                            <input type="radio" title="无合同" lay-filter="ext" name="ext" id="ext1" value="1">
+                                <%--                            <label for="ext1">无合同</label>--%>
                         </div>
                     </div>
                 </div>
@@ -587,9 +653,9 @@
                     </div>
                     <div id="divv3">
                         <div class="layui-item layui-col-sm6 lw7">
-                            <label class="layui-form-label">工程分类:</label>
+                            <label class="layui-form-label">合同类型:</label>
                             <div class="layui-input-block">
-                                <input htmlEscape="false"  readonly="true" id="constructionProjectType"  class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                                <input htmlEscape="false"  readonly="true" style="background-color: #f1f1f1" class="form-control layui-input" value="${projectRecords.workContractInfo.contractType}"/>
                             </div>
                         </div>
                     </div>
@@ -712,7 +778,7 @@
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
-                    <label class="layui-form-label">项目责人:</label>
+                    <label class="layui-form-label">项目责人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
                     </div>
@@ -723,6 +789,30 @@
                         <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${projectRecords.officeName}"/>
                     </div>
                 </div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label">项目负责人:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${projectRecords.projectMasterName}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>工程类型:</label>
+                    <div class="layui-input-block">
+                        <button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">
+                            <span>${engineeringInfo.engineeringName}</span>
+                            <input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+                            <i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
+                        </button>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>送审规模:</label>
+                    <div class="layui-input-block">
+                        <c:forEach items="${fns:getMainDictListOnProjectAdvent('attachment_project_approval_money')}" var="v">
+                            <input type="radio" name="submitMoney" id="submitMoney" value="${v.value}" title="${v.label}" <c:if test="${ruralProjectRecords.submitMoney==v.value}">checked</c:if>>
+                        </c:forEach>
+                    </div>
+                </div>
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label double-line">工作开始日期:</label>
                     <div class="layui-input-block">
@@ -1093,4 +1183,4 @@
 </div>
 
 </body>
-</html>
+</html>