Просмотр исходного кода

收费标准的勾选快捷输入方式

[user3] 4 лет назад
Родитель
Сommit
5aea7dfb5e

+ 2 - 2
src/main/webapp/webpage/modules/workcontractinfo/workContractAudit.jsp

@@ -119,11 +119,11 @@
                                 <div class="layui-item layui-col-sm12">
                                     <label class="layui-form-label">收费标准</label>
                                     <div class="layui-input-block">
-                                        <form:checkboxes path="chargeCriterionList" disabled="true" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('charge_criterion')}" />
+                                        <form:checkboxes path="chargeCriterionList" disabled="true" 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">
-                                    <label class="layui-form-label ">其他详情:</label>
+                                    <label class="layui-form-label "><!--其他详情:--></label>
                                     <div class="layui-input-block">
                                         <form:input path="otherDetails" readonly="true" htmlEscape="false" class="form-control layui-input"/>
                                     </div>

+ 12 - 9
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormAdd.jsp

@@ -672,7 +672,7 @@
 							<div class="layui-item layui-col-sm12">
 								<label class="layui-form-label "><!--其他详情:--></label>
 								<div class="layui-input-block">
-									<form:input path="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
+									<form:input path="otherDetails" id="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
 								</div>
 							</div>
 							<div class="layui-item layui-col-sm12 with-textarea">
@@ -850,21 +850,24 @@
 		layui.use('form', function () {
 			var form = layui.form;
 			form.render();
-
+			var zhi=$("#otherDetails").val();
 			//复选框监听器
 			form.on('checkbox(chargeCriterionList)', function(data){
-
 				var ids = [];
+
 				$("input[name='chargeCriterionList']:checked").each(function(i){
 					ids.push($(this).val());
 				})
-
-				if(ids.indexOf("4")!=-1){
-					// document.getElementById("otherDetails").readOnly=false
-				}else{
-					// document.getElementById("otherDetails").readOnly=true
-					$("#otherDetails").val(ids);
+				if ($(this).prop("checked")==true){
+					zhi+=$(this).val()+";"
 				}
+				$("#otherDetails").val(zhi);
+				// if(ids.indexOf("4")!=-1){
+				// 	// document.getElementById("otherDetails").readOnly=false
+				// }else{
+				// 	// document.getElementById("otherDetails").readOnly=true
+				// 	$("#otherDetails").val(ids);
+				// }
 			});
 		});
 	</script>

+ 15 - 11
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoFormEdit.jsp

@@ -35,9 +35,9 @@
 		$(document).ready(function() {
 			var chargeCriterionH = $("#chargeCriterionH").val();
 			if(chargeCriterionH.indexOf("4")!=-1){
-				document.getElementById("otherDetails").readOnly=false
+				// document.getElementById("otherDetails").readOnly=false
 			}else{
-				document.getElementById("otherDetails").readOnly=true
+				// document.getElementById("otherDetails").readOnly=true
 				$("#otherDetails").val("");
 			}
 			validateForm = $("#inputForm").validate({
@@ -612,13 +612,14 @@
 						<div class="layui-item layui-col-sm12">
 							<label class="layui-form-label">收费标准</label>
 							<div class="layui-input-block">
-								<form:checkboxes path="chargeCriterionList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('charge_criterion')}" />
+								<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" 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">
-							<label class="layui-form-label ">其他详情:</label>
+							<label class="layui-form-label "><!--其他详情:--></label>
 							<div class="layui-input-block">
-								<form:input path="otherDetails" readonly="true" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
+								<form:input path="otherDetails" id="otherDetails" htmlEscape="false" maxlength="255" class="form-control layui-input"/>
 							</div>
 						</div>
 						<div class="layui-item layui-col-sm12 with-textarea">
@@ -970,19 +971,22 @@
 		layui.use('form', function () {
 			var form = layui.form;
 			form.render();
-
+			var zhi=$("#otherDetails").val();
 			//复选框监听器
 			form.on('checkbox(chargeCriterionList)', function(data){
 				var ids = [];
 				$("input[name='chargeCriterionList']:checked").each(function(i){
 					ids.push($(this).val())
 				})
-				if(ids.indexOf("4")!=-1){
-					document.getElementById("otherDetails").readOnly=false
-				}else{
-					document.getElementById("otherDetails").readOnly=true
-					$("#otherDetails").val("");
+				if ($(this).prop("checked")==true){
+					zhi+=$(this).val()+";"
 				}
+				// if(ids.indexOf("4")!=-1){
+				// document.getElementById("otherDetails").readOnly=false
+				// }else{
+				// document.getElementById("otherDetails").readOnly=true
+					$("#otherDetails").val(zhi);
+				// }
 			});
 		});
 	</script>

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

@@ -183,7 +183,7 @@
 							</div>
 						</div>
 						<div class="layui-item layui-col-sm12">
-							<label class="layui-form-label ">其他详情:</label>
+							<label class="layui-form-label "></label>
 							<div class="layui-input-block">
 								<form:input path="otherDetails" readonly="true" htmlEscape="false" class="form-control layui-input"/>
 							</div>