Browse Source

项目登记(有合同/无合同),不同状态下添加联系人。(暂时不能保存项目)

user4 5 years ago
parent
commit
b062497d03

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

@@ -16,9 +16,9 @@ public interface ProjectClientLinkmanDao {
     public void deleteProjectLinkmans(@Param("projectId") String projectId,@Param("isEntrust")int isEntrust);
     public void deleteProjectLinkmans(@Param("projectId") String projectId,@Param("isEntrust")int isEntrust);
 
 
     /**
     /**
-     * 根据姓名查询联系人详细信息
-     * @param name
+     * 根据姓名和委托方(office)查询联系人详细信息
+     * @param workClientLinkman
      * @return
      * @return
      */
      */
-    public WorkClientLinkman getLinkManByName(String name);
+    public WorkClientLinkman getLinkManByNameAndOffice(WorkClientLinkman workClientLinkman);
 }
 }

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

@@ -1104,4 +1104,8 @@ public class ProjectRecordsService extends CrudService<ProjectRecordsDao, Projec
             actTaskService.endProcessInstance(projectRecords.getProcessInstanceId(), "项目登记-撤回");
             actTaskService.endProcessInstance(projectRecords.getProcessInstanceId(), "项目登记-撤回");
         }
         }
     }
     }
+
+    public WorkClientLinkman getLinkMan(WorkClientLinkman workClientLinkman){
+		return clientLinkmanDao.getLinkManByNameAndOffice(workClientLinkman);
+	}
 }
 }

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

@@ -26,6 +26,7 @@ import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.entity.Activity;
 import com.jeeplus.modules.workactivity.entity.Activity;
 import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workactivity.service.ActivityService;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
@@ -567,4 +568,15 @@ public class ProjectRecordsController extends BaseController {
             logger.error("项目计划模板下载失败!",e);
             logger.error("项目计划模板下载失败!",e);
         }
         }
     }
     }
+
+    /**
+     * 无合同状态下,输入联系人,查询系统中是否有此联系人
+     * @param workClientLinkman
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("queryLinkMan")
+    public WorkClientLinkman queryLinkMan(WorkClientLinkman workClientLinkman){
+        return  projectRecordsService.getLinkMan(workClientLinkman);
+    }
 }
 }

+ 6 - 0
src/main/resources/mappings/modules/projectclientlinkman/ProjectClientLinkmanDao.xml

@@ -16,4 +16,10 @@
 		WHERE project_id = #{projectId}
 		WHERE project_id = #{projectId}
 		AND is_entrust = #{isEntrust}
 		AND is_entrust = #{isEntrust}
 	</delete>
 	</delete>
+
+	<select id="getLinkManByNameAndOffice" parameterType="WorkClientLinkman" resultType="WorkClientLinkman">
+		select *
+		from project_client_linkman
+		where name = #{name} and office = #{office}
+	</select>
 </mapper>
 </mapper>

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

@@ -173,16 +173,16 @@
 
 
         function insertTitle(tValue){
         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);*/
-            var timestamp=new Date().getTime();
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "82";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
 
 
-            var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
-            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
-            var divId = "_attachment";
-            $("#addFile"+divId).show();
-            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+                var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
         }
         }
 
 
 
 
@@ -244,47 +244,47 @@
             <div class="form-group layui-row first">
             <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>项目合同信息</h2></div>
                 <div class="form-group-label"><h2>项目合同信息</h2></div>
                 <div class="layui-item layui-col-sm6 lw7">
                 <div class="layui-item layui-col-sm6 lw7">
-                <label class="layui-form-label">合同情况:</label>
-                <div class="layui-input-block">
-                    <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
-                    <label for="ext">有合同</label>
-                    <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
-                    <label for="ext1">无合同</label>
+                    <label class="layui-form-label">合同情况:</label>
+                    <div class="layui-input-block">
+                        <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+                        <label for="ext">有合同</label>
+                        <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+                        <label for="ext1">无合同</label>
+                    </div>
                 </div>
                 </div>
+                <div id="divv">
+                    <div class="layui-item layui-col-sm12 lw7" id="d1">
+                        <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
+                        <div class="layui-input-block  with-icon">
+                            <sys:gridselectContract url="${ctx}/project/projectRecords/selectcontract" type="" isTotal="" id="contractId" name="workContractInfo.id"  value="${projectRecords.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+                                                    labelValue="${projectRecords.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
+                        </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" id="contractName"  class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label double-line">合同金额(元):</label>
+                        <div class="layui-input-block">
+                            <input htmlEscape="false"  readonly="true" id="contractPrice"  class="form-control layui-input" value="${projectRecords.workContractInfo.contractPrice}" onchange="formatNum(this);"/>
+                        </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" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+                        </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" id="constructionProjectType"  class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                        </div>
+                    </div>
                 </div>
                 </div>
-               <div id="divv">
-                   <div class="layui-item layui-col-sm12 lw7" id="d1">
-                       <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
-                       <div class="layui-input-block  with-icon">
-                           <sys:gridselectContract url="${ctx}/project/projectRecords/selectcontract" type="" isTotal="" id="contractId" name="workContractInfo.id"  value="${projectRecords.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
-                                                   labelValue="${projectRecords.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
-                       </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" id="contractName"  class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
-                       </div>
-                   </div>
-                   <div class="layui-item layui-col-sm6 lw7">
-                       <label class="layui-form-label double-line">合同金额(元):</label>
-                       <div class="layui-input-block">
-                           <input htmlEscape="false"  readonly="true" id="contractPrice"  class="form-control layui-input" value="${projectRecords.workContractInfo.contractPrice}" onchange="formatNum(this);"/>
-                       </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" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
-                       </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" id="constructionProjectType"  class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
-                       </div>
-                   </div>
-               </div>
             </div>
             </div>
 
 
             <div class="form-group layui-row">
             <div class="form-group layui-row">
@@ -399,7 +399,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
 
 
-                <div class="form-group layui-row">
+                <div class="layui-item layui-col-xs12 form-table-container">
                     <table id="contentTable1" class="table table-bordered table-condensed details">
                     <table id="contentTable1" class="table table-bordered table-condensed details">
                         <thead>
                         <thead>
                         <tr>
                         <tr>