Преглед на файлове

合同登记中的添加模块错误修改

user7 преди 4 години
родител
ревизия
e535260cbd

+ 0 - 4
src/main/java/com/jeeplus/modules/projectreportnum/web/ProjectReportNumController.java

@@ -150,10 +150,6 @@ public class ProjectReportNumController extends BaseController {
 					if(treeData.getPid().equals("0")){
 						listNum.add(treeData);
 					}else{
-
-
-
-
 						String typeId = treeData.getNum().split("-")[1];
 						//截取获取
 						String typeStage=typeId.split("")[0];

+ 11 - 0
src/main/java/com/jeeplus/modules/workclientinfo/web/WorkClientInfoController.java

@@ -350,6 +350,17 @@ public class WorkClientInfoController extends BaseController {
                        HttpServletRequest request
                         ) throws Exception{
 		HashMap<Object, Object> map = Maps.newHashMap();
+
+		String [] jobStr=workClientInfo.getJobTypeStr().split(",");
+		Set<String> setType=new HashSet<>();
+		for(String str:jobStr){
+			setType.add(str);
+		}
+
+		String str = StringUtils.join(setType.toArray(), ",");
+
+		workClientInfo.setJobTypeStr(str);
+
 		try {
 			//保存当前人的公司
 			workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());

+ 4 - 0
src/main/resources/mappings/modules/workclientinfo/WorkClientInfoDao.xml

@@ -117,6 +117,7 @@
 		<if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
 			LEFT JOIN work_client_linkman b ON a.id = b.client_id
 		</if>
+		left join work_client_job_type_info c on c.work_client_id=a.id
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<!--<if test="workClientLinkman != null and workClientLinkman.id != '' and workClientLinkman.id != null">-->
@@ -163,6 +164,7 @@
                 AND a.create_date &lt; #{endDate}
             </if>
             AND a.company_id = #{currentUser.company.id}
+			and   c.job_type_id = '1'
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -181,6 +183,7 @@
         <if test="workClientLinkman != null and workClientLinkman.name !=null and workClientLinkman.name !=''">
             LEFT JOIN work_client_linkman b ON a.id = b.client_id
         </if>
+		left join work_client_job_type_info c on c.work_client_id=a.id
         <where>
             a.del_flag = #{DEL_FLAG_NORMAL}
             <if test="name != null and name != ''">
@@ -223,6 +226,7 @@
                 AND a.create_date &lt; #{endDate}
             </if>
             AND a.company_id = #{currentUser.company.id}
+			AND c.job_type_id = "1"
         </where>
     </select>
 	

+ 1 - 3
src/main/resources/mappings/modules/workclientinfo/WorkClientLinkmanDao.xml

@@ -327,9 +327,7 @@
 			<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
 			<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
 		</if>
-		AND c.job_type_id = "1"
-
-
+		AND c.job_type_id = '1'
 	</select>
 	<insert id="jobTypeInsert" parameterType="java.util.List">
 		INSERT INTO work_client_job_type_info(

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

@@ -1317,7 +1317,9 @@
                                       name="linkman.id"  title="选择客户"
                                       value="${projectRecords.workContractInfo.workClinetInfoIds}"
                                       cssClass="form-control required" fieldLabels="联系人" fieldKeys="name"
-                                      searchLabel="联系人" searchKey="name"></sys:gridselect1>
+                                      searchLabel="联系人" searchKey="name">
+
+                    </sys:gridselect1>
                 </div>
                 <div class="layui-item nav-btns" style="float: left;">
                     <a href="javascript:void(0)"

+ 5 - 5
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/projectReportRecordForm.jsp

@@ -140,19 +140,19 @@
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>合同编号:</label>
+					<label class="layui-form-label">合同编号:</label>
 					<div class="layui-input-block">
-						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
+					<label class="layui-form-label">合同名称:</label>
 					<div class="layui-input-block">
-						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
 					</div>
 				</div>
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>主委托方:</label>
+					<label class="layui-form-label">主委托方:</label>
 					<div class="layui-input-block">
 						<form:input id="clientName" path="clientName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
 					</div>

+ 15 - 1
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -371,6 +371,20 @@
                 $($document.getElementById(inputForm)).ajaxSubmit({
                     success:function(data) {
                         var d = data;
+						//获取已有数据行数 以便于查找已有行数据id
+						var length = document.getElementById("workClientInfoList");
+						var rows = length.rows.length;
+						var idList = [];
+						for (var i=0;i<rows;i++){
+							idList.push($("#workClientInfoList"+i+"_id").val())
+						}
+						for (var j=0;j<idList.length;j++){
+							if(idList[j] == d.id){
+								top.layer.close(index)
+								return false;
+							}
+						}
+
                         if(d.msg == "false"){
                             parent.layer.msg("保存客户信息异常!",{icon:2});
                             return false;
@@ -743,7 +757,7 @@
 						<div class="form-group layui-row">
 							<div class="form-group-label"><h2><span class="require-item">*</span>委托方列表</h2></div>
 							<div class="layui-item nav-btns">
-								<a href="javascript:void(0)" onclick="openBill2('新增客户管理', '${ctx}/workclientinfo/workClientInfo/form?param=2','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增客户</a>
+								<a href="javascript:void(0)" onclick="openBill2('新增客户管理', '${ctx}/workclientinfo/workClientInfo/formType?param=1','90%','90%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 新增客户</a>
 
 								<sys:gridselectclient2 url="${ctx}/workcontractinfo/workContractInfo/selectclientAhref" id="client2" name=""  value=""  title="选择客户" labelName="client.names"
 													   labelValue="" cssClass="form-control" fieldLabels="客户名称" fieldKeys="name" searchLabel="客户名称" searchKey="name" searchLabel1="联系人" searchKey1="workLinkName"></sys:gridselectclient2>