From c0ee72332ac9ab98ca73eab8c049b05bb1bcd67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com> Date: Fri, 25 Oct 2024 13:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E9=A2=84=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E4=B8=8A=E6=9E=B6=E5=8A=9F=E8=83=BD=202024/8/2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/array.js | 18 ++++- src/common/record.js | 11 +-- .../record/recordComDetailCard.vue | 25 +++++-- src/mycomponents/scan/winScanPackage.vue | 14 +++- .../record/productPutawayRecord.vue | 74 ++++++++++++++----- 5 files changed, 109 insertions(+), 33 deletions(-) diff --git a/src/common/array.js b/src/common/array.js index ed1cf95d..27a339c0 100644 --- a/src/common/array.js +++ b/src/common/array.js @@ -277,7 +277,23 @@ export function getEditRemoveOption() { return option_edit_remove; } - +//详情编辑移除 +export function getEditLocationRemoveOption() { + let option_edit_remove = [{ + text: '修改\n库位', + style: { + backgroundColor: '#F1A532' + } + }, + { + text: '移除', + style: { + backgroundColor: '#F56C6C' + } + } + ]; + return option_edit_remove; +} // 库存状态字典项 export function getInventoryStatusArray() { let array = [{ diff --git a/src/common/record.js b/src/common/record.js index 4bd90e91..08fb2061 100644 --- a/src/common/record.js +++ b/src/common/record.js @@ -7,9 +7,9 @@ import { } from '@/common/directory.js'; import { calc } from '@/common/calc' import { Decimal } from 'decimal.js';//引入 - import { - deepCopyData - } from '@/common/basic.js'; +import { + deepCopyData +} from '@/common/basic.js'; export function createItemInfo(balance, pack) { let item = { @@ -18,10 +18,11 @@ export function createItemInfo(balance, pack) { packQty: pack.packQty, packUnit: pack.packUnit, qty: new Decimal(balance.qty).toNumber(), - handleQty:new Decimal(0).toNumber(), + handleQty: new Decimal(0).toNumber(), uom: pack.uom, subList: [] } + item.containerNumber = pack.parentNumber != null ? pack.parentNumber : pack.number; return item; } @@ -34,7 +35,7 @@ export function createDetailInfo(balance, pack) { detail.qty = new Decimal(detail.qty).toNumber(); detail.packQty = new Decimal(pack.packQty).toNumber() detail.packUnit = pack.packUnit - detail.handleQty = new Decimal(detail.qty).toNumber() ; + detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.package = pack; detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的 detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的 diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue index 554878c4..7e71892b 100644 --- a/src/mycomponents/record/recordComDetailCard.vue +++ b/src/mycomponents/record/recordComDetailCard.vue @@ -5,6 +5,10 @@ @@ -23,9 +27,11 @@ import { ref, onMounted, nextTick, watch } from 'vue' import itemQty from '@/mycomponents/item/itemQty.vue' import balance from '@/mycomponents/balance/balance.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' +import location from '@/mycomponents/balance/location.vue' import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue' - -import { getDetailOption, getDetailEditRemoveOption, getClearOption } from '@/common/array.js' +import pack from '@/mycomponents/balance/pack.vue' +import PackageAndItemCard from '@/mycomponents/package/PackageAndItemCard.vue' +import { getDetailOption, getDetailEditRemoveOption, getClearOption,getEditLocationRemoveOption } from '@/common/array.js' const props = defineProps({ dataContent: { @@ -94,16 +100,18 @@ dataContent.value.subList.forEach((item) => { onMounted(() => { detailOptions.value = getDetailOption() scanOptions.value = getDetailEditRemoveOption() - removeOptions.value = getClearOption() + removeOptions.value = getEditLocationRemoveOption() }) const removeItem = (params, dataContent) => { const { text } = removeOptions.value[params[1]] - if (text == '清空') { + if (text == '移除') { comMessageRef.value.showQuestionMessage('确定清空物料及箱码信息?', (res) => { if (res) { - emit('removeItem') + emit('removeItem',dataContent) } }) + }else { + editLocation(dataContent) } } const swipeClick = (params, item) => { @@ -141,9 +149,12 @@ const confirm = (qty) => { editItem.value.handleQty = qty emit('updateData') } - +const editLocation = (item)=> { + editItem.value = item; + emit('editLocation', item) +} // 传递给父类 -const emit = defineEmits(['updateData', 'removePack']) +const emit = defineEmits(['updateData', 'removePack','editLocation'])