调整手续费新增页面
This commit is contained in:
parent
f8b0bd89e0
commit
dc13b444f7
@ -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"%>
|
||||
<script type="text/javascript">
|
||||
function goBack(){
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord(sPostEvents) {
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
function getChargeWay(){
|
||||
var chargeChannel = getItemValue(0,0,"charge_channel");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript">
|
||||
function goBack(){
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord() {
|
||||
var chargeChannel=getItemValue(0,0,"charge_channel");
|
||||
var chargeWay=getItemValue(0,0,"CHARGE_WAY");
|
||||
var startDate = getItemValue(0,0,"start_date");
|
||||
var expiryDate = getItemValue(0,0,"expiry_date")
|
||||
var checkDate = RunJavaMethodTrans("com.tenwa.customer.controller.group.CheckPoundegeDate","checkPoundegeDate","chargeChannel="+chargeChannel+",chargeWay="+chargeWay+",startDate="+startDate);
|
||||
if("true" != checkDate){
|
||||
alert(checkDate);
|
||||
return ;
|
||||
}
|
||||
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
window.onload=function(){
|
||||
getChargeWay("edit");
|
||||
}
|
||||
|
||||
function getChargeWay(status){
|
||||
var chargeChannel=getItemValue(0,0,"charge_channel");
|
||||
var chargeWay=getItemValue(0,0,"CHARGE_WAY");
|
||||
var sql="select itemno,itemname from code_library where codeno='charge_way' ";
|
||||
if("web"== chargeChannel){
|
||||
sql = sql + " AND ( itemno='AutoBuckle' OR itemno='Collection') ";
|
||||
}else if("wx"== chargeChannel){
|
||||
sql = sql + " AND ( itemno='UnionPay' OR itemno='WXPay') ";
|
||||
}else{
|
||||
sql = sql + " AND itemno='' ";
|
||||
}
|
||||
initSelectOption(sql,"itemname","itemno","CHARGE_WAY");
|
||||
if(status=="edit"){
|
||||
setItemValue(0,0,"CHARGE_WAY",chargeWay);
|
||||
}
|
||||
}
|
||||
|
||||
function isEndTime(){
|
||||
var start_Date = getItemValue(0,0,"start_date");
|
||||
if(""==start_Date){
|
||||
alert("请先选择开始时间!");
|
||||
setItemValue(0,0,"expiry_date","");
|
||||
}
|
||||
var startDate = new Date(start_Date);
|
||||
var expiryDate = new Date(getItemValue(0,0,"expiry_date"));
|
||||
if(startDate > expiryDate){
|
||||
alert("开始时间不能大于终止时间!");
|
||||
setItemValue(0,0,"expiry_date","");
|
||||
}
|
||||
}
|
||||
|
||||
function isStartTime(){
|
||||
setItemValue(0,0,"expiry_date","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -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<Map<String, String>> results = conn.executeQuery(sql, chargeChannel,chargeWay,startDate);
|
||||
if(results.size()>0){
|
||||
return "开始时间大于已有数据的结束时间!!";
|
||||
}
|
||||
return "true";
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user