Browse Source

项目类型添加数据库project_records添加字段type_id项目类型和审批之后修改提交

user7 5 years ago
parent
commit
11863b30a9
20 changed files with 239 additions and 18 deletions
  1. 4 0
      src/main/java/com/jeeplus/modules/projectType/dao/ProjectTypeDao.java
  2. 1 0
      src/main/java/com/jeeplus/modules/projectType/entity/ProjectType.java
  3. 8 0
      src/main/java/com/jeeplus/modules/projectType/service/ProjectTypeService.java
  4. 3 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectRecordsDao.java
  5. 11 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecords.java
  6. 10 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordsAlter.java
  7. 24 0
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsAlterService.java
  8. 2 0
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java
  9. 2 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectRecordsController.java
  10. 23 1
      src/main/java/com/jeeplus/modules/sys/utils/DictUtils.java
  11. 5 0
      src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml
  12. 12 5
      src/main/resources/mappings/modules/projectrecord/ProjectRecordsAlterDao.xml
  13. 16 5
      src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml
  14. 8 0
      src/main/webapp/WEB-INF/tlds/fns.tld
  15. 14 3
      src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterAudit.jsp
  16. 21 0
      src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterForm.jsp
  17. 3 3
      src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterView.jsp
  18. 18 1
      src/main/webapp/webpage/modules/projectrecord/projectRecordsAudit.jsp
  19. 38 0
      src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp
  20. 16 0
      src/main/webapp/webpage/modules/projectrecord/projectRecordsView.jsp

+ 4 - 0
src/main/java/com/jeeplus/modules/projectType/dao/ProjectTypeDao.java

