| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view class="container">
-
- <!-- 底部扫码输入框 -->
- <view class="fixed-bottom pad-20" style="background: #ffffff;">
- <u-search placeholder="请输入快递单号/订单编号" :searchIconSize="24" bgColor="#f6f7f6"
- @search="orderQuery" v-model="query.search" custom-style="font-size:32rpx"
- placeholder-style="font-size:32rpx" :clearabled="true" :focus="false" :showAction="false"
- :height="42"></u-search>
- <u-icon name="scan" size="34" color="#19be6b" @click="openScan"></u-icon>
- </view>
- </view>
- </template>
- <script setup>
- import {
- reactive,
- ref
- } from 'vue'
- import { onLoad, onShow, onUnload } from '@dcloudio/uni-app'
- const query = reactive({
- searchType: 2,
- search: ''
- })
- //订单查询 /app/stock/findOrder
- const orderQuery = () => {
- if (!query.search) {
- uni.$u.toast('请输入快递单号/订单编号')
- return
- }
- uni.redirectTo({
- url: `/pages/index/wms/order-query-list?id=${query.search}`
- })
- }
- function openScan() {
- uni.scanCode({
- success: (res) => {
- query.search = res.result
- orderQuery()
- }
- })
- }
- onLoad(() => {
- // #ifdef APP-PLUS
- uni.$u.useGlobalEvent((e) => {
- if (e.barcode) {
- query.search = e.barcode
- orderQuery()
- }
- })
- // #endif
- })
- onShow(() => {
- uni.$u.updateActivePageOnShow()
- })
- onUnload(() => {
- uni.$u.cleanupOnPageUnload();
- });
- </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>
|