zhang_li
3 months ago
4 changed files with 123 additions and 7 deletions
@ -1,11 +1,11 @@ |
|||||
VITE_BASE_URL=http://localhost:12080/admin-api |
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api |
||||
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api |
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api |
||||
|
|
||||
# 租户配置 |
# 租户配置 |
||||
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
VITE_TENANT='[{"text":"长春","value":1}]' |
||||
|
|
||||
# 是否是测试环境 |
# 是否是测试环境 |
||||
VITE_isDevelopment=true |
VITE_isDevelopment=false |
||||
|
|
||||
# 积木报表请求路径 |
# 积木报表请求路径 |
||||
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' |
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
||||
|
@ -0,0 +1,105 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<u-popup v-model="show" mode="bottom" :mask-close-able="false"> |
||||
|
<view class="popup_box"> |
||||
|
<view class="pop_title uni-flex space-between"> |
||||
|
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> |
||||
|
|
||||
|
<view class=""> |
||||
|
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class=""> |
||||
|
<view class=""> |
||||
|
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType" :isShowHistory="isShowHistory" :clearResult="true"></win-com-scan> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
<!-- 模拟扫描功能 --> |
||||
|
<win-com-scan v-show="false" ref="comscansimulate" @getResult="getScanResult" :headerType="headerType" :isShowHistory="false" :clearResult="true"></win-com-scan> |
||||
|
<com-message ref="comMessageRef" /> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' |
||||
|
import winComScan from '@/mycomponents/scan/winComScan.vue' |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: '箱标签' |
||||
|
}, |
||||
|
isShowHistory: { |
||||
|
type: Boolean, |
||||
|
default: true |
||||
|
}, |
||||
|
headerType: { |
||||
|
type: String, |
||||
|
default: 'HPQ' |
||||
|
} |
||||
|
}) |
||||
|
const show = ref(false) |
||||
|
const comscansimulate = ref() |
||||
|
const comscan = ref() |
||||
|
const comMessageRef = ref() |
||||
|
const simulateScan = (item) => { |
||||
|
comscansimulate.value.setItemCodeSimulate(item.copyContent) |
||||
|
comscansimulate.value.clickScanMsg() |
||||
|
} |
||||
|
const openScanPopup = () => { |
||||
|
setTimeout((res) => { |
||||
|
show.value = true |
||||
|
}, 200) |
||||
|
} |
||||
|
|
||||
|
const closeScanPopup = () => { |
||||
|
show.value = false |
||||
|
emit('close', '') |
||||
|
} |
||||
|
|
||||
|
const scanClick = () => { |
||||
|
if (comscan.value) { |
||||
|
comscan.value.clickScanMsg() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const cancelClick = () => { |
||||
|
if (comscan.value) { |
||||
|
comscan.value.clearScanValue() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const getScanResult = (result) => { |
||||
|
if (result.success) { |
||||
|
emit('getResult', result) |
||||
|
} else { |
||||
|
showMessage(result.message) |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const getfocus = () => { |
||||
|
if (comscan.value != undefined) { |
||||
|
comscan.value.getfocus() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const losefocus = () => { |
||||
|
if (comscan.value != undefined) { |
||||
|
comscan.value.losefocus() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
const showMessage = (message) => { |
||||
|
comMessageRef.value.showMessage(message) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.scroll-view { |
||||
|
overflow-y: scroll; |
||||
|
height: auto; |
||||
|
max-height: 300rpx; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue