起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1687|回复: 0

详细页JS代码 无法加载Sqlite 数据库中的数据 求解答

[复制链接]

5

主题

19

帖子

41

积分

新手上路

Rank: 1

积分
41
QQ
发表于 2016-5-2 09:51:49 | 显示全部楼层 |阅读模式
define(function(require){
        var $ = require("jquery");
        var justep = require("$UI/system/lib/justep");
        var Model = function(){
                this.callParent();
        };


        Model.prototype.getDefaultClass = function(type){
         var rows =this.comp("classData").classData.find(["fType"],[type]);
         return rows.length > 0 ? rows[0].val("fClass") : "";
        };
        Model.prototype.okBtnClick = function(event){
                this.owner.send(this.comp("accountData").getCurrentRow());
                this.comp("window").close();

        };



        Model.prototype.accountDataValueChanged = function(event){
                if(event.col=="fType"){
                        event.row.val("fClass",this.getDefaultClass(event.value));
                }
        };
       
        Model.prototype.modelParamsReceive = function(event){
                var data =this.comp("accountData");
                data.clear();
                if(event.params.data.operator =="new"){
                        data.newData({
                                "defaultValues" : [ {
                                        "fID" : justep.UUID.createUUID(),
                                        "fCreateTime" : new Date(),
                                        "fDate" : new Date(),
                                        "fType" : "支出",
                                        "fClass": this.getDefaultClass("支出")
                                } ]
                        });
                }
                        else if (event.params.data.operator=="edit"){
                        data.loadData([event.params.data.rowData]);
                        data.first();
                }
        };



        return Model;
});

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-4-19 23:37 , Processed in 0.061349 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表