文件清单配置编码做唯一性校验
This commit is contained in:
parent
c43bf3b22f
commit
f3d554f722
@ -21,7 +21,15 @@ include
|
||||
parent.AsDialog.ClosePage();
|
||||
}
|
||||
function saveRecord(sPostEvents) {
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
//校验文件清单配置代码项编号是否唯一
|
||||
var ITEMNO = getItemValue(0,0,'ITEMNO');
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","file_repeat","ITEMNO="+ITEMNO);
|
||||
if("false" ==sReturnInfo){
|
||||
AsDebug.alert("提示","代码项编号已存在,请重新输入!!!");
|
||||
return;
|
||||
}else{
|
||||
as_save("myiframe0", "goBack()");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -105,19 +105,6 @@
|
||||
<%/*~END~*/%>
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
|
||||
<script type="text/javascript">
|
||||
|
||||
//校验文件清单配置代码项编号是否唯一
|
||||
function Uniquenesscheck(){
|
||||
debugger;
|
||||
var ITEMNO = getItemValue(0,0,'ITEMNO');
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","file_repeat","ITEMNO="+ITEMNO);
|
||||
if("false" ==sReturnInfo){
|
||||
AsDebug.alert("提示","代码项编号已存在,请重新输入!!!");
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -22,7 +22,16 @@ public class CustomerGroupCompanyController {
|
||||
private String DISTRIBUTOR_CODING = "";
|
||||
private String flowunid;
|
||||
private String ITEMNO = "";
|
||||
private String SORTNO = "";
|
||||
|
||||
|
||||
public String getITEMNO() {
|
||||
return ITEMNO;
|
||||
}
|
||||
|
||||
public void setITEMNO(String iTEMNO) {
|
||||
ITEMNO = iTEMNO;
|
||||
}
|
||||
|
||||
|
||||
public String getFlowunid() {
|
||||
return flowunid;
|
||||
@ -188,10 +197,10 @@ public class CustomerGroupCompanyController {
|
||||
|
||||
|
||||
|
||||
|
||||
//校验文件清单配置代码项编号是否唯一
|
||||
public String file_repeat(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager filedc = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
|
||||
BizObject dgfc = filedc.createQuery("ITEMNO=:ITEMNO").setParameter("ITEMNO", ITEMNO).getSingleResult(false);
|
||||
BizObject dgfc = filedc.createQuery("ITEMNO=:ITEMNO and codeno='DocList'").setParameter("ITEMNO", ITEMNO).getSingleResult(false);
|
||||
if(dgfc == null){
|
||||
return "true";
|
||||
}else{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user