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