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

QQ登录

只需一步,快速开始

查看: 1544|回复: 1

[处理中3] app一直报错telChange is not defined 代码贴下面了

[复制链接]

3

主题

14

帖子

23

积分

新手上路

Rank: 1

积分
23
QQ
发表于 2018-7-18 09:13:43 | 显示全部楼层 |阅读模式
这是源码部分        <input component="$UI/system/components/justep/input/input" class="form-control" xid="tel" oninput="telChange"/>

这事js部分              Model.prototype.telChange = function(event){
                var me = this;
                var mobilephone = $.trim(me.comp('tel').val());
                console.log("mobilephone:"+mobilephone);
                event.async = true;
                var db = DB.getDatabase();
               
                // 执行SQL查询:先查询数据库,确认是否存在改数据。
                var selectSql = "select stid,StockPiciNo,EmName,TiaoMaNum,BoxNo,BxTmpS,xflag,BoxTiaoM,BNumber,JIZhuangNo from T_ScanMainChild where BoxTiaoM = "+mobilephone+";";
                SqliteUtil.executeSql(db, selectSql, null, onSuccess_select, onError);
                //查找fID中包含"E"或者"e"的第一条数据
                function onSuccess_select(res){
                        // 转换返回数据结果
                        var table = SqliteUtil.rowsToTable(res.rows);
                        if(table.rows.length > 0){
                                if(table.rows[0].xflag == 0){
                                        // 执行SQL更新:存在该数据,然后更新该数据的状态值。
                                        var updataSql = "update T_ScanMainChild set xflag=1 where xflag=0 and BoxTiaoM = "+mobilephone+";";
                                        SqliteUtil.executeSql(db, updataSql, null, onSuccess_update, onError);
                                } else {
                                justep.Util.hint("该箱子已经扫描过了!", {
                                    "tyep" : "info",
                                    "delay" : 1500,
                                    "position" : "top",
                                    "style" : "background-image : -webkit-linear-gradient(top, #FFFFFF 0, #FFFFFF 50%);text-align: center;font-size: 17px;width:200px;"
                                });
                                }
                        } else {
                                justep.Util.hint("该箱子,不存在装货清单中!", {
                                    "tyep" : "info",
                                    "delay" : 1500,
                                    "position" : "top",
                                    "style" : "background-image : -webkit-linear-gradient(top, #FFFFFF 0, #FFFFFF 50%);text-align: center;font-size: 17px;width:200px;"
                                });
                        }
                }
                function onSuccess_update(res){
                        justep.Util.hint("扫描成功!", {
                            "tyep" : "success",
                            "delay" : 1000,
                            "position" : "top",
                            "style" : "background-image : -webkit-linear-gradient(top, #FFFFFF 0, #FFB90F 50%);text-align: center;font-size: 17px;width:230px;"
                        });

                        var aa=$(me.getElementByXid("numberCount1")).text();
                        var bb=$(me.getElementByXid("numberCount1")).text(parseInt(aa)+1);
                        var cc=$(me.getElementByXid("tel")).val();
                        var dd=$(me.getElementByXid("tel")).val("");
               
                }

                //失败
                function onError(msg) {
                        console.log("失败",msg);
                }
        };
       

复制代码
发表于 2018-7-18 10:51:31 | 显示全部楼层
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 03:28 , Processed in 0.059906 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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