[user3] 4 лет назад
Родитель
Сommit
72e2e71c76

+ 22 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java

@@ -7,7 +7,10 @@ import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentTreeData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.ReportedConsultant;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.workcontent.entity.WorkContentClaim;
 import org.apache.ibatis.annotations.Param;
@@ -80,4 +83,23 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
 	 * @return
 	 */
 	WorkContentClaim getTypeByProjectIdAndContentId(@Param("projectId") String projectId ,@Param("contentId")  String contentId);
+	/**
+	 * 删除报告咨询员信息
+	 * @param projectId
+	 * @return
+	 */
+	int deleteConsultant(@Param("projectId") String projectId);
+	/**
+	 * 新增报告咨询员信息
+	 * @param info
+	 * @return
+	 */
+	int insertConsultant(RuralReportConsultant info);
+
+	/**
+	 * 根据项目id查找报告咨询员信息
+	 * @param projectId
+	 * @return
+	 */
+	List<RuralReportConsultant> findByProjectId(@Param("projectId") String projectId);
 }

+ 10 - 1
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java

@@ -11,6 +11,7 @@ import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.ReportedConsultant;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.sys.entity.Workattachment;
 
 import java.util.Date;
@@ -55,7 +56,7 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	private String monthlyContent;  //月报内容信息
 	private String monthlyNumber;   //月报编号
 
-	private List<ReportedConsultant> reportedConsultantList= Lists.newArrayList();;//咨询员列表
+	private List<RuralReportConsultant> reportedConsultantList= Lists.newArrayList();;//咨询员列表
 
 	private List<ProjectTemplateInfo> fileAttachmentList;   //报告文件
 	private List<ProjectTemplateInfo> fileGistdataList;   //依据性文件
@@ -323,4 +324,12 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	public void setFileOtherList(List<ProjectTemplateInfo> fileOtherList) {
 		this.fileOtherList = fileOtherList;
 	}
+
+	public List<RuralReportConsultant> getReportedConsultantList() {
+		return reportedConsultantList;
+	}
+
+	public void setReportedConsultantList(List<RuralReportConsultant> reportedConsultantList) {
+		this.reportedConsultantList = reportedConsultantList;
+	}
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralReportConsultant.java

@@ -79,4 +79,5 @@ public class RuralReportConsultant extends DataEntity<RuralReportConsultant> {
     public void setProjectId(String projectId) {
         this.projectId = projectId;
     }
+
 }

+ 25 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -517,6 +517,22 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         Projectcontentinfo contentinfo = projectcontentinfoDao.findListByProject(s).get(0);
         projectcontentinfo.setProjectOnRural(this.getInfo(projectcontentinfo.getProject().getId()));
         List<Workattachment> attachmentList = projectcontentinfo.getWorkAttachments();
+        //获取报告咨询员信息
+        List<RuralReportConsultant> ruralReportConsultants=projectcontentinfo.getReportedConsultantList();
+        //删除上报咨询员信息
+        projectcontentinfoDao.deleteConsultant(projectcontentinfo.getProjectOnRural().getId());
+        //保存咨询员信息
+        for (RuralReportConsultant info : projectcontentinfo.getReportedConsultantList()){
+            if (info.getId() == null){
+                continue;
+            }
+            //添加项目id
+            info.setProjectId(projectcontentinfo.getProjectOnRural().getId());
+            info.preInsert();
+//            ruralProjectRecordsReportedDao.insertConsultant(info);
+            projectcontentinfoDao.insertConsultant(info);
+
+        }
         //工作报告
         if (projectcontentinfo.getProjectReportData()!=null){
             //保存工作报告相关数据
@@ -1916,9 +1932,10 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
 
             //查询咨询员信息
             List<ReportedConsultant> consultantList = ruralProjectRecordsReportedDao.consultantList(id);
-            if(0 < consultantList.size())
-            for (ReportedConsultant info: consultantList) {
-                info.setZixunyuanId(info.getZixunyuan());
+            if(0 < consultantList.size()) {
+                for (ReportedConsultant info : consultantList) {
+                    info.setZixunyuanId(info.getZixunyuan());
+                }
             }
             ruralProjectRecordsReported.setReportedConsultantList(consultantList);
         }
@@ -2669,4 +2686,9 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         //完成上报
         return "";
     }
+
+    public List<RuralReportConsultant> getConsultantsList(String projectId){
+        List<RuralReportConsultant> list=projectcontentinfoDao.findByProjectId(projectId);
+        return list;
+    }
 }

