产品配置资金渠道

This commit is contained in:
ap007 2021-05-26 15:15:05 +08:00
parent 6a846b853d
commit 68eae1bf58
8 changed files with 323 additions and 11 deletions

View File

@ -0,0 +1,62 @@
<%@page import="com.amarsoft.app.base.util.ObjectWindowHelper"%>
<%@page import="com.amarsoft.app.base.businessobject.*"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
本金资源顺序列表
*/
String productId= CurPage.getParameter("productId");
ASObjectModel doTemp = new ASObjectModel("LB_PRODUCT_CORPUS_SOURCE");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow(productId);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord();","","","","btn_icon_add",""},
{"true","","Button","保存","保存","save()","","","","",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var position= getRowCount(0);
as_add(0);
tableDatas['myiframe0'][position][0]='<%=productId%>';
}
function save(){
if(checkAll()=='s'){
as_save(0);
self.location.reload();
}
}
function checkAll(){
//双循环来遍历查重
for(var i=0;i<getRowCount(0);i++){
for(var j = i+1; j < getRowCount(0); j++){
var orderList = getItemValue(0,i,'ORDER_LIST');
var corpusSource = getItemValue(0,i,'CORPUS_SOURCE');
var orderListLast = getItemValue(0,j,'ORDER_LIST');
var corpusSourceLast = getItemValue(0,j,'CORPUS_SOURCE');
if(i==0){
if(orderList==null||orderList==''||corpusSource==null||corpusSourceLast==''||orderListLast==null||orderListLast==''||corpusSourceLast==null||corpusSourceLast==''){
alert('资金来源或排序号不能为空');
return;
}
}
if(orderList==orderListLast){
alert('排序号不可以重复');
return;
}else if(corpusSource==corpusSourceLast){
alert('资金来源不可以重复');
return;
}
}
}
return 's';
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,78 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
产品配置资金来源顺序主页面
*/
ASObjectModel doTemp = new ASObjectModel("VI_PRODUCT_CORPUS_SOURCE");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
// dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(10);
dwTemp.genHTMLObjectWindow("");
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","编辑","编辑","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","删除","删除","deleteProduct()","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
function newRecord(){
var productId='';
AsDialog.OpenSelector("selectProductList","","dialogWidth=" + parseInt(window.screen.width * 0.6) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",
function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="")
{
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");
productId = sReturn[0];
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";
AsDialog.PopView(sUrl,'productId='+productId,'dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;',function(){reloadSelf();},'新建');
},"请选择产品",'');
//将返回的产品ID传输到编辑的info页面info页面只是展示作用然后list页面新增的时候再保存。
//编辑按钮不采用在后面添加超连接形式,曾经有的页面采用这种方式数据量大时特别卡。采用系统封装按钮事件来实现。
}
function viewAndEdit(){
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";
var sPara = getItemValue(0,getRow(0),'PRODUCT_ID');
if(typeof(sPara)=="undefined" || sPara.length==0 ){
alert("参数不能为空!");
return ;
}
AsDialog.PopView(sUrl,'productId=' +sPara ,'dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;',function(){reloadSelf();},'编辑');
}
/*function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
if(getObj(0,i,"action")!=null){
getObj(0,i,"action").innerHTML='<a class="box" style="text-align:center;" onclick="edit(\''+getItemValue(0,i,"PRODUCT_ID")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">&nbsp&nbsp&nbsp&nbsp&nbsp编辑</font></ a>';
}
};
}
function edit(productId){
var sUrl="/Tenwa/Apzl/productCar/LmProductUpAndDown.jsp";
var sPara = "productId="+productId;
AsDialog.PopView(sUrl,sPara,"dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){reloadSelf();},"配置车辆");
}*/
function deleteProduct(){
var sPara ='productId='+ getItemValue(0,getRow(0),'PRODUCT_ID');
var sResult = AsControl.RunJsp('/Tenwa/Apzl/productCorpus/deleteProductCorpus.jsp',sPara);
alert(sResult);
parent.reloadSelf();
}
/*
function mySelectRow(){
var TYPENO = getItemValue(0,getRow(0),"TYPENO");
parent.OpenInfo(TYPENO);
//list 页面同步info页面的联动传至单击事件
}
*/
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,20 @@
<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBegin.jsp"%><%
/*
页面说明: 示例上下联动框架页面
*/
String productId = CurPage.getParameter("productId");
%><%@include file="/Resources/CodeParts/Frame02.jsp"%>
<script type="text/javascript">
mytoptd.height=100;
OpenInfo();
OpenList();
function OpenInfo(){
AsControl.OpenView("/Tenwa/Apzl/productCorpus/LbProductInfo.jsp","productId=<%=productId%>","rightup");
}
function OpenList(){
AsControl.OpenView("/Tenwa/Apzl/productCorpus/LbCorpusSourceList.jsp","productId=<%=productId%>", "rightdown");
}
</script>
<%@ include file="/IncludeEnd.jsp"%>

View File

