更新法人业务申请问题

This commit is contained in:
tangfutang 2018-08-14 17:40:56 +08:00
parent 992a650c52
commit 5f0e2d6f0d
6 changed files with 99 additions and 7 deletions

View File

@ -7,6 +7,9 @@
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
String flowName = CurPage.getParameter("FlowName");
String flowUnid = CurPage.getParameter("FlowUnid");
String phaseNo = CurPage.getParameter("PhaseNo");
String userID = CurUser.getUserID();
String customertype = CurPage.getParameter("customertype");
if(sPrevUrl == null) sPrevUrl = "";
@ -14,12 +17,19 @@
if("01".equals(customertype)&&!("业务申请流程".equals(flowName))){
sTempletNo = "MakingCustomerCompanyTempInfo";//--模板号--
}
if("01".equals(customertype)&&"业务撤销流程".equals(flowName)){
sTempletNo = "ProjectCustomerCompanyTempInfo";//--模板号--
flowUnid = CurPage.getParameter("ProjectId");
}
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setColTips("", "");
doTemp.setHtmlEvent("tel","onChange","changetel");
doTemp.setHtmlEvent("wealth_tel","onChange","changewealth_tel");
doTemp.setHtmlEvent("company_tel","onChange","changecompany_tel");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(CurPage.getParameter("FlowUnid"));
dwTemp.genHTMLObjectWindow(flowUnid);
String sButtons[][] = {
//{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
@ -28,15 +38,36 @@
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function saveCompany(inputName,inputTel){
if(!changetel()){
return;
}
if(!changewealth_tel()){
return;
}
if(!changecompany_tel()){
return;
}
as_save("0","saveCertInfo('"+inputName+"','"+inputTel+"')");
}
function saveCertInfo(inputName,inputTel,leasfrom,projectSource){
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoManage","saveCompanyInfo",'inputName='+inputName+',inputTel='+inputTel+',flowunid=<%=flowUnid%>');
if(sResult == "SUCCESS"){
parent.reloadSelf();
}
}
$(document).ready(function(){
var nameResult = checkName();
var flowName = "<%=flowName%>";
if(nameResult=="2" &&"コマヘャヨニラ<EFBE86><EFBE97>フ"!=flowName&& "コマヘャア荳<EFBDB1><E88DB3>フ"!=flowName&&"コマヘャウキマ愠<EFBE8F>フ」ィニ﨤オ」ゥ"!=flowName){
var phaseNo = "<%=phaseNo%>" ;
var userId = "<%=userID%>" ;
if(nameResult=="2" &&"合同制作流程"!=flowName&& "合同变更流程"!=flowName&&"合同撤销流程(汽车)"!=flowName&&"0010"!=phaseNo&&userId.indexOf("8006")!=0){
//$("#FULLNAME").attr("style","color:red;");
$("#ENTERPRISENAME").css("color","red");
}
var certResult = checkCertId();
if(certResult=="4" && "コマヘャヨニラ<EFBE86><EFBE97>フ"!=flowName && "コマヘャア荳<EFBDB1><E88DB3>フ"!=flowName&&"コマヘャウキマ愠<EFBE8F>フ」ィニ﨤オ」ゥ"!=flowName){
if(certResult=="4" && "合同制作流程"!=flowName && "合同变更流程"!=flowName&&"合同撤销流程(汽车)"!=flowName&&"0010"!=phaseNo&&userId.indexOf("8006")!=0){
//$("#FULLNAME").attr("style","color:red;");
$("#CERTID").css("color","red");
}
@ -63,5 +94,50 @@
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
function changetel(){//校验法定代表人联系方式
var tel = getItemValue(0,getRow(0),"tel");
if(tel==""){
setErrorTips("tel","法定代表人联系方式不能为空!");
return false;
}
if(CheckPhoneCode(tel)){
setErrorTips("tel","");
return true;
}else{
setErrorTips("tel","法定代表人联系方式格式不正确!");
return false;
}
}
function changewealth_tel(){//校验财务负责人联系方式
var wealth_tel = getItemValue(0,getRow(0),"wealth_tel");
if(wealth_tel==""){
setErrorTips("wealth_tel","财务负责人联系方式不能为空!");
return false;
}
if(CheckPhoneCode(wealth_tel)){
setErrorTips("wealth_tel","");
return true;
}else{
setErrorTips("wealth_tel","财务负责人联系方式格式不正确!");
return false;
}
}
function changecompany_tel(){//校验公司固定电话
var company_tel = getItemValue(0,getRow(0),"company_tel");
if(company_tel==""){
setErrorTips("company_tel","公司固定电话不能为空!");
return false;
}
if(CheckPhoneCode(company_tel)){
setErrorTips("company_tel","");
return true;
}else{
setErrorTips("company_tel","公司固定电话格式不正确!");
return false;
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -148,10 +148,10 @@
if(falgs==false){
return;
}
/* var WorkTelResult = checkWorkTel();
var WorkTelResult = checkWorkTel();
if(WorkTelResult==false){
return;
} */
}
as_save(0,"goBack()");
}

View File

@ -65,7 +65,8 @@
var inputTel = getItemValue(0,getRow(),"inputTel");
var customerType = "<%=custype%>";
if(customerType=="01"){//法人
as_save("myiframe0","frame_list.window.as_save(0);");
//as_save("myiframe0","frame_list.window.saveCompany();");
frame_list.window.saveCompany(inputName,inputTel);
//as_save(0);
}
if(customerType=="03"){//自然人

View File

@ -429,7 +429,22 @@ public class CustomerInfoManage {
}
return "SUCCESS";
}
public String saveCompanyInfo(JBOTransaction tx){
try {
BizObjectManager bm = JBOFactory.getBizObjectManager(LB_PROJECT_INFO_TEMP.CLASS_NAME,tx);
BizObject proj = bm.createQuery("flowunid=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true);
if(proj != null){
proj.setAttributeValue("inputName", inputName);
proj.setAttributeValue("inputTel", inputTel);
}
bm.saveObject(proj);
tx.commit();
} catch (JBOException e) {
e.printStackTrace();
return "ERROR";
}
return "SUCCESS";
}
/* public String SelectGroup(JBOTransaction tx){
if(this.F_I_TYPE=="f_i_type02" && this.DISTRIBUTOR_STATUS=="distributor_status04"){
return "true";