diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceInfo.jsp index f51a0823a..3883b1c38 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceInfo.jsp @@ -1,35 +1,80 @@ -<%@page import="com.itextpdf.text.log.SysoCounter"%> -<%@ page contentType="text/html; charset=GBK"%> -<%@include file="/Frame/resources/include/include_begin_info.jspf"%><% - - - String sPrevUrl = CurPage.getParameter("PrevUrl"); - if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceList.jsp"; - String sTempletNo = "LPoundageMaintenanceInfo";//--模板号-- - ASObjectModel doTemp = new ASObjectModel(sTempletNo); - doTemp.setHtmlEvent("charge_channel", "onchange", "getChargeWay"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); - dwTemp.Style = "2";//freeform - dwTemp.ReadOnly = "0";//只读模式 - dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID")); - - String sButtons[][] = { - {"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""}, - }; -%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> - -<%@ include file="/Frame/resources/include/include_end.jspf"%> +<%@page import="com.itextpdf.text.log.SysoCounter"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@include file="/Frame/resources/include/include_begin_info.jspf"%><% + + + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceList.jsp"; + String sTempletNo = "LPoundageMaintenanceInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + doTemp.setHtmlEvent("charge_channel", "onchange", "getChargeWay"); + doTemp.setHtmlEvent("expiry_date", "onchange", "isEndTime"); + doTemp.setHtmlEvent("start_date", "onchange", "isStartTime"); + //doTemp.setReadOnly("start_date",true);//先把页面所有字段设为只读状态 + //doTemp.setReadOnly("expiry_date",true);//先把页面所有字段设为只读状态 + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "0";//只读模式 + dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID")); + + String sButtons[][] = { + {"true", "All", "Button", "保存","保存所有修改", "saveRecord()", "", "", "", ""}, + }; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/src_tenwa/com/tenwa/customer/controller/group/CheckPoundegeDate.java b/src_tenwa/com/tenwa/customer/controller/group/CheckPoundegeDate.java new file mode 100644 index 000000000..8a1dcd388 --- /dev/null +++ b/src_tenwa/com/tenwa/customer/controller/group/CheckPoundegeDate.java @@ -0,0 +1,51 @@ +package com.tenwa.customer.controller.group; + +import java.util.List; +import java.util.Map; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.tenwa.reckon.util.Conn; + +public class CheckPoundegeDate { + + private String chargeChannel;//扣款渠道 + private String chargeWay;//扣款方式 + private String startDate;//开始时间 + private String expiryDate;//结束时间 + public String getChargeChannel() { + return chargeChannel; + } + public void setChargeChannel(String chargeChannel) { + this.chargeChannel = chargeChannel; + } + public String getChargeWay() { + return chargeWay; + } + public void setChargeWay(String chargeWay) { + this.chargeWay = chargeWay; + } + public String getStartDate() { + return startDate; + } + public void setStartDate(String startDate) { + this.startDate = startDate; + } + public String getExpiryDate() { + return expiryDate; + } + public void setExpiryDate(String expiryDate) { + this.expiryDate = expiryDate; + } + + //校验扣款手续费维护日期 + public String checkPoundegeDate(JBOTransaction tx) throws Exception{ + Conn conn = new Conn(tx); + String sql = "SELECT id FROM LPOUNDAGE_MAINTENANCE where charge_channel=? AND charge_way=? AND DATE_FORMAT(expiry_date,'%Y/%m/%d')>DATE_FORMAT(?,'%Y/%m/%d')"; + List> results = conn.executeQuery(sql, chargeChannel,chargeWay,startDate); + if(results.size()>0){ + return "开始时间大于已有数据的结束时间!!"; + } + return "true"; + + } +}