2021-03-19 10:34:59 +08:00

62 lines
2.6 KiB
Plaintext

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Author: undefined 2018-12-20
Content: 示例详情页面
History Log:
*/
String sPrevUrl = CurPage.getParameter("PrevUrl");
String flowunid = CurPage.getParameter("FlowUnid");
String productId = CurPage.getParameter("ProductId");
String distributorNo = CurPage.getParameter("distributorNo");
String orgId = CurUser.getOrgID();
//如果是直营店,则显示子经销。
String sSql = "select DISTRIBUTOR_NO,F_I_TYPE from O where ORGID = :orgId";
// F_I_TYPE=f_i_type03 直营店
BizObject bo = JBOFactory.createBizObjectQuery("jbo.app.tenwa.customer.DISTRIBUTOR_INFO", sSql).setParameter("orgId", orgId).getSingleResult(false);
if(bo != null){
distributorNo = bo.getAttribute("DISTRIBUTOR_NO").getString();
}
String phaseNo = CurPage.getParameter("PhaseNo");
if(sPrevUrl == null) sPrevUrl = "";
String sTempletNo = "ProjectDistriborInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
String flag = "false";
if("0010".equals(phaseNo)||"0020".equals(phaseNo)){
doTemp.setColInnerBtEvent("DISTRIBUTOR_NAME", "selectDistributor()");
flag = "true";
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
dwTemp.genHTMLObjectWindow(flowunid);
String sButtons[][] = {
{flag,"All","Button","保存","保存所有修改","as_save(0)","","","",""},
// {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
};
// sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function returnList(){
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
}
function selectDistributor(){
AsDialog.OpenSelector("selectDistributorNew","distributorNum,<%=distributorNo%>,productId,,<%=productId%>","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,"DISTRIBUTOR_NAME",sReturn[0]);
setItemValue(0,0,"distributor_id",sReturn[1]);
setItemValue(0,0,"DISTRIBUTOR_CODING",sReturn[2]);
setCertType();
},"请选择经销商",'');
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>