增加校验

This commit is contained in:
luojian 2018-07-26 22:16:41 +08:00
parent e30eb6bcda
commit b6fd541884
4 changed files with 51 additions and 4 deletions

View File

@ -111,6 +111,15 @@ function doSubmit(){
}
function backStep(){
var param=FlowFunction.loadFlowParam();
if("BusinessApplyFlow"==param["FlowNo"]){
if("0030,0040,0050".indexOf(param["PhaseNo"])>-1){
var sReturn = AsControl.RunJavaMethodTrans("com.tenwa.controller.LAElementConfigController","queryBusinessApproval","PhaseNo="+param["PhaseNo"]+",ObjectNo="+param["ObjectNo"]);//返回值: yes-有意见; no-无意见; error-查询出错
if("0020"==sReturn){
AsDebug.alert("提示","已选择同意是否确实要退回!");
return;
}
}
}
if (typeof(param.ObjectNo)=="undefined" || param.ObjectNo.length==0){
alert(getHtmlMessage('1'));//请选择一条信息!
return;

View File

@ -311,7 +311,6 @@
function changeThirdChoice(){//根据信审意见,遍历相应的下拉选项
setItemValue(0,0,"thirdopinion","");
var thirdchoice = getItemValue(0,0,"thirdchoice");
alert(thirdchoice);
if(thirdchoice==""){
setItemRequired(0,"InterOpinion3",false);
setItemRequired(0,"DistriOpinion3",false);

View File

@ -1053,8 +1053,8 @@
<attribute name="DistriOpinion3" label="经销商意见3" type="STRING"/>
<attribute name="InterOpinion4" label="内部意见4" type="STRING"/>
<attribute name="DistriOpinion4" label="经销商意见4" type="STRING"/>
<attribute name="opinionType" label="意见类型" type="STRING"/>
</attributes>
<!-- <attribute name="opinionType" label="意见类型" type="STRING"/>
--> </attributes>
<manager>
<managerProperties>
<property name="table" value="vi_business_approval" />

View File

@ -1,6 +1,8 @@
package com.tenwa.controller;
import jbo.com.tenwa.lease.comm.VI_BUSINESS_APPROVAL;
import jbo.com.tenwa.limit.LA_LIMIT_ELEMENT;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
@ -8,6 +10,24 @@ import com.amarsoft.are.jbo.JBOTransaction;
public class LAElementConfigController {
private String ElementId;
private String PhaseNo;
private String ObjectNo;
public String getPhaseNo() {
return PhaseNo;
}
public void setPhaseNo(String phaseNo) {
PhaseNo = phaseNo;
}
public String getObjectNo() {
return ObjectNo;
}
public void setObjectNo(String objectNo) {
ObjectNo = objectNo;
}
public String getElementId() {
return ElementId;
@ -39,5 +59,24 @@ public class LAElementConfigController {
}
return "";
}
public String queryBusinessApproval(JBOTransaction tx)throws Exception {
String meagess="";
BizObjectManager lleManager = JBOFactory.getBizObjectManager(VI_BUSINESS_APPROVAL.CLASS_NAME,tx);
BizObject bo = lleManager.createQuery("FLOWUNID=:FLOWUNID ").setParameter("FLOWUNID",this.getObjectNo()).getSingleResult(false);
switch (this.getPhaseNo()) {
case "0030":
meagess=bo!=null?bo.getAttribute(VI_BUSINESS_APPROVAL.firstchoice).toString():"false";
break;
case "0040":
meagess=meagess=bo!=null?bo.getAttribute(VI_BUSINESS_APPROVAL.secondchoice).toString():"false";;
break;
case "0050":
meagess=meagess=bo!=null?bo.getAttribute(VI_BUSINESS_APPROVAL.thirdchoice).toString():"false";;
break;
default:
meagess="false";
break;
}
return meagess;
}
}