141 lines
4.6 KiB
Vue
141 lines
4.6 KiB
Vue
<template>
|
||
<div class="productflow-detail detail-panel">
|
||
<!-- 流水信息 -->
|
||
<div class="section">
|
||
<div class="section-title">流水信息</div>
|
||
<el-descriptions :column="4" border size="small" class="detail-descriptions">
|
||
<el-descriptions-item label="流水ID">{{ row?.id ?? '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="流水时间">{{ formatDateTime(row?.created_at) }}</el-descriptions-item>
|
||
<el-descriptions-item label="流水类型">
|
||
<span :class="getStatusTextClass(getTransactionTypeTag(row?.transaction_type))">
|
||
{{ getTransactionTypeLabel(row?.transaction_type) }}
|
||
</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="操作人">{{ row?.operator_name || '—' }}</el-descriptions-item>
|
||
</el-descriptions>
|
||
</div>
|
||
|
||
<!-- 商品与仓库 -->
|
||
<div class="section">
|
||
<div class="section-title">商品与仓库</div>
|
||
<el-descriptions :column="4" border size="small" class="detail-descriptions">
|
||
<el-descriptions-item label="商品ID">{{ row?.stock_id ?? '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="货主ID">{{ row?.store_id ?? '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="仓库ID">{{ row?.warehouse_id ?? '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="批次号">{{ row?.batch_no || '—' }}</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="变动数量">
|
||
<span :class="getQuantityClass(row)">{{ formatQuantityDisplay(row) }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="可用库存">
|
||
{{ row?.before_quantity ?? '—' }} → {{ row?.after_quantity ?? '—' }}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item label="锁定库存">
|
||
{{ row?.before_locked_quantity ?? '—' }} → {{ row?.after_locked_quantity ?? '—' }}
|
||
</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="订单类型">{{ getOrderTypeLabel(row?.order_type) }}</el-descriptions-item>
|
||
<el-descriptions-item label="订单号">{{ row?.order_no || '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="订单ID">{{ row?.order_id || '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="收货单ID">{{ row?.receiving_id || '—' }}</el-descriptions-item>
|
||
<el-descriptions-item label="入库单ID" :span="2">{{ row?.entry_order_id || '—' }}</el-descriptions-item>
|
||
</el-descriptions>
|
||
</div>
|
||
|
||
<!-- 备注 -->
|
||
<div class="section">
|
||
<div class="section-title">备注</div>
|
||
<el-descriptions :column="1" border size="small" class="detail-descriptions">
|
||
<el-descriptions-item label="备注">{{ row?.remark || '—' }}</el-descriptions-item>
|
||
</el-descriptions>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||
import {
|
||
formatDateTime,
|
||
getTransactionTypeLabel,
|
||
getTransactionTypeTag,
|
||
getOrderTypeLabel,
|
||
formatQuantityDisplay,
|
||
getQuantityClass
|
||
} from '../productflow-config'
|
||
|
||
defineProps<{
|
||
id?: number | string | null
|
||
row?: any
|
||
}>()
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||
|
||
/* 面板自带内边距(宿主 .detail-container 为 padding: 0 10px),
|
||
与 order/waveOrder「团购波次」波次明细面板(WaveBatchDetailPanel)完全一致 */
|
||
.productflow-detail {
|
||
height: 100%;
|
||
overflow-y: auto;
|
||
padding: 6px 10px 8px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.section {
|
||
margin-bottom: 12px;
|
||
|
||
&: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: 110px;
|
||
min-width: 110px;
|
||
background: #fafbfc;
|
||
font-weight: 500;
|
||
}
|
||
|
||
:deep(.el-descriptions__content) {
|
||
word-break: break-word;
|
||
}
|
||
}
|
||
|
||
.qty-up {
|
||
color: var(--el-color-success);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.qty-down {
|
||
color: var(--el-color-danger);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.qty-flat {
|
||
color: var(--el-text-color-secondary);
|
||
}
|
||
</style>
|