2018-06-03 22:26:41 +08:00

82 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
/*
Describe: 新增财务报表准备信息 本页面仅仅用于报表信息的新增操作
Input Param:
--CustomerID当前客户编号
--ModelClass: 模式类型
*/
//定义变量
String sCustomerID="";//--客户代码
String sModelClass = "";//--模式类型
String sSql = "";//--存放sql语句
String sPassRight = "true";//--布尔型变量
//获得组件参数,客户代码、模式类型
sCustomerID = CurPage.getParameter("CustomerID");
sModelClass = CurPage.getParameter("ModelClass");
//通过DW模型产生ASObjectModel对象doTemp
ASObjectModel doTemp = new ASObjectModel("AddFSPre");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="2"; //设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; //设置是否只读 1:只读 0:可写
doTemp.setDefaultValue("ModelClass",sModelClass);
//生成HTMLObjectWindow
dwTemp.genHTMLObjectWindow("");
String sButtons[][] = {
{"true","","Button","确定","确定","doCreation()","","","","btn_icon_finish"}
};
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
function saveRecord(sPostEvents){
//录入数据有效性检查
sReportDate = getItemValue(0,0,"ReportDate");
sReportScope = getItemValue(0,0,"ReportScope");
if(sReportScope == '01'){
sReportScopeName = "合并";
}else if(sReportScope == '02'){
sReportScopeName = "本部";
}else{
sReportScopeName = "汇总";
}
//如果需要可以进行保存前的权限判断
sPassRight = RunJavaMethodTrans("com.amarsoft.app.als.finance.analyse.action.FinanceCanPassAction", "financeCanPassAction",
"ObjectNo="+"<%=sCustomerID%>"+",ReportDate="+sReportDate+",ReportScope="+sReportScope);
if(sPassRight=="pass"){
as_save("myiframe0",sPostEvents);
}else{
alert(sReportDate +"月份的"+sReportScopeName+"口径财务报表已存在,请重新选择!");
}
}
/*~[Describe=新增一条记录;InputParam=无;OutPutParam=无;]~*/
function doCreation(){
saveRecord("goBack()");
}
function goBack(){
var recordNo = getItemValue(0,getRow(),"RecordNo");
var reportDate = getItemValue(0,getRow(),"ReportDate");
var reportScope = getItemValue(0,getRow(),"ReportScope");
parent.AsDialog.ClosePage("ok@"+recordNo+"@"+reportDate+"@"+reportScope);
}
//是否审计字段事件
function whenChange(){
var auditFlag = getItemValue(0,getRow(),"AuditFlag");
if(auditFlag == "Y"){
setItemRequired(0,"AuditOffice",true);
}else{
setItemRequired(0,"AuditOffice",false);
setItemValue(0,0,"AuditOffice","");
}
}
/*~[Describe=日期选择;]~*/
function getMonth(sObject){
AsDialog.OpenCalender(sObject, 'yyyy/MM','',new Date());
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>