合同制作扣款卡可以编辑

This commit is contained in:
tangft 2019-05-08 09:54:17 +08:00
parent 2b3272ee7b
commit 86849ce815
6 changed files with 74 additions and 69 deletions

View File

@ -98,7 +98,7 @@
}
//获取合同状态,已经发起或完成的电子签约,不允许删除
var flowName = "<%=flowName%>";
if("╨ом╛╠Д╦ЭаВЁл"!=flowName){
<%-- if("╨ом╛╠Д╦ЭаВЁл"!=flowName){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=productId%>,FlowUnid=<%=sFlowUnid%>");
var result = results.split("@");
if(eval(result[0])==4 && "合同变更流程"!=flowName){
@ -109,7 +109,7 @@
AsDebug.showMessage("提示","电子签约已发起,无发删除!","","",true);
return;
};
}
} --%>
if(confirm('确实要删除吗?')){
var files = getItemValueArray(0,"fileid");
var falg;

View File

@ -293,6 +293,12 @@
location.reload();
return;
}
//检查扣款卡信息是否签约
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.check.ContractInfoCheck","ProjectSignStatus","projectid=<%=projectId%>");
if("error"==sReturnInfo){
alert("请提醒客户查看手机短信,首先完成扣款卡的签约验证!");
return;
}
var param={};
var tempParam={};
var sparam="";
@ -303,6 +309,7 @@
tempParam["FLOW_UNID"]="<%=flowunid%>";
tempParam["CONTRACT_ID"]="<%=sContractId%>";
tempParam["PROJ_ID"]="<%=sProjId%>";
tempParam["PROJECT_ID"]="<%=projectId%>";
tempParam["contractNo"]="<%=contractNo%>";
tempParam["certid"]="<%=certid%>";
tempParam["mobile"]="<%=mobile%>";

View File

