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'])