|
发表于 2013-10-27 10:46:57
|
显示全部楼层
在从表对应的data的onvaluechanged事件中,加入类似代码:- mainActivity.dataDetailDataChanged = function(event){
- var mainData = justep.xbl('dataPrePay');
- var buyApplyData = justep.xbl('dataDetail');
- var totleAmount = 0;
- var length = buyApplyData.getCount();
- for (var i = 0; i < length; i++) {
- var mID = buyApplyData.getRowId(i);
- if (typeof mID == "undefined") {
- continue;
- }
- var fAmount = buyApplyData.getValue("fltSum", mID);
- fLateFee= buyApplyData.getValue("fltLateFee", mID);
- totleAmount = parseFloat(totleAmount - (-fAmount))-(-fLateFee).toFixed(2);
- }
- mainData.setValue("fltDeposit", totleAmount, mainData.getCurrentRowId());
- };
复制代码 |
评分
-
查看全部评分
|