小小儁爺
2026-01-06 22fd33c839969a5c14de0d994701876407385d7f
pages/sbgl/wxsq.vue
@@ -54,6 +54,9 @@
         </div>
      </view>
      <scan-code></scan-code>
   </view>
</template>
@@ -62,8 +65,20 @@
   import {
      EqpPermissions
   } from '../../config/api.js';
   import scanCode from '@/components/scan-code/scan-code.vue'
   export default {
      onLoad(option) {},
      components: {
         scanCode
      },
      onLoad(option) {
         const _this = this
         uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器
         uni.$on('scancodedate', function(content) {
            console.log("扫描到的内容为:", content)
            _this.changeInputBoxValue(content)
         })
      },
      onPullDownRefresh() {
         setTimeout(() => {
@@ -101,6 +116,8 @@
            uni.stopPullDownRefresh();
         },
         changeInputBoxValue(val) {
            this.inputBoxValue = val
            this.purchorderArr = this.purchorderArrAll.filter((p) => {
               return p.code.indexOf(val) !== -1
            })