BCDL相关JS

--前台进行编码转换的
encodeURI(encodeURI(url+pars));

--常用的JS判断存放在这个界面里面
paymentCommon.js
方法
isMoney
isNum
validate
checkMoneyEmpty
formatMoney

--每次点击分页就触发这个方法然后在这个方法里面做自己想做的操作
// process jump message
var oriSubmitForm = submitForm;
submitForm = getMessage;
function getMessage(pageNo) {
oriSubmitForm(pageNo);
//setCheckBoxHeader();
$("checkbox2").checked = false; // 翻页后直接设置为未选中,目前本页面默认均为未选中
}
拦截分页标签
要用的留着 刚弄的

oriSubmitForm(pageNo); 对应的JS方法就是 PagePanelAjax类里面的如下程序代码:
form.append("function submitForm(pageNo){");

--隐藏和显示查询条件的方法
function ShowTable2() {
var tableCtrl = document.getElementById("approvalRecord");
var tdhead = document.getElementById("hide");
var tdhead2 = document.getElementById("hide2");
tableCtrl.style.display ="none";
tdhead.style.display ="none";
tdhead2.style.display ="";
}
function ShowTable() {
var tableCtrl = document.getElementById("approvalRecord");
var tdhead = document.getElementById("hide");
var tdhead2 = document.getElementById("hide2");
tableCtrl.style.display ="";
tdhead.style.display ="";
tdhead2.style.display ="none";
}

--公司框架集中刷新页面的方法
//window.location.href = window.location.href.toString();
//refreshData();
//document.getElementById("jump").onchange();
//refresh();
//var right = window.dialogArguments.location.href;
//window.dialogArguments.location.href = right;

//这种刷新是针对 window.open 的方式
window.opener.document.getElementById("jump").onchange();

//这种刷新是针对 window.showModalDialog 的方式
window.dialogArguments.document.getElementById("jump").onchange();

//调用该方法,刷新主页面
//var parentHref = window.dialogArguments.document.location.href;
//window.dialogArguments.refreshData();

--新框架下面的关于时间的2,1300,1200.09,可以自动产生,分隔符
skysz.utils.toThousandsString()

--改变窗口大小
function adjust(obj){
var div = document.getElementById("gridTab1"); //DIV的大小
var gridTable1 = document.getElementById("gridTable1"); //grid的大小
var w = document.body.clientWidth;
var h = document.body.clientHeight;
div.style.width = w;
div.style.height = h/3;
gridTable1.style.width = w;
gridTable1.style.height = h/3;
}


function tabFit(){
//tabbar.enableAutoReSize(true);
//tabbar.adjustOuterSize();
var tabWidth = checkBill.init.window.getInnerWidth();
var tabHeight = skysz.$("checkBill.init.view.a_tabbar_td").offsetHeight;
checkBill.init.view.tabbar.setSize(tabWidth,tabHeight);
mygrid1.fit();
mygrid2.fit();
mygrid3.fit();
mygrid4.fit();
}

--设置GRID的高度
曾经遇到过一个问题是,怎么设置GRID的高度都不行,
只有往GRID里面填充数据的时候才会使GRID的高度发生变化,
以后遇到类似的问题就可以考虑是不是GRID添加了这一行设置
//oldGrid.enableAutoHeigth(true);

mygrid.setColSorting("int,str,str,rmb,rmb,rmb") //设置排序

//下面为表头双击grid排序
//mygrid.hdr.onclick = new Function("e","sortByDatabase(mygrid,hqlNames,names);");

--监听一个文本框或者什么的都可以
<script type="text/javascript">
ValueListener("accountID",loadOverdraft);
</script>

function ValueListener(controlNameArg, funcArg, timeArg) {
this.controlName = controlNameArg;
this.func = funcArg;
this.controlValue = $F(this.controlName);
this.intervalID = 0;
this.time = timeArg || 200;
this.newValue = function() {
this.controlValue = $F(this.controlName);
};
if (this.intervalID != 0) {
return;
}
var obj = this;
this.intervalID = window.setInterval(function() {
try {
var temp = $F(obj.controlName);
if (temp != obj.controlValue) {
obj.newValue();
obj.func.call(obj);
return;
}
} catch (e) {
window.clearInterval(obj.intervalID);
// skysz.msg.error(e.toJSONString());
}
}, obj.time);
this.stop = function() {
window.clearInterval(this.intervalID);
}
}

//加载可用额度
function loadOverdraft() {
var year = $F("year");
var month = $F("month");
var accntId = $F("accountID");

if( year && month && accntId ) {
var obj;
var u = "${loadOverdraft}";
var p = "accntId=" + accntId +"&year="+year+"&month="+month;
if(window.ActiveXObject){
obj=new ActiveXObject('Microsoft.XMLHTTP');
} else if(window.XMLHttpRequest){
obj=new XMLHttpRequest();
}
obj.open('POST',u,false);
obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
obj.send(p);
var strReturn=obj.responseText;
if( strReturn ) {
$("overdraft").value = strReturn;
}
}
}

这个地方还涉及到一个视图,它的配置.xml都可以借鉴一下
String hql = "from MonthAccountBalance b where b.year= :year and b.month=:month and b.account.accountID = :accountID ";
OdfRecordDaoImpl.java
AddOdfRecord.jsp

--小红*框
<span class="STYLE1">*</span>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值