You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.6 KiB
53 lines
1.6 KiB
<template>
|
|
<view class="uni-flex u-col-center" style="padding-top: 15rpx; padding-bottom: 15rpx; padding-left: 10rpx; padding-right: 10rpx; font-size: 32rpx">
|
|
<view class="uni-flex uni-row u-col-center" @click="showLocation">
|
|
<view style="font-size: 30rpx">
|
|
{{ title }}
|
|
<!-- <text style="font-size: 35rpx;">{{title}}  {{locationCode}} </text> -->
|
|
<text style="font-size: 25rpx; color: #3fbaff" v-if="locationCode == '' && isShowEdit == true">  请扫描</text>
|
|
<text style="font-size: 25rpx; color: #3fbaff">  {{ locationCode }}</text>
|
|
</view>
|
|
<image v-if="isShowEdit" style="width: 30rpx; height: 30rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
|
|
</view>
|
|
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
|
|
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
default: '需求库位'
|
|
},
|
|
locationCode: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
isShowEdit: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
locationAreaTypeList: {
|
|
type: Array,
|
|
default: null
|
|
}
|
|
})
|
|
const scanLocationCode = ref()
|
|
const showLocation = () => {
|
|
if (props.isShowEdit) {
|
|
scanLocationCode.value.openScanPopup()
|
|
}
|
|
}
|
|
// 扫描源库位
|
|
const getLocation = (location, code) => {
|
|
emit('getLocation', location, code)
|
|
}
|
|
|
|
// 传递给父类
|
|
const emit = defineEmits(['getLocation'])
|
|
</script>
|
|
|
|
<style></style>
|
|
|