@ -24,26 +24,33 @@
System.out.print("=========="+ldcls+"==========");
/* System.out.print("\n\n\n\t--FlowUnid "+FlowUnid+"\t\n\n\n"); */
String sTempletNo = "DebitCardInfo";//--Ä£°åºÅ--
if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){
sTempletNo = "DebitCardInfoMcontract";//--模板号--
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
//doTemp.setColTips("", "²âÊÔ");
doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank");
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")||("合同制作流程".equals(flowName))){
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){
doTemp.setColInnerBtEvent("ACCOUNT", "");
}
//doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")||("合同制作流程".equals(flowName)&&null!=ldcls)){
if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){
dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
}
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))||("合同制作流程".equals(flowName))){
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
dwTemp.ReadOnly = "-2";//Ö»¶Áģʽ
RightType="ReadOnly";
isShowButton=false;
}else{
isShowButton=true;
}
dwTemp.genHTMLObjectWindow(FlowUnid);
if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){
dwTemp.genHTMLObjectWindow(projectId);
}else{
dwTemp.genHTMLObjectWindow(FlowUnid);
}
dwTemp.replaceColumn("PaymentCard", "<iframe type='iframe' name=\"frame_list\" width=\"100%\" height=\"120\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
dwTemp.replaceColumn("S_PaymentCard", "<iframe type='iframe' name=\"frame_lists\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/S_PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
@ -135,40 +142,35 @@
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
setItemValue(0,0,"acc_type","Debit");
var res=true;
if("AccountChangeApply"!="<%=ApplyType%>"){//如果是扣款卡信息变更则不需要重新填写contract_id、customerid、projectid
if('BusinessApplyApply'=='<%=ApplyType%>'){
res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
var strarry=res.split(",");
var customerid=strarry[0];
var projectid=strarry[1];
var contractid=strarry[2];
if(res=="false"){
alert("请先填写个人基本信息!");
return;
}
if('BusinessApplyApply'=='<%=ApplyType%>'){
res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
var strarry=res.split(",");
var customerid=strarry[0];
var projectid=strarry[1];
var contractid=strarry[2];
if(res=="false"){
alert("请先填写个人基本信息!");
return;
}
if("BusinessChangeApply"!="<%=ApplyType%>"){//业务变更不需要修改customerid、project_id、contract_id
var contract_id= getItemValue(0,0,"contract_id");
if(null!=contract_id&&contract_id!=""){
contractid=contract_id;
}
setItemValue(0,0,"customerid",customerid);
setItemValue(0,0,"project_id",projectid);
if(contractid==""||contractid=="null"||contractid==null){
setItemValue(0,0,"contract_id","");
}else{
setItemValue(0,0,"contract_id",contractid);
}
var contract_id= getItemValue(0,0,"contract_id");
if(null!=contract_id&&contract_id!=""){
contractid=contract_id;
}
setItemValue(0,0,"customerid",customerid);
setItemValue(0,0,"project_id",projectid);
if(contractid==""||contractid=="null"||contractid==null){
setItemValue(0,0,"contract_id","");
}else{
setItemValue(0,0,"contract_id",contractid);
}
}
if("BusinessChangeApply"=="<%=ApplyType%>"){
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>";
if("BusinessChangeApply"=="<%=ApplyType%>"||"BContractApproveApply"=="<%=ApplyType%>"||"BContractChangeApply"=="<%=ApplyType%>"){
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>";
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
if("YES"==meassge){
setItemValue(0,0,"sign_status","");
}else if("NULL"==meassge){
alert("没有找到对应的扣款卡信息!!");
return;
if("false"==meassge){
alert("已生成合同无法修改扣款卡信息!!!");
return ;
}else if("Y"==meassge){
setItemValue(0,0,"sign_status","Y");
}else if("N"==meassge){

View File

@ -10,6 +10,11 @@
return;
}
sReturn = sReturn.split("@");
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.check.ContractInfoCheck","ProjectSignStatus","projectid="+sReturn[1]);
if("error"==sReturnInfo){
alert("请提醒客户查看手机短信,首先完成扣款卡的签约验证!");
return;
}
var contract_id = sReturn[0];
var proj_id = sReturn[1];
var productId = sReturn[2];

View File

@ -5,9 +5,11 @@ import java.util.List;
import java.util.Map;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_HIS;
import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
import jbo.com.tenwa.lease.comm.LB_PROJECT_INFO_TEMP;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import jbo.sys.CODE_LIBRARY;
@ -250,21 +252,20 @@ public class DebitCardAction {
//业务变更是否需要重新签约验证
public String checkSign(JBOTransaction tx) throws JBOException{
BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME);
BizObject ca = caManage.createQuery(" PROJECT_ID=:projectid ").setParameter("projectid", projectid).getSingleResult(false);
if(ca!=null){
if(account.equals(ca.getAttribute("account").getString())&&acc_number.equals(ca.getAttribute("acc_number").getString())&&bank_name.equals(ca.getAttribute("bank_name").getString())&&mobile.equals(ca.getAttribute("mobile").getString())){
String singStatus = ca.getAttribute("sign_status").getString();
if("Y".equals(singStatus)){
return "Y";
}else{
return "N";
}
}else{
return "YES";
BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
List<BizObject> ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", contractid).getResultList(false);
if(ldcls.size()>0){
return "false";
}
BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME);
List<BizObject> cahs = cahManage.createQuery(" account=:account and acc_number=:acc_number and bank_name=:bank_name and mobile=:mobile ")
.setParameter("account", account).setParameter("acc_number", acc_number).setParameter("bank_name", bank_name).setParameter("mobile", mobile).getResultList(false);
for (BizObject cah : cahs) {
if("Y".equals(cah.getAttribute("sign_status").toString())){
return "Y";
}
}
return "NULL";
return "N";
}
public String getMobile() {

View File

@ -18,6 +18,8 @@ import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.baseBussion.BaseBussiness;
@ -40,28 +42,16 @@ public class LBCustomerAccountTempToFormalBusiness extends BaseBussiness{
other.put("CONTRACT_ID",this.getAttribute("ContractId").toString());
//查看该扣款卡信息是否签约验证过
String flowname=(String)this.getAttribute("FlowName");
if("ÒµÎñ±ä¸üÁ÷³Ì".equals(flowname)){
Map<String,String> fromCond = new HashMap<String, String>();
fromCond.clear();
fromCond.put("flowunid", this.getAttribute("ObjectNo").toString());
BizObject cat = DataOperatorUtil.getSingleJBO(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME, fromCond, Sqlca);
if(cat!=null){
fromCond.clear();
fromCond.put("ACCOUNT", cat.getAttribute("ACCOUNT").getString());
fromCond.put("ACC_NUMBER", cat.getAttribute("ACC_NUMBER").getString());
fromCond.put("BANK_NAME", cat.getAttribute("BANK_NAME").getString());
fromCond.put("MOBILE", cat.getAttribute("MOBILE").getString());
List<BizObject> cahs = DataOperatorUtil.getSetJBO(CUSTOMER_ACCOUNT_HIS.CLASS_NAME, fromCond, Sqlca);
for (BizObject cah : cahs) {
if("Y".equals(cah.getAttribute("SIGN_STATUS").getString())){
status = "Y";
break;
}
}
if("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(flowname)){
BizObjectManager caManager = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME,Sqlca);
BizObject ca = caManager.createQuery(" project_id=:project_id ").setParameter("project_id", this.getAttribute("ProjectId").toString()).getSingleResult(true);
if(ca != null){
ca.setAttributeValue("contract_id", this.getAttribute("ContractId").toString());
caManager.saveObject(ca);
}
}else if(!"ºÏͬ±ä¸üÁ÷³Ì".equals(flowname)){
DataOperatorUtil.copyJBOSet(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_ACCOUNT.CLASS_NAME, toCondtion, other,null, Sqlca);
}
other.put(CUSTOMER_ACCOUNT.sign_status, status);
DataOperatorUtil.copyJBOSet(CUSTOMER_ACCOUNT_TEMP.CLASS_NAME, fromCondtion,CUSTOMER_ACCOUNT.CLASS_NAME, toCondtion, other,null, Sqlca);
DataOperatorUtil.copyJBOSet(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, fromCondtion,LB_GUARANTEE_UNIT.CLASS_NAME, toCondtion, otherProperty,null, Sqlca);
fromCondtion.clear();
fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString());