Bladeren bron

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
user5 4 jaren geleden
bovenliggende
commit
e03fdabc1c

+ 5 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingbatchRelationDao.java

@@ -3,7 +3,12 @@ package com.jeeplus.modules.projectFilingBatch.dao;
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
 @MyBatisDao
 public interface ProjectFilingbatchRelationDao extends CrudDao<ProjectFilingbatchRelation> {
     Integer deleteByprojectId(ProjectFilingbatchRelation relation);
+    List<ProjectFilingbatchRelation> getProjectRelation(@Param("filingBatch")String filingBatch);
 }

+ 28 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatch.java

@@ -5,6 +5,7 @@ import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
 
 import javax.validation.constraints.NotNull;
 import java.util.List;
@@ -31,6 +32,9 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
     private Office office;
     private String home;
     private Act act;//工作流对象
+    private String bzshbUserId; //总审用户id
+    private List<User> bzshbUserList;  //总审用户信息
+    private List<ProjectFilingbatchRelation> projectFilingbatchRelations;
 
     public String getProcessinstanceId() {
         return processinstanceId;
@@ -127,4 +131,28 @@ public class ProjectFilingBatch extends DataEntity<ProjectFilingBatch> {
     public void setAct(Act act) {
         this.act = act;
     }
+
+    public String getBzshbUserId() {
+        return bzshbUserId;
+    }
+
+    public void setBzshbUserId(String bzshbUserId) {
+        this.bzshbUserId = bzshbUserId;
+    }
+
+    public List<User> getBzshbUserList() {
+        return bzshbUserList;
+    }
+
+    public void setBzshbUserList(List<User> bzshbUserList) {
+        this.bzshbUserList = bzshbUserList;
+    }
+
+    public List<ProjectFilingbatchRelation> getProjectFilingbatchRelations() {
+        return projectFilingbatchRelations;
+    }
+
+    public void setProjectFilingbatchRelations(List<ProjectFilingbatchRelation> projectFilingbatchRelations) {
+        this.projectFilingbatchRelations = projectFilingbatchRelations;
+    }
 }

+ 1 - 2
src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java

@@ -151,7 +151,6 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             filingbatchRelation.preInsert();
             projectFilingbatchRelationDao.insert(filingbatchRelation);
         }
