|
|
@ -1,53 +1,44 @@ |
|
|
|
<template> |
|
|
|
<view class="" style="background-color: #fff;"> |
|
|
|
<u-collapse ref="collapse1" > |
|
|
|
<u-collapse-item :open="true"> |
|
|
|
<template v-slot:title> |
|
|
|
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|
|
|
:isShowStdPack="false"> |
|
|
|
</item-compare-qty> |
|
|
|
</template> |
|
|
|
<view class="" v-for="(item,index) in dataContent.subList" :key="index"> |
|
|
|
<u-swipe-action ref="swipeAction" |
|
|
|
:options="item.scaned?scanOptions:detailOptions" |
|
|
|
style='padding:0px 0px 5px 0px;align-items: center;' |
|
|
|
@click="(...event)=>swipeClick(event,item)"> |
|
|
|
<view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite;"> |
|
|
|
<view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;"> |
|
|
|
推 荐 |
|
|
|
<view class="" style="background-color: #fff"> |
|
|
|
<u-collapse ref="collapse1"> |
|
|
|
<u-collapse-item :open="true"> |
|
|
|
<template v-slot:title> |
|
|
|
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false"> </item-compare-qty> |
|
|
|
</template> |
|
|
|
<view class="" v-for="(item, index) in dataContent.subList" :key="index"> |
|
|
|
<u-swipe-action ref="swipeAction" :options="item.scaned ? scanOptions : detailOptions" style="padding: 0px 0px 5px 0px; align-items: center" @click="(...event) => swipeClick(event, item)"> |
|
|
|
<view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center"> |
|
|
|
<view class="" style="font-size: 32rpx; color: #3c9cff; font-weight: bold; text-align: center; padding: 10px"> |
|
|
|
推<br /> |
|
|
|
荐 |
|
|
|
</view> |
|
|
|
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch ? true:false' :isShowPack='isShowPack'> |
|
|
|
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex: 1" :isShowBatch="item.batch ? true : false" :isShowPack="isShowPack"> </recommend> |
|
|
|
</view> |
|
|
|
<view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;"> |
|
|
|
<view class="" style="font-size: 32rpx; color: red; font-weight: bold; text-align: center;"> |
|
|
|
实 |
|
|
|
<view v-else class="uni-flex" style="flex-direction: row; align-items: center; margin-top: 5rpx" :class="item.scaned ? 'scan_view' : ''"> |
|
|
|
<view class="" style="font-size: 32rpx; color: rgb(107, 196, 78); font-weight: bold; text-align: center; padding: 10px"> |
|
|
|
实<br /> |
|
|
|
际 |
|
|
|
</view> |
|
|
|
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch? true:false' :isShowPack='isShowPack'></recommend> |
|
|
|
|
|
|
|
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex: 1" :isShowBatch="item.batch ? true : false" :isShowPack="isShowPack"> </recommend> |
|
|
|
</view> |
|
|
|
</u-swipe-action> |
|
|
|
</view> |
|
|
|
</u-collapse-item> |
|
|
|
</u-collapse> |
|
|
|
<<recommend-qty-edit ref="recommendQtyEditRef" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :settingParam='settingParam' |
|
|
|
:isShowStatus="isShowStatus"></recommend-qty-edit> |
|
|
|
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' |
|
|
|
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|
|
|
<comMessage ref="message"></comMessage> |
|
|
|
</view> |
|
|
|
</u-swipe-action> |
|
|
|
</view> |
|
|
|
</u-collapse-item> |
|
|
|
</u-collapse> |
|
|
|
<recommend-qty-edit ref="recommendQtyEditRef" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :settingParam="settingParam" :isShowStatus="isShowStatus"></recommend-qty-edit> |
|
|
|
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation="getLocation" :locationAreaTypeList="locationAreaTypeList"></win-scan-location> |
|
|
|
<comMessage ref="message"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import {ref, watch, onMounted, nextTick} from 'vue' |
|
|
|
import { ref, watch, onMounted, nextTick } from 'vue' |
|
|
|
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
|
|
|
import recommend from '@/mycomponents/recommend/recommend.vue' |
|
|
|
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
|
|
|
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue' |
|
|
|
import { |
|
|
|
getDetailOption, |
|
|
|
getPurchaseReceiptOption |
|
|
|
} from '@/common/array.js' |
|
|
|
|
|
|
|
import { getDetailOption, getPurchaseReceiptOption } from '@/common/array.js' |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
dataContent: { |
|
|
@ -81,6 +72,14 @@ const props = defineProps({ |
|
|
|
isShowStatus: { |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
isShowFromLocation: { |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
isShowToLocation: { |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
} |
|
|
|
}) |
|
|
|
const emit = defineEmits(['openDetail', 'remove', 'updateData']) |
|
|
@ -99,30 +98,34 @@ const scanOptions = ref([]) |
|
|
|
|
|
|
|
const recommendQtyEditRef = ref() |
|
|
|
|
|
|
|
watch(() => props.dataContent, (newDataContent, oldDataContent) => { |
|
|
|
if (newDataContent?.subList.length > 0) { |
|
|
|
nextTick(() => { |
|
|
|
setTimeout(() => { |
|
|
|
if (collapse1.value) { |
|
|
|
collapse1.value.init() |
|
|
|
} |
|
|
|
}, 500) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, { immediate: true, deep: true }) |
|
|
|
watch( |
|
|
|
() => props.dataContent, |
|
|
|
(newDataContent, oldDataContent) => { |
|
|
|
if (newDataContent?.subList.length > 0) { |
|
|
|
nextTick(() => { |
|
|
|
setTimeout(() => { |
|
|
|
if (collapse1.value) { |
|
|
|
collapse1.value.init() |
|
|
|
} |
|
|
|
}, 500) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
{ immediate: true, deep: true } |
|
|
|
) |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
if (scanOptions.value.length === 0) { |
|
|
|
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false) |
|
|
|
} |
|
|
|
// showLocation(); |
|
|
|
if(import.meta.env.VITE_MANAGE_MODEL=='BY_PACKAGING'){ |
|
|
|
if (detailOptions.value.length == 0) { |
|
|
|
detailOptions.value = getDetailOption() |
|
|
|
} |
|
|
|
}else { |
|
|
|
scanOptions.value.splice(0,1) |
|
|
|
} |
|
|
|
if (import.meta.env.VITE_MANAGE_MODEL == 'BY_PACKAGING') { |
|
|
|
if (detailOptions.value.length == 0) { |
|
|
|
detailOptions.value = getDetailOption() |
|
|
|
} |
|
|
|
} else { |
|
|
|
scanOptions.value.splice(0, 1) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
const swipeClick = (e, item) => { |
|
|
@ -144,7 +147,7 @@ const swipeClick = (e, item) => { |
|
|
|
const edit = (item) => { |
|
|
|
editItem.value = item |
|
|
|
qtyEdit.value.openEditPopup(item.balance, item.handleQty) |
|
|
|
recommendQtyEditRef.value.openTaskEditPopup(item.qty,item.handleQty,item.labelQty) |
|
|
|
recommendQtyEditRef.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty) |
|
|
|
} |
|
|
|
|
|
|
|
const detail = (item) => { |
|
|
@ -178,8 +181,6 @@ const getLocation = (location, code) => { |
|
|
|
locatonItem.value.toLocationCode = code |
|
|
|
emit('updateData') |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
<style> |
|
|
|
</style> |
|
|
|
<style></style> |
|
|
|