You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
542 lines
20 KiB
542 lines
20 KiB
|
|
/***************************************************************
|
|
* <p>ProName:EdorSimpleDeal.js</p>
|
|
* <p>Title:团体客户简易保全</p>
|
|
* <p>Description:团体客户简易保全</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @author : lisy
|
|
* @version : 8.0
|
|
* @date : 2024-10-24
|
|
****************************************************************/
|
|
|
|
var showInfo;
|
|
var mDebug="1";
|
|
var aEdorFlag='0';
|
|
var mEdorType;
|
|
var turnPage = new turnPageClass();
|
|
var turnPage1 = new turnPageClass();
|
|
var tSQLInfo = new SqlClass();
|
|
var mOperate = "";//操作状态
|
|
var mflag = ""; //保单、客户查询标识
|
|
var theFirstValue="";
|
|
var theSecondValue="";
|
|
var hasSaved = "";
|
|
var userEdorPopedom = ""; //当前用户保全级别
|
|
|
|
/**
|
|
* 提交
|
|
*/
|
|
function submitForm() {
|
|
|
|
var i = 0;
|
|
var showStr = i18nMessage("正在保存数据,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04525");
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr);
|
|
//showInfo = window.showModelessDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
|
|
var name='提示'; //网页名称,可为空;
|
|
var iWidth=550; //弹出窗口的宽度;
|
|
var iHeight=250; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
|
|
showInfo.focus();
|
|
ajaxSubmit2(document.getElementById("fm"));
|
|
}
|
|
|
|
function afterQuery(arrQueryResult,tType) {
|
|
if( arrQueryResult != null ) {
|
|
if(tType == "GrpCustomerNo") {
|
|
try { fm.all('OtherNo').value = arrQueryResult; } catch(ex) { };
|
|
try { fm.all('OtherNoType').value = "2"; } catch(ex) { };
|
|
try { fm.all('OtherNoName').value = "团体客户号码"; } catch(ex) { };
|
|
divGrpCustomerQuery.style.display="";
|
|
divGrpContQuery.style.display='none';
|
|
divGrpContInfo.style.display='';
|
|
try {queryPassType(); } catch(ex) { };
|
|
try {easyQueryClick(); } catch(ex) { };
|
|
}
|
|
else if(tType == "GrpContNo"){
|
|
try { fm.all('OtherNo').value = arrQueryResult; } catch(ex) { };
|
|
try { fm.all('OtherNoType').value = "4"; } catch(ex) { };
|
|
try { fm.all('OtherNoName').value = "团体保单号码"; } catch(ex) { };
|
|
divGrpCustomerQuery.style.display="none";
|
|
divGrpContQuery.style.display='';
|
|
divGrpContInfo.style.display='';
|
|
try { queryPassType(); } catch(ex) { };
|
|
fm.GrpContNo.value=arrQueryResult;
|
|
try {easyQueryClick1(); } catch(ex) { };
|
|
}
|
|
else if(tType == "GrpContNo"){
|
|
try { fm.all('OtherNo').value = ""; } catch(ex) { };
|
|
try { fm.all('OtherNoType').value = "4"; } catch(ex) { };
|
|
try { fm.all('OtherNoName').value = "团体保单号码"; } catch(ex) { };
|
|
try { fm.all('PassWordType').value = ""; } catch(ex) { };
|
|
divGrpCustomerQuery.style.display="none";
|
|
divGrpContQuery.style.display='';
|
|
divGrpContInfo.style.display='';
|
|
fm.GrpContNo.value=arrQueryResult;
|
|
try {easyQueryClick1(); } catch(ex) { };
|
|
}
|
|
}
|
|
divEdorItemInfo.style.display='';
|
|
}
|
|
|
|
//团体客户号码查询
|
|
function easyQueryClick()
|
|
{
|
|
if(!verifyForm("fm")){
|
|
return false;
|
|
}
|
|
initPolGrid();
|
|
var tCustomerNo = fm.OtherNo.value;
|
|
if(tCustomerNo==null||tCustomerNo==""){
|
|
alert('请录入团体客户号码之后再查询!');
|
|
return;
|
|
}
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql1");
|
|
tSQLInfo.addSubPara(tCustomerNo);
|
|
turnPage.queryModal(tSQLInfo.getString(), PolGrid);
|
|
|
|
}
|
|
|
|
|
|
//团体保单号查询
|
|
function easyQueryClick1()
|
|
{
|
|
if((fm.OtherNo.value == null || fm.OtherNo.value =='') && (fm.AppntNo.value == null || fm.AppntNo.value =='')){
|
|
i18nAlert("团体保单号、团体客户号查询条件至少录入一个,请知悉!", "");
|
|
return false;
|
|
}
|
|
initPolGrid();
|
|
if(fm.OtherNo.value!=null&&fm.OtherNo.value!=''){
|
|
try { queryPassType(); } catch(ex) { };
|
|
}
|
|
var tGrpContNo = fm.OtherNo.value;
|
|
var tAppntNo = fm.AppntNo.value;
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql2");
|
|
tSQLInfo.addSubPara(tManageCom);
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(tAppntNo);
|
|
turnPage.queryModal(tSQLInfo.getString(), PolGrid);
|
|
if (!turnPage.strQueryResult) {
|
|
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
|
|
}
|
|
|
|
}
|
|
|
|
//团体分单详细查询
|
|
function easyQueryClick2(){
|
|
initGrpInsuredGrid();
|
|
var tGrpContNo = PolGrid.getRowColData(0,1);
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql3");
|
|
tSQLInfo.addSubPara(tGrpContNo);
|
|
tSQLInfo.addSubPara(fm.ContNo.value);
|
|
tSQLInfo.addSubPara(fm.InsuredIDType.value);
|
|
tSQLInfo.addSubPara(fm.InsuredIDNo.value);
|
|
tSQLInfo.addSubPara(fm.InsuredSex.value);
|
|
tSQLInfo.addSubPara(fm.InsuredName.value);
|
|
tSQLInfo.addSubPara(fm.InsuredBirthDay.value);
|
|
turnPage.queryModal(tSQLInfo.getString(), GrpInsuredGrid);
|
|
}
|
|
|
|
//密码类型查询
|
|
function queryPassType(){
|
|
if(fm.OtherNoType.value!=""&&fm.OtherNoType.value!=null){
|
|
if(fm.OtherNoType.value=='2'){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql4");
|
|
tSQLInfo.addSubPara(fm.grpcustomerno.value);
|
|
var arrResult = easyExecSql(tSQLInfo.getString(),1,0,1);
|
|
if(arrResult!=null)
|
|
fm.PassWordType.value=arrResult;
|
|
else
|
|
fm.PassWordType.value='服务未开通';
|
|
}else if(fm.OtherNoType.value=='4'){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql5");
|
|
tSQLInfo.addSubPara(fm.OtherNo.value);
|
|
var arrResult = easyExecSql(tSQLInfo.getString(),1,0,1);
|
|
if(arrResult!=null)
|
|
fm.PassWordType.value=arrResult;
|
|
else
|
|
fm.PassWordType.value='服务未开通';
|
|
}else if(fm.OtherNoType.value=='6'){
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_pa");
|
|
tSQLInfo.setResourceName("g_pos.EdorSimpleDealSql");
|
|
tSQLInfo.setSqlId("EdorSimpleDealSql5");
|
|
tSQLInfo.addSubPara(fm.grpcontno.value);
|
|
var arrResult = easyExecSql(tSQLInfo.getString(),1,0,1);
|
|
if(arrResult!=null)
|
|
fm.PassWordType.value=arrResult;
|
|
else
|
|
fm.PassWordType.value='服务未开通';
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/*********************************************************************
|
|
* 保全申请确认
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function edorAppConfirm()
|
|
{
|
|
if(fm.all('EdorType').value==""||fm.all('EdorType').value==null){
|
|
alert("批改类型不能为空");
|
|
return;
|
|
}
|
|
if(fm.all('OtherNoType').value==""||fm.all('OtherNoType').value==null){
|
|
alert("号码类型不能为空");
|
|
return;
|
|
}
|
|
if(fm.all('OtherNoType').value=='6'){
|
|
edorPApp();
|
|
}else{
|
|
edorGrpApp();
|
|
}
|
|
|
|
}
|
|
|
|
//团体保单及团体客户的密码设定
|
|
function edorGrpApp()
|
|
{
|
|
if(fm.OtherNoType.value!='4'){
|
|
if(fm.all('OtherNo').value==""||fm.all('OtherNo').value==null){
|
|
alert("保单号/客户号不能为空");
|
|
return;
|
|
}
|
|
}
|
|
if(fm.all('EdorType').value!='4'){
|
|
if(fm.all('PassWord').value==""||fm.all('PassWord').value==null){
|
|
alert("密码不能为空");
|
|
return;
|
|
}
|
|
if (verifyElement("密码|num&len=6", fm.all('PassWord').value) != true) {
|
|
return;
|
|
}
|
|
}
|
|
fm.action="../API/grp_pa/g_pos/EdorSimpleDealSave/ADD";
|
|
submitForm();
|
|
|
|
}
|
|
//号码类型为6时
|
|
function edorPApp()
|
|
{
|
|
var tEdorType = fm.all('EdorType').value;
|
|
var tPasswordMakeType = fm.all('GContPassType').value;
|
|
var tContNoType = fm.all('GContNoType').value;
|
|
if(tEdorType=='1'&&tPasswordMakeType=='2'){
|
|
if (verifyElement("密码|num&len=6", fm.all('PassWord').value) != true) {
|
|
return;
|
|
}
|
|
}else if(tEdorType=='2'&&tContNoType=='1'&&tPasswordMakeType=='2'){
|
|
if (verifyElement("密码|num&len=6", fm.all('PassWord').value) != true) {
|
|
return;
|
|
}
|
|
}else if(tEdorType=='2'&&tContNoType=='2'){
|
|
if (verifyElement("密码|num&len=6", fm.all('PassWord').value) != true) {
|
|
return;
|
|
}
|
|
var selNo = GrpInsuredGrid.getSelNo();
|
|
if(selNo==0)
|
|
{
|
|
alert("请选择一个被保险人进行操作!");
|
|
return;
|
|
}else{
|
|
fm.PContNo.value = GrpInsuredGrid.getRowColData(selNo-1,1);
|
|
}
|
|
}
|
|
fm.action = "../bq/GEdorSimpleDealForPSave.jsp";
|
|
submitForm();
|
|
}
|
|
/*********************************************************************
|
|
* 后台执行完毕反馈信息
|
|
* 描述: 后台执行完毕反馈信息
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function afterSubmit( FlagStr, content, EdorNo )
|
|
{
|
|
showInfo.close();
|
|
if (FlagStr == "Succ" )
|
|
{
|
|
var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + content ;
|
|
// showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
|
|
var name='提示'; //网页名称,可为空;
|
|
var iWidth=550; //弹出窗口的宽度;
|
|
var iHeight=350; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
|
|
showInfo.focus();
|
|
|
|
if (window.confirm("是否打印本次保全的批单? "))
|
|
{
|
|
fm.action = "../f1print/EndorsementF1PJ3.jsp?EdorNo="+EdorNo;
|
|
fm.target="f1print";
|
|
fm.submit();
|
|
}
|
|
window.location.reload();
|
|
}
|
|
if (FlagStr == "Fail" )
|
|
{
|
|
var urlStr="../common/jsp/MessagePage.jsp?picture=C&content=" + content ;
|
|
// showModalDialog(urlStr,window,"status:no;help:0;close:0;dialogWidth:550px;dialogHeight:250px");
|
|
var name='提示'; //网页名称,可为空;
|
|
var iWidth=550; //弹出窗口的宽度;
|
|
var iHeight=350; //弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; //获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; //获得窗口的水平位置
|
|
showInfo = window.open (urlStr,name, "status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no,height="+ iHeight+",width="+iWidth+",innerHeight="+iHeight+",innerWidth=" +iWidth+",left="+iLeft+",top="+iTop,false);
|
|
showInfo.focus();
|
|
window.location.reload();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 下拉框选择以后调用
|
|
*/
|
|
function afterCodeSelect(cCodeName, Field)
|
|
{
|
|
if(cCodeName=='OtherNoType'){
|
|
divEdorItemInfo.style.display='';
|
|
if(fm.OtherNoType.value=='2'){
|
|
divGrpCustomerQuery.style.display="";
|
|
divGrpContQuery.style.display='none';
|
|
divGrpContInfo.style.display='';
|
|
divGrpCustomerButton.style.display='none';
|
|
divGCont.style.display='none';
|
|
if(fm.OtherNo.value!=null&&fm.OtherNo.value!=''){
|
|
try {easyQueryClick(); } catch(ex) { };
|
|
queryPassType();
|
|
}
|
|
}
|
|
else if(fm.OtherNoType.value=='4'){
|
|
divGrpCustomerQuery.style.display="none";
|
|
divGrpContQuery.style.display='';
|
|
divGrpContInfo.style.display='';
|
|
divGrpCustomerButton.style.display='none';
|
|
divGCont.style.display='none';
|
|
if(fm.OtherNo.value!=null&&fm.OtherNo.value!=''){
|
|
fm.GrpContNo.value = fm.OtherNo.value;
|
|
try {easyQueryClick1(); } catch(ex) { };
|
|
queryPassType();
|
|
}
|
|
if(fm.GrpContNo.value!=null&&fm.GrpContNo.value!=''){
|
|
try {easyQueryClick1(); } catch(ex) { };
|
|
}
|
|
}
|
|
else if(fm.OtherNoType.value=='6'){
|
|
divGrpCustomerQuery.style.display="none";
|
|
divGrpContQuery.style.display='';
|
|
divGrpContInfo.style.display='';
|
|
divPassWord.style.display='none';
|
|
if(fm.OtherNo.value!=null&&fm.OtherNo.value!=''){
|
|
fm.GrpContNo.value = fm.OtherNo.value;
|
|
try {easyQueryClick1(); } catch(ex) { };
|
|
queryPassType();
|
|
}
|
|
}
|
|
}
|
|
if(cCodeName=='GContNoType'){
|
|
if(fm.GContNoType.value=='1'){
|
|
divPasswordMakeButton.style.display='';
|
|
divGCont.style.display='none';
|
|
}else if(fm.GContNoType.value=='2'){
|
|
divPasswordMakeButton.style.display='none';
|
|
divGCont.style.display='none';
|
|
}
|
|
if(fm.GContNoType.value=='2'){
|
|
if(PolGrid.mulLineCount!='1'){
|
|
alert('如果单独指定被保险人,那么团体保单必须唯一');
|
|
fm.GContNoType.value='';
|
|
fm.GContNoTypeName.value='';
|
|
divPassWord.style.display='none';
|
|
return;
|
|
}else{
|
|
divPassWord.style.display='';
|
|
divGCont.style.display='';
|
|
try {easyQueryClick2(); } catch(ex) { };
|
|
}
|
|
}
|
|
}
|
|
if(cCodeName=='GContPassType'){
|
|
if(fm.GContPassType.value=='2'){
|
|
divPassWord.style.display='';
|
|
}else{
|
|
divPassWord.style.display='none';
|
|
}
|
|
}
|
|
if(cCodeName=='EdorType'){
|
|
if(fm.EdorType.value=='4'){
|
|
divPassWord.style.display='none';
|
|
divGrpCustomerButton.style.display='none';
|
|
divPasswordMakeButton.style.display='none';
|
|
if(fm.OtherNoType.value=='2'){
|
|
if(!window.confirm("是否要将该客户网上查询服务终止?"))
|
|
{
|
|
fm.EdorType.value='';
|
|
fm.EdorTypeName.value='';
|
|
}
|
|
}else if(fm.OtherNoType.value=='4'){
|
|
if(!window.confirm("是否要将该团体保单网上查询服务终止?"))
|
|
{
|
|
fm.EdorType.value='';
|
|
fm.EdorTypeName.value='';
|
|
}
|
|
}else if(fm.OtherNoType.value=='6'){
|
|
if(!window.confirm("是否要将团体保单所有个人分单的网上查询服务终止?"))
|
|
{
|
|
fm.EdorType.value='';
|
|
fm.EdorTypeName.value='';
|
|
}
|
|
}
|
|
}else{
|
|
if(fm.OtherNoType.value!='6'){
|
|
divPassWord.style.display='';
|
|
divGrpCustomerButton.style.display='none';
|
|
divPasswordMakeButton.style.display='none';
|
|
}else{
|
|
if(fm.EdorType.value=='1'){
|
|
divGrpCustomerButton.style.display='none';
|
|
divPasswordMakeButton.style.display='';
|
|
}else{
|
|
divPasswordMakeButton.style.display='none';
|
|
divGrpCustomerButton.style.display='';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/*********************************************************************
|
|
* 客户查询
|
|
* 描述: 客户查询
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function customerQuery()
|
|
{
|
|
mflag = "1";
|
|
// 路径未修改 后期修改
|
|
var showInfo = window.open( "../bq/LDGrpPersonQueryNew.jsp","LDPersonQueryNew",'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
showInfo.focus();
|
|
}
|
|
|
|
/*********************************************************************
|
|
* 保单查询
|
|
* 描述: 保单查询
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function contQuery()
|
|
{
|
|
mflag = "0";
|
|
// 路径未修改 后期修改
|
|
var showInfo = window.open("../sys/AllProposalQueryMain.jsp","AllProposalQueryMain",'width='+screen.availWidth+',height='+screen.availHeight+',top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
|
|
showInfo.focus();
|
|
}
|
|
|
|
|
|
|
|
|
|
/*********************************************************************
|
|
* 验证文本框中两次输入的值是否相等
|
|
* 描述: 验证文本框中两次输入的值是否相等
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*********************************************************************
|
|
*/
|
|
function confirmSecondInput(aObject,aEvent){
|
|
if(aEvent=="onkeyup"){
|
|
var theKey = window.event.keyCode;
|
|
if(theKey=="13"){
|
|
if(theFirstValue!=""){
|
|
theSecondValue = aObject.value;
|
|
if(theSecondValue==""){
|
|
alert("请再次录入!");
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
if(theSecondValue==theFirstValue){
|
|
aObject.value = theSecondValue;
|
|
return;
|
|
}
|
|
else{
|
|
alert("两次录入结果不符,请重新录入!");
|
|
theFirstValue="";
|
|
theSecondValue="";
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
}
|
|
else{
|
|
theFirstValue = aObject.value;
|
|
if(theFirstValue==""){
|
|
theSecondValue="";
|
|
alert("请录入内容!");
|
|
return;
|
|
}
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
else if(aEvent=="onblur"){
|
|
if(theFirstValue!=""){
|
|
theSecondValue = aObject.value;
|
|
if(theSecondValue==""){
|
|
alert("请再次录入!");
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
if(theSecondValue==theFirstValue){
|
|
aObject.value = theSecondValue;
|
|
theSecondValue="";
|
|
theFirstValue="";
|
|
return;
|
|
}
|
|
else{
|
|
alert("两次录入结果不符,请重新录入!");
|
|
theFirstValue="";
|
|
theSecondValue="";
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
}
|
|
else{
|
|
theFirstValue = aObject.value;
|
|
if(theFirstValue==""){
|
|
return;
|
|
}
|
|
aObject.value="";
|
|
// aObject.focus();
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|
|
|