1
This commit is contained in:
parent
49655a585a
commit
2bcee8db80
@ -157,14 +157,32 @@
|
||||
</el-tag>
|
||||
<span v-else>—</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工单ID">{{ selectedRow.id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库ID">{{ selectedRow.warehouse_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主ID">{{ selectedRow.store_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主名称">{{ selectedRow.store_name || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人ID">{{ selectedRow.creator_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="站内信ID">{{ selectedRow.inbox_message_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="需仓库理赔">{{ selectedRow.claim_needed ? '是' : '否' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库理赔金额">{{ selectedRow.claim_amount ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="需运方理赔">{{ selectedRow.carrier_claim_needed ? '是' : '否' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运方理赔金额">{{ selectedRow.carrier_claim_amount ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="详细描述" :span="2">{{ selectedRow.description || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联运单号">{{ selectedRow.waybill_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联发货订单号">{{ selectedRow.order_delivery_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联入库单号">{{ selectedRow.entry_order_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联出库单号">{{ selectedRow.order_stockout_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="关联收货单号">{{ selectedRow.receiving_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="运单ID">{{ selectedRow.waybill_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单ID">{{ selectedRow.order_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="入库单ID">{{ selectedRow.entry_order_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出库单ID">{{ selectedRow.order_stockout_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="收货单ID">{{ selectedRow.receiving_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ selectedRow.created_at || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ selectedRow.updated_at || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{ selectedRow.started_at || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="完成时间">{{ selectedRow.completed_at || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="删除时间">{{ selectedRow.deleted_at || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="处理结果" :span="2">{{ selectedRow.resolution || '—' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="detail-actions" style="margin-top:12px">
|
||||
|
||||
@ -1245,6 +1245,21 @@ export const waveIndexRangeScanField = scanBasicField({
|
||||
defaultOperator: 'between',
|
||||
hideOperator: true
|
||||
})
|
||||
/** ScanBox:波次类型(wave_scope)。后端按值解析 wave_id 范围:
|
||||
* 0=未分配波次(wave_id = 0)、1=团购(反查 wave_type=1 的波次ID)、2=散单(反查 wave_type=2 的波次ID);
|
||||
* 多选(如 [1,2])由后端将两个范围条件 OR 合并。 */
|
||||
export const waveScopeScanField = scanBasicField({
|
||||
label: '波次类型',
|
||||
value: 'wave_scope',
|
||||
type: 'select',
|
||||
multiple: true,
|
||||
conditionType: 'number',
|
||||
options: [
|
||||
{ label: '未分配波次', value: 0 },
|
||||
{ label: '团购', value: 1 },
|
||||
{ label: '散单', value: 2 }
|
||||
]
|
||||
})
|
||||
export const deliveryOrderCodeScanField = scanBasicField({ label: '发货单号', value: 'delivery_order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'eq' })
|
||||
/** ScanBox:外部订单号(待处理订单专用,模糊匹配发货单号,替代表格右上角快捷搜索) */
|
||||
export const pendingOrderQuickSearchScanField = scanBasicField({ label: '外部订单号', value: 'delivery_order_code', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'like' })
|
||||
@ -1407,6 +1422,7 @@ export const deliveryAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveIndexRangeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveScopeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waybillCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
@ -1602,6 +1618,7 @@ export const reviewAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveIndexRangeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveScopeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformCodeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
@ -1761,6 +1778,7 @@ export const pendingAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveIndexRangeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveScopeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waybillCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
@ -2135,6 +2153,7 @@ export const expectionOrderAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveIndexRangeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveScopeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCodeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
@ -2255,6 +2274,7 @@ export const archiveAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveIndexRangeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveScopeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
|
||||
@ -402,6 +402,12 @@ export function buildOrderWhereConditions(rawConditions: Record<string, any>) {
|
||||
value: condition
|
||||
}
|
||||
})
|
||||
// 波次类型 wave_scope:单值归一为标量 eq,多值保留数组(后端按 wave_type 反查波次ID 后 OR 合并)
|
||||
if (where.wave_scope && typeof where.wave_scope === 'object' && 'value' in where.wave_scope) {
|
||||
const rawValue = (where.wave_scope as { value: unknown }).value
|
||||
const value = Array.isArray(rawValue) && rawValue.length === 1 ? rawValue[0] : rawValue
|
||||
where.wave_scope = { operator: 'eq', value }
|
||||
}
|
||||
return where
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,11 @@ const upperTable = ref<any>(null)
|
||||
|
||||
const presetTree = ref<any[]>([])
|
||||
const availableFieldsRef = reactive(
|
||||
JSON.parse(JSON.stringify(pendingAvailableFields.filter((field: any) => field.value !== 'wave_no')))
|
||||
JSON.parse(
|
||||
JSON.stringify(
|
||||
pendingAvailableFields.filter((field: any) => field.value !== 'wave_no' && field.value !== 'wave_scope')
|
||||
)
|
||||
)
|
||||
)
|
||||
const toolbarButtons = pickToolbarButtons(['refresh', 'columnConfig', 'allocateStorage', 'allocateExpress', 'manualWaybill', 'syncOrderIds'])
|
||||
|
||||
|
||||
@ -13,10 +13,25 @@
|
||||
<el-tag size="small" :type="getStatusTagType(row)">{{ getStatusText(row) }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库ID">{{ row.warehouse_id ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="总订单数">{{ row.total_orders ?? getOrderCount(row) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单数量">{{ getOrderCount(row) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="已处理订单">{{ getProcessedOrders(row) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="快递编码">{{ row.logistics_code || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="快递">{{ row.logistics_name || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="区分快递">
|
||||
<el-tag size="small" :type="Number(row?.distinguish_express) ? 'warning' : 'info'">
|
||||
{{ Number(row?.distinguish_express) ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="来源">
|
||||
<el-tag size="small" :type="getWaveSourceTagType(row.source)">
|
||||
{{ formatWaveSource(row.source) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建人">{{ row.creator || row.creator_name || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品类型">{{ row.item_part_type || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品部位">{{ row.item_part || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="商品结构" :span="4">{{ row.item_detail_machine || row.item_detail || '—' }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
@ -38,21 +53,23 @@
|
||||
{{ formatWavePrintAssignmentStatusLabel(row.print_assignment_status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="拣货状态">
|
||||
<el-tag size="small" :type="getWaveAssignmentAggregateTagType(row.pick_assignment_status)">
|
||||
{{ formatWavePickAssignmentStatusLabel(row.pick_assignment_status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="复核状态">
|
||||
<el-tag size="small" :type="getWaveAssignmentAggregateTagType(row.review_assignment_status)">
|
||||
{{ formatWaveReviewAssignmentStatusLabel(row.review_assignment_status) }}
|
||||
</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="未复核订单数">{{ row.unreviewed_order_count ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="库位分配异常" :span="3">{{ getStorageAssignmentError(row) }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">结构与订单信息</div>
|
||||
<div class="section-title">时间信息</div>
|
||||
<el-descriptions :column="2" border size="small" class="detail-descriptions">
|
||||
<el-descriptions-item label="订单信息" :span="2">{{ getOrderInfoSummary(row) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单列表" :span="2">{{ getOrderListPreview(row) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ formatDateTime(row.create_time || row.created_at || row.create_at) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="更新时间">{{ formatDateTime(row.update_time || row.updated_at || row.update_at) }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
@ -75,14 +92,15 @@
|
||||
import { computed } from 'vue'
|
||||
import {
|
||||
waveStatusTextMap,
|
||||
waveStorageAssignmentErrorPhraseMap,
|
||||
waveStorageAssignmentErrorTextMap,
|
||||
waveStorageAssignmentStatusTextMap,
|
||||
waveTypeTextMap,
|
||||
formatWaveExpressAssignmentStatusLabel,
|
||||
formatWavePickAssignmentStatusLabel,
|
||||
formatWavePrintAssignmentStatusLabel,
|
||||
formatWaveReviewAssignmentStatusLabel,
|
||||
getWaveAssignmentAggregateTagType
|
||||
formatWaveSource,
|
||||
getWaveAssignmentAggregateTagType,
|
||||
getWaveSourceTagType
|
||||
} from '../config/wave-config'
|
||||
|
||||
const props = defineProps<{
|
||||
@ -168,70 +186,6 @@ function getStorageAssignmentStatusText(row: any) {
|
||||
return text
|
||||
}
|
||||
|
||||
function translateStorageAssignmentErrorValue(value: unknown) {
|
||||
const text = String(value ?? '').trim()
|
||||
if (!text) return '—'
|
||||
|
||||
const normalized = text.toLowerCase()
|
||||
if (waveStorageAssignmentErrorTextMap[normalized] !== undefined) {
|
||||
return waveStorageAssignmentErrorTextMap[normalized]
|
||||
}
|
||||
|
||||
if (/[\u4e00-\u9fa5]/.test(text)) {
|
||||
return text
|
||||
}
|
||||
|
||||
let translated = text.replace(/[_-]+/g, ' ')
|
||||
for (const [pattern, replacement] of waveStorageAssignmentErrorPhraseMap) {
|
||||
translated = translated.replace(pattern, replacement)
|
||||
}
|
||||
|
||||
translated = translated.replace(/\s+/g, ' ').trim()
|
||||
return translated || text
|
||||
}
|
||||
|
||||
function getStorageAssignmentError(row: any) {
|
||||
return translateStorageAssignmentErrorValue(
|
||||
row?.storage_assignment_error
|
||||
|| row?.storage_assignment_exception
|
||||
|| row?.storage_assignment_error_message
|
||||
|| row?.storage_error
|
||||
|| row?.storage_error_message
|
||||
|| '—'
|
||||
)
|
||||
}
|
||||
|
||||
function getOrderInfoSummary(row: any) {
|
||||
if (Array.isArray(row?.order_list) && row.order_list.length) {
|
||||
const preview = row.order_list
|
||||
.slice(0, 6)
|
||||
.map((item: any) => item.delivery_order_code || item.order_no || item.order_number || item.id)
|
||||
.filter(Boolean)
|
||||
return row.order_list.length > 6 ? `${preview.join(',')} 等 ${row.order_list.length} 单` : preview.join(',')
|
||||
}
|
||||
const info = row?.order_info || row?.order_summary || row?.orders_summary
|
||||
if (typeof info === 'string' && info.trim()) return info
|
||||
if (Array.isArray(info) && info.length) return info.join(',')
|
||||
if (Array.isArray(row?.orders) && row.orders.length) {
|
||||
return row.orders.map((item: any) => item.order_sn || item.order_no || item.order_number || item.id).filter(Boolean).join(',')
|
||||
}
|
||||
return '—'
|
||||
}
|
||||
|
||||
function getOrderListPreview(row: any) {
|
||||
if (!Array.isArray(row?.order_list) || row.order_list.length === 0) {
|
||||
return '—'
|
||||
}
|
||||
return row.order_list
|
||||
.map((item: any) => {
|
||||
const code = item.delivery_order_code || item.order_no || item.order_number || item.id
|
||||
const storage = item.storage_status || '—'
|
||||
const post = item.post_status || '—'
|
||||
return `${code}(库位:${storage}, 快递:${post})`
|
||||
})
|
||||
.join(';')
|
||||
}
|
||||
|
||||
function formatDateTime(value: string | number | null | undefined) {
|
||||
if (!value) return '—'
|
||||
let normalizedValue: string | number = value
|
||||
|
||||
@ -74,6 +74,8 @@ export const columns = [
|
||||
{ prop: 'order_type', label: '订单类型', width: 100 },
|
||||
{ prop: 'order_no', label: '订单号', minWidth: 160, copyAction: 'copy' as const },
|
||||
{ prop: 'order_id', label: '订单ID', width: 90, copyAction: 'copy' as const },
|
||||
{ prop: 'receiving_id', label: '收货单ID', width: 100, copyAction: 'copy' as const },
|
||||
{ prop: 'entry_order_id', label: '入库单ID', width: 100, copyAction: 'copy' as const },
|
||||
{ prop: 'operator_name', label: '操作人', width: 90 },
|
||||
{ prop: 'remark', label: '备注', minWidth: 140 }
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user