-
         long t4 = System.currentTimeMillis();
         //启动审批流程
         if (projectFilingBatch.getFilingStatus()== ProjectStatusEnum.IN_APRL.getValue()&&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
@@ -224,7 +223,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                 workProjectNotify.setId("");
             }else{
                 if (xxxmgdys==null||xxxmgdys.size()==0){
-                    throw new Exception("流程审批人不能为空,角色部门负责人下无用户,请联系管理员!");
+                    throw new Exception("流程审批人不能为空,请联系管理员!");
                 }
                 processType = "projectFilingBatch";
                 variables.put("applyUserId", projectFilingBatch.getCreateBy().getId());

+ 12 - 1
src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java

@@ -15,6 +15,7 @@ import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.UserService;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
@@ -45,6 +46,8 @@ public class ProjectFilingBatchController extends BaseController {
     private RuralProjectRecordsService ruralProjectRecordsService;
     @Autowired
     private ActTaskService actTaskService;
+    @Autowired
+    private UserService userService;
     @ModelAttribute
     public ProjectFilingBatch get(@RequestParam(required = false) String id) {
         ProjectFilingBatch entity = null;
@@ -87,6 +90,7 @@ public class ProjectFilingBatchController extends BaseController {
     @RequiresPermissions(value = {"projectFilingBatch:projectFilingBatchInfo:view"})
     @RequestMapping(value = "view")
     public String view(ProjectFilingBatch projectFilingBatch, Model model) {
+        projectFilingBatch=projectFilingBatchService.get(projectFilingBatch.getId());
         if (projectFilingBatch != null && StringUtils.isNotBlank(projectFilingBatch.getId())) {
             List<RuralProjectRecords> ruralProjectRecordsList = new ArrayList<>();
             //获取详细信息
@@ -102,6 +106,8 @@ public class ProjectFilingBatchController extends BaseController {
             //项目信息
             projectFilingBatch.setProject(ruralProjectRecordsList);
         }
+//        List<User> auditUserList = userService.getFilingUserList();
+//        projectFilingBatch.setBzshbUserList(auditUserList);
         model.addAttribute("projectFilingBatch", projectFilingBatch);
         return "modules/projectFilingBatch/projectFilingBatchView";
     }
@@ -133,12 +139,15 @@ public class ProjectFilingBatchController extends BaseController {
             projectFilingBatch.setCreateBy(UserUtils.get(projectFilingBatch.getCreateBy().getId()));
             //项目信息
             projectFilingBatch.setProject(ruralProjectRecordsList);
+
         } else {
             //获取归档人
             projectFilingBatch.setCreateBy(UserUtils.getUser());
             projectFilingBatch.setCreateDate(new Date());
         }
-
+        //查询总审人员信息
+//        List<User> auditUserList = userService.getFilingUserList();
+//        projectFilingBatch.setBzshbUserList(auditUserList);
         model.addAttribute("projectFilingBatch", projectFilingBatch);
         return "modules/projectFilingBatch/projectFilingBatchForm";
     }
@@ -159,6 +168,8 @@ public class ProjectFilingBatchController extends BaseController {
             act.setTask(taskInfok);
             projectFilingBatch.setAct(act);
         }
+//        List<User> auditUserList = userService.getFilingUserList();
+//        projectFilingBatch.setBzshbUserList(auditUserList);
         projectFilingBatchService.queryInfo(projectFilingBatch);
         model.addAttribute("projectFilingBatch", projectFilingBatch);
         return "modules/projectFilingBatch/projectFilingBatchApply";

+ 2 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -28,6 +28,8 @@ import java.util.List;
 public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 
 	public static final String SERIAL_BIZCODE ="1";
+	public static final String PROJECT_COST_APPRAISAL ="100";//工程造价鉴定模板key
+	public static final String ECONOMIC_EVALUATION="101";//经济评价模板key
 	public static final String SERIAL_COST_BIZCODE ="1004";
 	private static final long serialVersionUID = 1L;
 	@NotNull(message = "合同信息不能为空")

+ 5 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -350,6 +350,11 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		synchronized (SYN_BYTE) {
 			if (StringUtils.isBlank(projectRecords.getProjectId())) {
 				if ("1".equals(projectRecords.getProjectType())) {
+					if(projectRecords.getAttachmentProjectSort().equals("6")){
+						projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.PROJECT_COST_APPRAISAL));
+					}else if(projectRecords.getAttachmentProjectSort().equals("7")){
+						projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.ECONOMIC_EVALUATION));
+					}
 					projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_BIZCODE));
 				} else if ("2".equals(projectRecords.getProjectType())) {
 					projectRecords.setProjectId(serialNumTplService.genSerialNum(createBy.getCompany(), RuralProjectRecords.SERIAL_COST_BIZCODE));
@@ -1796,7 +1801,6 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	 * 修改项目开始时间和结束时间
 	 * @param projectRecords
 	 */
-	@Transactional(readOnly = false)
 	public void updateDate(RuralProjectRecords projectRecords){
 		dao.updateDate(projectRecords);
 	}

+ 5 - 0
src/main/java/com/jeeplus/modules/sys/service/UserService.java

@@ -546,4 +546,9 @@ public class UserService extends BaseController {
         List<User> userList = UserUtils.getByRoleActivityEnname("bzshb",3,recordsOffice.getId(),"12",UserUtils.getUser());
         return userList;
     }
+    public List<User> getFilingUserList(){
+        Office recordsOffice =officeService.get(UserUtils.getUser().getOffice());
+        List<User> userList = UserUtils.getByRoleActivityEnname("xxgdydyhu",3,recordsOffice.getId(),"10",UserUtils.getUser());
+        return userList;
+    }
 }

+ 7 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -40,7 +40,9 @@ import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
 import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectAccessory.service.ProjectAccessoryRelationService;
 import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
+import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingbatchRelationDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectFilingBatch.service.ProjectFilingBatchService;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
@@ -461,6 +463,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private RoleService roleService;
 	@Autowired
 	private ProjectFilingBatchService projectFilingBatchService;
