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.
385 lines
13 KiB
385 lines
13 KiB
/***************************************************************
|
|
* <p>ProName:LLClaimHospitalInput.js</p>
|
|
* <p>Title:意健险产品险类配置</p>
|
|
* <p>Description:意健险产品险类配置</p>
|
|
* <p>Copyright:Copyright (c) 2012</p>
|
|
* <p>Company:Sinosoft</p>
|
|
* @version : 8.0
|
|
* @date : 2025/07/21
|
|
****************************************************************/
|
|
var showInfo;
|
|
var mDebug = "1";
|
|
var tSaveFlag = "0";
|
|
var turnPage = new turnPageClass();
|
|
var strSQL = "";
|
|
// 新增
|
|
function save()
|
|
{
|
|
// 数据校验
|
|
if (!checkParm())
|
|
{
|
|
return false;
|
|
}
|
|
// var strSQL1 = "select riskcode,riskname,insurancecode,insurancename from ldrisktoinsuranceconfig where 1=1"
|
|
// + getWherePart("riskcode", "RiskCode")
|
|
// + getWherePart("insurancecode", "InsuranceCode");
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_claim");
|
|
tSQLInfo.setResourceName("g_claim.RiskToinSuranceConfigSql");
|
|
tSQLInfo.setSqlId("RiskToinSuranceConfigSql1");
|
|
tSQLInfo.addSubPara(RiskCode);
|
|
tSQLInfo.addSubPara(InsuranceCode);
|
|
|
|
|
|
var arr = easyExecSql(tSQLInfo.getString());
|
|
|
|
if (arr != null)
|
|
{
|
|
i18nAlert("此数据已存在,请重新插入!");
|
|
return false;
|
|
}
|
|
fm.fmAction.value = "INSERT";
|
|
// fm.action="./RiskToinSuranceConfigSave.jsp";
|
|
|
|
fm.action = "../API/grp_claim/g_claim/RiskToinSuranceConfigSave/ADD";
|
|
submitForm();
|
|
// fm.submit();
|
|
|
|
}
|
|
|
|
// 数据校验
|
|
function checkParm()
|
|
{
|
|
|
|
var RiskCode = fm.RiskCode.value;
|
|
if (RiskCode == null || RiskCode == '')
|
|
{
|
|
i18nAlert("险种编码不能为空!");
|
|
return false;
|
|
}
|
|
var RiskName = fm.RiskName.value;
|
|
if (RiskName == null || RiskName == '')
|
|
{
|
|
i18nAlert("险种名称不能为空!");
|
|
return false;
|
|
}
|
|
var InsuranceCode = fm.InsuranceCode.value;
|
|
if (InsuranceCode == null || InsuranceCode == '')
|
|
{
|
|
i18nAlert("险类编码不能为空!");
|
|
return false;
|
|
}
|
|
var InsuranceName = fm.InsuranceName.value;
|
|
if (InsuranceName == null || InsuranceName == '')
|
|
{
|
|
i18nAlert("险类名称不能为空!");
|
|
return false;
|
|
}
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
// 修改
|
|
function toUpdate()
|
|
{
|
|
|
|
var selno = RiskToinSuranceConfigGrid.getSelNo() - 1;
|
|
if (selno < 0)
|
|
{
|
|
i18nAlert("请选择一条数据");
|
|
return;
|
|
}
|
|
|
|
// 数据校验
|
|
if (!checkParm())
|
|
{
|
|
return false;
|
|
}
|
|
// fm.action="./RiskToinSuranceConfigSave.jsp";
|
|
fm.action = "../API/grp_claim/g_claim/RiskToinSuranceConfigSave/ADD";
|
|
fm.fmAction.value = "UPDATE";
|
|
submitForm();
|
|
|
|
}
|
|
|
|
|
|
//删除
|
|
function toDelete()
|
|
{
|
|
|
|
var selno = RiskToinSuranceConfigGrid.getSelNo() - 1;
|
|
if (selno < 0)
|
|
{
|
|
i18nAlert("请选择一条数据");
|
|
return;
|
|
}
|
|
|
|
// 数据校验
|
|
if (!checkParm())
|
|
{
|
|
return false;
|
|
}
|
|
// fm.action="./RiskToinSuranceConfigSave.jsp";
|
|
fm.action = "../API/grp_claim/g_claim/RiskToinSuranceConfigSave/ADD";
|
|
fm.fmAction.value = "DELETE";
|
|
submitForm();
|
|
}
|
|
|
|
// 查询
|
|
function query()
|
|
{
|
|
// var strSQL2 = "select ld.riskcode,ld.riskname,ld.insurancecode,ld.insurancename,"
|
|
// + "TO_CHAR(lm.enddate, 'YYYY-MM-DD') as enddate,ld.operator,"
|
|
// + "TO_CHAR(ld.modifydate, 'YYYY-MM-DD') || ' ' || ld.modifytime as configtime "
|
|
// + "from ldrisktoinsuranceconfig ld left join lmriskapp lm on ld.riskcode = lm.riskcode "
|
|
// + "left join (select riskcode ,min(STARTTIME) as STARTTIME from lorisksalestart group by riskcode)min on ld.riskcode = trim(min.riskcode) "
|
|
// + "where 1=1 "
|
|
// + getWherePart("ld.riskcode", "RiskCode")
|
|
// + getWherePart("ld.insurancecode", "InsuranceCode")
|
|
// + " order by "
|
|
// + " case when min.STARTTIME is not null and lm.enddate is null then 1 when min.STARTTIME is null and lm.enddate is null then 2 when (min.STARTTIME is null and lm.enddate is not null) or (min.STARTTIME is not null and lm.enddate is not null) then 3 else 4 end, "
|
|
// + " case when (min.STARTTIME is null and lm.enddate is not null) or (min.STARTTIME is not null and lm.enddate is not null) then TO_CHAR(lm.enddate, 'YYYY-MM-DD') else null end desc, "
|
|
// + " case when min.STARTTIME is not null and lm.enddate is null then min.STARTTIME else null end desc";
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_claim");
|
|
tSQLInfo.setResourceName("g_claim.RiskToinSuranceConfigSql");
|
|
tSQLInfo.setSqlId("RiskToinSuranceConfigSql4");
|
|
tSQLInfo.addSubPara(fm.RiskCode.value);
|
|
tSQLInfo.addSubPara(fm.InsuranceCode.value);
|
|
|
|
var arr = easyExecSql(tSQLInfo.getString());
|
|
|
|
if (arr == null)
|
|
{
|
|
i18nAlert("未查到意健险产品险类配置信息")
|
|
}
|
|
turnPage.queryModal(tSQLInfo.getString(), RiskToinSuranceConfigGrid);
|
|
|
|
}
|
|
|
|
// function queryTemplateDown() {
|
|
// fm.action = "RiskToinSuranceConfigDown.jsp";
|
|
// fm.submit();
|
|
// }
|
|
//
|
|
// function queryUp() {
|
|
// location.href = "RiskToinSuranceConfigUp.jsp";
|
|
// }
|
|
|
|
//下载清单查询sql
|
|
function queryDown()
|
|
{
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_claim");
|
|
tSQLInfo.setResourceName("g_claim.RiskToinSuranceConfigSql");
|
|
tSQLInfo.setSqlId("RiskToinSuranceConfigSql5");
|
|
tSQLInfo.addSubPara(fm.RiskCode.value);
|
|
tSQLInfo.addSubPara(fm.InsuranceCode.value);
|
|
// strSQL = "select row_number() over (order by TO_CHAR(ld.modifydate, 'YYYY-MM-DD') || ' ' || ld.modifytime desc) as num,"
|
|
// + "ld.insurancecode,ld.insurancename,ld.riskname,ld.modifydate,lf.interfacename,"
|
|
// + "decode(lf.interfacetype, 'LP', '理赔', 'HB', '核保', 'XB', '续保', 'FPYC', '重复发票') as code "
|
|
// + "from ldinsurancetointerfaceconfig lf left join ldrisktoinsuranceconfig ld on ld.insurancecode = lf.insurancecode "
|
|
// + "where 1=1 "
|
|
// + getWherePart("ld.riskcode", "RiskCode")
|
|
// + getWherePart("ld.insurancecode", "InsuranceCode");
|
|
strSQL=tSQLInfo.getString();
|
|
|
|
}
|
|
|
|
|
|
//下载清单
|
|
function BatchPPrint()
|
|
{
|
|
|
|
if (confirm("确认要下载吗?"))
|
|
{
|
|
|
|
} else
|
|
return;
|
|
//报表标题
|
|
var tTitle = "险类编码^|险种类型^|险种名称^|配置时间^|调用中保信接口^|调用中保信的核心业务";
|
|
queryDown();
|
|
// fm.all("strSql").value = strSQL;
|
|
// fm.action="./RiskToinSuranceConfig.jsp";
|
|
// fm.submit();
|
|
|
|
var tQuerySQL = strSQL;
|
|
|
|
fm.action = "../API/grp_common/jsp/QueryDataExport/EXPORT";
|
|
//ajaxSubmit2(fm, null, null, true, tTitle, tQuerySQL);
|
|
ajaxSubmit2(document.getElementById("fm"), null, null, true,tTitle, tQuerySQL);
|
|
|
|
}
|
|
|
|
// 表单重置
|
|
function init()
|
|
{
|
|
|
|
fm.RiskCode.value = "";
|
|
fm.RiskName.value = "";
|
|
fm.InsuranceCode.value = "";
|
|
fm.InsuranceName.value = "";
|
|
|
|
}
|
|
/*
|
|
* 点击返回按钮,关闭当前页面
|
|
* 参数 : 无
|
|
* 返回值: 无
|
|
*/
|
|
function goback()
|
|
{
|
|
init();
|
|
query();
|
|
}
|
|
// 初始化选项下拉框
|
|
function initColData()
|
|
{
|
|
// 险种名称
|
|
// var sql = "select riskcode,riskname from lmriskapp order by riskcode asc";
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_claim");
|
|
tSQLInfo.setResourceName("g_claim.RiskToinSuranceConfigSql");
|
|
tSQLInfo.setSqlId("RiskToinSuranceConfigSql2");
|
|
|
|
|
|
var strTemp = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1);
|
|
fm.RiskCode.CodeData = strTemp;
|
|
|
|
// 险类名称
|
|
|
|
tSQLInfo = new SqlClass();
|
|
tSQLInfo.setModule("grp_claim");
|
|
tSQLInfo.setResourceName("g_claim.RiskToinSuranceConfigSql");
|
|
tSQLInfo.setSqlId("RiskToinSuranceConfigSql3");
|
|
// var sql1 = "select distinct insurancecode,insurancename from ldinsurancetointerfaceconfig order by insurancecode asc";
|
|
var strTemp1 = easyQueryVer3(tSQLInfo.getString(), 1, 0, 1);
|
|
fm.InsuranceCode.CodeData = strTemp1;
|
|
|
|
}
|
|
|
|
//修改数据回显
|
|
function RiskToinSuranceConfigGridClick()
|
|
{
|
|
var selno = RiskToinSuranceConfigGrid.getSelNo() - 1;
|
|
fm.RiskCode.value = RiskToinSuranceConfigGrid.getRowColData(selno, 1);
|
|
fm.RiskName.value = RiskToinSuranceConfigGrid.getRowColData(selno, 2);
|
|
fm.InsuranceCode.value = RiskToinSuranceConfigGrid.getRowColData(selno, 3);
|
|
fm.InsuranceName.value = RiskToinSuranceConfigGrid.getRowColData(selno, 4);
|
|
|
|
//修改前的数据
|
|
fm.RiskCode1.value = RiskToinSuranceConfigGrid.getRowColData(selno, 1);
|
|
fm.InsuranceCode1.value = RiskToinSuranceConfigGrid.getRowColData(selno, 3);
|
|
}
|
|
|
|
// 提交后操作,服务器数据返回后执行的操作
|
|
function afterSubmit(FlagStr, content)
|
|
{
|
|
// i18nAlert(content);
|
|
var iWidth = 550; // 弹出窗口的宽度;
|
|
var iHeight = 350; // 弹出窗口的高度;
|
|
var iTop = (window.screen.availHeight - iHeight) / 2; // 获得窗口的垂直位置
|
|
var iLeft = (window.screen.availWidth - iWidth) / 2; // 获得窗口的水平位置
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=S&content=" + content;
|
|
var name = '提示'
|
|
if (FlagStr == "Fail")
|
|
{
|
|
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
|
|
{
|
|
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();
|
|
|
|
}
|
|
init();
|
|
query();
|
|
|
|
}
|
|
|
|
/**
|
|
* 提交数据
|
|
*/
|
|
function submitForm() {
|
|
|
|
var showStr = i18nAlert("正在处理数据,请您稍候并且不要修改屏幕上的值或链接其他页面!", "LIS-04535");
|
|
var urlStr = "../common/jsp/MessagePage.jsp?picture=C&content=" + encodeURIComponent(showStr);
|
|
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"), afterSubmit);
|
|
}
|
|
/**
|
|
* 导入
|
|
*/
|
|
function submitImport() {
|
|
|
|
var filePath = uploadfm.UploadPath.value;
|
|
if (filePath == null || filePath == "") {
|
|
i18nAlert("请选择导入文件路径!", "LIS-03339");
|
|
return false;
|
|
}
|
|
|
|
var indexFirst = filePath.lastIndexOf("\\");
|
|
var indexLast = filePath.lastIndexOf(".xlsx");
|
|
if (indexFirst < 0 || indexLast < 0 || indexLast <= indexFirst) {
|
|
i18nAlert("文件路径不合法或选择的文件格式不正确,请重新选择!", "LIS-03340");
|
|
return false;
|
|
}
|
|
|
|
var fileName = filePath.substring(indexFirst + 1, indexLast);
|
|
|
|
if (fileName.length >= 100) {
|
|
|
|
i18nAlert("文件名长度不能超过100!", "LIS-04772");
|
|
return false;
|
|
}
|
|
|
|
var i = 0;
|
|
var showStr = i18nMessage("正在导入,请您稍候并且不要修改屏幕上的值或链接其他页面", "LIS-04817");
|
|
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();
|
|
uploadfm.ImpOperate.value = "EXCELIMP";
|
|
uploadfm.action = "../API/grp_claim/g_claim/RiskToinSuranceConfigSave/UPLOAD?Operate=" + uploadfm.ImpOperate.value;
|
|
ajaxSubmit2(document.getElementById("uploadfm"), afterSubmit, true);
|
|
} |