166 lines
5.9 KiB
Vue
166 lines
5.9 KiB
Vue
<template>
|
|
<div class="wave-order2-detail">
|
|
<div v-if="!row" class="empty-tip">请从上方列表中选择一项查看明细</div>
|
|
<template v-else>
|
|
<!-- 基础信息 -->
|
|
<div class="section">
|
|
<div class="section-title">基础信息</div>
|
|
<el-descriptions :column="4" border size="small" class="detail-descriptions">
|
|
<el-descriptions-item label="波次编号">{{ row.wave_no ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="波次类型">
|
|
<el-tag size="small" type="info">{{ row.wave_type ?? '—' }}</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="波次状态">
|
|
<el-tag size="small" :type="row.wave_status === '已就绪' ? 'success' : 'warning'">
|
|
{{ row.wave_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="仓库ID">{{ row.warehouse_id ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="订单数量">{{ row.total_orders ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="已处理订单">{{ row.processed_orders ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="快递">{{ row.logistics_name ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="创建人">{{ row.creator ?? '—' }}</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
|
|
<!-- 分配状态 -->
|
|
<div class="section">
|
|
<div class="section-title">分配状态</div>
|
|
<el-descriptions :column="3" border size="small" class="detail-descriptions">
|
|
<el-descriptions-item label="库位分配状态">
|
|
<el-tag size="small" :type="getAssignTagType(row.storage_assignment_status)">
|
|
{{ row.storage_assignment_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="快递分配状态">
|
|
<el-tag size="small" :type="getAssignTagType(row.express_assignment_status)">
|
|
{{ row.express_assignment_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="打印分配状态">
|
|
<el-tag size="small" :type="getPrintTagType(row.print_assignment_status)">
|
|
{{ row.print_assignment_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="拣货状态">
|
|
<el-tag size="small" :type="getPickTagType(row.pick_assignment_status)">
|
|
{{ row.pick_assignment_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="复核状态">
|
|
<el-tag size="small" :type="getReviewTagType(row.review_assignment_status)">
|
|
{{ row.review_assignment_status ?? '—' }}
|
|
</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="未复核订单数">{{ row.unreviewed_order_count ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item v-if="row.storage_assignment_error" label="库位分配异常" :span="3">
|
|
{{ row.storage_assignment_error }}
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
|
|
<!-- 订单信息 -->
|
|
<div class="section">
|
|
<div class="section-title">结构与订单信息</div>
|
|
<el-descriptions :column="2" border size="small" class="detail-descriptions">
|
|
<el-descriptions-item label="商品结构快照" :span="2">
|
|
{{ row.item_snapshot_text ?? '—' }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="订单信息" :span="2">
|
|
{{ row.order_info_summary ?? '—' }}
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="订单列表" :span="2">
|
|
<pre class="order-list-pre">{{ row.order_list_preview ?? '—' }}</pre>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="创建时间">{{ row.create_time ?? '—' }}</el-descriptions-item>
|
|
<el-descriptions-item label="更新时间">{{ row.update_time ?? '—' }}</el-descriptions-item>
|
|
</el-descriptions>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineOptions({ name: 'WaveOrder2DetailPanel' })
|
|
|
|
defineProps<{
|
|
row: Record<string, any> | null
|
|
}>()
|
|
|
|
function getAssignTagType(status: string | undefined): string {
|
|
if (!status) return 'info'
|
|
if (status === '已分配' || status === 'assigned') return 'success'
|
|
if (status === '部分分配' || status === 'partial') return 'warning'
|
|
return 'danger'
|
|
}
|
|
|
|
function getPrintTagType(status: string | undefined): string {
|
|
if (!status) return 'info'
|
|
return status === '已打印' || status === 'printed' ? 'success' : 'warning'
|
|
}
|
|
|
|
function getPickTagType(status: string | undefined): string {
|
|
if (!status) return 'info'
|
|
if (status === '已拣货') return 'success'
|
|
if (status === '部分拣货') return 'warning'
|
|
return 'danger'
|
|
}
|
|
|
|
function getReviewTagType(status: string | undefined): string {
|
|
if (!status) return 'info'
|
|
return status === '已复核' || status === 'reviewed' ? 'success' : 'warning'
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.wave-order2-detail {
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.empty-tip {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
font-size: 14px;
|
|
color: #909399;
|
|
}
|
|
|
|
.section {
|
|
margin-bottom: 16px;
|
|
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.section-title {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: #303133;
|
|
margin-bottom: 10px;
|
|
padding-left: 8px;
|
|
border-left: 3px solid #409eff;
|
|
line-height: 1.4;
|
|
}
|
|
}
|
|
|
|
.detail-descriptions {
|
|
:deep(.el-descriptions__label) {
|
|
width: 120px;
|
|
background: #fafbfc;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
.order-list-pre {
|
|
margin: 0;
|
|
font-family: inherit;
|
|
font-size: 13px;
|
|
line-height: 1.8;
|
|
white-space: pre-wrap;
|
|
color: #606266;
|
|
}
|
|
</style>
|