+	@Autowired
+	private ProjectFilingbatchRelationDao projectFilingbatchRelationDao;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -2704,6 +2708,8 @@ public class WorkProjectNotifyController extends BaseController {
 						ruralProjectRecords.setProjectReportNumber(filingBatch.getNumber());
 						ruralProjectRecordsList.add(ruralProjectRecords);
 					}
+//					List<ProjectFilingbatchRelation> projectFilingbatchRelations=projectFilingbatchRelationDao.getProjectRelation(projectFilingBatch.getFilingBatch());
+//					projectFilingBatch.setProjectFilingbatchRelations(projectFilingbatchRelations);
 					//获取归档人
 					projectFilingBatch.setCreateBy(UserUtils.get(projectFilingBatch.getCreateBy().getId()));
 					//项目信息
@@ -2714,7 +2720,7 @@ public class WorkProjectNotifyController extends BaseController {
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 						return "modules/projectFilingBatch/projectFilingBatchView";
 					} else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
-						return "modules/projectFilingBatch/projectFilingBachAuditre";
+						return "modules/projectFilingBatch/projectFilingBatchAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
 						return "modules/projectFilingBatch/projectFilingBatchApply";
 					} else {

+ 4 - 2
src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchDao.xml

@@ -10,6 +10,7 @@
 		a.del_flag AS "delFlag",
 		a.filing_batch AS "filingBatch",
 		a.process_instance_id AS "processinstanceId",
+		a.bzshbUserId AS "bzshbUserId",
 		a.filing_status AS "filingStatus"
 	</sql>
 	<sql id="filingBatchRelationColumns">
@@ -22,6 +23,7 @@
 		a.filing_batch AS "filingBatch",
 		a.process_instance_id AS "processinstanceId",
 		a.filing_status AS "filingStatus",
+		a.bzshbUserId AS "bzshbUserId",
 		g.project_id AS "projectId",
 		g.status AS "status",
 		g.box_num AS "boxNum",
@@ -30,9 +32,9 @@
 	</sql>
 	<insert id="insert">
 		insert into project_filingbatch
-		(id,create_by,create_date,update_by,update_date,del_flag,filing_batch,process_instance_id,filing_status)
+		(id,create_by,create_date,update_by,update_date,del_flag,filing_batch,process_instance_id,bzshbUserId,filing_status)
 		VALUES
-		(#{id},#{createBy.id},#{createDate},#{updateBy.id},#{updateDate},#{delFlag},#{filingBatch},#{processinstanceId},#{filingStatus})
+		(#{id},#{createBy.id},#{createDate},#{updateBy.id},#{updateDate},#{delFlag},#{filingBatch},#{processinstanceId},#{bzshbUserId},#{filingStatus})
 	</insert>
 	<update id="update">
 		update project_filingbatch

+ 21 - 0
src/main/resources/mappings/modules/projectGuidang/ProjectFilingbatchRelationDao.xml

@@ -1,6 +1,18 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingbatchRelationDao">
+	<sql id="filingBatchRelationColumns">
+		distinct g.id AS "id",
+		g.create_by AS "createBy.id",
+		g.create_date AS "createDate",
+		g.update_by AS "updateBy.id",
+		g.update_date AS "updateDate",
+		g.del_flag AS "delFlag",
+		g.filing_batch AS "filingBatch",
+		g.project_id AS "projectId",
+		g.box_num AS "boxNum",
+		g.re_box_num AS "reBoxNum",
+	</sql>
 	<insert id="insert">
 		insert into project_flingbatch_relation
 			(id,create_by,create_date,update_by,update_date,filing_batch,project_id,status,box_num,re_box_num)
@@ -34,4 +46,13 @@
 		</set>
 		where project_id=#{projectId}
 	</update>
+	<select id="getProjectRelation"  resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation">
+		SELECT
+		<include refid="filingBatchRelationColumns"/>
+		FROM project_filingbatch a
+		LEFT JOIN project_flingbatch_relation g on(a.filing_batch=g.filing_batch)
+		LEFT JOIN rural_project_records r on(g.project_id=r.project_id)
+		WHERE g.filing_batch = #{filingBatch}
+		order by a.create_date desc
+	</select>
 </mapper>

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

@@ -1376,7 +1376,7 @@
 		left join sys_user su on su.id = w1.user_id
 		left join sys_office so on so.id = su.office_id
 		<where>
-			and a.del_flag = 0 and project_type in (1,2)
+			and a.del_flag = 0 and project_type in (1,2) and prd.`status`=5
 			and a.id not in (select project_id	FROM project_flingbatch_relation r left join project_filingbatch f on f.filing_batch=r.filing_batch	where f.filing_status in(2,3,5) )
 # 		    and a.id not in (select project_id	FROM project_flingbatch_relation where status in(2,3,5) )
 			<if test="projectName != null and projectName != ''">
@@ -1406,7 +1406,7 @@
 			<if test="projectName != null and projectName != ''">
 				AND a.project_name like concat(concat('%',#{projectName}),'%')
 			</if>
-			and a.del_flag = 0 and project_type in (1,2)
+			and a.del_flag = 0 and a.project_type in (1,2) and prd.`status`=5
 			and a.id not in (select project_id	FROM project_flingbatch_relation r left join project_filingbatch f on f.filing_batch=r.filing_batch	where f.filing_status in(2,3,5) )
 # 			and a.id not in (select project_id	FROM project_flingbatch_relation where status in(2,3,5) )
 			<choose>

+ 9 - 389
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBachAuditre.jsp

@@ -9,19 +9,6 @@
     <title>客户信息管理</title>
     <meta name="decorator" content="default"/>
     <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
-    <%--<style type="text/css">--%>
-    <%--.btn-file{--%>
-    <%--margin-top:8px;--%>
-    <%--}--%>
-    <%--.btn-default:hover, .btn-default:focus, .btn-default:active, .btn-default.active, .open .dropdown-toggle.btn-default {--%>
-    <%--background-color:#fff;--%>
-    <%--color: #110F0F;--%>
-    <%--}--%>
-    <%--.btn-default{--%>
-    <%--background-color:#fff;--%>
-    <%--color: #110F0F;--%>
-    <%--}--%>
-    <%--</style>--%>
     <link href="${ctxStatic}/bootstrap-select-1.12.4/css/bootstrap-select.min.css" rel="stylesheet" />
     <style>
         #companyType-error{
@@ -40,114 +27,25 @@
     <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调用提交表单。
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
-                var jobTypeStr = $("#jobTypeStr").val();
-                if (jobTypeStr == null || "" == jobTypeStr) {
-                    parent.layer.msg("请选择联系人类型!", {icon: 5});
-                    return false;
-                }
-                var telephone = $("#telephone").val();
-                if(!/(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/.test(telephone) && !/^([0-9]{3,4}-)?[0-9]{7,8}$/.test(telephone)){
-                    parent.layer.msg("公司电话有误,请重新填写!", {icon: 5});
-                    return false;
-                }
-
-                var tableObj = document.getElementById('contentTable').rows[1];
-                var  contentTableLength = $("table#contentTable tr:visible").length;
-                if (tableObj == null || contentTableLength == 1) {
-                    parent.layer.msg("请填写联系人信息!", {icon: 5});
-                    return false;
-                }
-
-
-                if(!exitName){
-                    return false;
+                if(obj == 1) {
+                    $("#flag").val("yes");
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+                    }else {
+                        $("#flag").val("no2");
+                    }
                 }
                 $("#inputForm").submit();
                 return true;
-            }else {
-                parent.layer.msg("信息未填写完整!", {icon: 5});
             }
 
             return false;
         }
         $(document).ready(function() {
-            contentDetailTypeShow();
-            checkContentKeyUp('unitIntroduction',500);
-            $.validator.messages["orUnicode"] = true;
-            $.validator.methods["orUnicode"] = function( value, element ) {
-                return this.optional( element ) || /^[a-z0-9A-Z\-]*$/.test( value );
-            }
-            $.validator.messages["fax"] = true;
-            $.validator.methods["fax"] = function( value, element ) {
-                return this.optional( element ) || /^[0-9\-]*$/.test( value );
-            }
-            $.validator.messages["telephone"] = true;
-            $.validator.methods["telephone"] = function( value, element ) {
-                return this.optional( element ) || /^[0-9\-]*$/.test( value );
-            }
-            $.validator.messages["ourBank"] = true;
-            $.validator.methods["ourBank"] = function( value, element ) {
-                return this.optional( element ) || /^[\u4e00-\u9fa5]*$/.test( value );
-            }
-            $.validator.messages["taxId"] = true;
-            $.validator.methods["taxId"] = function( value, element ) {
-                return this.optional( element ) || /^[a-z0-9A-Z]*$/.test( value );
-            }
-
-            jQuery.validator.addMethod("isUscCode", function(value, element) {
-                if (this.optional(element)){
-                    return true;
-                }
-                var uscCode = /^((\w{15})|(\w{18})|(\w{20}))$/;
-                return uscCode.test(value);
-            }, "请填写正确的统一社会信用代码");
-
             validateForm = $("#inputForm").validate({
-                rules:{
-                    orUnicode:{
-                        orUnicode:true
-                    },
-                    zipCode:{
-                        digits:true
-                    },
-                    email:{
-                        email:true
-                    },
-                    fax:{
-                        fax:true
-                    },
-                    telephone:{
-                        telephone:true
-                    },
-                    taxId:{
-                        taxId:true
-                    }
-                    <%--uscCode:{remote: "${ctx}/workclientinfo/workClientInfo/checkUscCode?oldUscCode=" + encodeURIComponent($("#oldUscCode").val())}--%>
-                },
-                messages:{
-                    orUnicode:{
-                        orUnicode:"仅允许输入数字、大写拉丁字母、符号“-”"
-                    },
-                    zipCode:{
-                        required:"必须输入数字"
-                    },
-                    email:{
-                        email:"请输入合法的邮箱地址"
-                    },
-                    fax:{
-                        fax:"仅允许输入数字、符号“-”"
-                    },
-                    telephone:{
-                        telephone:"仅允许输入数字、符号“-”"
-                    },
-                    taxId:{
-                        taxId:"仅允许输入数字、大写拉丁字母"
-                    }
-                    // uscCode:{remote:"重复的统一社会信用代码"}
-                },
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
                     form.submit();
@@ -162,284 +60,6 @@
                     }
                 }
             });
-            $("#attachment_btn").click(function () {
-                $("#attachment_file").click();
-            });
-            $('input[name="hasUscc"]').on('ifChecked', function(event){
-                disUscc(event.target.defaultValue);
-            });
-            disUscc($('input[name="hasUscc"]:checked').val());
-            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);
-
-            /*新增代码传送统一社会信用代码*/
-            $("#uscCode").on("change",function(){
-                    var id = $("#id").val();
-                    var name = $("#name").val();
-                    var uscCode= $("#uscCode").val();
-
-                    $.ajax({
-                        url:"${ctx}/workclientinfo/workClientInfo/checkClientUscCode",
-                        type:"post",
-                        data:{"id":id,
-                            "name":name,
-                            "uscCode":uscCode},
-                        success:function(data){
-                            if(data.code==="false"){
-                                exitName=false
-                                $("#uscPh").html("该客户已存在");
-                                console.log(data);
-
-                                layer.confirm('该客户信息已存在是否进行信息修改?', {
-                                    btn: ['确定', '取消'] //可以无限个按钮
-
-                                }, function(index, layero){
-                                    /*var linkType=${linkType};
-                                console.log("---------"+linkType);*/
-                                    var typeId=data.workClientInfo.id;
-                                    window.location.href="${ctx}/workclientinfo/workClientInfo/formTwo?id="+typeId+"&param=1";
-
-                                }, function(index){
-                                    return "false";
-                                });
-
-                            }else {
-                                exitName=true
-                                $("#uscPh").html('');
-                            }
-                        }
-                    });
-                }
-            )
-
-            dismissDiv();
-
-        });
-
-        function testOurBank(value){
-            if(!/^[\u4e00-\u9fa5]*$/.test( value )){
-                parent.layer.msg("开户银行必须输入汉字",{icon:6});
-            }
-        }
-
-        /**
-         * 只允许输入数字
-         * @param value
-         */
-        function testBankNumber(value){
-            if(!/^\d*$/.test( value )){
-                parent.layer.msg("开户帐号必须输入数字",{icon:6});
-            }
-        }
-        function addRow(list, idx, tpl, row){
-            var idx1 = $("#workClientBankList tr").length;
-            if(list == '#workClientBankList'){
-                bornTemplete(list, idx, tpl, row, idx1);
-            }
-            var idx2 = $("#workClientLinkmanList tr").length;
-            if(list == '#workClientLinkmanList'){
-                bornTemplete(list, idx, tpl, row, idx2);
-            }
-        }
-        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");
-                    }
-                }
-            });
-        }
-        function delRow(obj, prefix){
-            var id = $(prefix+"_id");
-            var delFlag = $(prefix+"_delFlag");
-            if (id.val() == ""){
-                $(obj).parent().parent().remove();
-            }else if(delFlag.val() == "0"){
-                delFlag.val("1");
-                $(obj).html("&divide;").attr("title", "撤回删除");
-                $(obj).parent().parent().addClass("error");
-                $(obj).parent().parent().addClass("hide");
-            }else if(delFlag.val() == "1"){
-                delFlag.val("0");
-                $(obj).html("&times;").attr("title", "删除");
-                $(obj).parent().parent().removeClass("error");
-            }
-
-        }
-        function urlRedict(file,attach){
-            parent.layer.confirm('确定删除吗?', {
-                btn: ['确认', '取消'] //可以无限个按钮
-            }, function(index, layero){
-                var index1 = parent.layer.load(0, {shade: false});
-                $.post("${ctx}/workfullmanage/workFullManage/deleteFile",
-                    {"file":file,"attach":attach},
-                    function(result){
-                        var d = JSON.parse(result);
-                        if(d.str){
-                            location.reload();
-                            parent.layer.msg("删除成功!!!",{icon:6});
-                            parent.layer.close(index1);
-                            parent.layer.close(index);
-                        }
-                    });
-            }, function(index){
-                parent.layer.close(index)
-            });
-
-        }
-
-        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;
-            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 = "workClientInfo";
-                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);
-            }
-        }
-
-        function disUscc(hasUscc) {
-            if("2"==hasUscc){
-                $(".companyType_uscCode").hide();
-                /*$('input[name="uscCode"]').attr("class","form-control");*/
-                $('input[name="uscCode"]').val("");
-            }else {
-                $(".companyType_uscCode").show();
-                /*$('input[name="uscCode"]').attr("class","form-control required isUscCode layui-input");*/
-            }
-        }
-
-        // 模糊查询下拉框
-        var code=null;
-        function fuzzyQuery(){
-            var keyword = $("#name").val();
-            if (keyword == null || keyword === "") {
-                return;
-            }
-            $.post(
-                "${ctx}/workclientinfo/workClientInfo/enterpriseSearchByName",
-                {"keyword": keyword},
-                function (result) {
-                    if (result == null) {
-                        return;
-                    }
-                    var json = eval(result.data.items);
-                    //如果精准查询,只有一条数据,则不显示模糊查询div,直接赋值
-                    if (json.length == 1) {
-                        var id = json[0].id;
-                        $.getJSON(
-                            "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
-                            {"id": id},
-                            function (data) {
-                                $("#name").val(data.ENTNAME).change();
-                                $("#uscCode").val(data.TAXNUMBER).change();
-                                $("#registerAddress").val(data.OPLOC);
-                            }
-                        );
-                        return;
-                    }
-                    var html = "<ul>";
-                    for (var i = 0; i < json.length; i++) {
-                        html += "<li value=" + json[i].id + ">" + json[i].entname + "</li>";
-                    }
-                    html += "</ul>";
-                    $("#fuzzyQuerySelect").show().html(html);
-
-                    //鼠标移动到某行上改变颜色
-                    $("li").bind("mouseover", function () {
-                        $(this).css("background-color", "grey");
-                    });
-                    $("li").bind("mouseout", function () {
-                        $(this).css("background-color", "white");
-                    });
-                    //单击某行
-                    $("li").bind("click", function () {
-                        $("#fuzzyQuerySelect").hide();
-                        var id = $(this).val();
-                        $.getJSON(
-                            "${ctx}/workclientinfo/workClientInfo/enterpriseTicketInfo",
-                            {"id": id},
-                            function (data) {
-                                $("#name").val(data.ENTNAME).change();
-                                $("#uscCode").val(data.TAXNUMBER).change();
-                                $("#registerAddress").val(data.OPLOC);
-                            }
-                        );
-
-                    });
-                }, "json");
-        }
-
 
     </script>
 

