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.

91 lines
2.9 KiB

<template>
9 months ago
<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 u-row u-col-center" @click="showLocation">
<view class="flex u-row" v-if="isShowEdit">
<view>
<text style="font-size: 35rpx">{{ title }}</text>
9 months ago
<text style="font-size: 45rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
<text v-if="locationCode" style="font-size: 45rpx; color: #3fbaff">&nbsp/&nbsp{{ locationCode }}</text>
9 months ago
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
<image style="width: 45rpx; height: 45rpx; margin: 6rpx 10rpx 0px; display: inline-block" src="/static/icons/icons_edit.svg"></image>
9 months ago
</view>
<view class="" v-else>
<view>
<text style="font-size: 35rpx">{{ title }}</text>
<text style="font-size: 45rpx; color: #3fbaff">&nbsp {{ recommendLocationCode }}</text>
9 months ago
<!-- <text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text> -->
</view>
</view>
<view class="uni-flex uni-row center" style="vertical-align: center" v-if="isDevlement()">
<!-- <text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制</text> -->
<image style="width: 26rpx; height: 26rpx; margin-top: 6rpx" src="/static/icons/icon_copy.svg" alt="" @click.stop="copy" />
</view>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
9 months ago
<script setup lang="ts">
import { ref, getCurrentInstance } from 'vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import config from '@/static/config.js'
9 months ago
const defaultlocationCode = ref('')
const props = defineProps({
title: {
type: String,
default: '需求库位'
},
recommendLocationCode: {
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 copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = props.recommendLocationCode
9 months ago
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制库位成功'
})
}
})
}
const isDevlement = () => {
return config.isDevelopment
}
9 months ago
// 传递给父类
const emit = defineEmits(['getLocation'])
</script>
9 months ago
<style></style>