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.
 
 
 
FZ/lis-module-grp-nb-web/src/main/webapp/g_app/LCGroupBusinessInfoInput.js

409 lines
15 KiB

/***************************************************************
* <p>ProName:LCGroupBusinessInfoInput.js</p>
* <p>Title:业务信息修改</p>
* <p>Description:业务信息修改</p>
* <p>Copyright:Copyright (c) 2014</p>
* <p>Company:Sinosoft</p>
* @author : withxiaoqi
* @version : 8.0
* @date : 2024-12-26
****************************************************************/
var showInfo;
var turnPage = new turnPageClass();
var turnPage1 = new turnPageClass();
var tSQLInfo = new SqlClass();
/**
* 查询
*/
function queryClick() {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCGroupContRevokeSql");
tSQLInfo.setSqlId("LCGroupContContClassReviseSql4");
tSQLInfo.addSubPara(document.getElementById("ManageCom").value);
tSQLInfo.addSubPara(document.getElementById("GrpPropNo1").value);
tSQLInfo.addSubPara('');
tSQLInfo.addSubPara(document.getElementById("SaleDepart").value);
tSQLInfo.setModule("grp_nb");
turnPage1.queryModal(tSQLInfo.getString(),QueryResultGrid, 1 , 1 );
if (!turnPage1.strQueryResult) {
i18nAlert("未查询到符合条件的查询结果!", "LIS-03016");
}
}
/**
* 查询个人池列表信息
*/
function queryManage() {
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCGrpApproveListSql");
tSQLInfo.setSqlId("LCGrpApproveListSql4");
tSQLInfo.addSubPara(tManageCom);
tSQLInfo.setModule("grp_nb");
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArr != null) {
document.getElementById("ManageComName").value = tArr[0][0];
}
}
function updateInfo(){
if(!verifyInput()){
return false;
}
if (fm.PayType.value == "7" || fm.PayType.value == "E") {
alert("付款方式不能选择此方式,请选择其他方式!");
return false;
}
if (fm.PayType.value == "7" || fm.PayType.value == "4") {
if (fm.BankCode.value == "" || fm.BankCode.value == null) {
alert("付款方式为银行转账或者银行转账(非制返盘),请录入开户银行!");
return false;
}
if (fm.BankAccNo.value == "" || fm.BankAccNo.value == null) {
alert("付款方式为银行转账或者银行转账(非制返盘),请录入银行账号!");
return false;
}
}
if (fm.TaxFlag.value == "1") { //专用发票
if (fm.TaxName.value == "" || fm.TaxName.value == null) {
alert("名称不能为空!");
return false;
}
if (fm.TaxNo.value == "" || fm.TaxNo.value == null) {
alert("纳税人识别号不能为空!");
return false;
}
if (fm.TaxAddress.value == "" || fm.TaxAddress.value == null) {
alert("地址不能为空!");
return false;
}
// if (fm.TaxPhone.value == "" || fm.TaxPhone.value == null) {
// alert("电话不能为空!");
// return false;
// }
if (fm.TaxBankName.value == "" || fm.TaxBankName.value == null) {
alert("开户行不能为空!");
return false;
}
if (fm.TaxBankAccNo.value == "" || fm.TaxBankAccNo.value == null) {
alert("账户不能为空!");
return false;
}
if (document.all("TaxPhone").value != null && document.all("TaxPhone").value !="") {
if (!validatePhoneNumber(document.all("TaxPhone").value)) {
alert("电话不是电话或手机号格式");
return false;
}
}
var myreg = /^[a-zA-Z0-9]*$/;
if (!myreg.test(fm.TaxNo.value) ||
!(fm.TaxNo.value.length == 18)) {
alert("纳税人识别号不符合规则,应由字母数字组成,位数为18位!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql170");
tSQLInfo.addSubPara(fm.TaxNo.value);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("纳税人识别号前两位应以11,12,13,19,21,29,31,32,33,34,35,39,41,49,51,52,53,59,61,62,69,71,72,79,81,89,91,92,93,A1,A9,N1,N2,N3,N9,Y1,54,55,37,G1 之一开头!");
return false;
}
}
if (fm.TaxFlag.value == "2") {//增值税发票
if (fm.TaxName.value == "" || fm.TaxName.value == null) {
alert("名称不能为空!");
return false;
}
if (fm.TaxNo.value == "" || fm.TaxNo.value == null) {
alert("纳税人识别号不能为空!");
return false;
}
var myreg = /^[a-zA-Z0-9]*$/;
if (!myreg.test(fm.TaxNo.value) ||
!(fm.TaxNo.value.length == 18)) {
alert("纳税人识别号不符合规则,应由字母数字组成,位数为18位!");
return false;
}
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCContSql");
tSQLInfo.setModule("grp_common");
tSQLInfo.setSqlId("LCContSql170");
tSQLInfo.addSubPara(fm.TaxNo.value);
var tPropEntry = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tPropEntry==null) {
alert("纳税人识别号前两位应以11,12,13,19,21,29,31,32,33,34,35,39,41,49,51,52,53,59,61,62,69,71,72,79,81,89,91,92,93,A1,A9,N1,N2,N3,N9,Y1,54,55,37,G1 之一开头!");
return false;
}
}
var tRow = QueryResultGrid.getSelNo();
if (tRow==0) {
i18nAlert("请选择一条信息!", "LIS-03743");
return false;
}
if (fm.BankCode.value != "" && fm.BankCode.value != null) {
if (fm.AccName.value == "" || fm.BankAccNo.value == "" || fm.BankProvince.value == "" || fm.BankCity.value == "") {
alert("开户银行不为空时,【开户名】,【银行账号】,【开户行所在省】,【开户行所在市】为必录项");
return false;
}
}
if (fm.BankCode.value =="" || fm.BankCode.value==null){
if (fm.AccName.value != "" || fm.BankAccNo.value != "" || fm.BankProvince.value != "" || fm.BankCity.value != "") {
alert("开户银行为空时,【开户名】,【银行账号】,【开户行所在省】,【开户行所在市】无需录入");
return false;
}
}
AppntNo = QueryResultGrid.getRowColData(tRow-1,7);
fm.action="../API/grp_nb/g_app/LCGroupBusinessInfoSave/ADD"+"?AppntNo="+AppntNo;
submitForm();
initQueryResultGrid();
}
/**
*
*/
function queryInfo() {
var tSelNo = QueryResultGrid.getSelNo()-1;
tSQLInfo = new SqlClass();
tSQLInfo.setResourceName("g_app.LCGroupContRevokeSql");
tSQLInfo.setSqlId("LCGroupContContClassReviseSql5");
tSQLInfo.addSubPara(QueryResultGrid.getRowColData(tSelNo,2));
tSQLInfo.setModule("grp_nb");
var tArr = easyExecSql(tSQLInfo.getString(), 1, 0, 1);
if (tArr==null || tArr.length==0) {
i18nAlert("未查询到信息!", "LIS-99999");
return false;
} else {
document.getElementById("PayType").value = tArr[0][0];
document.getElementById("PayTypeName").value = tArr[0][1];
document.getElementById("AccName").value = tArr[0][2];
document.getElementById("BankAccNo").value = tArr[0][3];
document.getElementById("BankCode").value = tArr[0][4];
document.getElementById("BankCodeName").value = tArr[0][5];
document.getElementById("BankProvince").value = tArr[0][6];
document.getElementById("BankProvinceName").value = tArr[0][7];
document.getElementById("BankCity").value = tArr[0][8];
document.getElementById("BankCityName").value = tArr[0][9];
document.getElementById("AccAttributes").value = tArr[0][10];
document.getElementById("AccAttributesName").value = tArr[0][11];
document.getElementById("AccType2").value = tArr[0][12];
document.getElementById("AccTypeName2").value = tArr[0][13];
document.getElementById("BankAccSub2").value = tArr[0][14];
document.getElementById("TaxFlag").value = tArr[0][15];
document.getElementById("TaxFlagName").value = tArr[0][16];
document.getElementById("TaxName").value = tArr[0][17];
document.getElementById("TaxNo").value = tArr[0][18];
document.getElementById("TaxBankName").value = tArr[0][19];
document.getElementById("TaxBankAccNo").value = tArr[0][20];
document.getElementById("TaxPhone").value = tArr[0][21];
document.getElementById("TaxAddress").value = tArr[0][22];
}
document.getElementById("GrpPropNo").value = QueryResultGrid.getRowColData(tSelNo,1);
document.getElementById("PolicyName").value = QueryResultGrid.getRowColData(tSelNo,3);
}
function clearInput(codeInput,nameInput) {
codeInput.value = "";
nameInput.value = "";
}
function queryGrpContClassRevise(tSelNo){
tSQLInfo1 = new SqlClass();
tSQLInfo1.setResourceName("g_app.LCGroupContRevokeSql");
tSQLInfo1.setSqlId("LCGroupContContClassReviseSql3");
tSQLInfo1.addSubPara(QueryResultGrid.getRowColData(tSelNo,2));
tSQLInfo1.setModule("grp_nb");
turnPage.queryModal(tSQLInfo1.getString(),QueryInfo, 1 , 1 );
}
/**
* 模拟下拉操作
*/
function returnShowCodeList(value1, value2, value3) {
returnShowCode(value1, value2, value3, '0');
}
function returnShowCodeListKey(value1, value2, value3) {
returnShowCode(value1, value2, value3, '1');
}
/**
* 选择城市前必须先选择省份
*/
function checkBankProvince(){
if(document.all("BankProvince").value == ""){
i18nAlert("请先选择省份", "LIS-03010");
document.all("BankCity").value = "";
document.all("BankCityName").value = "";
}
}
function returnShowCode(value1, value2, value3, returnType) {
if (value1=='city') {
if (isEmpty(fm.ProvinceName)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
var tProvince = document.all("ProvinceCode").value;
if (returnType=='0') {
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
} else {
return showCodeListKey('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
}
} else if (value1=='bankcity') {
if (isEmpty(fm.BankProvinceName)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
var tProvince = document.all("BankProvince").value;
if (returnType=='0') {
return showCodeList('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
} else {
return showCodeListKey('city',value2,value3,null,tProvince,'UpPlaceName','1',180);
}
} else if (value1=='district') {
if (isEmpty(fm.ProvinceName)) {
i18nAlert("请选择省!", "LIS-00795");
return false;
}
if (isEmpty(fm.CityName)) {
i18nAlert("请选择市!", "LIS-00796");
return false;
}
var tCity = document.all("CityCode").value;
if (returnType=='0') {
return showCodeList('district',value2,value3,null,tCity,'UpPlaceName','1',180);
} else {
return showCodeListKey('district',value2,value3,null,tCity,'UpPlaceName','1',180);
}
} else if (value1=='bankprovince') {
var tSql = "1";
if (returnType=='0') {
return showCodeList('province',value2,value3,null,tSql,1,'1',180);
} else {
return showCodeListKey('province',value2,value3,null,tSql,1,'1',180);
}
} else if (value1=="agenttype") {
// if (isEmpty(fm.ChnlType)) {
// if (returnType=='0') {
// return showCodeList('agenttype',value2,value3);
// } else {
// return showCodeListKey('agenttype',value2,value3);
// }
// }
// var tChnlType = document.all("ChnlType").value;
// if (returnType=='0') {
// return showCodeList('queryexp',value2,value3,null,['agenttype',tChnlType],['CodeType','CodeExp'],'1',180);
// } else {
// return showCodeListKey('queryexp',value2,value3,null,['agenttype',tChnlType],['CodeType','CodeExp'],'1',180);
// }
}else if (value1=="comcodeall") {
if (returnType=='0') {
return showCodeList('comcodeall',value2,value3,null,['03',tManageCom],['ComGrade','ManageCom'],'1',180);
} else {
return showCodeListKey('comcodeall',value2,value3,null,['03',tManageCom],['ComGrade','ManageCom'],'1',180);
}
}
}
/**
* 提交数据
*/
function submitForm() {
var showStr = i18nMessage("正在处理数据,请您稍候并且不要修改屏幕上的值或链接其他页面!", "LIS-04535");
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();
ajaxSubmit(document.getElementById("fm"));
}
/**
* 附件管理
*/
function showAttachment() {
var tRow = QueryResultGrid.getSelNo();
if (tRow==0) {
i18nAlert("请选择一条信息!", "LIS-03743");
return false;
}
tGrpPropNo = QueryResultGrid.getRowColData(tRow-1,2);
mainRequest();
window.open("../g_busicommon/LDAttachmentMain.jsp?OtherNoType=NB&OtherNo="+tGrpPropNo+"&UploadNode=0","附件管理",'width=950,height=520,top=0,left=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=1,status=0');
}
function mainRequest() {
fm.action = "../API/grp_common/g_busicommon/LDAttachmentMainController/HANDDEAL?OtherNoType=NB&OtherNo="+tGrpPropNo+"&UploadNode=0";
ajaxSubmit2(document.getElementById("fm"),afterSubmitssc);
}
function afterSubmitssc(tMissionID) {
}
function afterSubmit(FlagStr, content, cQuotNo, cQuotBatNo) {
if (typeof(showInfo)=="object" && typeof(showInfo)!="unknown") {
showInfo.close();
}
if (FlagStr=="Fail") {
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content="+ encodeURIComponent(content);
//showModalDialog(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; //获得窗口的水平位置
var 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();
} else {
var urlStr = "../common/jsp/MessagePage.jsp?picture=S&content="+ encodeURIComponent(content);
//showModalDialog(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; //获得窗口的水平位置
var 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();
}
}