feat: 收货单未设置货主时禁止创建商品并提示
This commit is contained in:
parent
53f3b824f4
commit
5211f818fc
@ -2389,6 +2389,12 @@ const openAddDrawer = (row?: any) => {
|
|||||||
showReadOnlyTip()
|
showReadOnlyTip()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 收货单未设置货主时不允许创建商品
|
||||||
|
const receivingStoreId = Number(props.row?.store_id ?? props.row?.store?.id)
|
||||||
|
if (!Number.isFinite(receivingStoreId) || receivingStoreId <= 0) {
|
||||||
|
ElMessage.warning('请先设置收货单货主')
|
||||||
|
return
|
||||||
|
}
|
||||||
// row here is product row, but store info comes from parent receiving row (props.row)
|
// row here is product row, but store info comes from parent receiving row (props.row)
|
||||||
addDrawerStore.value = props.row?.store || { id: props.row?.store_id, name: props.row?.store_name }
|
addDrawerStore.value = props.row?.store || { id: props.row?.store_id, name: props.row?.store_name }
|
||||||
if (row) {
|
if (row) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user