+ 42 - 6
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -29,6 +29,7 @@ import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
@@ -38,6 +39,9 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -47,10 +51,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
@@ -96,6 +97,8 @@ public class RuralCostProjectMessageController extends BaseController {
     private ProjectAccessoryRelationService projectAccessoryRelationService;
     @Autowired
     private UserService userService;
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -448,6 +451,14 @@ public class RuralCostProjectMessageController extends BaseController {
         RuralProjectRecords ruralProjectRecords = projectRecordsService.getQueryProjectUsers(projectcontentinfo1.getProject().getId());
         Projectcontentinfo projectcontent = projectcontentinfoService.getByInfoId(projectReportData.getId());
         projectcontent.setProjectReportData(projectReportData);
+
+        //根据项目id查找报告咨询员信息
+        List<RuralReportConsultant> consultants = ruralProjectMessageService.getConsultantsList(projectcontentinfo.getProjectId());
+        for (RuralReportConsultant consultant:consultants){
+            User user=userService.get(consultant.getZixunyuan());
+            consultant.setZixunyuanName(user.getName());
+        }
+
         //根据条件查询附件必填项
         //判断项目类别是否为打包项目(1:打包项目,0:非打包项目)
         /*Integer projectSort = projectAccessoryRelationService.decideAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
@@ -517,6 +528,7 @@ public class RuralCostProjectMessageController extends BaseController {
         model.addAttribute("projectRecords", ruralProjectRecords);
         model.addAttribute("id", projectcontentinfo.getId());
         model.addAttribute("projectcontentinfo", projectcontent);
+        model.addAttribute("info", consultants);
         //获取是否含有上报信息
         RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReportedById(projectcontentinfo.getReportedId());
         if(null != reported){
@@ -1088,8 +1100,27 @@ public class RuralCostProjectMessageController extends BaseController {
         return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify";
     }
 
-
-
+    /**
+     * 咨询员获取资格证号和专业
+     * @param workStaffBasicInfo
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "getWorkUser")
+    public WorkStaffCertificate getWorkUser(WorkStaffBasicInfo workStaffBasicInfo){
+        workStaffBasicInfo = workStaffBasicInfoService.getWorkStaffBasicInfoByUserId(workStaffBasicInfo.getId());
+        workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
+        WorkStaffCertificate workStaffCertificate=new WorkStaffCertificate();
+        for (WorkStaffCertificate workStaff:workStaffBasicInfo.getCertificateList()){
+            //判定是否是一级造价师
+            if ("161".equals( workStaff.getName())){
+                workStaffCertificate.setName(workStaff.getName());
+                workStaffCertificate.setNum(workStaff.getNum());
+                workStaffCertificate.setMajor(workStaff.getMajor());
+            }
+        }
+        return workStaffCertificate;
+    }
 
     /**
      * 保存报告归档
@@ -1295,7 +1326,12 @@ public class RuralCostProjectMessageController extends BaseController {
             records.setReportData(projectReportData);
             reported = ruralProjectMessageService.disposeData(records);
         }
+
         model.addAttribute("ruralProjectRecordsReported", reported);
+        //查询项目信息
+        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(reported.getProjectId());
+        model.addAttribute("ruralProjectRecords", records);
+
         return "modules/ruralprojectrecords/cost/reportedForm";
     }
 

+ 2 - 1
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -148,7 +148,8 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
      * @return
      */
     public WorkStaffBasicInfo getWorkStaffBasicInfoByUserId(String userId) {
-		return dao.getWorkStaffBasicInfoByUserId(userId);
+        WorkStaffBasicInfo workStaffBasicInfo=dao.getWorkStaffBasicInfoByUserId(userId);
+		return workStaffBasicInfo;
 	}
 	public Integer getByCompany(WorkStaffBasicInfo workStaffBasicInfo) {
 	  return workStaffAchivesDao.getByCompany(workStaffBasicInfo);

+ 43 - 1
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -25,9 +25,12 @@
 
 	<sql id="projectcontentinfoJoins">
 	</sql>
+    <delete id="deleteConsultant">
+		delete from rural_report_consultant where projectId = #{projectId}
+	</delete>
 
 
-	<select id="get" resultType="Projectcontentinfo" >
+    <select id="get" resultType="Projectcontentinfo" >
 		SELECT
 			<include refid="projectcontentinfoColumns"/>
 		FROM project_content_info a
@@ -529,6 +532,35 @@
 			#{updateBy.id}
 		)
 	</insert>
+	<insert id="insertConsultant">
+		insert into rural_report_consultant (
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			zixunyuan,
+			zhucezigezhID,
+			major,
+			wordnr,
+			projectId
+		)
+		values
+		(
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{zixunyuan},
+			#{zhucezigezhID},
+			#{major},
+			#{wordnr},
+			#{projectId}
+		) ;
+	</insert>
 
 	<select id="getWorkContentTypeByTypeId" resultType="java.lang.String">
 		select type_name as typeName from work_content_type where type_id = #{typeId}
@@ -557,4 +589,14 @@
 		where wcc.project_id = #{projectId} and wcc.content_id =#{contentId}
 		order by wcc.update_date asc
 	</select>
+	<select id="findByProjectId"
+			resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant">
+		select id
+			 ,zixunyuan
+			 ,zhucezigezhID
+			 ,major
+			 ,wordnr
+			 ,projectId
+		from rural_report_consultant where projectId=#{projectId}
+	</select>
 </mapper>

+ 19 - 2
src/main/webapp/WEB-INF/tags/sys/reportedtreeselectUser.tag

@@ -90,9 +90,26 @@
 						var id = '${id}';
 						var w=id.indexOf("_"); // v 的下标为 2
 						var str = id.substring(0,w+1);
-						$("#"+str+"zhucezigezhID").val(officeIds.join(","));
-						console.log(officeIds)
+						console.log(str)
+						var zxid=$("#${id}Id").val();
 						$("#${id}Name").focus();
+						$.ajax({
+							type:"post",
+							url:'${ctx}/ruralProject/ruralCostProjectMessage/getWorkUser',
+							data:{"id":zxid},
+							dataType:"json",
+							success:function(data){
+								console.log(data)
+								$("#"+str+"zhucezigezhID").val(data.num);
+								$("#"+str+"major").val(data.major);
+
+								// if(data.success) {
+								// 	for (var info in data.data){
+								// 		$('#city').append(new Option(data.data[info].name,data.data[info].id));
+								// 	}
+								// }
+							}
+						})
 						top.layer.close(index);
 				    	       },
     	cancel: function(index){ //或者使用btn2

+ 155 - 32
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp

@@ -492,7 +492,34 @@
                 }
             })
         }
