- 浏览: 29826 次
- 性别:
- 来自: 北京
-
文章分类
- 全部博客 (22)
- js (3)
- java excel (1)
- java spring (1)
- oracle (6)
- case (1)
- java发展线路 (1)
- 乱码 (1)
- 修改字符集 (1)
- HessianServlet Hessian srpingMVC (1)
- synchronized memcache session (0)
- 互联网 (0)
- synchronized memcache session(互联网) (0)
- memcache(互联网) (1)
- redis (1)
- jedis (1)
- 短信,股票代码 (0)
- 股票 (1)
- springmvc,spring (1)
- spring (2)
- springmvc (1)
- mvc (1)
- jta (1)
- 分布式事务 (1)
- UserTransaction (1)
- Transaction (1)
- Java (1)
- 架构师 (1)
- java架构师之路 (1)
- ioc (1)
- mysql (1)
- db (1)
最新评论
<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/validator_rule.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/calendarNew.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/checkdate.js"></script>
<head>
<title></title>
<SCRIPT language="JavaScript" type="text/javascript">
var num = '<s:property value="iapsMainAppiList.size" />';
var xmlhttp;
// 获取 XMLHttpRequest;
function createxmlhttp() {
var xmlhttp;
if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
/*
// 回调函数
function handleStateChange(isBlean) {
// 这里 返回 对象的主见 id
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
// document.getElementById("t2").value=xmlhttp.responseText;
var appiId = "<s:property value="appiId" />";
if(appiId){
alert("新增成功");
}else{
alert("新增失败");
}
// alert("新增成功");
}
}
}*/
function delRow() {
try {
//判断行数是否小于等于已保存的信息条数+1(+1是因为表头的存在)
var billTable = document.getElementById('billTable');
if (billTable.rows.length <= (parseInt(num) + 1)) {
alert("已保存的申请件信息不能删除!");
return;
}
billTable.deleteRow(billTable.rows.length-1);
} catch (e) {
alert("Err 5001:\r\n" + e.message);
}
}
function addRow() {
try {
// 清空以前的 数据 信息
phoneArr = new Array();
var billTable = document.getElementById('billTable');
//复制最后一行 先复制 否则置灰的属性就会也被复制
var otr = billTable.rows[billTable.rows.length-1];
var newtr = otr.cloneNode(true);
//验证最后一行的数据是否完整,checkRowBatchQcc方法接收的为iapsMainAppiList列表的索引,所以除去表头一行,并且转成索引形式,所以为-2
var messArr = checkRowBatchQcc(billTable.rows.length-2);
var mess = messArr[0] ; // 错误信息
var parameters = messArr[1] ; // 参数
var rowindex = messArr[2] ; // 行数 / td的主键appid
var appiBatchfile = "<s:property value="appiBatchfile" />" ;
parameters += "&appiBatchfile=" + appiBatchfile ;
//alert("message:" + mess);
alert("parameters:" + parameters);
// 这里对电话号码数据 进行次数效验
mess = validPhone(mess) ;
document.getElementById('messageDiv').innerText = mess;
if(mess != ''){
alert('数据发生逻辑心错误,不能添加新行!');
return ;
}else{
var cel = document.getElementById('iapsMainAppiList'+(billTable.rows.length-2)).cells[1];
cel.innerHTML = parseInt(cel.innerText);
// 通过ajax 想服务器端发起请求
url = "<%=request.getContextPath()%>/batch/batchQccAction_saveOneBatchQcc.action" ;
xmlhttp = createxmlhttp();
xmlhttp.open("POST",url,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
xmlhttp.send(parameters); // 传递参数
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
// document.getElementById("t2").value=xmlhttp.responseText;
var appiId = xmlhttp.responseText;
alert("====appiId:" + appiId + "----rowindex:" + rowindex);
// var appiAppIdObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiAppId");
if(appiId){
//document.getElementById("iapsMainAppiList[1].appiAppId").value = appiId ;
document.getElementById(rowindex).value = appiId ;
// alert(document.getElementById('billTable').rows[rowindex].cells[1].innerHTML);
alert("保存成功");
}else{
alert("保存失败");
}
}
}
};
}
//替换cells中的对象的id和name所涉及到iapsMainAppiList的索引
var newNode = addId(parseInt(billTable.rows.length-2)+1,newtr);
newNode.id = "iapsMainAppiList"+(parseInt(billTable.rows.length-2)+1);
//特别加上tbody对象,因为直接在table中appendChild对象可能不显示
document.getElementById('bileTableTbody').appendChild(newNode);
//前10列的值不带下来
removeValue(billTable.rows.length-2);
//alert("addRow--num="+num);
//oTBODY.insertAdjacentElement("beforeEnd",newNode);
} catch (e) {
alert("Err 5002:\r\n" + e.message);
}
}
//j表示要增加的行的ID(即,最后一行的ID加1)
//node表示newtr = otr.cloneNode(true);
function addId(j,node) {
try {
var oList = node.childNodes;
for(var i=0;i<oList.length;i++) {
if(i==0||i==1||i==(oList.length-1)){
if(i==1){
oList[i].innerHTML=j+1;
}
}else{
oList[i].innerHTML = oList[i].innerHTML.replace(/\[\d\]/g,"["+j+"]");
}
}
return node;
}catch (e) {
alert("Err 5003:\r\n" + e.message);
}
}
/**
* 根据产品ID获得产品卡面
* prefix:ID前缀,主要是为了获取集合下标
* setValue:该方法是通过改变产品类型而来使主卡版面发生改变,该参数是要设置的主卡版面的值
*/
function changAppiProdCatCode(prefix){
createXMLHttpRequest();
var url = "<%=request.getContextPath()%>/company/companyInf_changCatCode.action";
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
var appiMcComName = xmlHttp.responseText;
alert(appiMcComName = '-------');
var appiMcComNames = (appiMcComName.split("---")[0]).split("||");
strDutyNum= appiMcComName.split("---")[1];
var appiMcDispartComNamelist = document.getElementById(prefix + ".appiMcColor");
appiMcDispartComNamelist.length=0;
appiMcDispartComNamelist.add(new Option("请选择",""));
for(var j=0;j<appiMcComNames.length-1;j++){
var resultValue =appiMcComNames[j].split("===")[0];
var resultText =appiMcComNames[j].split("===")[1];
var resultOption = new Option(resultText,resultValue);
appiMcDispartComNamelist.add(resultOption);
}
}
};
xmlHttp.open('POST', url, true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send("proCatCode=" + document.getElementById(prefix+'.appiProdCatCode').value);
}
var xmlHttp;
function createXMLHttpRequest() {
if(window.XMLHttpRequest){ //Mozilla
xmlHttp = new XMLHttpRequest();
}else if (window.ActiveXObject){ // IE
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
}
function calELength(value){
var pa = /[^x00-xff]/;
var array = value.split('');
var prvIsChinese = false;
var eLength = 0 ;
for(var i = 0 ; i < array.length ; i ++){
var temp = array[i];
if(pa.test(temp)){
if(prvIsChinese == true){
eLength += 2;
}else{
eLength += 4;
}
prvIsChinese = true;
}else{
eLength += 1;
prvIsChinese = false;
}
}
return eLength;
}
function showErrorMessage(mge){
document.getElementById('messageDiv').innerText = mge;
}
</SCRIPT>
<style>
.R_th {
white-space: nowrap;
text-align: center
}
;
.R_main(
white-space
:nowrap
;)
</style>
</head>
<body bgcolor="#e8e8e8">
<form name="form1"
action="<%=request.getContextPath()%>/batch/batchQccAction_inputBatchQcc.action"
method="post"><input value="0," name="allrow" id="allrow"
type="hidden">
<tr class="R_main">
<td class="R_main" colSpan="10">批次号:<s:property
value="appiBatchfile" /> <input type="hidden" name="appiBatchfile" id="appiBatchfile"
value="<s:property value="appiBatchfile" />" />
<div align="right"><input type="button" value="返回" class="btn"
onclick="goBack()" /><input type="button" value="保存" class="btn"
onClick="checkBatchQcc();" /></div>
</td>
</tr>
<div id="messageDiv" style="color: red;"></div>
<table width="100%" border="1" cellpadding="1" cellspacing="1"
id="billTable">
<tbody id="bileTableTbody">
<tr class="R_th" bgcolor="#3399CC">
<td class="R_th"></td>
<td class="R_th"></td>
<td class="R_th" align="center"><FONT color="red">*</FONT>产品类型</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>主卡版面</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>称谓</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>姓</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>姓名拼音</td>
<td class="R_th" align="center">第二印花名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件类型</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件号码</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>持卡人生日</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件有效期截至日期</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件有效期长期标识(长期)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>国籍</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址(省/直辖市)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址(市/区/县)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址一</td>
<td class="R_th" align="center">住宅地址二</td>
<td class="R_th" align="center">住宅地址三</td>
<td class="R_th" align="center">住宅邮编</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>持卡人手机号码</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位名称</td>
<td class="R_th" align="center">单位邮编</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址(省/直辖市)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址(市/区/县)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址一</td>
<td class="R_th" align="center">单位地址二</td>
<td class="R_th" align="center">单位地址三</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>主卡对帐单及领卡邮寄地址</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>母亲姓氏</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>联系人姓名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>联系人电话</td>
<td class="R_th" align="center">联系人与申请人关系</td>
<td class="R_th" align="center">联系人单位</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>长城信用卡主卡所在地</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>免年费类型FW</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>BH号</td>
<td class="R_th" align="center">银行专用信息推荐员工标识IN</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>总行端制卡参数选择</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>POS验密参数</td>
<td class="R_th" align="center">淘宝卡帐户类型</td>
<td class="R_th" align="center">电子邮箱</td>
<td class="R_th" align="center">毕业年份</td>
<td class="R_th" align="center">领卡分行号</td>
<td class="R_th" align="center">单位编号</td>
<td class="R_th"></td>
</tr>
<s:iterator id="iapsMainAppi" value="iapsMainAppiList" status="ii">
<tr class="R_main"
id="iapsMainAppiList<s:property value="#ii.index" />">
<td class="R_main" width="50">
<BUTTON onClick="addRow()" type="button"
class="btn">+</BUTTON>
<s:if test="#ii.index > 0">
<script language="JavaScript" type="text/javascript">
document.getElementById('allrow').value += <s:property value="#ii.index" /> + ",";
</script>
</s:if></td>
<td class="R_th"><s:property value="#ii.index + 1" /><input
type="hidden"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiAppId"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiAppId"
value="<s:property value="appiAppId" />" /></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiProdCatCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiProdCatCode"
onchange="changAppiProdCatCode('iapsMainAppiList[<s:property value="#ii.index" />]');">
<s:iterator value="getAllProdcat()">
<option value="<s:property value="proCatCode" />"
<s:if test="#iapsMainAppi.appiProdCatCode == proCatCode">selected="selected"</s:if>
cardTypeFlag="<s:property value="cardTypeFlag" />"><s:property
value="proCatName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcColor"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcColor"
onfocus="aa(this)">
<option value="">请选择</option>
<s:iterator value="getProdcatById(appiProdCatCode).productColor">
<option value="<s:property value="colorId" />"
<s:if test="#iapsMainAppi.appiMcColor == colorId">selected="selected"</s:if>><s:property
value="colorName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcTitle">
<option value="1"
<s:if test="appiMcTitle == 1">selected="selected"</s:if>>1先生</option>
<option value="2"
<s:if test="appiMcTitle == 2">selected="selected"</s:if>>2女士</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFirstName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFirstName"
size="6" onFocus="aa(this);"
value="<s:property value="appiMcFirstName" />" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFamilyname"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFamilyname"
value="<s:property value="appiMcFamilyname" />" size="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName1"
value="<s:property value="appiMcKnowAsName1" />" size="15"
maxlength="28" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName2"
value="<s:property value="appiMcKnowAsName2" />" size="15"
maxlength="13" onFocus="aa(this);" /></td>
<td class="R_main"><select style="WIDTH: 150px"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdType"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdType"
onchange="changeAppiMcIdType(this.value,<s:property value="#ii.index" />);">
<s:iterator status="index" value="getListByType('appi_mc_id_type')">
<option value="<s:property value="bizTypePropCode"/>"
<s:if test="#iapsMainAppi.appiMcIdType==bizTypePropCode">selected</s:if>>
<s:property value="bizTypePropCode" /><s:property
value="bizTypePropName" />
</s:iterator>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdNumber"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdNumber"
value="<s:property value="appiMcIdNumber" />" size="20"
maxlength="20" onFocus="aa(this);"
onblur="setAppiMcDob(this,<s:property value="#ii.index" />)" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcDob"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcDob"
value="<s:property value="appiMcDobStr" />" size="10" maxlength="10"
style="cursor: pointer;" onblur="validatorDate(this)"
onfocus="aa(this)" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidEndDate"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidEndDate"
value="<s:property value="appiMcValidEndDate" />" size="10"
maxlength="10" onFocus="aa(this);" onfocus="calendar(this);"
onblur="validatorDate(this)" /></td>
<td class="R_main" align="center"><s:if
test="appiMcValidLongFlag == 1">
<input type="checkbox"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
value="1" checked="checked" />
</s:if> <s:else>
<input type="checkbox"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
value="1" />
</s:else></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcNationality"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcNationality"
value="<s:property value="appiMcNationality == null ? 'CHN' : appiMcNationality" />"
size="6" maxlength="3" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrState"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrState"
value="<s:property value="appiMcAddrState" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrCity"
value="<s:property value="appiMcAddrCity" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr1"
value="<s:property value="appiMcAddr1" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr2"
value="<s:property value="appiMcAddr2" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr3"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr3"
value="<s:property value="appiMcAddr3" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcPostCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcPostCode"
value="<s:property value="appiMcPostCode" />" size="6" maxlength="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMPhone"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMPhone"
value="<s:property value="appiMcMPhone" />" size="20" maxlength="11"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmployerName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmployerName"
value="<s:property value="appiMcEmployerName" />"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplPostCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplPostCode"
value="<s:property value="appiMcEmplPostCode" />" size="6"
maxlength="6" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrState"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrState"
value="<s:property value="appiMcEmplAddrState" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrCity"
value="<s:property value="appiMcEmplAddrCity" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr1"
value="<s:property value="appiMcEmplAddr1" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr2"
value="<s:property value="appiMcEmplAddr2" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr3"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr3"
value="<s:property value="appiMcEmplAddr3" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcBillAddrInd"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcBillAddrInd">
<option value="1"
<s:if test="appiMcBillAddrInd == 1">selected="selected"</s:if>>1寄往公司地址</option>
<option value="2"
<s:if test="appiMcBillAddrInd == 2">selected="selected"</s:if>>2寄往住宅地址</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMotherName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMotherName"
value="<s:property value="appiMcMotherName" />" size="4"
onFocus="aa(this);" maxlength="6" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactName"
value="<s:property value="appiMcContactName" />" size="4"
onFocus="aa(this);" maxlength="6" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactMPhone"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactMPhone"
value="<s:property value="appiMcContactMPhone" />" size="20"
maxlength="11" onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactRelship"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactRelship">
<option value="">请选择</option>
<option value="1"
<s:if test="appiMcContactRelship == 1">selected="selected"</s:if>>1父母</option>
<option value="2"
<s:if test="appiMcContactRelship == 2">selected="selected"</s:if>>2配偶</option>
<option value="3"
<s:if test="appiMcContactRelship == 3">selected="selected"</s:if>>3亲戚</option>
<option value="4"
<s:if test="appiMcContactRelship == 4">selected="selected"</s:if>>4其他</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactEmployer"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactEmployer"
value="<s:property value="appiMcContactEmployer" />"
onFocus="aa(this);" /></td>
<td class="R_main"><select style="WIDTH: 150px"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsumeCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsumeCity">
<option value="">请选择</option>
<s:iterator value='getBaseId()'>
<option value="<s:property value='bnCode'/>"
<s:if test="bnCode == #iapsMainAppi.appiMcConsumeCity">selected="selected"</s:if>><s:property
value='bnDesc' /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoFeeType"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoFeeType">
<option value="0"
<s:if test="0 == appiBankinfoFeeType">selected="selected"</s:if>>0不免</option>
<option value="1"
<s:if test="1 == appiBankinfoFeeType">selected="selected"</s:if>>1免首年</option>
<option value="2"
<s:if test="2 == appiBankinfoFeeType">selected="selected"</s:if>>2免3年</option>
<option value="3"
<s:if test="3 == appiBankinfoFeeType">selected="selected"</s:if>>3全免</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoBh"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoBh"
value="<s:property value="appiBankinfoBh" />" size="8"
onFocus="aa(this);" maxlength="10" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoPccIn"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoPccIn"
value="<s:property value="appiBankinfoPccIn" />" size="12"
onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].packageId"
name="iapsMainAppiList[<s:property value="#ii.index" />].packageId">
<option value="0" <s:if test="0==apsBatchState.batchIsmail">selected="selected"</s:if>>0暂不制卡</option>
<option value="1" <s:if test="1==apsBatchState.batchIsmail">selected="selected"</s:if>>1制卡并邮寄</option>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsume"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsume">
<option value="1"
<s:if test="1 == appiMcConsume">selected="selected"</s:if>>1密码+签名</option>
<option value="2"
<s:if test="2 == appiMcConsume">selected="selected"</s:if>>2签名</option>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAlipayAccountType"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAlipayAccountType">
<option value="">请选择</option>
<option value="1000"
<s:if test="1000 == appiMcAlipayAccountType">selected="selected"</s:if>>1000手机号</option>
<option value="4000"
<s:if test="4000 == appiMcAlipayAccountType">selected="selected"</s:if>>4000电子邮箱</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmailAddr"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmailAddr"
value="<s:property value="appiMcEmailAddr" />" size="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAssetValue"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAssetValue"
value="<s:property value="appiMcAssetValue" />" size="4"
maxlength="4" onFocus="aa(this);" /></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard1Bank"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard1Bank"
disabled="disabled">
<s:iterator value="cardBankList">
<option value="<s:property value="appiCardId" />"
<s:if test="#iapsMainAppi.appiMcOtherCard1Bank == appiCardId">selected="selected"</s:if>><s:property
value="appiCardId" />/<s:property value="appiCardBankName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard2Bank"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard2Bank"
value="<s:property value="appiMcOtherCard2Bank" />" size="8"
onFocus="aa(this);" /></td>
<td>
<button onClick="delRow('allRow')" type="button" class="btn">-</button>
</td>
</tr>
</s:iterator>
</tbody>
</table>
<div><s:property value="precheckMessage" /></div>
</form>
<script type="text/javascript">
//返回
function goBack(){
var appiBatchfile = "<s:property value="appiBatchfile" />" ;
document.form1.action = "<%=request.getContextPath()%>/batch/apsBatchProjectAction_toBatchStateQccList.action?projectPkId=" + appiBatchfile.substr(0,10);
document.form1.submit();
}
// 定义2个数组 用来存取 电话号码 用于 判断该电话号码 出现的次数
// 在点击保存按钮的时候 吧电话号码 存入 数组中 在保存之前进行效验 号码出现的次数 是否已经超出
var phoneArr = new Array();
// 同一个电话号码出现的次数 默认是一次
var phoneCount = 1 ;
// 比较电话号码
function validPhone(message){
for(var i = 0 ; i < phoneArr.length-1 ; i++){
for(var j = i+1 ; j < phoneArr.length ; j++){
// 判断 是否有 重复出现的电话号码
if(phoneArr[i] == phoneArr[j]){
phoneCount = phoneCount + 1 ;
}
}
// 判断 该电话号码出现的次数 是否超过 5 次
if(phoneCount >= 5){
if(message.indexOf(phoneArr[i])==-1){
message = message + " 持卡人手机号码:" + phoneArr[i] + " 该电话号码已经出现了5次以上 请重新填写 ; "
}
}
// 循环判断一轮后 吧 phoneCount的值 置为 1 ;
phoneCount = 1 ;
}
return message ;
}
function removeValue(rowindex){
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFirstName").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFamilyname").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName1").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName2").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcDob").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidEndDate").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr2").value = "";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr3").value = "";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMotherName").value="";
//给证件类型绑定时间
var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
appiMcIdType.onchange = function(){
changeAppiMcIdType(this.value,rowindex);
}
//给证件号的文本框绑定事件
var appiMcIdNumberObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber");
appiMcIdNumberObj.value = "";
appiMcIdNumberObj.onblur = function(){
setAppiMcDob(this,rowindex);
}
function changeAppiMcIdType(val, rowIndex){
var appiMcDob = document.getElementById('iapsMainAppiList['+rowIndex+'].appiMcDob');
if(1 == val){
appiMcDob.readOnly = true;
appiMcDob.style.cursor = "pointer";
}else{
appiMcDob.readOnly = false;
appiMcDob.style.cursor = "default";
}
}
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMPhone").value="";
//产品类型,主卡版面,邮寄方式,长城卡使用所在地,免年费类型,制卡参数,验密参数,淘宝卡账户类型,领卡分行,下拉框的赋值
var previousRowIndex = rowindex - 1;
document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiProdCatCode").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcColor").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcColor").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcBillAddrInd").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcBillAddrInd").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcConsumeCity").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoFeeType").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiBankinfoFeeType").value;
document.getElementById("iapsMainAppiList["+rowindex+"].packageId").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].packageId").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsume").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcConsume").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactRelship").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcContactRelship").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcAlipayAccountType").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard1Bank").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcOtherCard1Bank").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard2Bank").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcOtherCard2Bank").value;
}
//数据质检
function checkBatchQcc()
{
var allrows=document.getElementById("billTable").rows.length - 1;
var rowindex;
var result=0;
// 清空以前的 数据 信息
phoneArr = new Array();
for(var i=0; i < allrows;i++){
var messArr = checkRowBatchQcc(i);
var message = messArr[0] ;
// 这里对电话号码数据 进行次数效验
message = validPhone(message) ;
if(message != ''){
result++;
document.getElementById('messageDiv').innerText = "";
var cel = document.getElementById('iapsMainAppiList'+i).cells[1];
cel.innerHTML = parseInt(cel.innerText) + '<a href="#" onclick="showErrorMessage(\''+message+'\')">错误消息</a>';
}
}
if(result == 0){
document.form1.submit();
}else{
alert('您刚填写的数据存在逻辑问题,请录入完整!');
}
}
function checkRowBatchQcc(rowindex){
var message = ""; // 错误信息
var parameters = "" ; // 单行提交的参数
var messArr = new Array(); // 吧两个 数据 存入 数组中
//对数据域进行校验
//主卡版面
var appiMcColorObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcColor");
if(appiMcColorObj.options.length != 1 && appiMcColorObj.value == ''){
message += "请选择主卡版面;";
appiMcColorObj.style.backgroundColor="#FF0000";
appiMcColorObj.onclick = function(){
appiMcColorObj.style.backgroundColor= "";
};
}
parameters += "iapsMainAppi.appiMcColor=" + appiMcColorObj.value ;
// 主键
var appiAppIdObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiAppId");
if(appiAppIdObj.value != ""){
parameters += "&iapsMainAppi.appiAppId=" + appiAppIdObj.value ;
}
//姓
var appiMcFirstName=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFirstName");
if(validateNotNull(appiMcFirstName) == 1){
message += "申请人姓不能为空;";
}
parameters += "&iapsMainAppi.appiMcFirstName=" + appiMcFirstName.value;
//名
var appiMcFamilyname=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFamilyname");
if(validateNotNull(appiMcFamilyname) == 1){
message += "申请人名不能为空;";
}
parameters += "&iapsMainAppi.appiMcFamilyname=" + appiMcFamilyname.value;
//姓名拼音
var appiMcKnowAsName1=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName1");
if(validateNotNull(appiMcKnowAsName1) == 1){
message += "姓名拼音不能为空;";
}else{
var appiMcKnowAsName1Result = getBlankNumber(appiMcKnowAsName1);
if(appiMcKnowAsName1Result && '' != appiMcKnowAsName1Result){
message += appiMcKnowAsName1Result;
}
}
parameters += "&iapsMainAppi.appiMcKnowAsName1=" + appiMcKnowAsName1.value;
//生日
var appiMcDob=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcDob");
if(validateNotNull(appiMcDob) == 1){
message += "生日不能为空;";
}else{
if(!isDate(appiMcDob.value)){
message += "请录入正确的身份证号;";
}
}
parameters += "&iapsMainAppi.appiMcDob=" + appiMcDob.value;
//证件号码
var appiMcIdNumber = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber");
var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
if(validateNotNull(appiMcIdNumber) == 1){
message += "证件号码不能为空;";
}else{
// var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
if(appiMcIdType == 1){
var appiMcIdNumberChecke = checkIdcard(appiMcIdNumber.value);
if('true' != appiMcIdNumberChecke){
message += appiMcIdNumberChecke + ";";
}
}
}
parameters += "&iapsMainAppi.appiMcIdNumber=" + appiMcIdNumber.value;
parameters += "&iapsMainAppi.appiMcIdType=" + appiMcIdType.value;
var appiMcValidEndDate = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidEndDate");
var appiMcValidLongFlag = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidLongFlag");
if(appiMcValidEndDate.value != ''){
if(!isDate(appiMcValidEndDate.value)){
message += '请录入正确的证件有效期截至日期;';
}
}else{
if(!appiMcValidLongFlag.checked){
message += '证件有效期截至日期和证件有效期长期标识两者必须有一项不为空;';
appiMcValidEndDate.style.backgroundColor="#FF0000";
appiMcValidEndDate.onclick = function(){
appiMcValidEndDate.style.backgroundColor= "";
};
appiMcValidLongFlag.style.backgroundColor="#FF0000";
appiMcValidLongFlag.onclick = function(){
appiMcValidLongFlag.style.backgroundColor= "";
};
}
}
parameters += "&iapsMainAppi.appiMcValidEndDate=" + appiMcValidEndDate.value;
parameters += "&iapsMainAppi.appiMcValidLongFlag=" + appiMcValidLongFlag.value;
//国籍
var appiMcNationality=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcNationality");
if(validateNotNull(appiMcNationality) == 1){
message += "国籍不能为空;";
}
parameters += "&iapsMainAppi.appiMcNationality=" + appiMcNationality.value;
//手机号
var appiMcMPhone=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMPhone");
if(validateNotNull(appiMcMPhone) == 1){
message += "手机号不能为空;";
}
if(!isMobile(appiMcMPhone.value)){
message += "请录入正确的手机号;";
}
parameters += "&iapsMainAppi.appiMcMPhone=" + appiMcMPhone.value;
var appiMcEmployerName = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmployerName");
if(validateNotNull(appiMcEmployerName) == 1){
message += "单位名称不能为空;";
}else{
if(calELength(appiMcEmployerName.value) > 30){
message += "单位名称长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmployerName=" + appiMcEmployerName.value;
//邮寄地址选择,1为寄往公司,则公司地址不能为空
var appiMcBillAddrInd = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcBillAddrInd");
var appiMcEmplPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplPostCode");
var appiMcPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcPostCode");
if('1' === appiMcBillAddrInd.value){
// var appiMcEmplPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplPostCode");
if(validateNotNull(appiMcEmplPostCode) == 1){
message += "公司邮编不能为空;";
}
if(!isPostalCode(appiMcEmplPostCode.value)){
message += "您选择邮寄地址为寄往公司,请录入正确的邮政编码;";
}
parameters += "&iapsMainAppi.appiMcEmplPostCode=" + appiMcEmplPostCode.value;
}else{
// var appiMcPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcPostCode");
if(validateNotNull(appiMcPostCode) == 1){
message += "住宅邮编不能为空;";
}
if(!isPostalCode(appiMcPostCode.value)){
message += "请录入正确的邮政编码;";
}
parameters += "&iapsMainAppi.appiMcPostCode=" + appiMcPostCode.value;
}
parameters += "&iapsMainAppi.appiMcBillAddrInd=" + appiMcBillAddrInd.value;
var appiMcEmplAddrState = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddrState");
if(validateNotNull(appiMcEmplAddrState) == 1){
message += "单位地址(省/直辖市)不能为空;";
}else{
if(calELength(appiMcEmplAddrState.value) > 30){
message += "单位地址(省/直辖市)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddrState=" + appiMcEmplAddrState.value;
var appiMcEmplAddrCity = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddrCity");
if(validateNotNull(appiMcEmplAddrCity) == 1){
message += "单位地址(市/区/县)不能为空;";
}else{
if(calELength(appiMcEmplAddrCity.value) > 30){
message += "单位地址(市/区/县)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddrCity=" + appiMcEmplAddrCity.value;
var appiMcEmplAddr1 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr1");
if(validateNotNull(appiMcEmplAddr1) == 1){
message += "单位地址一不能为空;";
}else{
if(calELength(appiMcEmplAddr1.value) > 30){
message += "单位地址一长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddr1=" + appiMcEmplAddr1.value;
var appiMcEmplAddr2 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr2");
//if(validateNotNull(appiMcEmplAddr2) == 1){
// message += "单位地址二不能为空;";
//}else{
if(calELength(appiMcEmplAddr2.value) > 30){
message += "单位地址二长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcEmplAddr2=" + appiMcEmplAddr2.value;
var appiMcEmplAddr3 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr3");
//if(validateNotNull(appiMcEmplAddr3) == 1){
// message += "单位地址三不能为空;";
//}else{
if(calELength(appiMcEmplAddr3.value) > 30){
message += "单位地址三长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcEmplAddr3=" + appiMcEmplAddr3.value;
var appiMcAddrState = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddrState");
if(validateNotNull(appiMcAddrState) == 1){
message += "住宅地址(省/直辖市)不能为空;";
}else{
if(calELength(appiMcAddrState.value) > 30){
message += "住宅地址(省/直辖市)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddrState=" + appiMcAddrState.value;
var appiMcAddrCity = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddrCity");
if(validateNotNull(appiMcAddrCity) == 1){
message += "住宅地址(市/区/县)不能为空;";
}else{
if(calELength(appiMcAddrCity.value) > 30){
message += "住宅地址(市/区/县)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddrCity=" + appiMcAddrCity.value;
var appiMcAddr1 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr1");
if(validateNotNull(appiMcAddr1) == 1){
message += "住宅地址一不能为空;";
}else{
if(calELength(appiMcAddr1.value) > 30){
message += "住宅地址一长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddr1=" + appiMcAddr1.value;
var appiMcAddr2 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr2");
//if(validateNotNull(appiMcAddr2) == 1){
// message += "住宅地址二不能为空;";
//}else{
if(calELength(appiMcAddr2.value) > 30){
message += "住宅地址二长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcAddr2=" + appiMcAddr2.value;
var appiMcAddr3 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr3");
//if(validateNotNull(appiMcAddr2) == 1){
// message += "住宅地址三不能为空;";
//}else{
if(calELength(appiMcAddr3.value) > 30){
message += "住宅地址三长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcAddr3=" + appiMcAddr3.value;
var appiMcMotherName = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMotherName");
if(validateNotNull(appiMcMotherName) == 1){
message += "母亲姓氏不能为空;";
}
parameters += "&iapsMainAppi.appiMcMotherName=" + appiMcMotherName.value;
//联系人与申请人关系
var appiMcContactRelship = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactRelship");
if(validateNotNull(appiMcContactRelship) == 1){
message += "请选择联系人与申请人关系;";
}
parameters += "&iapsMainAppi.appiMcContactRelship=" + appiMcContactRelship.value;
//判断是否准贷卡
var appiProdCatCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode");
if(appiProdCatCode.options[appiProdCatCode.selectedIndex].cardTypeFlag == 1 && document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity").value == ''){
message += "您选择的产品类型为准贷卡,请选择长城信用卡主卡所在地;"
}
parameters += "&iapsMainAppi.appiProdCatCode=" + appiProdCatCode.value;
//BH号
var appiBankinfoBh=document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoBh");
if(validateNotNull(appiBankinfoBh) == 1){
message += "请填写BH号;";
}
parameters += "&iapsMainAppi.appiBankinfoBh=" + appiBankinfoBh.value;
//验证淘宝卡
// var appiProdCatCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode");
var appiMcAlipayAccountType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType");
var appiMcEmailAddr = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmailAddr");
if('58' == appiProdCatCode.value || '129' == appiProdCatCode.value){
// var appiMcAlipayAccountType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType");
if('' == appiMcAlipayAccountType.value){
message += "您选择的产品类型为淘宝卡,请选择淘宝卡账户类型;";
}else if('4000' == appiMcAlipayAccountType.value){
// var appiMcEmailAddr = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmailAddr");
if(validateNotNull(appiMcEmailAddr) == 1){
message += "您选择的淘宝卡账户类型为4000电子邮箱,电子邮箱不能为空;";
}else{
if(!isEmail(appiMcEmailAddr.value)){
message += "您选择的淘宝卡账户类型为4000电子邮箱,请填写正确的电子邮箱地址;";
}
}
}
}
parameters += "&iapsMainAppi.appiMcAlipayAccountType=" + appiMcAlipayAccountType.value;
parameters += "&iapsMainAppi.appiMcEmailAddr=" + appiMcEmailAddr.value;
// 称谓
var appiMcTitleObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcTitle");
parameters += "&iapsMainAppi.appiMcTitle=" + appiMcTitleObj.value;
// 第二印花名 appiMcKnowAsName2
var appiMcKnowAsName2Obj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName2");
parameters += "&iapsMainAppi.appiMcKnowAsName2=" + appiMcKnowAsName2Obj.value;
// 联系人姓名 appiMcContactName
var appiMcContactNameObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactName");
parameters += "&iapsMainAppi.appiMcContactName=" + appiMcContactNameObj.value;
// 联系人电话 appiMcContactMPhone
var appiMcContactMPhoneObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactMPhone");
parameters += "&iapsMainAppi.appiMcContactMPhone=" + appiMcContactMPhoneObj.value;
// 联系人单位 appiMcContactEmployer
var appiMcContactEmployerObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactEmployer");
parameters += "&iapsMainAppi.appiMcContactEmployer=" + appiMcContactEmployerObj.value;
// 长城信用卡主卡所在地 appiMcConsumeCity
var appiMcConsumeCityObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity");
parameters += "&iapsMainAppi.appiMcConsumeCity=" + appiMcConsumeCityObj.value;
// 免年费类型FW appiBankinfoFeeType
var appiBankinfoFeeTypeObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoFeeType");
parameters += "&iapsMainAppi.appiBankinfoFeeType=" + appiBankinfoFeeTypeObj.value;
// 银行专用信息推荐员工标识IN appiBankinfoPccIn
var appiBankinfoPccInObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoPccIn");
parameters += "&iapsMainAppi.appiBankinfoPccIn=" + appiBankinfoPccInObj.value;
// POS验密参数 appiMcConsume
var appiMcConsumeObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsume");
parameters += "&iapsMainAppi.appiMcConsume=" + appiMcConsumeObj.value;
// 毕业年份 appiMcAssetValue
var appiMcAssetValueObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAssetValue");
parameters += "&iapsMainAppi.appiMcAssetValue=" + appiMcAssetValueObj.value;
// 单位编号appiMcOtherCard2Bank
var appiMcOtherCard2BankObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard2Bank");
parameters += "&iapsMainAppi.appiMcOtherCard2Bank=" + appiMcOtherCard2BankObj.value;
// 把行号作为参数 传递过去 用来 追加主键 appi_id 的时候用
// parameters += "&rowindex=" + rowindex ;
// var appiBatchfile = document.getElementById("appiBatchfile").vlaue;
// parameters += "&appiBatchfile=" + appiBatchfile ;
if(message == ""){
// appiMcFirstName.readOnly = true ;
appiMcColorObj.disabled = true ;
appiMcFirstName.disabled = true ;
appiMcFamilyname.disabled = true ;
appiMcKnowAsName1.disabled = true ;
appiMcDob.disabled = true ;
appiMcIdNumber.disabled = true ;
appiMcIdType.disabled = true ;
appiMcValidEndDate.disabled = true ;
appiMcValidLongFlag.disabled = true ;
appiMcNationality.disabled = true ;
appiMcMPhone.disabled = true ;
appiMcEmployerName.disabled = true ;
appiMcBillAddrInd.disabled = true ;
appiMcEmplPostCode.disabled = true ;
appiMcPostCode.disabled = true ;
appiMcEmplAddrState.disabled = true ;
appiMcEmplAddrCity.disabled = true ;
appiMcEmplAddr1.disabled = true ;
appiMcEmplAddr2.disabled = true ;
appiMcEmplAddr3.disabled = true ;
appiMcAddrState.disabled = true ;
appiMcAddrCity.disabled = true ;
appiMcAddr1.disabled = true ;
appiMcAddr2.disabled = true ;
appiMcAddr3.disabled = true ;
appiMcMotherName.disabled = true ;
appiMcContactRelship.disabled = true ;
appiProdCatCode.disabled = true ;
appiBankinfoBh.disabled = true ;
appiProdCatCode.disabled = true ;
appiMcAlipayAccountType.disabled = true ;
appiMcEmailAddr.disabled = true ;
appiMcTitleObj.disabled = true ;
appiMcKnowAsName2Obj.disabled = true ;
appiMcContactNameObj.disabled = true ;
appiMcContactMPhoneObj.disabled = true ;
appiMcContactEmployerObj.disabled = true ;
appiMcConsumeCityObj.disabled = true ;
appiBankinfoFeeTypeObj.disabled = true ;
appiBankinfoPccInObj.disabled = true ;
appiMcConsumeObj.disabled = true ;
appiMcAssetValueObj.disabled = true ;
appiMcOtherCard2BankObj.disabled = true ;
}
// 先判断message 是否是“” 是“” 说明数据规格正确 然后存入 array 中
if(message == ""){
// 把手机号码存入 数组中
phoneArr.push(appiMcMPhone.value);
}
// message 为空 条件 成立 拼接 参数
if(message != ""){
parameters = "";
}
messArr.push(message);
messArr.push(parameters);
// messArr.push(rowindex);
messArr.push("iapsMainAppiList["+rowindex+"].appiAppId");
//alert("message:" + message);
//alert("parameters:" + parameters);
return messArr ;
}
function validateNotNull(eleObj)
{
if(eleObj.value==""||eleObj.value=="不能为空")
{
eleObj.style.backgroundColor="#FF0000";
eleObj.value="不能为空";
return 1;
}
else
{
// alert(eleObj.value);
eleObj.style.backgroundColor="";
}
return 0;
}
//验证select标签
function validateSelect(eleObj){
if('' === eleObj.value){
eleObj.style.backgroundColor="#FF0000";
return 1;
}
return 0;
}
function aa(eleObj){
if(eleObj.value=="不能为空" || '' === eleObj.value){
eleObj.value="";
eleObj.style.backgroundColor="";
eleObj.focus();
}
}
function validateEmail( eleObj ){
if(!isEmail(eleObj.value)){
eleObj.style.backgroundColor="#FF0000";
return 1;
}
return 0;
}
function isEmail(strValue){
// Email 必须是 x@a.b.c.d 等格式 或者为空
if( isEmpty( strValue ) )
return true;
var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
return checkExp( pattern, strValue );
}
function isEmpty( strValue ){
if( "" === strValue)
return true;
return false;
}
// 使用正则表达式,检测 s 是否满足模式 re
function checkExp( re, s ){
return re.test( s );
}
//根据证件号码自动设置生日
function setAppiMcDob(obj,index){
var appiMcIdNumberValue = obj.value;
if((document.getElementById('iapsMainAppiList['+index+'].appiMcIdType').value == '1') && appiMcIdNumberValue != ''){
/*
if(checkExp(/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/gi , appiMcIdNumberValue)){
var appiMcDobValue = appiMcIdNumberValue.substring(6,10) + '-' + appiMcIdNumberValue.substring(10,12) + '-' + appiMcIdNumberValue.substring(12,14);
document.getElementById('iapsMainAppiList['+index+'].appiMcDob').value = appiMcDobValue;
}else{
alert('请录入正确的身份证号!');
}
*/
var checkIdcardResult = checkIdcard(appiMcIdNumberValue)
if('true' == checkIdcardResult){
var appiMcDobValue = appiMcIdNumberValue.substring(6,10) + '-' + appiMcIdNumberValue.substring(10,12) + '-' + appiMcIdNumberValue.substring(12,14);
document.getElementById('iapsMainAppiList['+index+'].appiMcDob').value = appiMcDobValue;
}else{
alert(checkIdcardResult);
}
}
}
function checkPerName(obj)
{
var partten = /^[\u4e00-\u9fa5A-Za-z]*$/;
var name = obj.value;
if(trimSpace(name) != "")
{
if(!partten.test(trimSpace(name)))
{
alert("请输入汉字或字母");
obj.focus();
return false;
}
}
obj.value = obj.value.trim();
}
function isDate(value){
var pattern =/^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[0-9])|([1-2][0-3]))\:([0-5]?[0-9])((\s)|(\:([0-5]?[0-9])))))?$/;
if(value!=""){
if(!pattern.exec(value)){
return false;
}
return true;
}
}
function checkIdcard(idcard){
var Errors=new Array(
"true",
"身份证号码位数有误,请输入15或18位身份证号码",
"身份证号码出生日期超出范围或含有非法字符!",
"身份证号码校验错误!",
"身份证地区非法!"
);
var area={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}
var idcard,Y,JYM;
var S,M;
var idcard_array = new Array();
idcard_array = idcard.split("");
//地区检验
if(area[parseInt(idcard.substr(0,2))]==null)
return Errors[4];
//身份号码位数及格式检验
switch(idcard.length){
case 15:
if ( (parseInt(idcard.substr(6,2))+1900) % 4 == 0 || ((parseInt(idcard.substr(6,2))+1900) % 100 == 0 && (parseInt(idcard.substr(6,2))+1900) % 4 == 0 )){
ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/;//测试出生日期的合法性
} else {
ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/;//测试出生日期的合法性
}
if(ereg.test(idcard))
return Errors[0];
else
return Errors[2];
break;
case 18:
//18位身份号码检测
//出生日期的合法性检查
//闰年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))
//平年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))
if ( parseInt(idcard.substr(6,4)) % 4 == 0 || (parseInt(idcard.substr(6,4)) % 100 == 0 && parseInt(idcard.substr(6,4))%4 == 0 )){
ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/;//闰年出生日期的合法性正则表达式
} else {
ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/;//平年出生日期的合法性正则表达式
}
if(ereg.test(idcard)){//测试出生日期的合法性
//计算校验位
S = (parseInt(idcard_array[0]) + parseInt(idcard_array[10])) * 7
+ (parseInt(idcard_array[1]) + parseInt(idcard_array[11])) * 9
+ (parseInt(idcard_array[2]) + parseInt(idcard_array[12])) * 10
+ (parseInt(idcard_array[3]) + parseInt(idcard_array[13])) * 5
+ (parseInt(idcard_array[4]) + parseInt(idcard_array[14])) * 8
+ (parseInt(idcard_array[5]) + parseInt(idcard_array[15])) * 4
+ (parseInt(idcard_array[6]) + parseInt(idcard_array[16])) * 2
+ parseInt(idcard_array[7]) * 1
+ parseInt(idcard_array[8]) * 6
+ parseInt(idcard_array[9]) * 3 ;
Y = S % 11;
M = "F";
JYM = "10X98765432";
M = JYM.substr(Y,1);//判断校验位
if(M == idcard_array[17])
return Errors[0]; //检测ID的校验位
else
return Errors[3];
} else
return Errors[2];
break;
default:
return Errors[1];
break;
}
}
function isMobile(value){
var reg0 = /^1[3,5,8]\d{9}$/;
if (reg0.test(value))
return true;
return false;
}
function isTelphone(value) {
var pattern=/^(\d{7,8})$/;
if(pattern.exec(s))
return true;
return false;
}
function isPostalCode(value){
var pattern =/^[0-9]{6}$/;
if(pattern.exec(value))
return true;
return false;
}
function changeAppiMcIdType(val, rowIndex){
var appiMcDob = document.getElementById('iapsMainAppiList['+rowIndex+'].appiMcDob');
if(1 == val){
appiMcDob.readOnly = true;
appiMcDob.style.cursor = "pointer";
}else{
appiMcDob.readOnly = false;
appiMcDob.style.cursor = "default";
}
}
function getBlankNumber(obj){
var str = document.getElementById(obj.id).value;
if(escape(str).indexOf("%u") > 0){
return "姓名拼音只能输入英文字符;";
}
if(str!=""){
var temp = "";
whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';
for (var i = 0,len = str.length; i < len; i++) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
str = str.substring(i);
break;
}
}
for (i = str.length - 1; i >= 0; i--) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
str = str.substring(0, i + 1);
break;
}
}
var s = str.length;
for (var i = 0,len = str.length; i < len; i++) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
temp=temp+str.charAt(i);
}
}
var e = temp.length;
if((s-e)!=1){
return "请在姓和名之间以空格隔开;";
}else{
obj.value = str;
obj.value = obj.value.toUpperCase();
}
}
}
</script>
</body>
</html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/validator_rule.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/calendarNew.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/checkdate.js"></script>
<head>
<title></title>
<SCRIPT language="JavaScript" type="text/javascript">
var num = '<s:property value="iapsMainAppiList.size" />';
var xmlhttp;
// 获取 XMLHttpRequest;
function createxmlhttp() {
var xmlhttp;
if (window.ActiveXObject) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
/*
// 回调函数
function handleStateChange(isBlean) {
// 这里 返回 对象的主见 id
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
// document.getElementById("t2").value=xmlhttp.responseText;
var appiId = "<s:property value="appiId" />";
if(appiId){
alert("新增成功");
}else{
alert("新增失败");
}
// alert("新增成功");
}
}
}*/
function delRow() {
try {
//判断行数是否小于等于已保存的信息条数+1(+1是因为表头的存在)
var billTable = document.getElementById('billTable');
if (billTable.rows.length <= (parseInt(num) + 1)) {
alert("已保存的申请件信息不能删除!");
return;
}
billTable.deleteRow(billTable.rows.length-1);
} catch (e) {
alert("Err 5001:\r\n" + e.message);
}
}
function addRow() {
try {
// 清空以前的 数据 信息
phoneArr = new Array();
var billTable = document.getElementById('billTable');
//复制最后一行 先复制 否则置灰的属性就会也被复制
var otr = billTable.rows[billTable.rows.length-1];
var newtr = otr.cloneNode(true);
//验证最后一行的数据是否完整,checkRowBatchQcc方法接收的为iapsMainAppiList列表的索引,所以除去表头一行,并且转成索引形式,所以为-2
var messArr = checkRowBatchQcc(billTable.rows.length-2);
var mess = messArr[0] ; // 错误信息
var parameters = messArr[1] ; // 参数
var rowindex = messArr[2] ; // 行数 / td的主键appid
var appiBatchfile = "<s:property value="appiBatchfile" />" ;
parameters += "&appiBatchfile=" + appiBatchfile ;
//alert("message:" + mess);
alert("parameters:" + parameters);
// 这里对电话号码数据 进行次数效验
mess = validPhone(mess) ;
document.getElementById('messageDiv').innerText = mess;
if(mess != ''){
alert('数据发生逻辑心错误,不能添加新行!');
return ;
}else{
var cel = document.getElementById('iapsMainAppiList'+(billTable.rows.length-2)).cells[1];
cel.innerHTML = parseInt(cel.innerText);
// 通过ajax 想服务器端发起请求
url = "<%=request.getContextPath()%>/batch/batchQccAction_saveOneBatchQcc.action" ;
xmlhttp = createxmlhttp();
xmlhttp.open("POST",url,true);
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
xmlhttp.send(parameters); // 传递参数
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
// document.getElementById("t2").value=xmlhttp.responseText;
var appiId = xmlhttp.responseText;
alert("====appiId:" + appiId + "----rowindex:" + rowindex);
// var appiAppIdObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiAppId");
if(appiId){
//document.getElementById("iapsMainAppiList[1].appiAppId").value = appiId ;
document.getElementById(rowindex).value = appiId ;
// alert(document.getElementById('billTable').rows[rowindex].cells[1].innerHTML);
alert("保存成功");
}else{
alert("保存失败");
}
}
}
};
}
//替换cells中的对象的id和name所涉及到iapsMainAppiList的索引
var newNode = addId(parseInt(billTable.rows.length-2)+1,newtr);
newNode.id = "iapsMainAppiList"+(parseInt(billTable.rows.length-2)+1);
//特别加上tbody对象,因为直接在table中appendChild对象可能不显示
document.getElementById('bileTableTbody').appendChild(newNode);
//前10列的值不带下来
removeValue(billTable.rows.length-2);
//alert("addRow--num="+num);
//oTBODY.insertAdjacentElement("beforeEnd",newNode);
} catch (e) {
alert("Err 5002:\r\n" + e.message);
}
}
//j表示要增加的行的ID(即,最后一行的ID加1)
//node表示newtr = otr.cloneNode(true);
function addId(j,node) {
try {
var oList = node.childNodes;
for(var i=0;i<oList.length;i++) {
if(i==0||i==1||i==(oList.length-1)){
if(i==1){
oList[i].innerHTML=j+1;
}
}else{
oList[i].innerHTML = oList[i].innerHTML.replace(/\[\d\]/g,"["+j+"]");
}
}
return node;
}catch (e) {
alert("Err 5003:\r\n" + e.message);
}
}
/**
* 根据产品ID获得产品卡面
* prefix:ID前缀,主要是为了获取集合下标
* setValue:该方法是通过改变产品类型而来使主卡版面发生改变,该参数是要设置的主卡版面的值
*/
function changAppiProdCatCode(prefix){
createXMLHttpRequest();
var url = "<%=request.getContextPath()%>/company/companyInf_changCatCode.action";
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
var appiMcComName = xmlHttp.responseText;
alert(appiMcComName = '-------');
var appiMcComNames = (appiMcComName.split("---")[0]).split("||");
strDutyNum= appiMcComName.split("---")[1];
var appiMcDispartComNamelist = document.getElementById(prefix + ".appiMcColor");
appiMcDispartComNamelist.length=0;
appiMcDispartComNamelist.add(new Option("请选择",""));
for(var j=0;j<appiMcComNames.length-1;j++){
var resultValue =appiMcComNames[j].split("===")[0];
var resultText =appiMcComNames[j].split("===")[1];
var resultOption = new Option(resultText,resultValue);
appiMcDispartComNamelist.add(resultOption);
}
}
};
xmlHttp.open('POST', url, true);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send("proCatCode=" + document.getElementById(prefix+'.appiProdCatCode').value);
}
var xmlHttp;
function createXMLHttpRequest() {
if(window.XMLHttpRequest){ //Mozilla
xmlHttp = new XMLHttpRequest();
}else if (window.ActiveXObject){ // IE
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
}
function calELength(value){
var pa = /[^x00-xff]/;
var array = value.split('');
var prvIsChinese = false;
var eLength = 0 ;
for(var i = 0 ; i < array.length ; i ++){
var temp = array[i];
if(pa.test(temp)){
if(prvIsChinese == true){
eLength += 2;
}else{
eLength += 4;
}
prvIsChinese = true;
}else{
eLength += 1;
prvIsChinese = false;
}
}
return eLength;
}
function showErrorMessage(mge){
document.getElementById('messageDiv').innerText = mge;
}
</SCRIPT>
<style>
.R_th {
white-space: nowrap;
text-align: center
}
;
.R_main(
white-space
:nowrap
;)
</style>
</head>
<body bgcolor="#e8e8e8">
<form name="form1"
action="<%=request.getContextPath()%>/batch/batchQccAction_inputBatchQcc.action"
method="post"><input value="0," name="allrow" id="allrow"
type="hidden">
<tr class="R_main">
<td class="R_main" colSpan="10">批次号:<s:property
value="appiBatchfile" /> <input type="hidden" name="appiBatchfile" id="appiBatchfile"
value="<s:property value="appiBatchfile" />" />
<div align="right"><input type="button" value="返回" class="btn"
onclick="goBack()" /><input type="button" value="保存" class="btn"
onClick="checkBatchQcc();" /></div>
</td>
</tr>
<div id="messageDiv" style="color: red;"></div>
<table width="100%" border="1" cellpadding="1" cellspacing="1"
id="billTable">
<tbody id="bileTableTbody">
<tr class="R_th" bgcolor="#3399CC">
<td class="R_th"></td>
<td class="R_th"></td>
<td class="R_th" align="center"><FONT color="red">*</FONT>产品类型</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>主卡版面</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>称谓</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>姓</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>姓名拼音</td>
<td class="R_th" align="center">第二印花名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件类型</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件号码</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>持卡人生日</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件有效期截至日期</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>证件有效期长期标识(长期)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>国籍</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址(省/直辖市)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址(市/区/县)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>住宅地址一</td>
<td class="R_th" align="center">住宅地址二</td>
<td class="R_th" align="center">住宅地址三</td>
<td class="R_th" align="center">住宅邮编</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>持卡人手机号码</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位名称</td>
<td class="R_th" align="center">单位邮编</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址(省/直辖市)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址(市/区/县)</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>单位地址一</td>
<td class="R_th" align="center">单位地址二</td>
<td class="R_th" align="center">单位地址三</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>主卡对帐单及领卡邮寄地址</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>母亲姓氏</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>联系人姓名</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>联系人电话</td>
<td class="R_th" align="center">联系人与申请人关系</td>
<td class="R_th" align="center">联系人单位</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>长城信用卡主卡所在地</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>免年费类型FW</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>BH号</td>
<td class="R_th" align="center">银行专用信息推荐员工标识IN</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>总行端制卡参数选择</td>
<td class="R_th" align="center"><FONT color="red">*</FONT>POS验密参数</td>
<td class="R_th" align="center">淘宝卡帐户类型</td>
<td class="R_th" align="center">电子邮箱</td>
<td class="R_th" align="center">毕业年份</td>
<td class="R_th" align="center">领卡分行号</td>
<td class="R_th" align="center">单位编号</td>
<td class="R_th"></td>
</tr>
<s:iterator id="iapsMainAppi" value="iapsMainAppiList" status="ii">
<tr class="R_main"
id="iapsMainAppiList<s:property value="#ii.index" />">
<td class="R_main" width="50">
<BUTTON onClick="addRow()" type="button"
class="btn">+</BUTTON>
<s:if test="#ii.index > 0">
<script language="JavaScript" type="text/javascript">
document.getElementById('allrow').value += <s:property value="#ii.index" /> + ",";
</script>
</s:if></td>
<td class="R_th"><s:property value="#ii.index + 1" /><input
type="hidden"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiAppId"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiAppId"
value="<s:property value="appiAppId" />" /></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiProdCatCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiProdCatCode"
onchange="changAppiProdCatCode('iapsMainAppiList[<s:property value="#ii.index" />]');">
<s:iterator value="getAllProdcat()">
<option value="<s:property value="proCatCode" />"
<s:if test="#iapsMainAppi.appiProdCatCode == proCatCode">selected="selected"</s:if>
cardTypeFlag="<s:property value="cardTypeFlag" />"><s:property
value="proCatName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcColor"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcColor"
onfocus="aa(this)">
<option value="">请选择</option>
<s:iterator value="getProdcatById(appiProdCatCode).productColor">
<option value="<s:property value="colorId" />"
<s:if test="#iapsMainAppi.appiMcColor == colorId">selected="selected"</s:if>><s:property
value="colorName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcTitle">
<option value="1"
<s:if test="appiMcTitle == 1">selected="selected"</s:if>>1先生</option>
<option value="2"
<s:if test="appiMcTitle == 2">selected="selected"</s:if>>2女士</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFirstName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFirstName"
size="6" onFocus="aa(this);"
value="<s:property value="appiMcFirstName" />" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFamilyname"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcFamilyname"
value="<s:property value="appiMcFamilyname" />" size="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName1"
value="<s:property value="appiMcKnowAsName1" />" size="15"
maxlength="28" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcKnowAsName2"
value="<s:property value="appiMcKnowAsName2" />" size="15"
maxlength="13" onFocus="aa(this);" /></td>
<td class="R_main"><select style="WIDTH: 150px"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdType"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdType"
onchange="changeAppiMcIdType(this.value,<s:property value="#ii.index" />);">
<s:iterator status="index" value="getListByType('appi_mc_id_type')">
<option value="<s:property value="bizTypePropCode"/>"
<s:if test="#iapsMainAppi.appiMcIdType==bizTypePropCode">selected</s:if>>
<s:property value="bizTypePropCode" /><s:property
value="bizTypePropName" />
</s:iterator>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdNumber"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcIdNumber"
value="<s:property value="appiMcIdNumber" />" size="20"
maxlength="20" onFocus="aa(this);"
onblur="setAppiMcDob(this,<s:property value="#ii.index" />)" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcDob"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcDob"
value="<s:property value="appiMcDobStr" />" size="10" maxlength="10"
style="cursor: pointer;" onblur="validatorDate(this)"
onfocus="aa(this)" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidEndDate"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidEndDate"
value="<s:property value="appiMcValidEndDate" />" size="10"
maxlength="10" onFocus="aa(this);" onfocus="calendar(this);"
onblur="validatorDate(this)" /></td>
<td class="R_main" align="center"><s:if
test="appiMcValidLongFlag == 1">
<input type="checkbox"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
value="1" checked="checked" />
</s:if> <s:else>
<input type="checkbox"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcValidLongFlag"
value="1" />
</s:else></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcNationality"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcNationality"
value="<s:property value="appiMcNationality == null ? 'CHN' : appiMcNationality" />"
size="6" maxlength="3" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrState"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrState"
value="<s:property value="appiMcAddrState" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddrCity"
value="<s:property value="appiMcAddrCity" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr1"
value="<s:property value="appiMcAddr1" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr2"
value="<s:property value="appiMcAddr2" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr3"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAddr3"
value="<s:property value="appiMcAddr3" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcPostCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcPostCode"
value="<s:property value="appiMcPostCode" />" size="6" maxlength="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMPhone"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMPhone"
value="<s:property value="appiMcMPhone" />" size="20" maxlength="11"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmployerName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmployerName"
value="<s:property value="appiMcEmployerName" />"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplPostCode"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplPostCode"
value="<s:property value="appiMcEmplPostCode" />" size="6"
maxlength="6" onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrState"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrState"
value="<s:property value="appiMcEmplAddrState" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddrCity"
value="<s:property value="appiMcEmplAddrCity" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr1"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr1"
value="<s:property value="appiMcEmplAddr1" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr2"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr2"
value="<s:property value="appiMcEmplAddr2" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr3"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmplAddr3"
value="<s:property value="appiMcEmplAddr3" />" size="20"
onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcBillAddrInd"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcBillAddrInd">
<option value="1"
<s:if test="appiMcBillAddrInd == 1">selected="selected"</s:if>>1寄往公司地址</option>
<option value="2"
<s:if test="appiMcBillAddrInd == 2">selected="selected"</s:if>>2寄往住宅地址</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMotherName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcMotherName"
value="<s:property value="appiMcMotherName" />" size="4"
onFocus="aa(this);" maxlength="6" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactName"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactName"
value="<s:property value="appiMcContactName" />" size="4"
onFocus="aa(this);" maxlength="6" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactMPhone"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactMPhone"
value="<s:property value="appiMcContactMPhone" />" size="20"
maxlength="11" onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactRelship"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactRelship">
<option value="">请选择</option>
<option value="1"
<s:if test="appiMcContactRelship == 1">selected="selected"</s:if>>1父母</option>
<option value="2"
<s:if test="appiMcContactRelship == 2">selected="selected"</s:if>>2配偶</option>
<option value="3"
<s:if test="appiMcContactRelship == 3">selected="selected"</s:if>>3亲戚</option>
<option value="4"
<s:if test="appiMcContactRelship == 4">selected="selected"</s:if>>4其他</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactEmployer"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcContactEmployer"
value="<s:property value="appiMcContactEmployer" />"
onFocus="aa(this);" /></td>
<td class="R_main"><select style="WIDTH: 150px"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsumeCity"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsumeCity">
<option value="">请选择</option>
<s:iterator value='getBaseId()'>
<option value="<s:property value='bnCode'/>"
<s:if test="bnCode == #iapsMainAppi.appiMcConsumeCity">selected="selected"</s:if>><s:property
value='bnDesc' /></option>
</s:iterator>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoFeeType"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoFeeType">
<option value="0"
<s:if test="0 == appiBankinfoFeeType">selected="selected"</s:if>>0不免</option>
<option value="1"
<s:if test="1 == appiBankinfoFeeType">selected="selected"</s:if>>1免首年</option>
<option value="2"
<s:if test="2 == appiBankinfoFeeType">selected="selected"</s:if>>2免3年</option>
<option value="3"
<s:if test="3 == appiBankinfoFeeType">selected="selected"</s:if>>3全免</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoBh"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoBh"
value="<s:property value="appiBankinfoBh" />" size="8"
onFocus="aa(this);" maxlength="10" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoPccIn"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiBankinfoPccIn"
value="<s:property value="appiBankinfoPccIn" />" size="12"
onFocus="aa(this);" /></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].packageId"
name="iapsMainAppiList[<s:property value="#ii.index" />].packageId">
<option value="0" <s:if test="0==apsBatchState.batchIsmail">selected="selected"</s:if>>0暂不制卡</option>
<option value="1" <s:if test="1==apsBatchState.batchIsmail">selected="selected"</s:if>>1制卡并邮寄</option>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsume"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcConsume">
<option value="1"
<s:if test="1 == appiMcConsume">selected="selected"</s:if>>1密码+签名</option>
<option value="2"
<s:if test="2 == appiMcConsume">selected="selected"</s:if>>2签名</option>
</select></td>
<td class="R_main"><select
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAlipayAccountType"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAlipayAccountType">
<option value="">请选择</option>
<option value="1000"
<s:if test="1000 == appiMcAlipayAccountType">selected="selected"</s:if>>1000手机号</option>
<option value="4000"
<s:if test="4000 == appiMcAlipayAccountType">selected="selected"</s:if>>4000电子邮箱</option>
</select></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmailAddr"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcEmailAddr"
value="<s:property value="appiMcEmailAddr" />" size="6"
onFocus="aa(this);" /></td>
<td class="R_main"><input type="text"
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAssetValue"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcAssetValue"
value="<s:property value="appiMcAssetValue" />" size="4"
maxlength="4" onFocus="aa(this);" /></td>
<td class="R_main"><select
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard1Bank"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard1Bank"
disabled="disabled">
<s:iterator value="cardBankList">
<option value="<s:property value="appiCardId" />"
<s:if test="#iapsMainAppi.appiMcOtherCard1Bank == appiCardId">selected="selected"</s:if>><s:property
value="appiCardId" />/<s:property value="appiCardBankName" /></option>
</s:iterator>
</select></td>
<td class="R_main"><input type="text" disabled=true
name="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard2Bank"
id="iapsMainAppiList[<s:property value="#ii.index" />].appiMcOtherCard2Bank"
value="<s:property value="appiMcOtherCard2Bank" />" size="8"
onFocus="aa(this);" /></td>
<td>
<button onClick="delRow('allRow')" type="button" class="btn">-</button>
</td>
</tr>
</s:iterator>
</tbody>
</table>
<div><s:property value="precheckMessage" /></div>
</form>
<script type="text/javascript">
//返回
function goBack(){
var appiBatchfile = "<s:property value="appiBatchfile" />" ;
document.form1.action = "<%=request.getContextPath()%>/batch/apsBatchProjectAction_toBatchStateQccList.action?projectPkId=" + appiBatchfile.substr(0,10);
document.form1.submit();
}
// 定义2个数组 用来存取 电话号码 用于 判断该电话号码 出现的次数
// 在点击保存按钮的时候 吧电话号码 存入 数组中 在保存之前进行效验 号码出现的次数 是否已经超出
var phoneArr = new Array();
// 同一个电话号码出现的次数 默认是一次
var phoneCount = 1 ;
// 比较电话号码
function validPhone(message){
for(var i = 0 ; i < phoneArr.length-1 ; i++){
for(var j = i+1 ; j < phoneArr.length ; j++){
// 判断 是否有 重复出现的电话号码
if(phoneArr[i] == phoneArr[j]){
phoneCount = phoneCount + 1 ;
}
}
// 判断 该电话号码出现的次数 是否超过 5 次
if(phoneCount >= 5){
if(message.indexOf(phoneArr[i])==-1){
message = message + " 持卡人手机号码:" + phoneArr[i] + " 该电话号码已经出现了5次以上 请重新填写 ; "
}
}
// 循环判断一轮后 吧 phoneCount的值 置为 1 ;
phoneCount = 1 ;
}
return message ;
}
function removeValue(rowindex){
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFirstName").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFamilyname").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName1").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName2").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcDob").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidEndDate").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr2").value = "";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr3").value = "";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMotherName").value="";
//给证件类型绑定时间
var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
appiMcIdType.onchange = function(){
changeAppiMcIdType(this.value,rowindex);
}
//给证件号的文本框绑定事件
var appiMcIdNumberObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber");
appiMcIdNumberObj.value = "";
appiMcIdNumberObj.onblur = function(){
setAppiMcDob(this,rowindex);
}
function changeAppiMcIdType(val, rowIndex){
var appiMcDob = document.getElementById('iapsMainAppiList['+rowIndex+'].appiMcDob');
if(1 == val){
appiMcDob.readOnly = true;
appiMcDob.style.cursor = "pointer";
}else{
appiMcDob.readOnly = false;
appiMcDob.style.cursor = "default";
}
}
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber").value="";
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMPhone").value="";
//产品类型,主卡版面,邮寄方式,长城卡使用所在地,免年费类型,制卡参数,验密参数,淘宝卡账户类型,领卡分行,下拉框的赋值
var previousRowIndex = rowindex - 1;
document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiProdCatCode").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcColor").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcColor").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcBillAddrInd").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcBillAddrInd").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcConsumeCity").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoFeeType").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiBankinfoFeeType").value;
document.getElementById("iapsMainAppiList["+rowindex+"].packageId").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].packageId").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsume").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcConsume").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactRelship").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcContactRelship").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcAlipayAccountType").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard1Bank").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcOtherCard1Bank").value;
document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard2Bank").value = document.getElementById("iapsMainAppiList["+previousRowIndex+"].appiMcOtherCard2Bank").value;
}
//数据质检
function checkBatchQcc()
{
var allrows=document.getElementById("billTable").rows.length - 1;
var rowindex;
var result=0;
// 清空以前的 数据 信息
phoneArr = new Array();
for(var i=0; i < allrows;i++){
var messArr = checkRowBatchQcc(i);
var message = messArr[0] ;
// 这里对电话号码数据 进行次数效验
message = validPhone(message) ;
if(message != ''){
result++;
document.getElementById('messageDiv').innerText = "";
var cel = document.getElementById('iapsMainAppiList'+i).cells[1];
cel.innerHTML = parseInt(cel.innerText) + '<a href="#" onclick="showErrorMessage(\''+message+'\')">错误消息</a>';
}
}
if(result == 0){
document.form1.submit();
}else{
alert('您刚填写的数据存在逻辑问题,请录入完整!');
}
}
function checkRowBatchQcc(rowindex){
var message = ""; // 错误信息
var parameters = "" ; // 单行提交的参数
var messArr = new Array(); // 吧两个 数据 存入 数组中
//对数据域进行校验
//主卡版面
var appiMcColorObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcColor");
if(appiMcColorObj.options.length != 1 && appiMcColorObj.value == ''){
message += "请选择主卡版面;";
appiMcColorObj.style.backgroundColor="#FF0000";
appiMcColorObj.onclick = function(){
appiMcColorObj.style.backgroundColor= "";
};
}
parameters += "iapsMainAppi.appiMcColor=" + appiMcColorObj.value ;
// 主键
var appiAppIdObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiAppId");
if(appiAppIdObj.value != ""){
parameters += "&iapsMainAppi.appiAppId=" + appiAppIdObj.value ;
}
//姓
var appiMcFirstName=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFirstName");
if(validateNotNull(appiMcFirstName) == 1){
message += "申请人姓不能为空;";
}
parameters += "&iapsMainAppi.appiMcFirstName=" + appiMcFirstName.value;
//名
var appiMcFamilyname=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcFamilyname");
if(validateNotNull(appiMcFamilyname) == 1){
message += "申请人名不能为空;";
}
parameters += "&iapsMainAppi.appiMcFamilyname=" + appiMcFamilyname.value;
//姓名拼音
var appiMcKnowAsName1=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName1");
if(validateNotNull(appiMcKnowAsName1) == 1){
message += "姓名拼音不能为空;";
}else{
var appiMcKnowAsName1Result = getBlankNumber(appiMcKnowAsName1);
if(appiMcKnowAsName1Result && '' != appiMcKnowAsName1Result){
message += appiMcKnowAsName1Result;
}
}
parameters += "&iapsMainAppi.appiMcKnowAsName1=" + appiMcKnowAsName1.value;
//生日
var appiMcDob=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcDob");
if(validateNotNull(appiMcDob) == 1){
message += "生日不能为空;";
}else{
if(!isDate(appiMcDob.value)){
message += "请录入正确的身份证号;";
}
}
parameters += "&iapsMainAppi.appiMcDob=" + appiMcDob.value;
//证件号码
var appiMcIdNumber = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdNumber");
var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
if(validateNotNull(appiMcIdNumber) == 1){
message += "证件号码不能为空;";
}else{
// var appiMcIdType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcIdType");
if(appiMcIdType == 1){
var appiMcIdNumberChecke = checkIdcard(appiMcIdNumber.value);
if('true' != appiMcIdNumberChecke){
message += appiMcIdNumberChecke + ";";
}
}
}
parameters += "&iapsMainAppi.appiMcIdNumber=" + appiMcIdNumber.value;
parameters += "&iapsMainAppi.appiMcIdType=" + appiMcIdType.value;
var appiMcValidEndDate = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidEndDate");
var appiMcValidLongFlag = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcValidLongFlag");
if(appiMcValidEndDate.value != ''){
if(!isDate(appiMcValidEndDate.value)){
message += '请录入正确的证件有效期截至日期;';
}
}else{
if(!appiMcValidLongFlag.checked){
message += '证件有效期截至日期和证件有效期长期标识两者必须有一项不为空;';
appiMcValidEndDate.style.backgroundColor="#FF0000";
appiMcValidEndDate.onclick = function(){
appiMcValidEndDate.style.backgroundColor= "";
};
appiMcValidLongFlag.style.backgroundColor="#FF0000";
appiMcValidLongFlag.onclick = function(){
appiMcValidLongFlag.style.backgroundColor= "";
};
}
}
parameters += "&iapsMainAppi.appiMcValidEndDate=" + appiMcValidEndDate.value;
parameters += "&iapsMainAppi.appiMcValidLongFlag=" + appiMcValidLongFlag.value;
//国籍
var appiMcNationality=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcNationality");
if(validateNotNull(appiMcNationality) == 1){
message += "国籍不能为空;";
}
parameters += "&iapsMainAppi.appiMcNationality=" + appiMcNationality.value;
//手机号
var appiMcMPhone=document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMPhone");
if(validateNotNull(appiMcMPhone) == 1){
message += "手机号不能为空;";
}
if(!isMobile(appiMcMPhone.value)){
message += "请录入正确的手机号;";
}
parameters += "&iapsMainAppi.appiMcMPhone=" + appiMcMPhone.value;
var appiMcEmployerName = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmployerName");
if(validateNotNull(appiMcEmployerName) == 1){
message += "单位名称不能为空;";
}else{
if(calELength(appiMcEmployerName.value) > 30){
message += "单位名称长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmployerName=" + appiMcEmployerName.value;
//邮寄地址选择,1为寄往公司,则公司地址不能为空
var appiMcBillAddrInd = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcBillAddrInd");
var appiMcEmplPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplPostCode");
var appiMcPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcPostCode");
if('1' === appiMcBillAddrInd.value){
// var appiMcEmplPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplPostCode");
if(validateNotNull(appiMcEmplPostCode) == 1){
message += "公司邮编不能为空;";
}
if(!isPostalCode(appiMcEmplPostCode.value)){
message += "您选择邮寄地址为寄往公司,请录入正确的邮政编码;";
}
parameters += "&iapsMainAppi.appiMcEmplPostCode=" + appiMcEmplPostCode.value;
}else{
// var appiMcPostCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcPostCode");
if(validateNotNull(appiMcPostCode) == 1){
message += "住宅邮编不能为空;";
}
if(!isPostalCode(appiMcPostCode.value)){
message += "请录入正确的邮政编码;";
}
parameters += "&iapsMainAppi.appiMcPostCode=" + appiMcPostCode.value;
}
parameters += "&iapsMainAppi.appiMcBillAddrInd=" + appiMcBillAddrInd.value;
var appiMcEmplAddrState = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddrState");
if(validateNotNull(appiMcEmplAddrState) == 1){
message += "单位地址(省/直辖市)不能为空;";
}else{
if(calELength(appiMcEmplAddrState.value) > 30){
message += "单位地址(省/直辖市)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddrState=" + appiMcEmplAddrState.value;
var appiMcEmplAddrCity = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddrCity");
if(validateNotNull(appiMcEmplAddrCity) == 1){
message += "单位地址(市/区/县)不能为空;";
}else{
if(calELength(appiMcEmplAddrCity.value) > 30){
message += "单位地址(市/区/县)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddrCity=" + appiMcEmplAddrCity.value;
var appiMcEmplAddr1 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr1");
if(validateNotNull(appiMcEmplAddr1) == 1){
message += "单位地址一不能为空;";
}else{
if(calELength(appiMcEmplAddr1.value) > 30){
message += "单位地址一长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcEmplAddr1=" + appiMcEmplAddr1.value;
var appiMcEmplAddr2 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr2");
//if(validateNotNull(appiMcEmplAddr2) == 1){
// message += "单位地址二不能为空;";
//}else{
if(calELength(appiMcEmplAddr2.value) > 30){
message += "单位地址二长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcEmplAddr2=" + appiMcEmplAddr2.value;
var appiMcEmplAddr3 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmplAddr3");
//if(validateNotNull(appiMcEmplAddr3) == 1){
// message += "单位地址三不能为空;";
//}else{
if(calELength(appiMcEmplAddr3.value) > 30){
message += "单位地址三长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcEmplAddr3=" + appiMcEmplAddr3.value;
var appiMcAddrState = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddrState");
if(validateNotNull(appiMcAddrState) == 1){
message += "住宅地址(省/直辖市)不能为空;";
}else{
if(calELength(appiMcAddrState.value) > 30){
message += "住宅地址(省/直辖市)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddrState=" + appiMcAddrState.value;
var appiMcAddrCity = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddrCity");
if(validateNotNull(appiMcAddrCity) == 1){
message += "住宅地址(市/区/县)不能为空;";
}else{
if(calELength(appiMcAddrCity.value) > 30){
message += "住宅地址(市/区/县)长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddrCity=" + appiMcAddrCity.value;
var appiMcAddr1 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr1");
if(validateNotNull(appiMcAddr1) == 1){
message += "住宅地址一不能为空;";
}else{
if(calELength(appiMcAddr1.value) > 30){
message += "住宅地址一长度超过最大长度;";
}
}
parameters += "&iapsMainAppi.appiMcAddr1=" + appiMcAddr1.value;
var appiMcAddr2 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr2");
//if(validateNotNull(appiMcAddr2) == 1){
// message += "住宅地址二不能为空;";
//}else{
if(calELength(appiMcAddr2.value) > 30){
message += "住宅地址二长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcAddr2=" + appiMcAddr2.value;
var appiMcAddr3 = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAddr3");
//if(validateNotNull(appiMcAddr2) == 1){
// message += "住宅地址三不能为空;";
//}else{
if(calELength(appiMcAddr3.value) > 30){
message += "住宅地址三长度超过最大长度;";
}
//}
parameters += "&iapsMainAppi.appiMcAddr3=" + appiMcAddr3.value;
var appiMcMotherName = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcMotherName");
if(validateNotNull(appiMcMotherName) == 1){
message += "母亲姓氏不能为空;";
}
parameters += "&iapsMainAppi.appiMcMotherName=" + appiMcMotherName.value;
//联系人与申请人关系
var appiMcContactRelship = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactRelship");
if(validateNotNull(appiMcContactRelship) == 1){
message += "请选择联系人与申请人关系;";
}
parameters += "&iapsMainAppi.appiMcContactRelship=" + appiMcContactRelship.value;
//判断是否准贷卡
var appiProdCatCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode");
if(appiProdCatCode.options[appiProdCatCode.selectedIndex].cardTypeFlag == 1 && document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity").value == ''){
message += "您选择的产品类型为准贷卡,请选择长城信用卡主卡所在地;"
}
parameters += "&iapsMainAppi.appiProdCatCode=" + appiProdCatCode.value;
//BH号
var appiBankinfoBh=document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoBh");
if(validateNotNull(appiBankinfoBh) == 1){
message += "请填写BH号;";
}
parameters += "&iapsMainAppi.appiBankinfoBh=" + appiBankinfoBh.value;
//验证淘宝卡
// var appiProdCatCode = document.getElementById("iapsMainAppiList["+rowindex+"].appiProdCatCode");
var appiMcAlipayAccountType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType");
var appiMcEmailAddr = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmailAddr");
if('58' == appiProdCatCode.value || '129' == appiProdCatCode.value){
// var appiMcAlipayAccountType = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAlipayAccountType");
if('' == appiMcAlipayAccountType.value){
message += "您选择的产品类型为淘宝卡,请选择淘宝卡账户类型;";
}else if('4000' == appiMcAlipayAccountType.value){
// var appiMcEmailAddr = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcEmailAddr");
if(validateNotNull(appiMcEmailAddr) == 1){
message += "您选择的淘宝卡账户类型为4000电子邮箱,电子邮箱不能为空;";
}else{
if(!isEmail(appiMcEmailAddr.value)){
message += "您选择的淘宝卡账户类型为4000电子邮箱,请填写正确的电子邮箱地址;";
}
}
}
}
parameters += "&iapsMainAppi.appiMcAlipayAccountType=" + appiMcAlipayAccountType.value;
parameters += "&iapsMainAppi.appiMcEmailAddr=" + appiMcEmailAddr.value;
// 称谓
var appiMcTitleObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcTitle");
parameters += "&iapsMainAppi.appiMcTitle=" + appiMcTitleObj.value;
// 第二印花名 appiMcKnowAsName2
var appiMcKnowAsName2Obj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcKnowAsName2");
parameters += "&iapsMainAppi.appiMcKnowAsName2=" + appiMcKnowAsName2Obj.value;
// 联系人姓名 appiMcContactName
var appiMcContactNameObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactName");
parameters += "&iapsMainAppi.appiMcContactName=" + appiMcContactNameObj.value;
// 联系人电话 appiMcContactMPhone
var appiMcContactMPhoneObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactMPhone");
parameters += "&iapsMainAppi.appiMcContactMPhone=" + appiMcContactMPhoneObj.value;
// 联系人单位 appiMcContactEmployer
var appiMcContactEmployerObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcContactEmployer");
parameters += "&iapsMainAppi.appiMcContactEmployer=" + appiMcContactEmployerObj.value;
// 长城信用卡主卡所在地 appiMcConsumeCity
var appiMcConsumeCityObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsumeCity");
parameters += "&iapsMainAppi.appiMcConsumeCity=" + appiMcConsumeCityObj.value;
// 免年费类型FW appiBankinfoFeeType
var appiBankinfoFeeTypeObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoFeeType");
parameters += "&iapsMainAppi.appiBankinfoFeeType=" + appiBankinfoFeeTypeObj.value;
// 银行专用信息推荐员工标识IN appiBankinfoPccIn
var appiBankinfoPccInObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiBankinfoPccIn");
parameters += "&iapsMainAppi.appiBankinfoPccIn=" + appiBankinfoPccInObj.value;
// POS验密参数 appiMcConsume
var appiMcConsumeObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcConsume");
parameters += "&iapsMainAppi.appiMcConsume=" + appiMcConsumeObj.value;
// 毕业年份 appiMcAssetValue
var appiMcAssetValueObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcAssetValue");
parameters += "&iapsMainAppi.appiMcAssetValue=" + appiMcAssetValueObj.value;
// 单位编号appiMcOtherCard2Bank
var appiMcOtherCard2BankObj = document.getElementById("iapsMainAppiList["+rowindex+"].appiMcOtherCard2Bank");
parameters += "&iapsMainAppi.appiMcOtherCard2Bank=" + appiMcOtherCard2BankObj.value;
// 把行号作为参数 传递过去 用来 追加主键 appi_id 的时候用
// parameters += "&rowindex=" + rowindex ;
// var appiBatchfile = document.getElementById("appiBatchfile").vlaue;
// parameters += "&appiBatchfile=" + appiBatchfile ;
if(message == ""){
// appiMcFirstName.readOnly = true ;
appiMcColorObj.disabled = true ;
appiMcFirstName.disabled = true ;
appiMcFamilyname.disabled = true ;
appiMcKnowAsName1.disabled = true ;
appiMcDob.disabled = true ;
appiMcIdNumber.disabled = true ;
appiMcIdType.disabled = true ;
appiMcValidEndDate.disabled = true ;
appiMcValidLongFlag.disabled = true ;
appiMcNationality.disabled = true ;
appiMcMPhone.disabled = true ;
appiMcEmployerName.disabled = true ;
appiMcBillAddrInd.disabled = true ;
appiMcEmplPostCode.disabled = true ;
appiMcPostCode.disabled = true ;
appiMcEmplAddrState.disabled = true ;
appiMcEmplAddrCity.disabled = true ;
appiMcEmplAddr1.disabled = true ;
appiMcEmplAddr2.disabled = true ;
appiMcEmplAddr3.disabled = true ;
appiMcAddrState.disabled = true ;
appiMcAddrCity.disabled = true ;
appiMcAddr1.disabled = true ;
appiMcAddr2.disabled = true ;
appiMcAddr3.disabled = true ;
appiMcMotherName.disabled = true ;
appiMcContactRelship.disabled = true ;
appiProdCatCode.disabled = true ;
appiBankinfoBh.disabled = true ;
appiProdCatCode.disabled = true ;
appiMcAlipayAccountType.disabled = true ;
appiMcEmailAddr.disabled = true ;
appiMcTitleObj.disabled = true ;
appiMcKnowAsName2Obj.disabled = true ;
appiMcContactNameObj.disabled = true ;
appiMcContactMPhoneObj.disabled = true ;
appiMcContactEmployerObj.disabled = true ;
appiMcConsumeCityObj.disabled = true ;
appiBankinfoFeeTypeObj.disabled = true ;
appiBankinfoPccInObj.disabled = true ;
appiMcConsumeObj.disabled = true ;
appiMcAssetValueObj.disabled = true ;
appiMcOtherCard2BankObj.disabled = true ;
}
// 先判断message 是否是“” 是“” 说明数据规格正确 然后存入 array 中
if(message == ""){
// 把手机号码存入 数组中
phoneArr.push(appiMcMPhone.value);
}
// message 为空 条件 成立 拼接 参数
if(message != ""){
parameters = "";
}
messArr.push(message);
messArr.push(parameters);
// messArr.push(rowindex);
messArr.push("iapsMainAppiList["+rowindex+"].appiAppId");
//alert("message:" + message);
//alert("parameters:" + parameters);
return messArr ;
}
function validateNotNull(eleObj)
{
if(eleObj.value==""||eleObj.value=="不能为空")
{
eleObj.style.backgroundColor="#FF0000";
eleObj.value="不能为空";
return 1;
}
else
{
// alert(eleObj.value);
eleObj.style.backgroundColor="";
}
return 0;
}
//验证select标签
function validateSelect(eleObj){
if('' === eleObj.value){
eleObj.style.backgroundColor="#FF0000";
return 1;
}
return 0;
}
function aa(eleObj){
if(eleObj.value=="不能为空" || '' === eleObj.value){
eleObj.value="";
eleObj.style.backgroundColor="";
eleObj.focus();
}
}
function validateEmail( eleObj ){
if(!isEmail(eleObj.value)){
eleObj.style.backgroundColor="#FF0000";
return 1;
}
return 0;
}
function isEmail(strValue){
// Email 必须是 x@a.b.c.d 等格式 或者为空
if( isEmpty( strValue ) )
return true;
var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
return checkExp( pattern, strValue );
}
function isEmpty( strValue ){
if( "" === strValue)
return true;
return false;
}
// 使用正则表达式,检测 s 是否满足模式 re
function checkExp( re, s ){
return re.test( s );
}
//根据证件号码自动设置生日
function setAppiMcDob(obj,index){
var appiMcIdNumberValue = obj.value;
if((document.getElementById('iapsMainAppiList['+index+'].appiMcIdType').value == '1') && appiMcIdNumberValue != ''){
/*
if(checkExp(/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/gi , appiMcIdNumberValue)){
var appiMcDobValue = appiMcIdNumberValue.substring(6,10) + '-' + appiMcIdNumberValue.substring(10,12) + '-' + appiMcIdNumberValue.substring(12,14);
document.getElementById('iapsMainAppiList['+index+'].appiMcDob').value = appiMcDobValue;
}else{
alert('请录入正确的身份证号!');
}
*/
var checkIdcardResult = checkIdcard(appiMcIdNumberValue)
if('true' == checkIdcardResult){
var appiMcDobValue = appiMcIdNumberValue.substring(6,10) + '-' + appiMcIdNumberValue.substring(10,12) + '-' + appiMcIdNumberValue.substring(12,14);
document.getElementById('iapsMainAppiList['+index+'].appiMcDob').value = appiMcDobValue;
}else{
alert(checkIdcardResult);
}
}
}
function checkPerName(obj)
{
var partten = /^[\u4e00-\u9fa5A-Za-z]*$/;
var name = obj.value;
if(trimSpace(name) != "")
{
if(!partten.test(trimSpace(name)))
{
alert("请输入汉字或字母");
obj.focus();
return false;
}
}
obj.value = obj.value.trim();
}
function isDate(value){
var pattern =/^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])|([13579][01345789]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\s(((0?[0-9])|([1-2][0-3]))\:([0-5]?[0-9])((\s)|(\:([0-5]?[0-9])))))?$/;
if(value!=""){
if(!pattern.exec(value)){
return false;
}
return true;
}
}
function checkIdcard(idcard){
var Errors=new Array(
"true",
"身份证号码位数有误,请输入15或18位身份证号码",
"身份证号码出生日期超出范围或含有非法字符!",
"身份证号码校验错误!",
"身份证地区非法!"
);
var area={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"}
var idcard,Y,JYM;
var S,M;
var idcard_array = new Array();
idcard_array = idcard.split("");
//地区检验
if(area[parseInt(idcard.substr(0,2))]==null)
return Errors[4];
//身份号码位数及格式检验
switch(idcard.length){
case 15:
if ( (parseInt(idcard.substr(6,2))+1900) % 4 == 0 || ((parseInt(idcard.substr(6,2))+1900) % 100 == 0 && (parseInt(idcard.substr(6,2))+1900) % 4 == 0 )){
ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/;//测试出生日期的合法性
} else {
ereg=/^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/;//测试出生日期的合法性
}
if(ereg.test(idcard))
return Errors[0];
else
return Errors[2];
break;
case 18:
//18位身份号码检测
//出生日期的合法性检查
//闰年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))
//平年月日:((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))
if ( parseInt(idcard.substr(6,4)) % 4 == 0 || (parseInt(idcard.substr(6,4)) % 100 == 0 && parseInt(idcard.substr(6,4))%4 == 0 )){
ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/;//闰年出生日期的合法性正则表达式
} else {
ereg=/^[1-9][0-9]{5}19[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/;//平年出生日期的合法性正则表达式
}
if(ereg.test(idcard)){//测试出生日期的合法性
//计算校验位
S = (parseInt(idcard_array[0]) + parseInt(idcard_array[10])) * 7
+ (parseInt(idcard_array[1]) + parseInt(idcard_array[11])) * 9
+ (parseInt(idcard_array[2]) + parseInt(idcard_array[12])) * 10
+ (parseInt(idcard_array[3]) + parseInt(idcard_array[13])) * 5
+ (parseInt(idcard_array[4]) + parseInt(idcard_array[14])) * 8
+ (parseInt(idcard_array[5]) + parseInt(idcard_array[15])) * 4
+ (parseInt(idcard_array[6]) + parseInt(idcard_array[16])) * 2
+ parseInt(idcard_array[7]) * 1
+ parseInt(idcard_array[8]) * 6
+ parseInt(idcard_array[9]) * 3 ;
Y = S % 11;
M = "F";
JYM = "10X98765432";
M = JYM.substr(Y,1);//判断校验位
if(M == idcard_array[17])
return Errors[0]; //检测ID的校验位
else
return Errors[3];
} else
return Errors[2];
break;
default:
return Errors[1];
break;
}
}
function isMobile(value){
var reg0 = /^1[3,5,8]\d{9}$/;
if (reg0.test(value))
return true;
return false;
}
function isTelphone(value) {
var pattern=/^(\d{7,8})$/;
if(pattern.exec(s))
return true;
return false;
}
function isPostalCode(value){
var pattern =/^[0-9]{6}$/;
if(pattern.exec(value))
return true;
return false;
}
function changeAppiMcIdType(val, rowIndex){
var appiMcDob = document.getElementById('iapsMainAppiList['+rowIndex+'].appiMcDob');
if(1 == val){
appiMcDob.readOnly = true;
appiMcDob.style.cursor = "pointer";
}else{
appiMcDob.readOnly = false;
appiMcDob.style.cursor = "default";
}
}
function getBlankNumber(obj){
var str = document.getElementById(obj.id).value;
if(escape(str).indexOf("%u") > 0){
return "姓名拼音只能输入英文字符;";
}
if(str!=""){
var temp = "";
whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000';
for (var i = 0,len = str.length; i < len; i++) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
str = str.substring(i);
break;
}
}
for (i = str.length - 1; i >= 0; i--) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
str = str.substring(0, i + 1);
break;
}
}
var s = str.length;
for (var i = 0,len = str.length; i < len; i++) {
if (whitespace.indexOf(str.charAt(i)) === -1) {
temp=temp+str.charAt(i);
}
}
var e = temp.length;
if((s-e)!=1){
return "请在姓和名之间以空格隔开;";
}else{
obj.value = str;
obj.value = obj.value.toUpperCase();
}
}
}
</script>
</body>
</html>
相关推荐
Ajax无刷新读取数据库数据技术是指使用JavaScript、XMLHttpRequest和ASP.NET技术实现无刷新读取数据库数据的功能。本文将详细介绍该技术的实现过程。 一、技术背景 随着Web应用程序的发展,对数据的实时更新和读取...
2. JavaScript通过XMLHttpRequest发起Ajax请求,携带用户输入的前缀信息到服务器。 3. Asp.net接收到请求后,执行SQL查询,找出与输入前缀匹配的搜索关键词。 4. 数据处理完成后,Asp.net将结果封装成JSON格式,返回...
这个资源"struts2+json"显然涉及到在Struts2框架下实现JSON(JavaScript Object Notation)数据交换,这是一种轻量级的数据交换格式,广泛用于前后端交互,特别是AJAX(Asynchronous JavaScript and XML)请求。...
2. **异步通信**:利用XMLHttpRequest进行后台数据的异步加载,Struts框架负责处理数据并返回结果,Ajax则负责前端的动态渲染,实现流畅的用户体验。 3. **表单验证**:在表单提交前,使用Ajax进行预验证,减少...
Struts和JavaScript以及jQuery是Web开发中的重要技术栈,它们在构建动态、交互式的Web应用程序中发挥着关键作用。Struts是一种基于MVC(Model-View-Controller)设计模式的Java Web框架,它帮助开发者组织和管理应用...
Java Web整合开发是构建Web应用程序的关键技术,涵盖了Java语言、Eclipse集成开发环境(IDE)、Struts 2框架以及Ajax异步JavaScript和XML技术。这个主题深入探讨了这些技术如何协同工作,创建出高效、用户友好的Web...
8. **Ajax与Struts2的结合**:通过XMLHttpRequest对象,JavaScript可以发送异步请求到Struts2 Action,获取返回的数据,实现实时更新页面。 结合上述两个技术,"js+struts2"模式使得开发者能够利用JavaScript增强...
JavaScript中的DOM(Document Object Model)模型是Web开发中不可或缺的一部分,它为HTML和XML文档提供了一个结构化的表示,并允许通过JavaScript来动态地访问和修改页面内容。DOM模型的诞生源于90年代末期的浏览器...
Struts2、JSON和AJAX是Web开发中的关键技术,它们的整合可以实现高效的数据交互和动态页面更新。本文将深入探讨这些技术以及如何在实际项目中整合它们。 **Struts2** 是一个基于MVC(Model-View-Controller)设计...
通过上述解释,我们可以看到Ajax、JavaScript和Struts2是如何协同工作的,构建出具有高度交互性和动态更新的Web应用。这样的实例展示了现代Web开发的强大能力,使得用户能够在不离开当前页面的情况下,享受到流畅、...
文件包括了:项目工程(关键部分注解详细),以及sql文件。功能:选中第一个下拉框,局部刷新第二个下拉框的值,且...主要使用了MySQL,jdbc,servlet,jsp,而异步是使用了原生的JS和XMLHttpRequest异步对象实现的。
【标题】"jsp+ajax+struts"是一个经典的Web开发技术组合,主要应用于构建动态、交互性强的Web应用程序。这个组合涉及到Java服务器页面(JSP)、异步JavaScript和XML(AJAX)以及Struts框架,这三者在Web开发中的角色...
在JavaScript中实现表格(table)分页是一种常见的需求,特别是在数据量较大的网页应用中,为了提高用户体验和加载速度,我们通常会将数据分页展示。本文将深入探讨如何使用JavaScript来实现这一功能,并结合给定的...
在JavaScript中,动态修改HTML表格(Table)的内容是一项常见的任务,尤其在网页交互和数据展示时。本篇文章将深入探讨如何使用JavaScript实现这一功能,包括选择表格元素、获取和设置单元格内容,以及监听事件来...
在本项目中,Struts2作为控制器,负责接收用户的请求,处理业务逻辑,并将结果返回给视图层。 JDBC(Java Database Connectivity)是Java与数据库交互的标准API,用于连接Java应用与各种数据库。在这个成绩管理系统...
Struts和Ajax是两种在Web开发中常用的框架和技术,它们结合使用可以构建出高效、动态且用户友好的应用程序。在本篇文章中,我们将深入探讨Struts与Ajax的整合及其在增删查改(CRUD)操作中的应用。 首先,让我们...
Struts2还提供了拦截器机制,可以添加自定义的验证、日志等功能,增强系统的灵活性和可扩展性。 **Hibernate** Hibernate是一个强大的ORM(Object-Relational Mapping)框架,它简化了Java应用与数据库之间的交互。...
1. **EXT**:EXT(现称为Sencha EXT JS)是一个JavaScript库,专门用于创建富互联网应用程序(RIA)。EXT提供了大量的组件,如数据网格、图表、表单等,用于构建具有桌面级用户体验的Web应用。在Demo中,EXT可能被...
jQuery以其简洁易用的API深受开发者喜爱,而Struts2作为Java Web开发中的MVC框架,提供了丰富的动作和结果类型,便于构建动态网站。 首先,我们需要了解jQuery中的Ajax方法。jQuery封装了XMLHttpRequest对象,提供...