feat:每个货柜独立库存

This commit is contained in:
dzc committed 2025-04-18 14:35:48 +08:00
1 parent 89aa679c75
commit 95c3ad6c39
11 files changed
+340 -26

No files matched your search

+158
View File
@@ -0,0 +1,158 @@
<template>
<div v-loading="loading">
<el-descriptions v-if="detail" title="智能柜日志">
<el-descriptions-item labelClassName="no-colon">
<el-timeline>
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">用户授权</el-tag>
<span class="color-primary ml-2">{{ detail.createTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.requestOpenTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">智能柜申请开门</el-tag>
<span class="color-primary ml-2">{{ detail.requestOpenTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.openCallbackTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">智能柜开门响应</el-tag>
<span class="color-primary ml-2">{{ detail.openCallbackTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.videoCallbackTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">智能柜视频回调</el-tag>
<span class="color-primary ml-2">{{ detail.videoCallbackTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.skuSubmitTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">商品提交识别</el-tag>
<span class="color-primary ml-2">{{ detail.skuSubmitTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.skuCallbackTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">商品识别响应</el-tag>
<span class="color-primary ml-2">{{ detail.skuCallbackTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.payTime">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="info" style="width: 120px">订单结算</el-tag>
<span class="color-primary ml-2">{{ detail.payTime }}</span>
</div>
</el-timeline-item>
</el-timeline>
<el-timeline v-if="detail.error && detail.errorDesc">
<el-timeline-item placement="top">
<div class="el-timeline-right-content">
<el-tag type="danger" style="width: 120px">错误</el-tag>
<span class="color-danger ml-2">{{ detail.errorDesc }}</span>
</div>
</el-timeline-item>
</el-timeline>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script setup lang="ts" name="hard-door-log">
import * as hardFlowManager from "/@/api/hard/hard-door-flow"
type Props = {
orderId?: string
}
const props = withDefaults(defineProps<Props>(), { orderId: "" })
const detail = ref<any>({})
const loading = ref<boolean>(false)
watch(
() => props.orderId,
() => {
getFlow()
},
)
const getFlow = async () => {
if (!props.orderId) return
loading.value = true
try {
const _pa = { orderId: props.orderId }
const { data } = await hardFlowManager.getByOrderId(_pa)
detail.value = data
} catch (e) {
console.error(e)
} finally {
loading.value = false
}
}
onMounted(() => {
getFlow()
})
</script>
<style lang="scss" scoped>
// 时间线样式调整
:deep(.el-timeline) {
margin: 10px 0 0 160px;
.el-timeline-item__wrapper {
position: relative;
top: -20px;
.el-timeline-item__timestamp {
position: absolute !important;
top: 10px;
left: -150px;
}
}
.el-timeline-right-content {
display: flex;
align-items: center;
min-height: 30px;
padding: 10px;
background-color: #409eff;
&::before {
position: absolute;
top: 10px;
left: 13px;
border-color: transparent #409eff transparent transparent;
border-style: solid;
border-width: 8px;
content: "";
}
}
.el-timeline-item__node {
position: absolute;
left: -5px;
top: -50%;
transform: translateY(100%);
display: flex;
width: 20px;
height: 20px;
font-size: 10px;
background: #409eff;
border-radius: 50%;
justify-content: center;
align-items: center;
}
}
</style>
+1 -2
View File
@@ -54,8 +54,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
})
// table hook
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
useTable(state)
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
// 打开弹窗
const openDialog = (id: string) => {