|
|
@ -69,7 +69,7 @@ import { Decimal } from 'decimal.js' // 引入 |
|
|
|
import { getManagementPrecisions } from '@/common/balance.js' |
|
|
|
import { getCurrDateTime, goHome, navigateBack, getPackingNumberAndBatch, getSwitchInfoByCode } from '@/common/basic.js' |
|
|
|
|
|
|
|
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit, getPrintProductReceiptList, getBalanceToPackage, batchPrintingLable } from '@/api/request2.js' |
|
|
|
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit, getPrintProductReceiptList, getBalanceToPackage, batchPrintingLable, isCheckMesCode } from '@/api/request2.js' |
|
|
|
|
|
|
|
import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js' |
|
|
|
|
|
|
@ -203,6 +203,10 @@ const getDetail = () => { |
|
|
|
|
|
|
|
const getScanResult = (result) => { |
|
|
|
// TODO缺少零件号的对应关系 |
|
|
|
// 查询mes码是否完工 |
|
|
|
isCheckMesCode(result.content) |
|
|
|
.then((res) => { |
|
|
|
if (res.data) { |
|
|
|
if (detailSource.value.length > 0) { |
|
|
|
const item = detailSource.value[0] // 应该按零件号查找 |
|
|
|
result.uom = item.uom |
|
|
@ -217,7 +221,7 @@ const getScanResult = (result) => { |
|
|
|
subItem.fgList.push(result) |
|
|
|
calcFgQty(detailSource.value) |
|
|
|
} else { |
|
|
|
const itemIndex = subItem.fgList.findIndex((r) => r.itemCode == result.itemCode && r.productDate == result.productDate && r.order == result.order) |
|
|
|
const itemIndex = subItem.fgList.findIndex((r) => r.itemCode == result.itemCode && r.order == result.order) |
|
|
|
if (itemIndex == -1) { |
|
|
|
subItem.fgList.push(result) |
|
|
|
calcFgQty(detailSource.value) |
|
|
@ -235,6 +239,11 @@ const getScanResult = (result) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
showErrorMessage(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const calcFgQty = () => { |
|
|
|
detailSource.value.forEach((item) => { |
|
|
@ -391,7 +400,9 @@ const commit = () => { |
|
|
|
submitJob() |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (!subitem.handleQty) { |
|
|
|
subitem.handleQty = subitem.qty |
|
|
|
} |
|
|
|
subitem.scaned = true |
|
|
|
submitJob() |
|
|
|
} |
|
|
@ -445,9 +456,9 @@ const setParams = () => { |
|
|
|
if (detail.fgList) { |
|
|
|
detail.fgList.forEach((res) => { |
|
|
|
res.outsideItemCode = res.itemCode |
|
|
|
res.outsideProduceDate = res.productDate |
|
|
|
// res.outsideProduceDate = res.productDate |
|
|
|
res.outsideProduceDate = null |
|
|
|
res.outsideSerialNumber = res.order |
|
|
|
res.lowerLim = res.content |
|
|
|
}) |
|
|
|
} |
|
|
|
subList.push(detail) |
|
|
|