feat:手动更新智能柜库存

This commit is contained in:
dzc committed 2025-04-07 18:34:10 +08:00
1 parent 1ef76323cd
commit f57334703d
3 files changed
+112 -8

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ const form = reactive({
userId: "",
hardId: "",
spuId: "",
count: "",
count: 5,
})
// 定义校验规则
+110 -6
View File
@@ -36,11 +36,61 @@
@sort-change="sortChangeHandle"
>
<el-table-column type="selection" width="40" align="center" />
<el-table-column type="index" label="#" width="40" />
<el-table-column prop="userId" label="用户id" show-overflow-tooltip />
<el-table-column prop="hardId" label="设备id" show-overflow-tooltip />
<el-table-column prop="spuId" label="商品id" show-overflow-tooltip />
<el-table-column prop="count" label="更新库存数量" show-overflow-tooltip />
<el-table-column type="index" label="#" width="80" />
<el-table-column prop="userId" label="上架">
<el-table-column min-width="120" label="上架人">
<template #default="{ row }">
<span> {{ row.username }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" min-width="120" label="上架时间" />
<el-table-column label="上架类型">
<template #default="{ row }">
<dict-tag :options="hard_spu_repertory_type" :value="row.bizType" />
</template>
</el-table-column>
<el-table-column prop="beforeCount" min-width="120" label="上架前数量" />
<el-table-column prop="count" min-width="120" label="上架数量" />
</el-table-column>
<el-table-column label="商品">
<el-table-column min-width="120" label="商品">
<template #default="{ row }">
<span class="color-primary">
{{ row.spuName }}
</span>
</template>
</el-table-column>
<el-table-column min-width="120" label="分类">
<template #default="{ row }">
<span class="color-success">
{{ row.spuCategoryName }}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="hardId" label="设备">
<el-table-column min-width="120" label="所属商家">
<template #default="{ row }">
<span class="color-primary">
{{ row.merchantName }}
</span>
</template>
</el-table-column>
<el-table-column min-width="120" label="设备名称">
<template #default="{ row }">
<span class="color-primary">
{{ row.hardName }}
</span>
</template>
</el-table-column>
<el-table-column min-width="120" label="放置层数">
<template #default="{ row }">
<span class="color-primary">
{{ row.hardDoorNumber }}
</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" width="150">
<template #default="scope">
<el-button
@@ -74,7 +124,7 @@ import { useDict } from "/@/hooks/dict"
// 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
// 定义查询字典
const { hard_spu_repertory_type } = useDict("hard_spu_repertory_type")
// 定义变量内容
const formDialogRef = ref()
// 搜索变量
@@ -129,3 +179,57 @@ const handleDelete = async (ids: string[]) => {
}
}
</script>
<style scoped lang="scss">
.text-line {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.desc {
display: flex;
align-items: center;
margin-bottom: 2px;
span {
display: inline-block;
}
span:nth-child(1) {
min-width: 60px;
max-width: 100px;
text-align: left;
}
span:nth-child(2) {
flex: 1;
min-width: 50px;
}
}
.status {
display: flex;
align-items: center;
margin-bottom: 2px;
span {
display: inline-block;
}
span:nth-child(1) {
min-width: 60px;
max-width: 100px;
text-align: left;
}
span:nth-child(2) {
flex: 1;
min-width: 50px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
+1 -1
View File
@@ -10,7 +10,7 @@
<el-col :span="24" class="mb20">
<el-form-item prop="hardDoorNumber">
<template #label>
<span>商品层数</span>
<span>放置层数</span>
<tip content="商品在智能柜的层数,按层数放置会提高识别率" />
</template>
<el-input-number :min="0" :step="1" v-model="form.hardDoorNumber" placeholder="" />