@@ -47,4 +47,8 @@ public interface ProjectTypeDao extends CrudDao<ProjectType> {
 
 	Integer deleteProjectTypeById(String id);
 
+	/**
+	 * 初始化加载获取项目类型到下拉框
+	 */
+	List<ProjectType> getProjectType();
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/projectType/entity/ProjectType.java

@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
  */
 public class ProjectType extends DataEntity<ProjectType> {
     private static final long serialVersionUID = 1L;
+
     private String parentId;	// 父级ID
     private String parentIds; // 所有父级编号
     private String typeName; 	// 类型名称

+ 8 - 0
src/main/java/com/jeeplus/modules/projectType/service/ProjectTypeService.java

@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 项目类型service
@@ -87,4 +88,11 @@ public class ProjectTypeService extends CrudService<ProjectTypeDao, ProjectType>
     public void deleteByLogic(ProjectType projectType) {
         dao.deleteByLogic(projectType);
     }
+
+    /**
+     * 初始化加载获取项目类型到下拉框
+     */
+    public List<ProjectType> getProjectType() {
+        return projectTypeDao.getProjectType();
+    }
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectRecordsDao.java

@@ -8,6 +8,7 @@ import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 项目登记DAO接口
@@ -31,4 +32,6 @@ public interface ProjectRecordsDao extends CrudDao<ProjectRecords> {
     List<ProjectRecords> findPageByRe(ProjectRecords records);
     int queryCount(ProjectRecords records);
     int queryCountByStatus(ProjectRecords records);
+
+
 }

+ 11 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecords.java

@@ -57,6 +57,9 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 	private Double installUnitFees;    //安装单位造价
 	private Double totalFees;        //总合同额
 
+	//新添代码
+	private String projectTypeId; //项目类型
+
 	private ProjectReportData reportData;//报告
 
 	public ProjectReportData getReportData() {
@@ -569,4 +572,12 @@ public class ProjectRecords extends ActEntity<ProjectRecords> {
 	public void setProjectReportData(List<ProjectReportData> projectReportData) {
 		this.projectReportData = projectReportData;
 	}
+
+	public String getProjectTypeId() {
+		return projectTypeId;
+	}
+
+	public void setProjectTypeId(String projectTypeId) {
+		this.projectTypeId = projectTypeId;
+	}
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordsAlter.java

@@ -90,6 +90,8 @@ public class ProjectRecordsAlter extends ActEntity<ProjectRecordsAlter> {
 	private String alterProjectId;
 
     private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+	//新添代码
+	private String projectTypeId; //项目类型
 
 	public ProjectRecordsAlter() {
 		super();
@@ -515,4 +517,12 @@ public class ProjectRecordsAlter extends ActEntity<ProjectRecordsAlter> {
 	public void setTotalFees(Double totalFees) {
 		this.totalFees = totalFees;
 	}
+
+	public String getProjectTypeId() {
+		return projectTypeId;
+	}
+
+	public void setProjectTypeId(String projectTypeId) {
+		this.projectTypeId = projectTypeId;
+	}
 }

+ 24 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsAlterService.java

@@ -324,6 +324,10 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
 	 * @param projectRecordsAlter
 	 */
     private void startAudit(ProjectRecordsAlter projectRecordsAlter,String processInstanceId) throws Exception {
+        //保存项目负责人(新添代码start)
+        List<User> lds = projectRecordsAlter.getProjectLeaders();
+        User user2=new User();
+
         Map<String, Object> variables = new HashMap<String, Object>();
         identityService.setAuthenticatedUserId(projectRecordsAlter.getCurrentUser().getId());
         Office office = projectRecordsAlter.getOffice();
@@ -338,6 +342,26 @@ public class ProjectRecordsAlterService extends CrudService<ProjectRecordsAlterD
         String processType = workActivityMenu.getProcessType();
         StringBuffer buffer = new StringBuffer();
         Activity activity = new Activity();
+        /*//新增代码----------
+        if(null!=lds&&lds.size()>0){
+            this.saveProjectUsers(projectRecordsAlter.getId(), lds, true);
+            for(int i=0;i<lds.size();i++){
+                user2.setId(lds.get(i).getId());
+                workProjectNotifyService
+                        .save(UtilNotify
+                                .saveNotify(projectRecordsAlter.getId(),
+                                        *//*projectRecords.getCreateBy(),*//*
+                                        user2,
+                                        projectRecordsAlter.getCompany().getId(),
+                                        titleStr,
+                                        notifyStr,
+                                        "39",
+                                        "0",
+                                        "待通知",
+                                        notifyRole));
+            }
+
+        }*/
         WorkProjectNotify workProjectNotify = UtilNotify
                 .saveNotify(projectRecordsAlter.getId(),
                         null,

+ 2 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectRecordsService.java

@@ -110,6 +110,8 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
     private WorkActivityProcessDao workActivityProcessDao;
     @Autowired
 	private ProjectReportDataDao projectReportDataDao;
+	@Autowired
+	private ProjectRecordsDao projectRecordsDao;
 
 	public ProjectRecords get(String id) {
 		return super.get(id);

+ 2 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectRecordsController.java

@@ -639,4 +639,6 @@ public class ProjectRecordsController extends BaseController {
 		}
 		return null;
 	}
+
+
 }

+ 23 - 1
src/main/java/com/jeeplus/modules/sys/utils/DictUtils.java

@@ -9,6 +9,9 @@ import com.google.common.collect.Maps;
 import com.jeeplus.common.utils.CacheUtils;
 import com.jeeplus.common.utils.JedisUtils;
 import com.jeeplus.common.utils.SpringContextHolder;
+import com.jeeplus.modules.projectType.dao.ProjectTypeDao;
+import com.jeeplus.modules.projectType.entity.ProjectType;
+import com.jeeplus.modules.projectrecord.dao.ProjectRecordsDao;
 import com.jeeplus.modules.sys.dao.DictDao;
 import com.jeeplus.modules.sys.dao.MainDictDetailDao;
 import com.jeeplus.modules.sys.entity.Dict;
@@ -36,7 +39,7 @@ public class DictUtils {
 	private static DictDao dictDao = SpringContextHolder.getBean(DictDao.class);
 	private static MainDictService mainDictService = SpringContextHolder.getBean(MainDictService.class);
 	private static MainDictDetailDao mainDictDetailDao = SpringContextHolder.getBean(MainDictDetailDao.class);
-
+	private static ProjectTypeDao projectTypeDao=SpringContextHolder.getBean(ProjectTypeDao.class);
 	public static final String CACHE_DICT_MAP = "dictMap";
 	public static final String MAIN_DICT_MAP = "mainDictMap";
 	public static String getDictLabel(String value, String type, String defaultValue){
@@ -188,6 +191,25 @@ public class DictUtils {
 		return dictList;
 	}
 
+	/**
+	 * 项目类型业务字典
+	 * @param type
+	 * @return
+	 */
+	public static List<ProjectType> getProjectType(){
+
+		List<ProjectType> dictList=new ArrayList<>();
+		try {
+			dictList = projectTypeDao.getProjectType();
+			return dictList;
+
+		} catch (Exception e) {
+			System.out.println("获取项目类型失败!");
+		} finally {
+
+		}
+		return dictList;
+	}
 	/*public static List<MainDictDetail> getMainDictListView(String type){
 		boolean admin = UserUtils.getUser().isAdmin();
 		String comId=UserUtils.getSelectCompany().getId();

+ 5 - 0
src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml

@@ -154,4 +154,9 @@
 	<select id="findUniqueByProperty" resultType="com.jeeplus.modules.projectType.entity.ProjectType" statementType="STATEMENT">
 		select * FROM project_type  where ${propertyName} = '${value}'
 	</select>
+
+	<select id="getProjectType" resultType="com.jeeplus.modules.projectType.entity.ProjectType">
+		select type_id as "typeId",type_name as "typeName" from project_type where parent_id="0"
+	</select>
+
 </mapper>

+ 12 - 5
src/main/resources/mappings/modules/projectrecord/ProjectRecordsAlterDao.xml

@@ -42,7 +42,8 @@
 		a.unit_fees AS "unitFees",
 		a.building_unit_fees AS "buildingUnitFees",
 		a.install_unit_fees AS "installUnitFees",
-		a.total_fees AS "totalFees"
+		a.total_fees AS "totalFees",
+		a.type_id As "projectTypeId"
 	</sql>
 	
 	<sql id="ProjectRecordsAlterJoins">
@@ -167,7 +168,8 @@
 		    unit_fees,
 		    building_unit_fees,
 		    install_unit_fees,
-		    total_fees
+		    total_fees,
+		    type_id
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -206,7 +208,8 @@
 			#{unitFees},
 			#{buildingUnitFees},
 			#{installUnitFees},
-			#{totalFees}
+			#{totalFees},
+			#{projectTypeId}
 		)
 	</insert>
 	
@@ -246,7 +249,8 @@
 		    unit_fees = #{unitFees},
 		    building_unit_fees = #{buildingUnitFees},
 		    install_unit_fees =  #{installUnitFees},
-		    total_fees =  #{totalFees}
+		    total_fees =  #{totalFees},
+			type_id = #{projectTypeId}
 		WHERE id = #{id}
 	</update>
 	
@@ -329,7 +333,10 @@
 				alter_before_id = #{alterBeforeRecords.id},
 			</if>
 			<if test="alterProjectId!=null and alterProjectId!=''">
-                alter_project_id = #{alterProjectId}
+                alter_project_id = #{alterProjectId},
+			</if>
+			<if test="projectTypeId!=null and projectTypeId!=''">
+				type_id = #{projectTypeId}
 			</if>
 		</set>
 		WHERE id = #{id}

+ 16 - 5
src/main/resources/mappings/modules/projectrecord/ProjectRecordsDao.xml

@@ -41,7 +41,8 @@
 		a.unit_fees AS "unitFees",
 		a.building_unit_fees AS "buildingUnitFees",
 		a.install_unit_fees AS "installUnitFees",
-		a.total_fees AS "totalFees"
+		a.total_fees AS "totalFees",
+		a.type_id As "projectTypeId"
 	</sql>
 	
 	<sql id="projectRecordsJoins">
@@ -382,7 +383,8 @@
 		    unit_fees,
 		    building_unit_fees,
 		    install_unit_fees,
-		    total_fees
+		    total_fees,
+		    type_id
 		) VALUES (
 			#{id},
 			#{createBy.id},
@@ -420,7 +422,8 @@
 			#{unitFees},
 			#{buildingUnitFees},
 			#{installUnitFees},
-			#{totalFees}
+			#{totalFees},
+			#{projectTypeId}
 		)
 	</insert>
 	
@@ -458,7 +461,8 @@
 		    unit_fees = #{unitFees},
 		    building_unit_fees = #{buildingUnitFees},
 		    install_unit_fees =  #{installUnitFees},
-		    total_fees =  #{totalFees}
+		    total_fees =  #{totalFees},
+		    type_id = #{projectTypeId}
 		WHERE id = #{id}
 	</update>
 	
@@ -550,7 +554,10 @@
 				office_id = #{office.id},
 			</if>
 			<if test="alterProcessId!=null and alterProcessId!=''">
-                alter_process_id = #{alterProcessId}
+                alter_process_id = #{alterProcessId},
+			</if>
+			<if test="projectTypeId!=null and projectTypeId!=''">
+				type_id = #{projectTypeId}
 			</if>
 		</set>
 		WHERE id = #{id}
@@ -604,6 +611,9 @@
 			<if test="alterProcessId!=null and alterProcessId!=''">
 				alter_process_id = #{alterProcessId}
 			</if>
+			<if test="projectTypeId!=null and projectTypeId!=''">
+				type_id = #{projectTypeId}
+			</if>
 		</set>
 		WHERE project_id = #{projectId}
 	</update>
@@ -638,4 +648,5 @@
 			</otherwise>
 		</choose>
 	</select>
+
 </mapper>

+ 8 - 0
src/main/webapp/WEB-INF/tlds/fns.tld

@@ -386,4 +386,12 @@
     <function-signature>java.lang.String uuid()</function-signature>
     <example>${fns:getUUid()}</example>
   </function>
+
+  <function>
+    <description>获取项目类型字典对象列表</description>
+    <name>getProjectType</name>
+    <function-class>com.jeeplus.modules.sys.utils.DictUtils</function-class>
+    <function-signature>java.util.List getProjectType()</function-signature>
+    <example>${fns:getProjectType()}</example>
+  </function>
 </taglib>

+ 14 - 3
src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterAudit.jsp

@@ -184,12 +184,23 @@
                                          title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                     </div>
                 </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectRecordsAlter.projectTypeId}" readonly="true">
+                            <%--<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                            <form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId"></form:options>
+                        </form:select>
+                    </div>
+                </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">变更人:</label>
                     <div class="layui-input-block">
                         <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.createBy.name}"/>
                     </div>
                 </div>
+
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label">变更日期:</label>
                     <div class="layui-input-block">
@@ -199,7 +210,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" class="form-control layui-input" value="${projectRecords.projectStructure}"/>
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.projectStructure}"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
@@ -223,13 +234,13 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label">计量单位:</label>
                     <div class="layui-input-block">
-                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.measuringUnit}"/>
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.measuringUnit}"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label">工程用途:</label>
                     <div class="layui-input-block">
-                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectUse}"/>
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.projectUse}"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">

+ 21 - 0
src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterForm.jsp

@@ -520,6 +520,27 @@
                                          title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                     </div>
                 </div>
+
+                <%--<div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectRecordsAlter.projectTypeId}">
+                            &lt;%&ndash;<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>&ndash;%&gt;
+                            <form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId"></form:options>
+                        </form:select>
+                    </div>
+                </div>--%>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectRecordsAlter.projectTypeId}">
+                            <%--<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                            <form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId"></form:options>
+                        </form:select>
+                    </div>
+                </div>
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label">变更人:</label>
                     <div class="layui-input-block">

+ 3 - 3
src/main/webapp/webpage/modules/projectrecord/projectRecordsAlterView.jsp

@@ -164,7 +164,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" class="form-control layui-input" value="${projectRecords.projectStructure}"/>
+                                    <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.projectStructure}"/>
                                 </div>
                             </div>
                             <div class="layui-item layui-col-sm6 lw7">
@@ -188,13 +188,13 @@
                             <div class="layui-item layui-col-sm6 lw7">
                                 <label class="layui-form-label">计量单位:</label>
                                 <div class="layui-input-block">
-                                    <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.measuringUnit}"/>
+                                    <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.measuringUnit}"/>
                                 </div>
                             </div>
                             <div class="layui-item layui-col-sm6 lw7">
                                 <label class="layui-form-label">工程用途:</label>
                                 <div class="layui-input-block">
-                                    <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectUse}"/>
+                                    <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecordsAlter.projectUse}"/>
                                 </div>
                             </div>
                             <div class="layui-item layui-col-sm6 lw7">

+ 18 - 1
src/main/webapp/webpage/modules/projectrecord/projectRecordsAudit.jsp

@@ -220,12 +220,29 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6 lw6">
-					<label class="layui-form-label">项目负责人:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectt id="master" name="projectLeaders" value="${projectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${projectRecords.leaderNameStr}"
                                          title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                     </div>
 				</div>
+				<%--新添代码--%>
+				<%--<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目类型:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectTypeId}"/>
+					</div>
+				</div>--%>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">项目类型:</label>
+					<div class="layui-input-block">
+						<form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectTypeId}" readonly="true">
+							<%--<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+							<form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId"></form:options>
+						</form:select>
+					</div>
+				</div>
 				<div class="layui-item layui-col-sm6 lw6">
 					<label class="layui-form-label">创建人:</label>
 					<div class="layui-input-block">

+ 38 - 0
src/main/webapp/webpage/modules/projectrecord/projectRecordsForm.jsp

@@ -592,6 +592,26 @@
                                          title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required 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>
+                    <select id="projectType" class="layui-input-block  with-icon" name="projectTypeId">
+                        &lt;%&ndash;<c:forEach items="${projectTypeId}" var="type">
+                            <option value="${type.id}">${type.type_name}</option>
+                        </c:forEach>&ndash;%&gt;
+                    </select>
+                </div>--%>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目类型:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectTypeId}">
+                            <%--<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                            <form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId"></form:options>
+                        </form:select>
+                    </div>
+                </div>
+                
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label">创建人:</label>
                     <div class="layui-input-block">
@@ -780,6 +800,24 @@
                                 }
                             }
                         });
+                        //获取项目类型
+                        /*$(document).ready(function () {
+                            $.ajax({
+                                type:'post',
+                                url:'${ctx}/project/projectRecords/getProjectType',
+                                data:{
+
+                                },
+                                success:function(data){
+                                     console.log(data);
+                                    /!*var pro=$("#projectType");
+                                    for(var i=0;i<data.projectTypeId.length;i++){
+                                        var option="<option value="+data.projectTypeId[i].id+">"+data.projectTypeId[i].type_name+"</option>";
+                                        pro.append(option);
+                                    }*!/
+                                }
+                            });
+                        });*/
                     </script>
                 </div>
             </div>

+ 16 - 0
src/main/webapp/webpage/modules/projectrecord/projectRecordsView.jsp

@@ -182,6 +182,22 @@
 						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
 					</div>
 				</div>
+				<%--<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目类型:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectTypeId}"/>
+					</div>
+				</div>--%>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">项目类型:</label>
+					<div class="layui-input-block">
+						<form:select path="projectTypeId" class="form-control editable-select layui-input" id="projectTypeId" value="${projectTypeId}" readonly="true">
+							<%--<form:option value=""/>
+                            <form:options items="${fns:getProjectType()}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+							<form:options items="${fns:getProjectType()}" itemLabel="typeName" itemValue="typeId" readonly="true"></form:options>
+						</form:select>
+					</div>
+				</div>
 				<div class="layui-item layui-col-sm6 lw6">
 					<label class="layui-form-label">创建人:</label>
 					<div class="layui-input-block">