Commit 87ca4491 by qinjianhui

fix: 拣胚成功创建入库单支持所有状态创建

parent 8bcbc948
......@@ -458,17 +458,12 @@ const handleClose = () => {
}
const handleCreateInbound = async () => {
const partialRows = selections.value.filter(
(r) => r.pickingStatus === 'partial',
)
if (
selections.value.length === 0 ||
!selections.value.every((r) => r.pickingStatus === 'partial')
) {
return ElMessage.warning('请选择需调整拣胚顺序的数据')
if (selections.value.length === 0) {
ElMessage.warning('请选择需创建入库单的数据')
return
}
const firstWid = partialRows[0].warehouseId
if (partialRows.some((r) => r.warehouseId !== firstWid)) {
const firstWid = selections.value[0].warehouseId
if (selections.value.some((r) => r.warehouseId !== firstWid)) {
return ElMessage.error('请选择相同仓库的库存SKU!')
}
resetReceiptEditForm()
......@@ -488,7 +483,7 @@ const handleCreateInbound = async () => {
}
}
receiptEditForm.value.warehouseId = firstWid
receiptEditForm.value.warehouseName = partialRows[0].warehouseName || ''
receiptEditForm.value.warehouseName = selections.value[0].warehouseName || ''
const wh = warehouseList.value.find((w) => w.id == firstWid)
if (wh) {
receiptEditForm.value.warehouseName = wh.name
......@@ -498,7 +493,7 @@ const handleCreateInbound = async () => {
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const skus = partialRows.map((r) => r.thirdSkuCode as string)
const skus = selections.value.map((r) => r.thirdSkuCode as string)
const res = await getBySkuAndUserMarkApi(firstWid, skus.join(','), null)
if (res.code !== 200) return
otherPurchaseData.value = res.data.map((item: InterskuList) =>
......
......@@ -472,8 +472,8 @@
</span>
<template #dropdown>
<ElDropdownMenu>
<ElDropdownItem command="tiff_42">TIF(40+2cm)</ElDropdownItem>
<ElDropdownItem command="tiff_60">TIF(60cm)</ElDropdownItem>
<!-- <ElDropdownItem command="tiff_42">TIF(40+2cm)</ElDropdownItem>
<ElDropdownItem command="tiff_60">TIF(60cm)</ElDropdownItem> -->
<ElDropdownItem command="png_42">PNG(40+2cm)</ElDropdownItem>
<ElDropdownItem command="png_60">PNG(60cm)</ElDropdownItem>
</ElDropdownMenu>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment