Dict.CN 在线词典, 英语学习, 在线翻译 ------------- MyGitee 朱秋贵内科诊所 My腾云code

Ext.store.load callback

var paramsReceivable = {};
                paramsReceivable.querytext = Ext.getCmp('hiddquerytext').getValue();
                gridReceivable.store.load({
                    params: paramsReceivable,
                    callback: function (r, options, success) {
                        var heji = 0;
                        for (var i = 0; i < r.length; i++) {
                            var record = r[i];
                            heji += record.data.heji;
                        }
                        Ext.getCmp('lblheji').setText(heji);


                        //Math.round(heji)//四舍五入
                        //Math.floor(heji)//取整数
                        Ext.getCmp('lblheji').setText("¥"+heji.toFixed(2));
                }
                });

posted @ 2022-04-06 17:08  cn2024  阅读(50)  评论(0编辑  收藏  举报