+ 77 - 79
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp

@@ -18,7 +18,12 @@
                         $("#flag").val("no2");
 					}
                 }
-                $("#inputForm").submit();
+                if ($("#clientType").val()!=null){
+					$("#inputForm").submit();
+				}else{
+					layer.msg("请输入项目信息", { icon: 2, offset: "error", time:2000 });
+				}
+
                 return true;
             }
 	
@@ -53,7 +58,8 @@
 		});
 
         function insertTitle(tValue){
-            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var files = $("#attachment_file")[0].files;
+            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = $("#id").val();
             var attachmentFlag = "82";
             console.log(file);
@@ -126,60 +132,45 @@
 			</div>
 			<div class="form-group layui-row first">
 				<div class="form-group-label"><h2>项目基础信息</h2></div>
-				<table id="contentTable2" class="table table-bordered table-condensed details">
-					<thead>
-					<tr>
-						<th class="hide"></th>
-						<th style="text-align: center" width="20%">归档项目编号</th>
-						<th style="text-align: center" width="20%">归档项目名称</th>
-						<th style="text-align: center" width="20%">报告号</th>
-						<th style="text-align: center" width="20%">盒号</th>
-						<th style="text-align: center" width="20%">确认盒号</th>
-						<th style="text-align: center" width="20%">操作</th>
-					</tr>
-					</thead>
-					<tbody id="workConstructionLinkmanList">
-					<c:choose>
-						<c:when test="${not empty projectFilingBatch}">
-							<c:forEach items="${projectFilingBatch.project}" var="project" varStatus="index">
-								<tr onchange="onchge(this)">
-									<td>
-											${project.projectId}
-									</td>
-									<td>
-											${project.projectName}
-									</td>
-									<td>
-											${project.projectReportNumber}
-									</td>
-									<td>
-										<input id="boxNum" style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="layui-input" value=""/>
-										<span class="node" style="display: none;color: red;"></span>
-									</td>
-									<td>
-										<input onchange="upcase(this)" id="reboxNum"  style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="form-control layui-input reBoxNum" value=""/>
-										<span class="reNode" style="display: none;color: red;"></span>
-									</td>
-									<td >
-										<input type="hidden" id="getProId" value="${project.id}"/>
-										<select id="projectPass" style="border: 0px;width:100%;text-align: center;background-color: rgba(255,255,255,0);" class="form-control editable-select layui-input" readonly="true">
-											<option style="text-align: center" value="5">通过</option>
-											<option style="text-align: center" value="4">驳回</option>
-										</select>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:when>
-						<c:otherwise>
+					<table id="contentTable" class="table table-bordered table-condensed can-edit">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th style="text-align: center">归档项目编号</th>
+							<th style="text-align: center" >归档项目名称</th>
+							<th style="text-align: center">报告号</th>
+							<th style="text-align: center" >盒号</th>
+							<th style="text-align: center" >确认盒号</th>
+							<th style="text-align: center" >操作</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						<c:forEach items="${projectFilingBatch.project}" var="project" varStatus="index">
 							<tr>
-								<td colspan="7">
-									暂无数据
+								<td>
+									<input name="projectId" type="text" readonly value="${project.projectId}" class="form-control"/>
+								</td>
+								<td>
+									<input name="projectName" type="text" readonly value="${project.projectName}" class="form-control"/>
+								</td>
+								<td>
+									<input name="projectReportNumber" type="text" readonly value="${project.projectReportNumber}" class="form-control"/>
+								</td>
+								<td><input id="boxNum" type="text" value="${projectFilingBatch.boxNum}" class="form-control"/></td>
+								<td><input id="reboxNum" onchange="upcase(this)" value="${projectFilingBatch.reBoxNum}" type="text" class="form-control"/></td>
+								<td>
+									<input type="hidden" id="getProId" value="${project.id}"/>
+									<select onchange="proType(this)" id="clientType" class="form-control simple-select required">
+										<option value="" label="--是否通过--"/>
+										<option value="5" itemLabel="label">通过</option>
+										<option value="4" itemLabel="label">驳回</option>
+									</select>
 								</td>
+
 							</tr>
-						</c:otherwise>
-					</c:choose>
-					</tbody>
-				</table>
+						</c:forEach>
+						</tbody>
+					</table>
 			</div>
 	</form:form>
 			<div class="form-group layui-row">
@@ -192,10 +183,6 @@
 	</div>
 </div>
 <script>
-	// function onchge(obj) {
-	// 	alert($("boxNum").val())
-	// }
-
 	function upcase(obj) {
 		var tr=obj.parentNode.parentNode;
 		var boxNum=jQuery(tr).find("#boxNum").val()
@@ -203,36 +190,47 @@
 		if (boxNum!=""){
 			if (reboxNum!=""){
 				if(boxNum!=reboxNum){
-					alert("确认盒号与盒号不匹配")
+					layer.msg("确认盒号与盒号不匹配", { icon: 2, offset: "error", time:2000 });
+				}
+			}else{
+				layer.msg("请输入再次确认盒号", { icon: 2, offset: "error", time:2000 });
+			}
+		}else{
+			layer.msg("请输入盒号", { icon: 2, offset: "error", time:2000 });
+		}
+	}
+	function proType(obj) {
+		var tr=obj.parentNode.parentNode;
+		var boxNum=jQuery(tr).find("#boxNum").val()
+		var reboxNum=jQuery(tr).find("#reboxNum").val()
+		var pass=jQuery(tr).find("#clientType").val();
+		var proId=jQuery(tr).find("#getProId").val();
+		if (boxNum!=""){
+			if (reboxNum!=""){
+				if(boxNum!=reboxNum){
 				}else{
-					var pass=jQuery(tr).find("#projectPass").val();
-					var proId=jQuery(tr).find("#getProId").val();
 					//修改项目状态
-					<%--$.ajax({--%>
-					<%--	type : "POST",--%>
-					<%--	url : "${ctx}/projectFilingBatch/projectFilingBatchInfo/updateProjectPass",--%>
-					<%--	data : {--%>
-					<%--		'status':pass,--%>
-					<%--		'proId':proId,--%>
-					<%--		"boxNum":boxNum,--%>
-					<%--		"reboxNum":reboxNum--%>
-					<%--	},--%>
-					<%--	//请求成功--%>
-					<%--	success : function(result) {--%>
-
-					<%--	},--%>
+					$.ajax({
+						type : "POST",
+						url : "${ctx}/projectFilingBatch/projectFilingBatchInfo/updateProjectPass",
+						data : {
+							'status':pass,
+							'proId':proId,
+							"boxNum":boxNum,
+							"reboxNum":reboxNum
+						},
+						//请求成功
+						success : function(result) {
+							layer.msg("项目状态修改成功", { icon: 1, offset: "auto", time:2000 });
+						},
 
-					<%--});--%>
+					});
 				}
 			}else{
-				alert("请输入再次确认盒号")
+				layer.msg("请输入再次确认盒号", { icon: 2, offset: "error", time:2000 });
 			}
-		}else{
-			alert("请输入盒号")
 		}
-
 	}
-
 </script>
 </body>
 </html>

+ 0 - 1
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchForm.jsp

@@ -659,7 +659,6 @@
                 <div class="layui-item layui-col-sm6 lw7">
                     <label class="layui-form-label"><span class="require-item">*</span>归档批次号:</label>
                     <div class="layui-input-block">
-
                         <form:input path="filingBatch" htmlEscape="false"  class="form-control layui-input required"/>
                     </div>
                 </div>