Explorar el Código

开票功能开发

user5 hace 4 años
padre
commit
0e54d8ab05

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

@@ -129,6 +129,18 @@
                 type : 'date'
 , trigger: 'click'
             });
+
+			if("${workContractInfo.contractInformation}" == "1"){
+				$("#contractPrice").parent().parent().hide();
+				$("#contractPrice").removeClass("judgment")
+				$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
+				$("#otherDetails").attr("class","form-control layui-input judgment")
+			}else{
+				$("#contractPrice").parent().parent().show();
+				$("#contractPrice").attr("class","form-control judgment number layui-input")
+				$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
+				$("#otherDetails").attr("class","form-control layui-input")
+			}
         });
 
         function addRow(list, idx, tpl, row){
@@ -631,6 +643,13 @@
 								</div>
 							</div>
 							<div class="layui-item layui-col-sm6">
+								<label class="layui-form-label double-line"><span class="require-item">*</span>合同金额类别:</label>
+								<div class="layui-input-block">
+									<input type="radio" title="金额合同" lay-filter="jine" name="contractInformation" checked id="jine" value="0" <c:if test="${workContractInfo.contractInformation=='0'}">checked</c:if>>
+									<input type="radio" title="框架合同" lay-filter="jine" name="contractInformation" id="jine1" value="1" <c:if test="${workContractInfo.contractInformation=='1'}">checked</c:if>>
+								</div>
+							</div>
+							<div class="layui-item layui-col-sm6">
 								<label class="layui-form-label double-line"><span class="require-item">*</span>合同金额 (元)预计金额:</label>
 								<div class="layui-input-block">
 									<form:input path="contractPrice" htmlEscape="false"     pattern="#.00" class="form-control required number  layui-input"/>
@@ -656,7 +675,7 @@
 									</div>
 								</div>
 							</c:if>
-							<div class="layui-item layui-col-sm12">
+							<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="value" htmlEscape="false" items="${fns:getMainDictList('charge_criterion')}" />
@@ -883,8 +902,23 @@
 					$("#otherDetails").val("");
 				}
 			});
+			layui.form.on('radio(jine)', function(data){
+				var span=data.value;
+				if(span==1){
+					$("#contractPrice").parent().parent().hide();
+					$("#contractPrice").removeClass("judgment")
+					$("#chargeCriterionList").find("label").eq(0).html("<span class=\"require-item\">*</span>收费标准:")
+					$("#otherDetails").attr("class","form-control layui-input judgment")
+
+				}else{
+					$("#contractPrice").parent().parent().show();
+					$("#contractPrice").attr("class","form-control judgment number layui-input")
+					$("#chargeCriterionList").find("label").eq(0).html("收费标准:")
+					$("#otherDetails").attr("class","form-control layui-input")
+				}
+			})
 		});
 	</script>
 </div>
 </body>
-</html>
+</html>

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

@@ -900,11 +900,11 @@
 							<c:when test="${(workContractInfo.borrowStatus == '1' or workContractInfo.borrowStatus == '3' or workContractInfo.borrowStatus == '4')}">,"candeleteBorrow":"1"</c:when>
 						</c:choose>
 					</c:if>
-					<c:if test="${'1' == workContractInfo.flagAdmin}">
+					<shiro:hasPermission name="workcontractinfo:workContractInfo:adminDel">
 						<c:choose>
 							<c:when test="${workContractInfo.contractState == 5 }">,"updateAdmin":"1"</c:when>
 						</c:choose>
-					</c:if>
+					</shiro:hasPermission>
 					<shiro:hasPermission name="workcontractrecord:workContractRecord:revert">,"giveBorrow":	<c:choose><c:when test="${workContractInfo.borrowStatus == '5' && workContractInfo.giveStatus != '5'}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
                 }
                 </c:forEach>

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

@@ -904,11 +904,11 @@
 							<c:when test="${(workContractInfo.borrowStatus == '1' or workContractInfo.borrowStatus == '3' or workContractInfo.borrowStatus == '4')}">,"candeleteBorrow":"1"</c:when>
 						</c:choose>
 					</c:if>
-					<c:if test="${'1' == workContractInfo.flagAdmin}">
+					<shiro:hasPermission name="workcontractinfo:workContractInfo:adminDel">
 						<c:choose>
 							<c:when test="${workContractInfo.contractState == 5 }">,"updateAdmin":"1"</c:when>
 						</c:choose>
-					</c:if>
+					</shiro:hasPermission>
 					<shiro:hasPermission name="workcontractrecord:workContractRecord:revert">,"giveBorrow":	<c:choose><c:when test="${workContractInfo.borrowStatus == '5' && workContractInfo.giveStatus != '5'}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
                 }
                 </c:forEach>