apzl_leasing/WebContent/Tenwa/Lease/App/AutoFiveGradeClassification/AutoFiveGradeClassificationList.jsp
2018-06-03 22:26:41 +08:00

58 lines
2.8 KiB
Plaintext

<%@page import="com.tenwa.comm.dataRightmanager.DataRightManager"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
String contractId = CurPage.getParameter("ContractId") != null ? CurPage.getParameter("ContractId") : "";
String isRemind = CurPage.getParameter("IsRemind") != null ? CurPage.getParameter("IsRemind") : "";
ASObjectModel doTemp = new ASObjectModel("LBFiveGradeClassificationList");
String appendSql = "";
if(!"".equals(contractId)){
appendSql += " and O.id = '"+contractId+"' and lccs.Is_Remind = '"+isRemind+"' AND v.DATEDIFF(v.NOW(),lccs.FIVE_GRADE_DATE) <= 3 ";
}else if(!"".equals(isRemind)){
appendSql += " and lccs.Is_Remind = '"+isRemind+"' AND v.DATEDIFF(v.NOW(),lccs.FIVE_GRADE_DATE) <= 3 ";
}
String sCondtion=DataRightManager.getRightCondition(CurUser,"O", "contract");
if(!"".equals(appendSql)) sCondtion += appendSql;
doTemp.appendJboWhere(sCondtion);
doTemp.setDefaultValue("IS_AUTO", "Y");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(15);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] =new String[][] {
{"true","","Button","设置自动分类","设置自动分类","setAutoClassification()","","","","btn_icon_set"},
{"true","","Button","取消自动分类","取消自动分类","cancelAutoClassification()","","","","btn_icon_delete"}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function setAutoClassification(){
var contractId = getItemValue(0,getRow(),"ID");
var paymentNumber = getItemValue(0,getRow(),"PAYMENT_NUMBER");
var isAuto = getItemValue(0,getRow(),"IS_AUTO");
if(isAuto=='Y'){
alert("您选择的投放目前是自动分类,无需设置!");
}else{
var Result = AsControl.RunJavaMethodTrans("com.tenwa.lease.app.fivegradeclassification.FiveGradeClassificationController", "changeFiveGradeAuto", "contractId="+contractId+",paymentNumber="+paymentNumber+",isAuto="+"Y");
if(Result=='success'){
alert("操作成功!");
reloadSelf();
}
}
}
function cancelAutoClassification(){
var contractId = getItemValue(0,getRow(),"ID");
var paymentNumber = getItemValue(0,getRow(),"PAYMENT_NUMBER");
var isAuto = getItemValue(0,getRow(),"IS_AUTO");
if(isAuto=='N'){
alert("您选择的投放目前不是自动分类,无需设置!");
}else{
var Result = AsControl.RunJavaMethodTrans("com.tenwa.lease.app.fivegradeclassification.FiveGradeClassificationController", "changeFiveGradeAuto", "contractId="+contractId+",paymentNumber="+paymentNumber+",isAuto="+"N");
if(Result=='success'){
alert("操作成功!");
reloadSelf();
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>