diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceInfo.jsp
index c6388ca97..613117709 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceInfo.jsp
@@ -20,39 +20,55 @@
function goBack(){
parent.AsDialog.ClosePage();
}
- function saveRecord(sPostEvents) {
+
+ function saveRecord(sPostEvents) {
+ // 保存前进行校验, 同一个主体只能有一个启用的对公账户信息
+ var subject_name = getItemValue(0,getRow(0),'subject_name');
+ var id = getItemValue(0,getRow(0),'id');
+ var is_enable = getItemValue(0,getRow(0),'is_enable');
+ if(is_enable=="Y"){
+ var Return = RunJavaMethodTrans("com.tenwa.app.wechat.WechatPublicAccountInfoVerify","soleVerify","subject_name="+subject_name+",id="+id);
+ if(Return=="true"){
+ as_save("myiframe0", "goBack()");
+ }else{
+ alert("该主体已存在启用状态对公账号信息! ");
+ return;
+ }
+ }else{
as_save("myiframe0", "goBack()");
}
+ }
- // 主体账户选择;
- function selectloanlimit(){
- AsDialog.OpenSelector("SelectLoanLimit","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
- if(!sReturn||sReturn=="_CANCEL_"){
- //alert(getHtmlMessage('1'));//请选择一条信息!
- return;
- }
- sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
- //setItemValue(0,getRow(),"OA_ID",sReturn[0]);//向页面的框中添加数据
- setItemValue(0,getRow(),"ACC_NAME",sReturn[0]);
- setItemValue(0,getRow(),"BANK_NAME",sReturn[1]);
- setItemValue(0,getRow(),"ACC_NUMBER",sReturn[2]);
- setItemValue(0,getRow(),"BRANCH_TITLE",sReturn[3]);
- },"请选择账户名称");
+ // 选择主体
+ function selectManySubject(){
+ AsDialog.OpenSelector("selectManySubject","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",function(sReturn){
+ if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
+ return;
+ }
+ sReturn = sReturn.split("@");
+ setItemValue(0,0,"subject_id",sReturn[0]);
+ setItemValue(0,0,"subject_name",sReturn[1]);
+ },"请选择主体");
+ }
+
+ // 主体账户选择;
+ function selectloanlimit(){
+ var subject_name = getItemValue(0,getRow(0),'subject_name');
+ if(subject_name.length<1){
+ alert("请先选择主体信息");
+ return;
}
- // 选择主体
- function selectManySubject(){
- AsDialog.OpenSelector("selectManySubject","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
- function(sReturn){
- if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
- {
- //alert(getHtmlMessage('1'));//请选择一条信息!
- return;
- }
- sReturn = sReturn.split("@");
- setItemValue(0,0,"id",sReturn[0]);
- setItemValue(0,0,"subject_name",sReturn[1]);
- },"请选择客户",'');}
-
+ AsDialog.OpenSelector("SelectLoanLimit","subject_name,"+subject_name,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
+ if(!sReturn||sReturn=="_CANCEL_"){
+ return;
+ }
+ sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
+ setItemValue(0,getRow(),"ACC_NAME",sReturn[0]);
+ setItemValue(0,getRow(),"BANK_NAME",sReturn[1]);
+ setItemValue(0,getRow(),"ACC_NUMBER",sReturn[2]);
+ setItemValue(0,getRow(),"BRANCH_TITLE",sReturn[3]);
+ },"请选择账户");
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceList.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceList.jsp
index 75a3d4c86..af13227f8 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBAssetTransferRegistration/MoreThemeMaintenanceList.jsp
@@ -1,14 +1,14 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
- String PG_TITLE = "主体维护"; // 浏览器窗口标题
PG_TITLE
+ String PG_TITLE = "微信对公账号维护"; // 浏览器窗口标题 PG_TITLE
ASObjectModel doTemp = new ASObjectModel("LB_MANY_SUBJECT_LIST");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
//dwTemp.MultiSelect = true; //多选
dwTemp.ReadOnly = "1"; //只读模式
- dwTemp.setPageSize(30);
+ dwTemp.setPageSize(20);
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
index 847778201..aa51eb7b4 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
@@ -5247,35 +5247,31 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/src/com/tenwa/app/wechat/WechatPublicAccountInfoVerify.java b/src/com/tenwa/app/wechat/WechatPublicAccountInfoVerify.java
new file mode 100644
index 000000000..cbd3e653a
--- /dev/null
+++ b/src/com/tenwa/app/wechat/WechatPublicAccountInfoVerify.java
@@ -0,0 +1,45 @@
+package com.tenwa.app.wechat;
+
+import java.util.List;
+import java.util.Map;
+import com.amarsoft.are.jbo.JBOException;
+import com.amarsoft.are.jbo.JBOTransaction;
+import com.tenwa.comm.util.jboutil.DataOperatorUtil;
+
+public class WechatPublicAccountInfoVerify {
+ private String subject_name;
+ private String id;
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public String getSubject_name() {
+ return subject_name;
+ }
+ public void setSubject_name(String subject_name) {
+ this.subject_name = subject_name;
+ }
+
+ /**
+ * 1: 新增主体对公账户信息时, 对启用状态的数据进行校验, 已存在该主体启用账户信息不允许新增.
+ * @param tx
+ * @return
+ * @throws Exception
+ */
+ public String soleVerify(JBOTransaction tx) throws Exception {
+ String returns="true";
+ try {
+ String sql="SELECT SUBJECT_NAME FROM LB_MANY_SUBJECT WHERE SUBJECT_NAME='"+subject_name+"' AND IS_ENABLE='Y' AND ID <> '"+id+"'";
+ List