|
|
|
|
@ -485,7 +485,7 @@
|
|
|
|
|
</component>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<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>
|
|
|
|
|
</component>
|
|
|
|
|
</template>
|
|
|
|
|
@ -600,6 +600,9 @@ const selectedPalletPackageCountLabel = computed(() => {
|
|
|
|
|
const packageQuantity = currentSelectRow.value?.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 palletDialogGuardTag = computed(() => (props.disabled ? 'el-form' : 'div'))
|
|
|
|
|
|
|
|
|
|
@ -1169,6 +1172,7 @@ const removeSelectedPallets = () => {
|
|
|
|
|
const confirmPalletSelect = () => {
|
|
|
|
|
if (props.disabled) return
|
|
|
|
|
if (!currentSelectRow.value) return
|
|
|
|
|
if (isPalletConfirmDisabled.value) return
|
|
|
|
|
const row = currentSelectRow.value
|
|
|
|
|
row.pallets = selectedPalletRows.value.map((pallet) => ({
|
|
|
|
|
palletId: pallet.id,
|
|
|
|
|
|