Selaa lähdekoodia

合同登记,费率合同的描述必填

[user3] 3 vuotta sitten
vanhempi
commit
6aa6ae14b2

+ 24 - 13
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -27,10 +27,21 @@
 						parent.layer.msg("请选择合同类型!", {icon: 5});
 						return false;
 					}
+					//判断收费标准是否选择
+					var ff=false;
+					$("[name='chargeCriterionList']").each(function(){
+						if($(this).prop("checked")){
+							ff=true;
+						}
+					})
+					if (!ff){
+						parent.layer.msg("未选择收费标准!", {icon: 5});
+						return false;
+					}
                     //送审
 					var flags=judgment();
 					if (flags){
-						$("#inputForm").attr("action","${ctx}/workcontractinfo/workContractInfo/save");
+						<%--<!--$("#inputForm").attr("action","${ctx}/workcontractinfo/workContractInfo/save");-->--%>
 					}else{
 						return flags;
 					}
@@ -106,16 +117,16 @@
 				$("#contractPrice").parent().parent().hide();
 				$("#contractPrice").removeClass("judgment")
 				$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
-				$("#describeContentDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>描述内容:")
+				$("#otherDetailsDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>")
 				$("#otherDetails").attr("class","form-control layui-input judgment")
-				$("#describeContent").attr("class","form-control judgment")
+				// $("#describeContent").attr("class","form-control judgment")
 			}else{
 				$("#contractPrice").parent().parent().show();
 				$("#contractPrice").attr("class","form-control judgment number layui-input")
 				$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
-				$("#describeContentDiv").find("label").eq(0).html("描述内容:")
+				$("#otherDetailsDiv").find("label").eq(0).html("")
 				$("#otherDetails").attr("class","form-control layui-input")
-				$("#describeContent").attr("class","form-control")
+				// $("#otherDetails").attr("class","form-control")
 			}
 
 
@@ -708,19 +719,19 @@
 							<div class="layui-item layui-col-sm12" id="chargeCriterionList" >
 								<label class="layui-form-label">收费标准:</label>
 								<div class="layui-input-block">
-									<form:checkboxes path="chargeCriterionList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="label" htmlEscape="true" items="${fns:getMainDictList('charge_criterion')}" />
+									<form:checkboxes path="chargeCriterionList" name="chargeCriterionList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="label" htmlEscape="true" items="${fns:getMainDictList('charge_criterion')}" />
 <%--									<form:checkboxes path="chargeCriterionList" cssStyle="display: none;" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="true" items="${fns:getMainDictList('charge_criterion')}" />--%>
 								</div>
 							</div>
 
 
-							<div class="layui-item layui-col-sm12">
-								<label class="layui-form-label "><!--其他详情:--></label>
+							<div class="layui-item layui-col-sm12"  id="otherDetailsDiv">
+								<label class="layui-form-label "></label>
 								<div class="layui-input-block">
 									<form:input placeholder="请选择收费标准" path="otherDetails" id="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
 								</div>
 							</div>
-							<div class="layui-item layui-col-sm12 with-textarea" id="describeContentDiv">
+							<div class="layui-item layui-col-sm12 with-textarea">
 								<label class="layui-form-label ">描述内容:</label>
 								<div class="layui-input-block">
 									<form:textarea placeholder="请输入描述内容" path="describeContent" htmlEscape="false" rows="4" maxlength="500"   class="form-control "/>
@@ -1048,16 +1059,16 @@
 					$("#contractPrice").parent().parent().hide();
 					$("#contractPrice").removeClass("judgment")
 					$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
-					$("#describeContentDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>描述内容:")
+					$("#otherDetailsDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>")
 					$("#otherDetails").attr("class","form-control layui-input judgment")
-					$("#describeContent").attr("class","form-control judgment")
+					// $("#describeContent").attr("class","form-control judgment")
 				}else{
 					$("#contractPrice").parent().parent().show();
 					$("#contractPrice").attr("class","form-control judgment number layui-input")
 					$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
-					$("#describeContentDiv").find("label").eq(0).html("描述内容:")
+					$("#otherDetailsDiv").find("label").eq(0).html("")
 					$("#otherDetails").attr("class","form-control layui-input")
-					$("#describeContent").attr("class","form-control")
+					// $("#describeContent").attr("class","form-control")
 				}
 			})
 		});

+ 19 - 8
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormEdit.jsp

@@ -19,6 +19,17 @@
 				return false;
 			}
             if(validateForm.form()){
+				//判断收费标准是否选择
+				var ff=false;
+				$("[name='chargeCriterionList']").each(function(){
+					if($(this).prop("checked")){
+						ff=true;
+					}
+				})
+				if (!ff){
+					parent.layer.msg("未选择收费标准!", {icon: 5});
+					return false;
+				}
                // if(obj == 1) {
                     $("#flag").val("yes");
                 /*}else {
@@ -101,16 +112,16 @@
 				$("#contractPrice").parent().parent().hide();
 				$("#contractPrice").removeClass("required")
 				$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
-				$("#describeContentDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>描述内容:")
+				$("#otherDetailsDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>")
 				$("#otherDetails").attr("class","form-control layui-input required")
-				$("#describeContent").attr("class","form-control required")
+				// $("#describeContent").attr("class","form-control required")
 			}else{
 				$("#contractPrice").parent().parent().show();
 				$("#contractPrice").attr("class","form-control required number layui-input")
 				$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
-				$("#describeContentDiv").find("label").eq(0).html("描述内容:")
+				$("#otherDetailsDiv").find("label").eq(0).html("")
 				$("#otherDetails").attr("class","form-control layui-input")
-				$("#describeContent").attr("class","form-control")
+				// $("#describeContent").attr("class","form-control")
 			}
 
 
@@ -654,7 +665,7 @@
 <%--								<form:checkboxes path="chargeCriterionList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="label" htmlEscape="false" items="${fns:getMainDictList('charge_criterion')}" />--%>
 							</div>
 						</div>
-						<div class="layui-item layui-col-sm12">
+						<div class="layui-item layui-col-sm12" id="otherDetailsDiv">
 							<label class="layui-form-label "><!--其他详情:--></label>
 							<div class="layui-input-block">
 								<form:input placeholder="请选择收费标准" path="otherDetails" id="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input required"/>
@@ -1159,7 +1170,7 @@
 					$("#contractPrice").parent().parent().hide();
 					$("#contractPrice").removeClass("required")
 					$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
-					$("#describeContentDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>描述内容:")
+					$("#otherDetailsDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>")
 					$("#otherDetails").attr("class","form-control layui-input re" +
 							"" +
 							"quired")
@@ -1169,9 +1180,9 @@
 					$("#contractPrice").parent().parent().show();
 					$("#contractPrice").attr("class","form-control required number layui-input")
 					$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
-					$("#describeContentDiv").find("label").eq(0).html("描述内容:")
+					$("#otherDetailsDiv").find("label").eq(0).html("")
 					$("#otherDetails").attr("class","form-control layui-input")
-					$("#describeContent").attr("class","form-control")
+					// $("#describeContent").attr("class","form-control")
 				}
 			})
 		});