+		function delRow(obj, prefix){
+			var id = $(prefix+"_id");
+			var delFlag = $(prefix+"_delFlag");
+			$(obj).parent().parent().remove();
+		}
+		function addRow(list, idx, tpl, row){
+			var idx1 = $("#reportedConsultantList tr").length;
+			idx1 +=1;
+			bornTemplete(list, idx1, tpl, row, idx);
+		}
 
+		function bornTemplete(list, idx, tpl, row, idx1){
+			$(list).append(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row,
+				order:idx1 + 1
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+		}
 	</script>
 </head>
 <body>
@@ -872,8 +899,10 @@
 				<div class="layui-item layui-col-sm6 lw7">
 					<label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
 					<div class="layui-input-block  with-icon">
-						<sys:inquireselectUser id="principal" name="projectReportData.principal.id" value="${projectReportData.principal.id}" labelName="projectReportData.principal.name" labelValue="${projectReportData.principal.name}"
-									cssStyle="background-color:#fff"	title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+						<sys:reportedtreeselectUser id="principal" name="projectReportData.principal.id" value="${ruralProjectRecords.projectMasterId}" labelName="projectMasterName" labelValue="${projectRecords.projectMasterName}"
+													cssStyle="background-color:#fff" title="项目负责人" url="/sys/office/treeDataAll?type=4" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+<%--						<sys:inquireselectUser id="principal" name="projectReportData.principal.id" value="${projectReportData.principal.id}" labelName="projectReportData.principal.name" labelValue="${projectReportData.principal.name}"--%>
+<%--									cssStyle="background-color:#fff"	title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm12 lw7 with-textarea">
@@ -883,6 +912,88 @@
 					</div>
 				</div>
 			</div>
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2><span class="require-item">*</span>咨询员</h2></div>
+				<div class="layui-item layui-col-sm12 lw6">
+					<div class="layui-item nav-btns">
+						<div class="layui-item nav-btns" style="padding-left:0px;">
+							<a class="nav-btn nav-btn-add"
+							   onclick="addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
+							   title="新增"><i class="fa fa-plus"></i> 新增</a>
+						</div>
+						<table id="bankinfo" class="table table-bordered table-condensed can-edit">
+							<thead>
+							<tr>
+								<th width="60px">编号</th>
+								<th ><span class="require-item">*</span>咨询员名称</th>
+								<th ><span class="require-item">*</span>注册/资格证号</th>
+								<th ><span class="require-item">*</span>专业</th>
+								<th ><span class="require-item">*</span>本人负责内容</th>
+								<th width="100px">操作</th>
+							</tr>
+							</thead>
+							<tbody id="reportedConsultantList">
+								<c:forEach items="${info}" var = "info" varStatus="status">
+									<tr>
+										<td width="60px">
+											<input id="reportedConsultantList${status.index+1}_costNum" name="reportedConsultantList[${status.index+1}].costNum" readonly="readonly" style="text-align: center"  value="${status.index+1}" type="text" class="form-control contentDetail"/>
+										</td>
+										<td>
+											<sys:reportedtreeselectUser id="reportedConsultantList${status.index+1}_zixunyuan" name="reportedConsultantList[${status.index+1}].zixunyuan" value="${info.zixunyuan}" labelName="workAccountList[${status.index+1}].zixunyuan" labelValue="${info.zixunyuanName}"
+																		title="用户" url="/sys/office/treeDataAll?type=4" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+										</td>
+
+										<td>
+											<input id="reportedConsultantList${status.index+1}_zhucezigezhID" readonly="true" name="reportedConsultantList[${status.index+1}].zhucezigezhID" value="${info.zhucezigezhID}" class="form-control required"/>
+										</td>
+										<td>
+											<input id="reportedConsultantList${status.index+1}_major" readonly="true"  name="reportedConsultantList[${status.index+1}].major" value="${info.major}" class="form-control required"/>
+										</td>
+										<td>
+											<input id="reportedConsultantList${status.index+1}_wordnr" placeholder="请输入本人负责内容" name="reportedConsultantList[${status.index+1}].wordnr" value="${info.wordnr}" class="form-control required"/>
+										</td>
+
+										<td class="text-center op-td" width="10">
+											<span class="op-btn op-btn-delete" onclick="delRow(this, '#reportedConsultantList${status.index+1}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>
+										</td>
+									</tr>
+								</c:forEach>
+							</tbody>
+						</table>
+						<script type="text/template" id="workClientBankTpl">//<!--
+                                <tr id="reportedConsultantList{{idx}}">
+                                    <td class="hide">
+                                        <input id="reportedConsultantList{{idx}}_id" name="reportedConsultantList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                        <input id="reportedConsultantList{{idx}}_delFlag" name="reportedConsultantList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        <input id="reportedConsultantList{{idx}}_remindId" name="reportedConsultantList[{{idx}}].remindId" type="hidden" value="{{row.remindId}}"/>
+                                    </td>
+
+                                    <td width="60px">
+                                        <input id="reportedConsultantList{{idx}}_costNum" name="reportedConsultantList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+                                    </td>
+                                    <td>
+                                        <sys:reportedtreeselectUser id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" value="{{row.zixunyuan}}" labelName="workAccountList[{{idx}}].zixunyuan" labelValue="{{row.zixunyuanName}}"
+                                            title="用户" url="/sys/office/treeDataAll?type=4" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                    </td>
+
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_zhucezigezhID" readonly="true" name="reportedConsultantList[{{idx}}].zhucezigezhID" value="{{row.zhucezigezhID}}" class="form-control required"/>
+                                    </td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_major" readonly="true"  name="reportedConsultantList[{{idx}}].major" value="{{row.major}}" class="form-control required"/>
+                                    </td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_wordnr" placeholder="请输入本人负责内容" name="reportedConsultantList[{{idx}}].wordnr" value="{{row.wordnr}}" class="form-control required"/>
+                                    </td>
+
+                                    <td class="text-center op-td" width="10">
+                                        {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#reportedConsultantList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+                                    </td>
+                                </tr>//-->
+						</script>
+					</div>
+				</div>
+			</div>
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
@@ -1174,6 +1285,18 @@
 		</form:form>
 	</div>
 </div>
+<script type="text/javascript">
+	var workClientBankRowIdx = 0,
+			workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+	$(document).ready(function () {
+		var dataBank = ${fns:toJson(ruralProjectRecordsReported.reportedConsultantList)};
+		for (var i = 0; i < dataBank.length; i++) {
+			addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
+			workClientBankRowIdx = workClientBankRowIdx + 1;
+		}
+	});
+
+</script>
 <script>
 	function openBill2(title,url,width,height,target,formId,tableId){
 		var rows = $(this).parent().prevAll().length + 1;
@@ -1351,36 +1474,36 @@
 		return false;
 	}
 
-	function addRowBaseData(list, idx, tpl, row){
-		bornTemplete(list, idx, tpl, row, idx);
-	}
-
-	function bornTemplete(list, idx, tpl, row, idx1){
-		var idx1 = '';
-		if(list == 'file_attachment'){
-			idx1 = $("#file_attachment tr").length +1;
-		}else if(list == 'file_gistdata'){
-			idx1 = $("#file_gistdata tr").length +1;
-		}else if(list == 'file_other'){
-			idx1 = $("#file_other tr").length +1;
-		}
-
-		$(list).append(Mustache.render(tpl, {
-			idx: idx, delBtn: true, row: row,
-			order:idx1 + 1, idx1:idx1
-		}));
-		$(list+idx).find("select").each(function(){
-			$(this).val($(this).attr("data-value"));
-		});
-		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
-			var ss = $(this).attr("data-value").split(',');
-			for (var i=0; i<ss.length; i++){
-				if($(this).val() == ss[i]){
-					$(this).attr("checked","checked");
-				}
-			}
-		});
-	}
+	// function addRowBaseData(list, idx, tpl, row){
+	// 	bornTemplete(list, idx, tpl, row, idx);
+	// }
+	//
+	// function bornTemplete(list, idx, tpl, row, idx1){
+	// 	var idx1 = '';
+	// 	if(list == 'file_attachment'){
+	// 		idx1 = $("#file_attachment tr").length +1;
+	// 	}else if(list == 'file_gistdata'){
+	// 		idx1 = $("#file_gistdata tr").length +1;
+	// 	}else if(list == 'file_other'){
+	// 		idx1 = $("#file_other tr").length +1;
+	// 	}
+	//
+	// 	$(list).append(Mustache.render(tpl, {
+	// 		idx: idx, delBtn: true, row: row,
+	// 		order:idx1 + 1, idx1:idx1
+	// 	}));
+	// 	$(list+idx).find("select").each(function(){
+	// 		$(this).val($(this).attr("data-value"));
+	// 	});
+	// 	$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+	// 		var ss = $(this).attr("data-value").split(',');
+	// 		for (var i=0; i<ss.length; i++){
+	// 			if($(this).val() == ss[i]){
+	// 				$(this).attr("checked","checked");
+	// 			}
+	// 		}
+	// 	});
+	// }
 	function delRowBaseData(obj, prefix,userId){
 		var id = $(prefix+"_id").val();
 		var currentUser = '${fns:getUser().id}';

+ 6 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/cost/reportedForm.jsp

@@ -578,8 +578,10 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>咨询项目负责人:</label>
                     <div class="layui-input-block  with-icon">
-                        <sys:inquireselectUser id="master" name="xmFZR" value="${ruralProjectRecordsReported.xmFZR}" labelName="leaderNameStr" labelValue="${ruralProjectRecordsReported.leaderNameStr}"
-                                      cssStyle="background-color:#fff"  title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        <sys:reportedtreeselectUser id="master" name="xmFZR" value="${ruralProjectRecords.projectMasterId}" labelName="leaderNameStr" labelValue="${projectRecords.projectMasterName}"
+                                                    cssStyle="background-color:#fff" title="项目负责人" url="/sys/office/treeDataAll?type=4" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+<%--                        <sys:inquireselectUser id="master" name="xmFZR" value="${ruralProjectRecordsReported.xmFZR}" labelName="leaderNameStr" labelValue="${ruralProjectRecordsReported.leaderNameStr}"--%>
+<%--                                      cssStyle="background-color:#fff"  title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>--%>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
@@ -695,7 +697,7 @@
                                     </td>
                                     <td>
                                         <sys:reportedtreeselectUser id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" value="{{row.zixunyuan}}" labelName="workAccountList[{{idx}}].zixunyuan" labelValue="{{row.zixunyuanName}}"
-                                            title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                            title="用户" url="/sys/office/treeDataAll?type=4" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                                     </td>
 
                                     <td>
@@ -1009,7 +1011,7 @@
                 $.ajax({
                     type:"post",
                     url:'${ctx}/ruralProject/ruralProjectMessage/getArea',
-                    data:{"id":data.value},
+                    data:{"userId":data.value},
                     dataType:"json",
                     async: false,
                     success:function(data){