📄 registersp.jsp
字号:
<%@ page language = "java" contentType="text/html;charset=GBK"%>
<%@ include file="/WEB-INF/jsp/inc/tld.inc"%>
<%@ page import="com.onewaveinc.cnbss.sp.entity.*,
com.onewaveinc.cnbss.enums.*,
com.onewaveinc.core.common.web.*,
com.onewaveinc.core.common.page.*,
java.util.*,
com.onewaveinc.cnbss.sp.manager.*,
com.onewaveinc.core.common.page.PageBean"%>
<bean:define id="message" name="BssSpForm" property="message" type="String"/>
<bean:define id="createSPSucess" name="BssSpForm" property="createSPSucess" type="Boolean"/>
<bean:define id="bssSp" name="BssSpForm" property="bssSp" type="BssSp"/>
<%
long connectPlace = 0;
if(bssSp != null){
connectPlace = bssSp.getConnectPlace();
}
%>
<SCRIPT LANGUAGE="JavaScript">
function submitForm(type)
{
if(document.BssSpForm["bssSp.name"].value.length <= 0){
alert("请输入客户名称!");
document.BssSpForm["bssSp.name"].focus();
return false;
}
if(document.BssSpForm["bssSp.code"].value.length <= 0){
alert("请输入客户编码!");
document.BssSpForm["bssSp.code"].focus();
return false;
}
if(document.BssSpForm["bssSp.licenceNo"].value.length <= 0){
alert("请输入许可证编号!");
document.BssSpForm["bssSp.licenceNo"].focus();
return false;
}
if(!checkLoginName(document.BssSpForm["bssSp.portalName"],"自服务登录名",true)){
document.BssSpForm["bssSp.portalName"].focus();
return false;
}
document.BssSpForm.action.value = type;
if(canSubmit()) {
document.BssSpForm.submit();
}
}
</SCRIPT>
<SCRIPT LANGUAGE=javascript>
<!--
/***********************************************
//
// 用DOM实现:基于XML的动态N级联动
//
//**********************************************/
// 多级联动的Select集合
var objSelects = new Array();
// 创建应有的Select对象
function funCreateSelectEl(sonId)
{
// 创建DOMDocument对象
var xmlSrc = new ActiveXObject("MicroSoft.XMLDOM");
xmlSrc = xmlSource.XMLDocument;
// root为文档对象的根节点
var root = xmlSrc.documentElement;
// 得到所传父ID的所有节点
var currentItemsSon = root.selectNodes("//Troot/Item[@id = " + sonId + "]");
var iItemsSon = currentItemsSon.length;
var parentId = 0;
//alert("sonId = "+sonId);
if(sonId == 1){
parentId = 1;
}
else if(sonId < 0){
parentId = 1;
}
else if(sonId == 2){
parentId = 2;
}else if(sonId < 100){
parentId = sonId;
}
else if(iItemsSon > 0)
{
parentId = currentItemsSon[0].attributes[1].text;
}
//alert("parentId = "+parentId);
var currentItems = root.selectNodes("//Troot/Item[@pid = " + parentId + "]");
var iItems = currentItems.length;
if(iItems > 0)
{
// 创建Select并把OnChange事件写好
var newChild = document.createElement("<SELECT onchange='eventSltChange()' id='slt" + objSelects.length + "'>");
// 向集合中添加新建的Select对象
objSelects[objSelects.length] = newChild;
// 向Select对向添加所有的Option
var i;
var j = -1;
for(i = 0; i < iItems; i++)
{
var oOption = document.createElement("OPTION");
oOption.text = currentItems[i].text;
oOption.value = currentItems[i].attributes[0].text;
//alert("oOption.value="+oOption.text);
if( oOption.value == <%=connectPlace%> ){
j = i;
}
newChild.options.add(oOption);
}
// 将新建的Select放到目标上
oDIV.appendChild(newChild);
// 先置一个空白空值
newChild.value = "";
if(j >= 0){
newChild.options[j].selected = true;
}
}
}
// Select的OnChange事件响应函数
function eventSltChange()
{
// 删除全部本层下的孩子
var i;
for(i = objSelects.length - 1; i > parseInt(event.srcElement.id.replace("slt",""), 10); i--)
{
oDIV.removeChild(objSelects[i]);
objSelects.pop();
}
//alert("event.srcElement.value="+event.srcElement.value);
if(event.srcElement.value < 100 && event.srcElement.value > 0){
// 响应新的选择
funCreateSelectEl(event.srcElement.value);
}
// 联动的选择结果
var resultArray = new Array();
var resultArray2 = new Array();
for(i = 0; i < objSelects.length; i++)
{
resultArray[i] = objSelects[i].value;
resultArray2[i] = objSelects[i].value;
document.BssSpForm["bssSp.connectPlace"].value=objSelects[i].value;
}
// 输出选定
//OUTPUT.innerText = resultArray2.join("-");
}
//-->
</SCRIPT>
<BODY onload="funCreateSelectEl(<%=connectPlace%>)">
<html:form action="/bss/BssSpAction" method="GET">
<html:hidden property="action"/>
<ui:panel title="客户注册">
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td class="f12_r" width="25%">客户名称</td>
<td width="25%"><html:text property="bssSp.name"/><font color=red>*</font></td>
<td class="f12_r" width="25%">客户编码</td>
<td width="25%"><html:text property="bssSp.code"/><font color=red>*</font></td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">许可证编号</td>
<td><html:text property="bssSp.licenceNo"/><font color=red>*</font>
</td>
<td class="f12_r" width="25%">自服务登录名</td>
<td><html:text property="bssSp.portalName"/><font color=red>*</font></td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">地址</td>
<td><html:text property="bssSp.address"/>
</td>
<td class="f12_r" width="25%">
<p align="right">邮政编码</td>
<td><html:text property="bssSp.zipCode"/></td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">客户等级</td>
<td><util:select name="bssSp.creditLevel" formName="BssSpForm" collection="creditLevelsDropdown"/></td>
<td class="f12_r" width="25%"></div></td>
<td></td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">自身业务类型</td>
<td>
<util:select name="bssSp.selfType" formName="BssSpForm" collection="selfTypesDropdown"/>
</td>
<td class="f12_r" width="25%">客户类型</td>
<td>
<util:select name="bssSp.type" formName="BssSpForm" collection="spTypesDropdown"/>
</td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">客户接入类型</td>
<td>
<util:select name="bssSp.connectType" formName="BssSpForm" collection="connectTypesDropdown"/>
</td>
<td class="f12_r" width="25%">接入地(归属)</td>
<td>
<!--util:select name="bssSp.connectPlace" formName="BssSpForm" collection="connectPlacesDropdown"/-->
<html:hidden property="bssSp.connectPlace"/>
<DIV ID="oDIV"></DIV>
<XML ID="xmlSource" src="../include/mselect.xml"/>
</td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">业务传送范围</td>
<td>
<util:select name="bssSp.area" formName="BssSpForm" collection="areasDropdown"/>
</td>
<td class="f12_r" width="25%">结算类型</td>
<td>
<util:select name="bssSp.balanceType" formName="BssSpForm" collection="balanceTypesDropdown"/>
</td>
</tr>
<tr>
<td class="f12_r" width="25%">
<p align="right">业务类型</td>
<td>
<util:select name="bssSp.serviceType" formName="BssSpForm" collection="serviceTypesDropdown"/>
</td>
<td class="f12_r" width="25%">用户支付渠道</td>
<td>
<util:select name="bssSp.channel" formName="BssSpForm" collection="channelsDropdown"/>
</td>
</tr>
<tr>
<td class="f12_r" width="25%"><div align="right">开户银行</div></td>
<td><html:text property="bssSp.bank"/></td>
<td class="f12_r" width="25%"><div align="right">银行行号</div></td>
<td><html:text property="bssSp.bankNo"/></td>
</tr>
<tr>
<td class="f12_r" width="25%"><div align="right">银行帐号</div></td>
<td><html:text property="bssSp.bankAcct"/></td>
<td class="f12_r" width="25%"><div align="right">银行开户名</div></td>
<td><html:text property="bssSp.openName"/></td>
</tr>
<%
BssSpExtendConstantManager spExtendConstantManager = (BssSpExtendConstantManager)AppWebUtils.getBean(request,"bssSpExtendConstantManager");
BssSpExtendDataManager spExtendDataManager = (BssSpExtendDataManager)AppWebUtils.getBean(request,"bssSpExtendDataManager");
%>
<logic:notEqual name="BssSpForm" property="bssSpExtendList" value="">
<logic:iterate id="data" name="BssSpForm" property="bssSpExtendList" type="BssSpExtend">
<tr>
<td class="f12_r" width="25%" align="center">
<div align="right"><bean:write name="data" property="name"/></div></td>
<td colspan="3">
<%
BssSpExtendData bssSpExtendDatExist = spExtendDataManager.searchBssSpExtendDataBySpIdAndExId(bssSp.getId(),data.getId());
if(data.getType() == EnumBss.SP_EXTEND_TYPE_CONSTANT){
BssSpExtendConstant bssSpExtendConstantParent = spExtendConstantManager.searchBssSpExtendConstantByName(data.getPreValue(),EnumBss.SP_EXTEND_CONSTANT_GRADE_PARENT);
if(bssSpExtendConstantParent != null){
List allBssSpExtendConstantSon = spExtendConstantManager.searchBssSpExtendConstantByParentId(bssSpExtendConstantParent.getId(),new PageBean());
if(allBssSpExtendConstantSon != null && allBssSpExtendConstantSon.size() > 0){
%>
<select name="bssSpExtendValue">
<%
for(int i = 0 ; i < allBssSpExtendConstantSon.size(); i ++){
if(i == 0){
%>
<option value=""></option>
<%
}
BssSpExtendConstant bssSpExtendConstantSon = (BssSpExtendConstant )allBssSpExtendConstantSon.get(i);
if(bssSpExtendDatExist != null && bssSpExtendDatExist.getValue().equals(bssSpExtendConstantSon.getName()))
{
%>
<option value="<%=bssSpExtendConstantSon.getName()%>" selected><%=bssSpExtendDatExist.getValue()%></option>
<%
}else{
%>
<option value="<%=bssSpExtendConstantSon.getName()%>"><%=bssSpExtendConstantSon.getName()%></option>
<%
}
}
%>
</select>
<%
}
}else{
%>
<input type="hidden" name="bssSpExtendValue" value="" maxlength="10">
<%
}
}else{
String preValueShow = data.getPreValue();
if(preValueShow == null){
preValueShow = "";
}
if(bssSpExtendDatExist != null )
{
String dataValueShow = bssSpExtendDatExist.getValue();
if(dataValueShow == null){
dataValueShow = "";
}
if(data.getType() == EnumBss.SP_EXTEND_TYPE_DATE){
%>
<input type="text" name="bssSpExtendValue" value="<%=dataValueShow%>" maxlength="10">
<%
}else{
%>
<input type="text" name="bssSpExtendValue" value="<%=dataValueShow%>" minlength="<%=data.getMinLength()%>" maxlength="<%=data.getLength()%>">
<%
}
}else{
if(data.getType() == EnumBss.SP_EXTEND_TYPE_DATE){
%>
<input type="text" name="bssSpExtendValue" value="<%=preValueShow%>" maxlength="10">
<%
}else{
%>
<input type="text" name="bssSpExtendValue" value="<%=preValueShow%>" minlength="<%=data.getMinLength()%>" maxlength="<%=data.getLength()%>">
<%
}
}
//如果是数字类型或者是日期类型,则在页面上提示操作员输入的类型
if(data.getType() == EnumBss.SP_EXTEND_TYPE_NUMBER){
out.println("此属性为数字类型,请输入数字!");
}
else if(data.getType() == EnumBss.SP_EXTEND_TYPE_DATE){
out.println("此属性为日期类型,请输入日期格式!(例:2008-08-08)");
}
}
%>
</td>
</tr>
</logic:iterate>
</logic:notEqual>
<%if(!createSPSucess.booleanValue()){
%>
<tr>
<td align="center" colspan="4">
<input type="button" value="保存" class="shortbtn2" onClick="submitForm('create');"><p><%=message%>
</td>
</tr>
<%
}else{
%>
<tr>
<td align="center" colspan="4">
<input type="button" value="添加联系人" class="btn6" onClick="submitForm('newSpContact');"><p><%=message%>
</td>
</tr>
<%
}
%>
</table>
</ui:panel>
</html:form>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -