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

71 lines
2.2 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"%><%
String PG_TITLE = "汇率管理详细页面"; // 浏览器窗口标题 <title> PG_TITLE </title>
// 获得页面参数
String rateid = CurPage.getParameter("rateid");
if(rateid==null) rateid="";
// 通过DW模型产生ASObjectModel对象doTemp
ASObjectModel doTemp = new ASObjectModel("RateInfo");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="2"; // 设置DW风格 1:Grid 2:Freeform
dwTemp.ReadOnly = "0"; // 设置是否只读 1:只读 0:可写
//生成HTMLDataWindow
dwTemp.genHTMLObjectWindow(rateid);//传入参数,逗号分割
String sButtons[][] = {
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","","Button","返回","返回列表页面","goBack()","","","",""}
};
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
var bIsInsert = false; //标记DW是否处于“新增状态”
/*~[Describe=保存;InputParam=后续事件;OutPutParam=无;]~*/
function saveRecord(sPostEvents){
if(bIsInsert){
beforeInsert();
//特殊增加,如果为新增保存,保存后页面刷新一下,防止主键被修改
beforeUpdate();
as_save("myiframe0");
return;
}
beforeUpdate();
as_save("myiframe0",sPostEvents);
}
function goBack(){
AsControl.OpenView("/SystemManage/SynthesisManage/RateInfoList.jsp","","_self");
}
/*~[Describe=执行插入操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
function beforeInsert(){
}
/*~[Describe=设置字段值;InputParam=无;OutPutParam=无;]~*/
function setExchangeValue(){
var sUnit = getItemValue(0,getRow(),"Unit"); //单位
var sPrice = getItemValue(0,getRow(),"Price"); //中间价
var iExchangeValue=sPrice/sUnit;
setItemValue(0,getRow(),"ExchangeValue",iExchangeValue);
}
/*~[Describe=执行更新操作前执行的代码;InputParam=无;OutPutParam=无;]~*/
function beforeUpdate(){
}
/*~[Describe=页面装载时对DW进行初始化;InputParam=无;OutPutParam=无;]~*/
function initRow(){
if (getRowCount(0)==0){
setItemValue(0,0,"Status","1");
}
}
initRow(); //页面装载时对DW当前记录进行初始化
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>