1
This commit is contained in:
parent
af3c6ba6e6
commit
6e61f3a5be
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -26,7 +26,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<span class="toolbar-switch-label">{{ pickTaskWaveListDefaults.toolbarHint }}</span>
|
||||
<!-- <span class="toolbar-switch-label">{{ pickTaskWaveListDefaults.toolbarHint }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -149,14 +149,14 @@
|
||||
@mousedown="beginSplitDrag"
|
||||
/>
|
||||
<div v-if="selectedTaskId" class="lower-level" :style="lowerPaneStyle">
|
||||
<div class="detail-header">
|
||||
<!-- <div class="detail-header">
|
||||
<span class="detail-header-title">
|
||||
波次列表({{ selectedTaskWaveList.length }})
|
||||
<template v-if="selectedTaskRow">
|
||||
— 任务 {{ selectedTaskRow.task_no }}
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="detail-container">
|
||||
<el-table
|
||||
v-if="selectedTaskWaveList.length"
|
||||
@ -327,12 +327,17 @@ const toolbarActionMap: Record<string, () => void> = {
|
||||
loadData: () => {
|
||||
void loadData()
|
||||
},
|
||||
openColumnConfigPanel: () => openColumnConfigPanel(),
|
||||
handleSearch: () => handleSearch(),
|
||||
handleBatchCancelTasks: () => {
|
||||
void handleBatchCancelTasks()
|
||||
}
|
||||
}
|
||||
|
||||
function openColumnConfigPanel() {
|
||||
upperTable.value?.openColumnConfig?.()
|
||||
}
|
||||
|
||||
function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
|
||||
const handler = toolbarActionMap[action]
|
||||
if (!handler) return
|
||||
|
||||
@ -879,6 +879,7 @@ export const pickTaskWaveDetailDialogDefaults = {
|
||||
/** 拣货任务页工具栏按钮(action 与 WavePickTaskListPanel 内 toolbarActionMap 键一致) */
|
||||
export const pickTaskWaveToolbarButtons: ToolbarButtonConfig[] = [
|
||||
{ key: 'refresh', label: '刷新', size: 'small', action: 'loadData' },
|
||||
{ key: 'columnConfig', label: '字段设置', size: 'small', action: 'openColumnConfigPanel' },
|
||||
{ key: 'search', label: '查询', type: 'primary', size: 'small', action: 'handleSearch' },
|
||||
{
|
||||
key: 'batchCancel',
|
||||
|
||||
@ -74,8 +74,8 @@
|
||||
<section v-if="comparePreview" v-loading="compareLoading" class="binding-section">
|
||||
<div class="section-title">
|
||||
对照预览
|
||||
<span v-if="comparePreview.receiving_number" class="section-subtitle">
|
||||
{{ comparePreview.receiving_number }}
|
||||
<span v-if="comparePreviewReceivingNumber" class="section-subtitle">
|
||||
{{ comparePreviewReceivingNumber }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -190,6 +190,10 @@ const itemBindingRows = ref<ItemBindingRow[]>([])
|
||||
const comparePreview = ref<ReceivingCompareResponse | null>(null)
|
||||
const activeCompareReceivingId = ref<number | null>(null)
|
||||
|
||||
const comparePreviewReceivingNumber = computed(
|
||||
() => comparePreview.value?.comparisons?.[0]?.receiving_number ?? ''
|
||||
)
|
||||
|
||||
const compareSummaryItems = computed(() => {
|
||||
const first = comparePreview.value?.comparisons?.[0]
|
||||
return buildReceivingCompareSummaryItems(first?.summary as Record<string, unknown> | undefined)
|
||||
|
||||
@ -100,7 +100,7 @@
|
||||
<div class="diff-gutter-header">行</div>
|
||||
<div class="diff-side-header diff-side-header--receiving">
|
||||
<span class="side-label">收货单</span>
|
||||
<span class="side-code">{{ compareResult.receiving_number || selectedReceivingNumber }}</span>
|
||||
<span class="side-code">{{ activeCompareReceivingNumber }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -276,6 +276,21 @@ const selectedReceivingNumber = computed(
|
||||
() => selectedReceiving.value?.receiving_number || (queryForm.receiving_id ? `#${queryForm.receiving_id}` : '—')
|
||||
)
|
||||
|
||||
const activeCompareItem = computed(() => {
|
||||
const comparisons = compareResult.value?.comparisons
|
||||
if (!comparisons?.length) return null
|
||||
const receivingId = queryForm.receiving_id
|
||||
if (receivingId !== '') {
|
||||
const matched = comparisons.find((item) => item.receiving_id === Number(receivingId))
|
||||
if (matched) return matched
|
||||
}
|
||||
return comparisons[0]
|
||||
})
|
||||
|
||||
const activeCompareReceivingNumber = computed(
|
||||
() => activeCompareItem.value?.receiving_number || selectedReceivingNumber.value
|
||||
)
|
||||
|
||||
function getReceivingStatusText(item: ReceivingOption): string {
|
||||
return (
|
||||
formatReceivingOrderStatusLabel(item.storage_status) ||
|
||||
@ -416,13 +431,13 @@ const diffRows = computed<DiffRow[]>(() => {
|
||||
if (!compareResult.value) return []
|
||||
|
||||
const rows: DiffRow[] = []
|
||||
const comparison = compareResult.value.comparison ?? []
|
||||
comparison.forEach((row, index) => {
|
||||
const comparison = activeCompareItem.value?.comparison ?? []
|
||||
comparison.forEach((row: ReceivingCompareRow, index: number) => {
|
||||
rows.push(buildDiffRow(row, index, 'cmp'))
|
||||
})
|
||||
|
||||
const receivingOnly = compareResult.value.receiving_only ?? []
|
||||
receivingOnly.forEach((row, index) => {
|
||||
const receivingOnly = activeCompareItem.value?.receiving_only ?? []
|
||||
receivingOnly.forEach((row: ReceivingCompareRow, index: number) => {
|
||||
rows.push(buildDiffRow(row, comparison.length + index, 'recv', true))
|
||||
})
|
||||
|
||||
@ -430,11 +445,15 @@ const diffRows = computed<DiffRow[]>(() => {
|
||||
})
|
||||
|
||||
const summaryItems = computed(() =>
|
||||
buildReceivingCompareSummaryItems(compareResult.value?.summary as Record<string, unknown> | undefined)
|
||||
buildReceivingCompareSummaryItems(
|
||||
(activeCompareItem.value?.summary ?? compareResult.value?.total_summary) as
|
||||
| Record<string, unknown>
|
||||
| undefined
|
||||
)
|
||||
)
|
||||
|
||||
const summaryTag = computed(() => {
|
||||
const summary = compareResult.value?.summary
|
||||
const summary = activeCompareItem.value?.summary ?? compareResult.value?.total_summary
|
||||
if (!summary) return null
|
||||
|
||||
if (summary.is_fully_matched === true || summary.fully_matched === true) {
|
||||
@ -451,7 +470,7 @@ const summaryTag = computed(() => {
|
||||
const receivingOnly = Number(
|
||||
summary.receiving_only_items ??
|
||||
summary.receiving_only_count ??
|
||||
(compareResult.value?.receiving_only?.length ?? 0)
|
||||
(activeCompareItem.value?.receiving_only?.length ?? 0)
|
||||
)
|
||||
|
||||
if (!diffRows.value.length) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user