zhaohuanhuan пре 8 месеци
родитељ
комит
48ea9e7c21
2 измењених фајлова са 18 додато и 7 уклоњено
  1. 11 5
      src/views/transfer/move/down/index.vue
  2. 7 2
      src/views/transfer/move/list/index.vue

+ 11 - 5
src/views/transfer/move/down/index.vue

@@ -14,6 +14,7 @@
           </van-nav-bar>
           </van-nav-bar>
         </div>
         </div>
         <div class="content">
         <div class="content">
+          <div ref="topRef">
           <div class="take-delivery">
           <div class="take-delivery">
             <div class="take-info">
             <div class="take-info">
               <div class="take-info-no">
               <div class="take-info-no">
@@ -102,9 +103,9 @@
               <div class="button-text"  @click="onConfirm">下架</div>
               <div class="button-text"  @click="onConfirm">下架</div>
             </div>
             </div>
           </div>
           </div>
-          <van-divider :style="{ color: '#333', borderColor: '#1989fa', padding: '0 16px',margin:'5px 0' }">待移出列表
-          </van-divider>
-          <div class="move-stock-list">
+          <van-divider :style="{ color: '#333', borderColor: '#1989fa', padding: '0 16px',margin:'5px 0' }">待移出列表</van-divider>
+          </div>
+          <div class="move-stock-list"  :style="{ 'max-height': computedMaxHeight }">
             <table class="task-table">
             <table class="task-table">
               <thead>
               <thead>
               <tr>
               <tr>
@@ -174,12 +175,18 @@ try {
   androidFocus()
   androidFocus()
 } catch (error) {
 } catch (error) {
 }
 }
+const topRef=ref(null)
+const topHeight=ref(200)
 // 页面初始化
 // 页面初始化
 onMounted(() => {
 onMounted(() => {
   openListener()
   openListener()
   scanInit(_handlerScan)
   scanInit(_handlerScan)
   loadData()
   loadData()
+  topHeight.value=topRef.value?.offsetHeight+96
 })
 })
+const computedMaxHeight = computed(() => {
+  return `calc(100vh - ${topHeight.value}px)`;
+});
 const router = useRouter()
 const router = useRouter()
 const storeUser = useStore()
 const storeUser = useStore()
 const route = useRoute()
 const route = useRoute()
@@ -257,7 +264,6 @@ const _handlerScan = async (code) => {
   }
   }
 }
 }
 const onConfirm=()=>{
 const onConfirm=()=>{
-  console.log(1111)
   if(!activeBarcode.value.id ){
   if(!activeBarcode.value.id ){
     scanError()
     scanError()
     tips.value='请扫描商品条码'
     tips.value='请扫描商品条码'
@@ -453,7 +459,7 @@ window.onRefresh = loadData
         .move-stock-list
         .move-stock-list
           width: 100%
           width: 100%
           overflow-y: auto
           overflow-y: auto
-          max-height: 47vh
+          //max-height: 47vh
           min-height: 100px
           min-height: 100px
 
 
           .move-button
           .move-button

+ 7 - 2
src/views/transfer/move/list/index.vue

@@ -14,7 +14,7 @@
           </van-nav-bar>
           </van-nav-bar>
         </div>
         </div>
         <div class="content">
         <div class="content">
-          <van-pull-refresh v-model="loading" @refresh="onRefresh" style="min-height: 85vh;">
+          <van-pull-refresh v-model="loading" @refresh="onRefresh" :style="{ 'max-height': computedMaxHeight,'min-height':computedMaxHeight ,'overflow':'auto'}" >
             <table border="1" style="width: 100%;border-collapse: collapse;text-align: center;table-layout: fixed;" >
             <table border="1" style="width: 100%;border-collapse: collapse;text-align: center;table-layout: fixed;" >
               <thead>
               <thead>
               <tr>
               <tr>
@@ -62,7 +62,7 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { ref } from 'vue'
+import { computed, onMounted, ref } from 'vue'
 import { getHeader, goBack, scanError } from '@/utils/android'
 import { getHeader, goBack, scanError } from '@/utils/android'
 import { useStore } from '@/store/modules/user'
 import { useStore } from '@/store/modules/user'
 import { getMoveTaskList } from '@/api/transferMove/index'
 import { getMoveTaskList } from '@/api/transferMove/index'
@@ -72,12 +72,17 @@ import { closeLoading, showLoading } from '@/utils/loading'
 import { useRouter } from 'vue-router'
 import { useRouter } from 'vue-router'
 import { toMap } from '@/utils/dataType.js'
 import { toMap } from '@/utils/dataType.js'
 import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
 import InputBarcode from '@/views/outbound/picking/components/InputBarcode.vue'
+import { openListener, scanInit } from '@/utils/keydownListener.js'
 const router = useRouter()
 const router = useRouter()
 try {
 try {
   getHeader()
   getHeader()
 }catch (error) {
 }catch (error) {
   router.push('/login')
   router.push('/login')
 }
 }
+const topHeight=ref(96)
+const computedMaxHeight = computed(() => {
+  return `calc(100vh - ${topHeight.value}px)`;
+});
 const storeUser = useStore()
 const storeUser = useStore()
 const warehouse = storeUser.warehouse
 const warehouse = storeUser.warehouse
 //任务列表
 //任务列表