Browse Source

修改备货任务扫描其他批次选不中 2024/7/4 19:18:30

hella_vue3
zhang_li 3 months ago
parent
commit
9dbe73d0b5
  1. 62
      src/mycomponents/balance/balanceSelect.vue
  2. 2
      src/mycomponents/scan/winScanPackAndLocation.vue
  3. 2
      src/pages/deliver/coms/comScanDeliverPack.vue
  4. 8
      src/pages/productionReturn/coms/comScanReturnPack.vue
  5. 1
      src/pages/repleinsh/record/directRepleinshRecord.vue
  6. 10
      src/pages/stockUp/coms/comScanStockUpPack.vue

62
src/mycomponents/balance/balanceSelect.vue

@ -1,41 +1,37 @@
<!--发料任务卡片-->
<template>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<u-popup v-model='show' mode='center'>
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;">
<item :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;"
v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)">
<balance :dataContent="item"></balance>
</view>
</scroll-view>
</u-popup>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<u-popup v-model="show" mode="center">
<scroll-view scroll-y="true" style="background-color: #eeeeee; height: 90vh">
<item style="margin: 10rpx" :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw; margin: 20rpx 20rpx 30rpx 20rpx" v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)">
<balance :dataContent="item" :isShowStatus="false"></balance>
</view>
</scroll-view>
</u-popup>
</template>
<script setup lang="ts">
import {
ref,
getCurrentInstance,
} from 'vue'
import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue'
const balanceItems = ref([])
const openPopup = (items) => {
if(Array.isArray(items)){
balanceItems.value= items;
}else{
balanceItems.value = [items];
}
show.value = true
}
import { ref, getCurrentInstance } from 'vue'
import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue'
const callback = (item) => {
emit("onSelectItem", item);
show.value = false
}
const emit = defineEmits(['onSelectItem'])
defineExpose({openPopup})
const balanceItems = ref([])
const openPopup = (items) => {
if (Array.isArray(items)) {
balanceItems.value = items
} else {
balanceItems.value = [items]
}
show.value = true
}
const callback = (item) => {
emit('onSelectItem', item)
show.value = false
}
const emit = defineEmits(['onSelectItem'])
defineExpose({ openPopup })
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

2
src/mycomponents/scan/winScanPackAndLocation.vue

@ -128,7 +128,7 @@ const openScanPopupForType = (fromLocationCodeParams, businessTypeParams) => {
}
fromInventoryStatuses.value = getDirectoryItemArray(businessType.value.outInventoryStatuses)
inventoryStatus.value = getDirectoryItemArray(businessType.value.outInventoryStatuses) //
fromLocationAreaTypeList.value = getDirectoryItemArray(businessType.value.fromLocationAreaTypeList) //
fromLocationAreaTypeList.value = getDirectoryItemArray(businessType.value.outAreaTypes) //
if (!show.value) {
setTimeout((res) => {
show.value = true

2
src/pages/deliver/coms/comScanDeliverPack.vue

@ -263,7 +263,7 @@ const afterGetBalance = (label, balance, packageInfo) => {
getfocus()
})
}
} else if (jobContent.value.AllowModifyBatch == null) {
} else if (jobContent.value.allowModifyBatch == 'TRUE') {
showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发货明细,是否要继续发货?`, (res) => {
if (res) {
const batch = createBatchInfo(label, balance, packageInfo)

8
src/pages/productionReturn/coms/comScanReturnPack.vue

@ -238,10 +238,10 @@ const afterGetBalance = (label, balance, packageInfo) => {
getfocus()
})
}
} else if (jobContent.value.AllowModifyBatch == null) {
} else if (jobContent.value.allowModifyBatch == "TRUE") {
showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发料明细,是否要继续发料?`, (res) => {
if (res) {
const batch = createBatchInfo(label, balance)
const batch = createBatchInfo(label, balance,packageInfo))
fromLocation.Batchs.unshift(batch)
}
})
@ -261,7 +261,7 @@ const afterGetBalance = (label, balance, packageInfo) => {
})
}
}
const createBatchInfo = (data, balance) => {
const createBatchInfo = (data, balance,packageInfo) => {
const batch = {
batch: data.batch,
qty: 0,
@ -269,7 +269,7 @@ const createBatchInfo = (data, balance) => {
handleQty: Number(data.qty),
Records: []
}
const record = creatRecord(data, balance)
const record = creatRecord(data, balance,packageInfo)
batch.Records.push(record)
issueRecord.value.unshift(record)
return batch

1
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -96,7 +96,6 @@ onLoad((option) => {
getBusinessType(businessTypeCode.value, (res) => {
if (res.success) {
businessType.value = res.businessType
res.fromLocationAreaTypeList.push('INSPECT', 'SUPPER')
fromLocationAreaTypeList.value = res.fromLocationAreaTypeList
toLocationAreaTypeList.value = res.toLocationAreaTypeList
showFromLocationPopup()

10
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -218,12 +218,12 @@ const onScan = (result) => {
showBalanceSelect(balanceRes.data.list, packageInfo)
}
} else {
showErrorMessage(balanceRes.message.message)
showErrorMessage(balanceRes.message)
}
uni.hideLoading()
})
} catch (e) {
showErrorMessage(e.stack)
} catch (error) {
showErrorMessage(error)
uni.hideLoading()
}
}
@ -270,7 +270,7 @@ const afterGetBalance = (label, balance, packageInfo) => {
getfocus()
})
}
} else if (jobContent.value.AllowModifyBatch == null) {
} else if (jobContent.value.allowModifyBatch == 'TRUE') {
showQuestionMessage(`在【${fromLocationCode.value}】库位下,未查找到批次【${lot}】的发货明细,是否要继续发货?`, (res) => {
if (res) {
const batch = createBatchInfo(label, balance, packageInfo)
@ -295,7 +295,7 @@ const afterGetBalance = (label, balance, packageInfo) => {
}
const createBatchInfo = (data, balance, packageInfo) => {
const batch = {
batch: data.lot,
batch: data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),

Loading…
Cancel
Save