4月18号2

This commit is contained in:
yin 2026-04-18 21:01:32 +08:00
parent 14b1476982
commit 13b25e1d9c

View File

@ -193,14 +193,6 @@
<el-form-item label="已选订单数"> <el-form-item label="已选订单数">
<span>{{ storagePendingOrderIds.length }} 条</span> <span>{{ storagePendingOrderIds.length }} 条</span>
</el-form-item> </el-form-item>
<el-form-item label="订单 ID 预览">
<el-input
type="textarea"
:rows="3"
readonly
:model-value="storageIdsPreview"
/>
</el-form-item>
<el-form-item label="允许存储储位"> <el-form-item label="允许存储储位">
<el-switch v-model="storageForm.allowStorageLocation" active-text="是" inactive-text="否" /> <el-switch v-model="storageForm.allowStorageLocation" active-text="是" inactive-text="否" />
</el-form-item> </el-form-item>
@ -288,13 +280,6 @@ const storageForm = reactive<{
warehouseId: undefined warehouseId: undefined
}) })
const storageIdsPreview = computed(() => {
const ids = storagePendingOrderIds.value
if (!ids.length) return ''
const text = ids.join(', ')
return text.length > 500 ? `${text.slice(0, 500)}…` : text
})
const selectedRow = computed(() => { const selectedRow = computed(() => {
return list.value.find((i: any) => i.id === selectedOrderId.value) || null return list.value.find((i: any) => i.id === selectedOrderId.value) || null
}) })
@ -470,11 +455,11 @@ function resetStorageAllocateDialog() {
} }
async function submitStorageAllocate() { async function submitStorageAllocate() {
const orderIds = storagePendingOrderIds.value const order_ids = [...storagePendingOrderIds.value]
if (!orderIds.length || storageAllocateLoading.value) return if (!order_ids.length || storageAllocateLoading.value) return
try { try {
await ElMessageBox.confirm( await ElMessageBox.confirm(
`确定对 ${orderIds.length} 条订单发起储位分配吗?`, `确定对 ${order_ids.length} 条订单发起储位分配吗?`,
'确认', '确认',
{ type: 'warning' } { type: 'warning' }
) )
@ -485,7 +470,7 @@ async function submitStorageAllocate() {
storageAllocateLoading.value = true storageAllocateLoading.value = true
try { try {
const payload: Record<string, any> = { const payload: Record<string, any> = {
orderIds, order_ids,
allowStorageLocation: storageForm.allowStorageLocation allowStorageLocation: storageForm.allowStorageLocation
} }
if (storageForm.warehouseId != null && Number.isFinite(Number(storageForm.warehouseId))) { if (storageForm.warehouseId != null && Number.isFinite(Number(storageForm.warehouseId))) {