apzl_leasing/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp
2019-12-31 10:43:28 +08:00

141 lines
5.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-05-27
Content: 示例详情页面
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");
String phaseNo = CurPage.getParameter("PhaseNo");
String sPrevUrl = CurPage.getParameter("id");
String rightType = CurPage.getParameter("RightType");
String rightTypeS = CurPage.getParameter("distributor_id");
String DistributorNo = CurPage.getParameter("DistributorNo");
String sTempletNo = "DMarginChargeInfo_Temp";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("DISTRIBUTOR_ID", DistributorNo);
doTemp.setDefaultValue("MONEY_TYPE", "bondCollect");
String disno="";
List<BizObject> nolist=JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT").createQuery("select di.distributor_no from O ,jbo.app.tenwa.customer.DISTRIBUTOR_INFO di where di.id=O.flow_key and flow_unid=:flowunid")
.setParameter("flowunid",sFlowUnid).getResultList(false);
if(nolist.size()>0){
disno=nolist.get(0).getAttribute("distributor_no").getString();
}
//ASObjectModel doTemp = new ASObjectModel(sTempletNo);
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if("ReadOnly".equals(rightType)){
dwTemp.ReadOnly = "1";//只读模式
doTemp.setColInnerBtEvent("LOCAL_ACCOUNT,ACCOUNT_INFO", "");
}
if(!"0010".equals(phaseNo)){
doTemp.setColInnerBtEvent("SUBJECTNAME", "");//去掉选择对话框
}
String acc_number = Sqlca.getString("select acc_number from OWN_ACCOUNT limit 0,1");
String acc_bank = Sqlca.getString("select acc_bank from OWN_ACCOUNT limit 0,1");
String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
String acco = Sqlca.getString("select account from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
dwTemp.genHTMLObjectWindow(sFlowUnid);
dwTemp.getDataObject().setVisible("CAUTION_MONEY", true);
String sButtons[][] = {
{"ReadOnly".equals(rightType)?"false":"true","","Button","保存","保存所有修改","save(0)","","","",""},
//{"true","All","Button","返回","返回列表","returnList()","","","",""}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload=function(){
var laccount = getItemValue(0,0,'LOCAL_ACCOUNT');
if(!laccount){
<%-- setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>'); --%>
setItemValue(0,0,"ACCOUNT_INFO",'<%=acc%>');
setItemValue(0,0,"ACCOUNT",'<%=acco%>');
}
}
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,0,"MONEY_TYPE","经销商保证金");
var payer=getItemValue(0, 0, "PAYER");
if(payer==null||payer==""||payer=="undefined"){
setItemValue(0,0,"PAYER","<%=CurPage.getParameter("ProjectName")%>");
}
function save(){
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,getRow(),"FlowUnid",sFlowUnid);//初始化流程编号
as_save("myiframe0","returnList()");
}
function returnList(){
parent.selectItem(1);
}
// 获取主体信息
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,"SUBJECTID",sReturn[0]);
setItemValue(0,0,"SUBJECTNAME",sReturn[1]);
},"请选择主体",'');
}
function selectaccount(){
var disno = getItemValue(0, 0, "disno");
// alert(id);
AsDialog.OpenSelector("SelectAccountS","distributorid,"+"<%=disno%>","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(),"ACCOUNT_INFO",sReturn[0]);//向页面的框中添加数据
setItemValue(0,getRow(),"ACCOUNT",sReturn[1]);
setItemValue(0,getRow(),"DISTRIBUTOR_ACCOUNT_TEMP",sReturn[2]);
},"请选择名称");
}
function selectensure(){
debugger;
AsDialog.OpenSelector("Depositcollection","","dialogWidth=" + parseInt(window.screen.width * 0.6) + "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(),"LOCAL_ACCOUNT",sReturn[0]);//向页面的框中添加数据
setItemValue(0,getRow(),"LOCAL_BANK",sReturn[1]);
setItemValue(0,getRow(),"SUBJECTID",sReturn[2]);
setItemValue(0,getRow(),"SUBJECTNAME",sReturn[3]);
},"请选择名称");
}
function initRow()
{
//如果没有找到对应记录,则新增一条,并可以设置字段默认值
if (getRowCount(0)==0)
{
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
}
}
</script>
<script language=javascript>
initRow(); //页面装载时对DW当前记录进行初始化
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>