style:入库单据-托盘码-仓库名称/库区必填

main
黄伟杰 5 days ago
parent aa0410ec1c
commit bbfdde936d

@ -485,7 +485,7 @@
</component> </component>
<template #footer> <template #footer>
<component :is="palletDialogGuardTag" v-bind="disabled ? formEnabledAttrs : {}"> <component :is="palletDialogGuardTag" v-bind="disabled ? formEnabledAttrs : {}">
<el-button v-if="!disabled" type="primary" @click="confirmPalletSelect">{{ t('common.ok') }}</el-button> <el-button v-if="!disabled" type="primary" :disabled="isPalletConfirmDisabled" @click="confirmPalletSelect">{{ t('common.ok') }}</el-button>
<el-button @click="palletDialogVisible = false">{{ t('common.cancel') }}</el-button> <el-button @click="palletDialogVisible = false">{{ t('common.cancel') }}</el-button>
</component> </component>
</template> </template>
@ -600,6 +600,9 @@ const selectedPalletPackageCountLabel = computed(() => {
const packageQuantity = currentSelectRow.value?.packageQuantity ?? '-' const packageQuantity = currentSelectRow.value?.packageQuantity ?? '-'
return t('ErpStock.Item.packageCountWithItems', { count: packageQuantity }) return t('ErpStock.Item.packageCountWithItems', { count: packageQuantity })
}) })
const isPalletConfirmDisabled = computed(() =>
selectedPalletRows.value.some((row) => !row.warehouseId || !row.areaId)
)
const formEnabledAttrs = { disabled: false, labelWidth: '0px' } const formEnabledAttrs = { disabled: false, labelWidth: '0px' }
const palletDialogGuardTag = computed(() => (props.disabled ? 'el-form' : 'div')) const palletDialogGuardTag = computed(() => (props.disabled ? 'el-form' : 'div'))
@ -1169,6 +1172,7 @@ const removeSelectedPallets = () => {
const confirmPalletSelect = () => { const confirmPalletSelect = () => {
if (props.disabled) return if (props.disabled) return
if (!currentSelectRow.value) return if (!currentSelectRow.value) return
if (isPalletConfirmDisabled.value) return
const row = currentSelectRow.value const row = currentSelectRow.value
row.pallets = selectedPalletRows.value.map((pallet) => ({ row.pallets = selectedPalletRows.value.map((pallet) => ({
palletId: pallet.id, palletId: pallet.id,

Loading…
Cancel
Save