| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <view class="container">
- <!-- 底部扫码输入框 -->
- <view class="fixed-bottom pad-20" style="background: #ffffff;">
- <u-search placeholder="请输入库位编号" :searchIconSize="24" bgColor="#f6f7f6" @search="onSearch"
- v-model="positionCode" :clearabled="true" :focus="false" :showAction="false" :height="42"></u-search>
- <u-icon name="scan" size="32" color="#19be6b" @click="openScan"></u-icon>
- </view>
- </view>
- </template>
- <script setup>
- import {
- ref
- } from 'vue'
- import {
- onLoad,
- onShow
- } from '@dcloudio/uni-app'
- const positionCode = ref('')
- const onSearch = () => {
- if (positionCode.value) {
- uni.navigateTo({
- url: '/pages/index/wms/location-order-list?positionCode=' + positionCode.value
- })
- } else {
- uni.$u.toast('请输入库位编号')
- }
- }
- function openScan() {
- uni.scanCode({
- success: (res) => {
- positionCode.value = res.result
- onSearch()
- }
- })
- }
- onLoad(() => {
- // #ifdef APP-PLUS
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- positionCode.value = e.barcode
- onSearch()
- }
- })
- // #endif
- })
- onShow(() => {
- uni.$u.updateActivePageOnShow()
- })
- </script>
- <style lang="scss" scoped>
- .header {
- display: flex;
- justify-content: space-between;
- padding: 20rpx 30rpx;
- background-color: #ffffff;
- }
- .status {
- color: green;
- }
- .log-item {
- display: flex;
- justify-content: space-between;
- padding: 20rpx 30rpx;
- border-bottom: 1px solid #e0e0e0;
- }
- </style>
|