wtt
2025-10-30 c219c2c41488d1dc1d48032df57e16bd1582eff8
修正扫码光标未对准bug
5个文件已修改
42 ■■■■■ 已修改文件
.hbuilderx/launch.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigourukujiaoyan/form.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shengchanlingliao/form.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/common.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.hbuilderx/launch.json
@@ -21,11 +21,11 @@
            "type" : "uni-app:app-ios"
        },
        {
            "customPlaygroundType" : "local",
            "customPlaygroundType" : "device",
            "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
            "openVueDevtools" : true,
            "packageName" : "com.shebeiguanli.www",
            "playground" : "custom",
            "playground" : "standard",
            "type" : "uni-app:app-android"
        }
    ]
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "2.0.7",
    "versionCode" : 207,
    "versionName" : "2.0.9",
    "versionCode" : 209,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages/caigourukujiaoyan/form.vue
@@ -4,7 +4,7 @@
            <view class="form-item">
                <view class="title">条码:</view>
                <view class="right">
                    <input v-model="hform.HBarCode" :focus="HBarCodeFocus" placeholder="请扫描(或输入)条码" @blur="getCode(hform.HBarCode)" @input="handleInput" />
                    <input  v-model="hform.HBarCode" :focus="HBarCodeFocus" placeholder="请扫描(或输入)条码" @blur="getCode(hform.HBarCode)"  />
                </view>
                <uni-icons type="scan"
                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
@@ -271,8 +271,13 @@
            async refreshHBarCodeFocus() {
                this.HBarCodeFocus = false
                this.hform.HBarCode = ''
                await this.$nextTick()
                this.HBarCodeFocus = true
                // this.$nextTick(() => {
                //     this.HBarCodeFocus = true
                // })
                setTimeout(() => {
                  this.HBarCodeFocus = true;
                }, 300);
            },
            //扫码
            toScanCode() {
@@ -723,17 +728,19 @@
                            }
                            //显示表体明细
                            this.DisBillEntryList()
                            this.refreshHBarCodeFocus()
                            //清空数量
                            this.hform.HQty = ''
                        } else {
                            CommonUtils.playSound(0);
                            this.refreshHBarCodeFocus()
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
            
                        this.refreshHBarCodeFocus()
            
                    } catch (e) {
                        CommonUtils.playSound(0)
pages/shengchanlingliao/form.vue
@@ -354,9 +354,13 @@
            },
            async refreshHBarCodeFocus() {
                this.HBarCodeFocus = false
                await this.$nextTick()
                this.hform.HBarCode = ''
                this.HBarCodeFocus = true
                // await this.$nextTick(() => {
                //     this.HBarCodeFocus = true
                // })
                setTimeout(() => {
                  this.HBarCodeFocus = true;
                }, 300);
            },
            async refreshHBillNoFocus() {
                this.HBillNoFocus = false
@@ -803,17 +807,19 @@
                            }
                            //显示表体明细
                            this.DisBillEntryList()
                            this.refreshHBarCodeFocus()
                            //清空数量
                            this.hform.HQty = ''
                        } else {
                            CommonUtils.playSound(0);
                            this.refreshHBarCodeFocus()
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                        }
                        this.refreshHBarCodeFocus()
                    } catch (e) {
                        CommonUtils.playSound(0)
utils/common.js
@@ -312,10 +312,9 @@
        method,
    }) {
        if (this.requestLock) {
            console.warn("该请求被锁定,不能重复请求!!!")
            console.log("该请求被锁定,不能重复请求!!!")
            return
        }
        this.requestLock = true
        return new Promise((resolve, reject) => {
            // that = that || this;
@@ -386,14 +385,14 @@
        innerAudioContext.play(); // 播放音频
        innerAudioContext.onPlay(() => {
            console.log('开始播放');
            //console.log('开始播放');
        });
        innerAudioContext.onError((res) => {
            console.log(res.errMsg);
            console.log(res.errCode);
        });
        innerAudioContext.onPause(function() {
            console.log('播放出现错误,销毁');
            //console.log('播放暂停,销毁');
            innerAudioContext.destroy();
        })
    }