@ -0,0 +1,26 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
产品简介
*/
String productId = CurPage.getParameter("productId");
String sTempletNo = "LbProductInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(productId);
String sButtons[][] = {
//{"true","All","Button","保存","保存所有修改","save()","","","",""},
//{"true","All","Button","返回","返回列表","returnList()","","","",""}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
/* function save(){
as_save("myiframe0","returnList()");
} */
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -0,0 +1,20 @@
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBeginMDAJAX.jsp"%><%
String sResult = "";
String productId = CurPage.getParameter("productId");
int count = JBOFactory.createBizObjectQuery("jbo.prd.LB_PRODUCT_CORPUS_SOURCE", "select 1 from O where PRODUCT_ID=:productId").setParameter("productId", productId).getTotalCount();
int count_d = JBOFactory.createBizObjectQuery("jbo.prd.LB_PRODUCT_CORPUS_SOURCE", "delete from O where PRODUCT_ID=:productId").setParameter("productId", productId).executeUpdate();
if(count==count_d){
sResult="删除成功";
}else if(count_d==0){
sResult="删除失败";
}else if(count>count_d&&count_d>0){
sResult="部分删除请记录当前产品ID或产品名称并联系系统管理员";
}else{
sResult="未知错误请记录当前产品ID或产品名称并联系系统管理员";
}
out.println(sResult);
%><%@ include file="/IncludeEndAJAX.jsp"%>

View File

@ -182,26 +182,26 @@
</managerProperties>
</manager>
</class>
<class name="VI_PRODUCTS_NUMBER" label="" keyAttributes="">
<class name="VI_PRODUCTS_NUMBER" label="" keyAttributes="">
<attributes>
<attribute name="TYPENO" label="产品编号" type="STRING"/>
<attribute name="TYPENAME" label="产品名称" type="STRING"/>
<attribute name="payType" label="投放方式" type="STRING"/>
<attribute name="LeasForm" label="租赁形式" type="STRING"/>
<attribute name="equip_type" label="租赁物类型" type="STRING"/>
<attribute name="EFFECTIVEDATE" label="生效日期" type="STRING"/>
<attribute name="EFFECTIVEDATE" label="生效日期" type="STRING"/>
<attribute name="INCOME_NUMBER" label="期数" type="STRING"/>
<attribute name="fact_money" label="投放金额" type="STRING"/>
<attribute name="fact_date" label="初次投放时间" type="STRING"/>
<attribute name="Attribute2" label="产品类型" type="STRING"/>
<attribute name="distributor_name" label="经销商名称" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_products_number" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
<attribute name="distributor_name" label="经销商名称" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_products_number" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="LB_PRODUCTTOCOMPANY_INFO" label="" keyAttributes="ID">
<attributes>
@ -246,7 +246,37 @@
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</class>
<class name="VI_PRODUCT_CORPUS_SOURCE" label="产品资金来源清单" keyAttributes="">
<attributes>
<attribute name="PRODUCT_ID" label="产品编号" type="STRING"/>
<attribute name="PRODUCT_NAME" label="产品名称" type="STRING"/>
<attribute name="CORPUS_SOURCE_LIST" label="资金来源顺序" type="STRING"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="vi_product_corpus_source" />
</managerProperties>
</manager>
</class>
<class name="LB_PRODUCT_CORPUS_SOURCE" label="产品资金来源表" keyAttributes="ID">
<attributes>
<attribute name="ID" label="ID" type="STRING" length="32"/>
<attribute name="PRODUCT_ID" label="产品ID" type="STRING" length="32"/>
<attribute name="CORPUS_SOURCE" label="资金来源" type="STRING" length="32"/>
<attribute name="ORDER_LIST" label="资金顺序" type="STRING" length="20"/>
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="30"/>
<attribute name="INPUTUSERID" label="创建人" type="STRING" length="30"/>
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="30"/>
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="30"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="lb_product_corpus_source" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
</package>
</jbo>

View File

@ -0,0 +1,48 @@
package jbo.prd;
import java.lang.String;
/**
* 产品资金来源表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface LB_PRODUCT_CORPUS_SOURCE{
/**
* 产品资金来源表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.prd.LB_PRODUCT_CORPUS_SOURCE";
/**
* ID STRING(32)<br>
*/
public static final String ID = "ID";
/**
* 产品ID STRING(32)<br>
*/
public static final String PRODUCT_ID = "PRODUCT_ID";
/**
* 资金来源 STRING(32)<br>
*/
public static final String CORPUS_SOURCE = "CORPUS_SOURCE";
/**
* 资金顺序 STRING(20)<br>
*/
public static final String ORDER_LIST = "ORDER_LIST";
/**
* 创建时间 STRING(30)<br>
*/
public static final String INPUTTIME = "INPUTTIME";
/**
* 创建人 STRING(30)<br>
*/
public static final String INPUTUSERID = "INPUTUSERID";
/**
* 更新时间 STRING(30)<br>
*/
public static final String UPDATETIME = "UPDATETIME";
/**
* 更新人 STRING(30)<br>
*/
public static final String UPDATEUSERID = "UPDATEUSERID";
}

View File

@ -0,0 +1,28 @@
package jbo.prd;
import java.lang.String;
/**
* 产品资金来源清单 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface VI_PRODUCT_CORPUS_SOURCE{
/**
* 产品资金来源清单<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.prd.VI_PRODUCT_CORPUS_SOURCE";
/**
* 产品编号 STRING(20)<br>
*/
public static final String PRODUCT_ID = "PRODUCT_ID";
/**
* 产品名称 STRING(20)<br>
*/
public static final String PRODUCT_NAME = "PRODUCT_NAME";
/**
* 资金来源顺序 STRING(20)<br>
*/
public static final String CORPUS_SOURCE_LIST = "CORPUS_SOURCE_LIST";
}