|
@@ -13,7 +13,7 @@
|
|
|
<van-icon name="list-switch" size="20" @click="onClickRight" />
|
|
<van-icon name="list-switch" size="20" @click="onClickRight" />
|
|
|
</template>
|
|
</template>
|
|
|
</van-nav-bar>
|
|
</van-nav-bar>
|
|
|
- <van-pull-refresh v-model="loading" @refresh="onRefresh" style="min-height: 93.1vh;">
|
|
|
|
|
|
|
+<!-- <van-pull-refresh v-model="loading" @refresh="onRefresh" style="min-height: 93.1vh;">-->
|
|
|
<div v-if="locationList.length>0">
|
|
<div v-if="locationList.length>0">
|
|
|
<div class="code">
|
|
<div class="code">
|
|
|
<div class="code-title">
|
|
<div class="code-title">
|
|
@@ -24,19 +24,20 @@
|
|
|
<van-field class="code-input"
|
|
<van-field class="code-input"
|
|
|
v-model="containerNo"
|
|
v-model="containerNo"
|
|
|
readonly
|
|
readonly
|
|
|
- @click="onContainerNo(containerNo===''?2:scanType,selectTask)"
|
|
|
|
|
|
|
+ @click="onContainerNo(containerNo===''?2:scanType)"
|
|
|
placeholder="拣货容器号" >
|
|
placeholder="拣货容器号" >
|
|
|
<template #button>
|
|
<template #button>
|
|
|
- <van-button size="mini" type="primary" v-if="containerNo===''" plain @click="onContainerNo(2,selectTask)" >设置拣货容器</van-button>
|
|
|
|
|
- <van-button size="mini" type="primary" v-else plain @click="onContainerNo(scanType,selectTask)" >更换拣货容器</van-button>
|
|
|
|
|
|
|
+ <van-button size="mini" type="primary" v-if="containerNo===''" plain @click="onContainerNo(2)" >设置拣货容器</van-button>
|
|
|
|
|
+ <van-button size="mini" type="primary" v-else plain @click="onContainerNo(scanType)" >更换拣货容器</van-button>
|
|
|
</template>
|
|
</template>
|
|
|
</van-field>
|
|
</van-field>
|
|
|
</div>
|
|
</div>
|
|
|
<van-row class="list">
|
|
<van-row class="list">
|
|
|
<van-col span="7">
|
|
<van-col span="7">
|
|
|
<div class="left">
|
|
<div class="left">
|
|
|
- <div class="item " :class="index==activeIndex?'active':allPicking(location)"
|
|
|
|
|
|
|
+ <div class="item" ref="itemRefs" :class="index==activeIndex?'active':allPicking(location)"
|
|
|
v-for="(location,index) in locationList"
|
|
v-for="(location,index) in locationList"
|
|
|
|
|
+ :key="index"
|
|
|
@click="onLocation(index)">
|
|
@click="onLocation(index)">
|
|
|
{{ location.location }}
|
|
{{ location.location }}
|
|
|
</div>
|
|
</div>
|
|
@@ -83,7 +84,7 @@
|
|
|
description="暂无拣货数据"
|
|
description="暂无拣货数据"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- </van-pull-refresh>
|
|
|
|
|
|
|
+<!-- </van-pull-refresh>-->
|
|
|
<van-action-sheet
|
|
<van-action-sheet
|
|
|
v-model:show="modeTrueFalseBy"
|
|
v-model:show="modeTrueFalseBy"
|
|
|
:actions="actions"
|
|
:actions="actions"
|
|
@@ -92,15 +93,15 @@
|
|
|
@select="onSelectMode"
|
|
@select="onSelectMode"
|
|
|
/>
|
|
/>
|
|
|
<!-- 拣货容器号-->
|
|
<!-- 拣货容器号-->
|
|
|
- <container-no-input ref="containerNoInputRef" @setContainer="setContainer" />
|
|
|
|
|
|
|
+ <container-no-input ref="containerNoInputRef" @setContainer="setContainer" :selectTask="selectTask" />
|
|
|
<!-- 拣货任务号-->
|
|
<!-- 拣货任务号-->
|
|
|
<picking-no-input ref="pickingNoInputRef" @loadData="loadData" />
|
|
<picking-no-input ref="pickingNoInputRef" @loadData="loadData" />
|
|
|
- <van-floating-bubble v-if="locationList.length>0" gap="50" axis="xy" magnetic="x" @click="onContainerNo(containerNo===''?2:scanType,selectTask)">容器</van-floating-bubble>
|
|
|
|
|
|
|
+ <van-floating-bubble v-if="locationList.length>0" gap="50" axis="xy" magnetic="x" @click="onContainerNo(containerNo===''?2:scanType)">容器</van-floating-bubble>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue'
|
|
|
|
|
|
|
+import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
|
import { showDialog, showToast } from 'vant'
|
|
import { showDialog, showToast } from 'vant'
|
|
|
import { fetchPickingData, getPickingTask } from '@/views/outbound/picking/list/hooks/list'
|
|
import { fetchPickingData, getPickingTask } from '@/views/outbound/picking/list/hooks/list'
|
|
|
import { getOwnerList } from '@/hooks/basic'
|
|
import { getOwnerList } from '@/hooks/basic'
|
|
@@ -156,9 +157,9 @@ const scanBarcode=ref('')
|
|
|
const taskItem=ref([])
|
|
const taskItem=ref([])
|
|
|
// 切换容器号
|
|
// 切换容器号
|
|
|
const containerNoInputRef=ref(null)
|
|
const containerNoInputRef=ref(null)
|
|
|
-const onContainerNo=(type,task)=>{
|
|
|
|
|
|
|
+const onContainerNo=(type)=>{
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
|
- containerNoInputRef.value?.show(containerNo.value,type,task)
|
|
|
|
|
|
|
+ containerNoInputRef.value?.show(containerNo.value,type)
|
|
|
},500)
|
|
},500)
|
|
|
}
|
|
}
|
|
|
const allQuantity=ref(0)
|
|
const allQuantity=ref(0)
|
|
@@ -175,7 +176,11 @@ const loadData = async (pickingCode) => {
|
|
|
// 对数组进行分组
|
|
// 对数组进行分组
|
|
|
taskMap.value = {}
|
|
taskMap.value = {}
|
|
|
taskItem.value.forEach(item => {
|
|
taskItem.value.forEach(item => {
|
|
|
- item.count=''
|
|
|
|
|
|
|
+ if(item.operationTime){
|
|
|
|
|
+ item.count=item.quantity
|
|
|
|
|
+ }else{
|
|
|
|
|
+ item.count=''
|
|
|
|
|
+ }
|
|
|
const { location } = item
|
|
const { location } = item
|
|
|
// 使用对象的简写形式初始化分组
|
|
// 使用对象的简写形式初始化分组
|
|
|
if (!taskMap.value[location]) {
|
|
if (!taskMap.value[location]) {
|
|
@@ -266,7 +271,21 @@ const onLocation = (index) => {
|
|
|
onScan(2)
|
|
onScan(2)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-//扫描监听
|
|
|
|
|
|
|
+const itemRefs = ref([]);
|
|
|
|
|
+// 监听 activeIndex 变化,滚动到指定位置
|
|
|
|
|
+watch(activeIndex, (newIndex) => {
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ const item = itemRefs.value[newIndex];
|
|
|
|
|
+ if (item) {
|
|
|
|
|
+ item.scrollIntoView({
|
|
|
|
|
+ behavior: 'smooth', // 平滑滚动
|
|
|
|
|
+ block: 'start', // 滚动到顶部 nearest center
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+//设置扫描类型 1容器、2库位、3条码
|
|
|
const onScan = (type) => {
|
|
const onScan = (type) => {
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
scanType.value = type
|
|
scanType.value = type
|