Commit a7a4d918 by sunxin

功能修改 不强制业务类别

parent 4b2385a2
...@@ -710,7 +710,15 @@ public class ReportController extends BaseController { ...@@ -710,7 +710,15 @@ public class ReportController extends BaseController {
*/ */
@RequestMapping(value = "addTrack") @RequestMapping(value = "addTrack")
public String addTrack(ReportEntity reportEntity, HttpServletRequest request, Model public String addTrack(ReportEntity reportEntity, HttpServletRequest request, Model
model, RedirectAttributes redirectAttributes) { model, RedirectAttributes redirectAttributes,String supplementType,String supplementCategory) {
/*如果传过来的 业务类型 类别 为空 将原来数据的业务类型 类别也修改为空 */
if(supplementType == null){
reportEntity.setSupplementType("");
}
if(supplementCategory == null){
reportEntity.setSupplementCategory("");
}
//判断登录人的角色 //判断登录人的角色
User user = UserUtils.getUser(); User user = UserUtils.getUser();
......
...@@ -579,7 +579,7 @@ ...@@ -579,7 +579,7 @@
<c:forEach items="${page.list}" var="report" varStatus="vs"> <c:forEach items="${page.list}" var="report" varStatus="vs">
<tr class="reportList"> <tr class="reportList">
<td align="center" style="width:5%"></td> <td align="center" style="width:5%"></td>
<td align="left" style="width:15%" title= ${report.supplementTitle}>${report.supplementTitle}</td> <td align="left" style="width:15%" title= ${report.supplementTitle}> <a href="${ctx}/report/view?id=${report.id}">${report.supplementTitle}</a></td>
</c:forEach> </c:forEach>
</c:if> </c:if>
......
...@@ -51,13 +51,21 @@ ...@@ -51,13 +51,21 @@
maxlength: "最多输入{0}个字符" maxlength: "最多输入{0}个字符"
} }
} }
/*遍历业务类别option选项 判断业务类型下面是否有类别 */
var array = new Array(); //定义数组
$("#supplementCategory option").each(function(){ //遍历全部option
var txt = $(this).text(); //获取option的内容
if(txt != "请选择") //如果不是“全部”
array.push(txt); //添加到数组中
});
/*alert(array.length);*/
if ($("#supplementType").val() == null || $("#supplementType").val()== " ") { if ($("#supplementType").val() == null || $("#supplementType").val()== " ") {
top.$.jBox.tip('请选择业务类型', 'warning'); top.$.jBox.tip('请选择业务类型', 'warning');
} else if ($("#supplementGroup").val() == " ") { } else if ($("#supplementGroup").val() == " ") {
top.$.jBox.tip('请选择被举报集团', 'warning'); top.$.jBox.tip('请选择被举报集团', 'warning');
}else if ($("#supplementArea").val() == " ") { }else if ($("#supplementArea").val() == " ") {
top.$.jBox.tip('请选择被举报区域', 'warning'); top.$.jBox.tip('请选择被举报区域', 'warning');
}else if ($("#supplementCategory").val() == null || $("#supplementCategory").val()== " ") { }else if (($("#supplementCategory").val() == null && array.length !=0) || ($("#supplementCategory").val()== " " && array.length !=0)) {
top.$.jBox.tip('请选择业务类别', 'warning'); top.$.jBox.tip('请选择业务类别', 'warning');
} else { } else {
submitCount += 1; submitCount += 1;
...@@ -1157,7 +1165,7 @@ ...@@ -1157,7 +1165,7 @@
</select> </select>
<%--<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"--%> <%--<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"--%>
<%--htmlEscape="false"/></select>--%> <%--htmlEscape="false"/></select>--%>
<span class="help-inline"><font color="red">*</font> </span> <%--<span class="help-inline"><font color="red">*</font> </span>--%>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment