手续费率维护可以修改终止时间和提示信息

This commit is contained in:
tangfutang 2019-12-11 20:04:32 +08:00
parent 5bc41e4d73
commit f9bb431baf
5 changed files with 40 additions and 16 deletions

View File

@ -11,8 +11,14 @@
doTemp.setHtmlEvent("expiry_date", "onchange", "isEndTime");
doTemp.setHtmlEvent("start_date", "onchange", "isStartTime");
if(Id!=null){
doTemp.setReadOnly("start_date",true);//先把页面所有字段设为只读状态
doTemp.setReadOnly("expiry_date",true);//先把页面所有字段设为只读状态
String sql = "SELECT id FROM LPOUNDAGE_MAINTENANCE WHERE charge_channel='"+CurPage.getParameter("chargeChannel")+"' AND charge_way='"+CurPage.getParameter("chargeWay")+"' AND DATE_FORMAT("+CurPage.getParameter("startDate")+",'%Y/%m/%d')<DATE_FORMAT(START_DATE,'%Y/%m/%d')";
String afterId = Sqlca.getString(sql);
if(afterId!=null){
doTemp.setReadOnly("expiry_date",true);
}
doTemp.setReadOnly("start_date",true);
doTemp.setReadOnly("charge_channel",true);
doTemp.setReadOnly("charge_way",true);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
@ -28,11 +34,12 @@
parent.AsDialog.ClosePage();
}
function saveRecord() {
var id=getItemValue(0,0,"id");
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);
var checkDate = RunJavaMethodTrans("com.tenwa.customer.controller.group.CheckPoundegeDate","checkPoundegeDate","id="+id+",chargeChannel="+chargeChannel+",chargeWay="+chargeWay+",startDate="+startDate);
if("true" != checkDate){
alert(checkDate);
return ;

View File

@ -28,12 +28,16 @@
function viewAndEdit(){
var sUrl = "/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/PoundageMaintenanceInfo.jsp";
var sPara = getItemValue(0,getRow(0),'ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
var id = getItemValue(0,getRow(0),'ID');
var startDate = getItemValue(0,getRow(0),'START_DATE');
var chargeChannel=getItemValue(0,0,"charge_channel");
var chargeWay=getItemValue(0,0,"CHARGE_WAY");
if(typeof(id)=="undefined" || id.length==0 ){
alert("参数不能为空!");
return ;
}
AsDialog.PopView(sUrl,"ID="+sPara,"resizable=yes;dialogWidth=850px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"修改信息");
AsDialog.PopView(sUrl,"ID="+id+"&startDate="+startDate+"&chargeChannel="+chargeChannel+"&chargeWay="+chargeWay,"resizable=yes;dialogWidth=850px;dialogHeight=200px;center:yes;status:no;statusbar:no",function(){reloadSelf();},"ÐÞ¸ÄÐÅÏ¢");
}
function deleteRecord(){
var ownNumber = getItemValue(0,getRow(),'subject');

View File

@ -31,12 +31,14 @@
AsDebug.showMessage("提示","请选择一行数据","","",true);
return;
}
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","paymentReturn","CONTRACT_ID="+contractid);
if("success" == result){
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
if(confirm('确实要删除吗?')){
var result = RunJavaMethodTrans("com.tenwa.flow.fund.fundcollection.FundIncomeMethod","paymentReturn","CONTRACT_ID="+contractid);
if("success" == result){
AsDebug.showMessage("提示","操作成功!","","",true);
reloadSelf();
}else{
AsDebug.showMessage("提示","操作失败","","",true);
}
}
}
</script>

View File

@ -15,6 +15,7 @@ public class CheckPoundegeDate {
private String chargeWay;//扣款方式
private String startDate;//开始时间
private String expiryDate;//结束时间
private String id;
public String getChargeChannel() {
return chargeChannel;
}
@ -39,19 +40,26 @@ public class CheckPoundegeDate {
public void setExpiryDate(String expiryDate) {
this.expiryDate = expiryDate;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
//校验扣款手续费维护日期
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){
if(id==null &&results.size()>0){
return "开始时间大于已有数据的结束时间!!";
}
String endSql = "SELECT a.expiry_date FROM LPOUNDAGE_MAINTENANCE AS a WHERE expiry_date = (SELECT MAX(expiry_date) FROM LPOUNDAGE_MAINTENANCE WHERE a.charge_channel=charge_channel AND a.charge_way=charge_way) and a.charge_channel=? AND a.charge_way=?";
List<Map<String, String>> endtime = conn.executeQuery(endSql, chargeChannel,chargeWay);
if(endtime.size()>0){
if(id==null && endtime.size()>0){
String enddate = endtime.get(0).get("expiry_date");
DateFormat df = new SimpleDateFormat("yyyy/MM/dd");
Date startdate = df.parse(startDate);

View File

@ -35,9 +35,12 @@ public class SubmitAgainLabel extends BaseBussiness{
if( fbo!= null){
String proj_name = fbo.getAttribute("proj_name").toString();
if(proj_name.indexOf("ÔŮ´ÎĚὝ")<0){
fbo.setAttributeValue("proj_name", proj_name+"_ÔŮ´ÎĚὝ");
fboManage.saveObject(fbo);
fbo.setAttributeValue("proj_name", proj_name+"_"+resultList.size()+"´ÎĚὝ");
}else{
fbo.setAttributeValue("proj_name", proj_name.substring(0,proj_name.indexOf("´ÎĚὝ")-1)+resultList.size()+"´ÎĚὝ");
}
fboManage.saveObject(fbo);
}
}