feat: 新增物料图标和优化UI组件

fix(入库页面): 修复重复箱检测和批次检查逻辑

refactor(请求模块): 优化错误处理和防抖机制

style(全局字体): 更改默认字体为数黑体

perf(扫码组件): 添加防抖处理避免重复提交

feat(卡片组件): 增加删除功能并优化样式

docs(工具函数): 添加入库工具函数文档

chore: 更新依赖和配置文件
This commit is contained in:
2025-08-22 18:28:25 +08:00
parent 684ad6f152
commit a48ea6f110
29 changed files with 1830 additions and 1068 deletions

View File

@@ -0,0 +1,32 @@
<template>
<scroll-view class="list-container" :style="{height: height + 'px'}" scroll-y>
<scroll-view class="list-content" scroll-y>
<slot></slot>
</scroll-view>
</scroll-view>
</template>
<script>
export default {
name: 'CustomList',
props: {
// 列表高度
height: {
type: [String, Number],
default: 'auto'
}
}
}
</script>
<style scoped>
.list-container {
width: 100%;
overflow-y: auto;
}
.list-content {
width: 100%;
padding: 10rpx;
}
</style>

View File

@@ -0,0 +1,36 @@
<template>
<view class="list-item" @click="handleClick">
<view class="item-content">
<slot></slot>
</view>
</view>
</template>
<script>
export default {
name: 'CustomListItem',
methods: {
// 点击事件处理
handleClick() {
this.$emit('click');
}
}
}
</script>
<style scoped>
.list-item {
padding: 20rpx;
border-bottom: 1rpx solid #f0f0f0;
background-color: #fff;
}
.list-item:last-child {
border-bottom: none;
}
.item-content {
display: flex;
flex-direction: column;
}
</style>

View File

@@ -0,0 +1,126 @@
<template>
<view v-if="show" class="popup-mask" @click="clickMask">
<view class="popup-container" :class="[mode, round ? 'round' : '']" :style="customStyle" @click.stop>
<slot></slot>
<view v-if="closeable" class="popup-close" @click="close">
<text class="close-icon">×</text>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'CustomPopup',
props: {
// 是否显示弹窗
show: {
type: Boolean,
default: false
},
// 弹窗模式 center-居中显示 top-顶部显示 bottom-底部显示 left-左侧显示 right-右侧显示
mode: {
type: String,
default: 'center'
},
// 是否显示圆角
round: {
type: Boolean,
default: false
},
// 是否显示关闭按钮
closeable: {
type: Boolean,
default: false
},
// 自定义样式
customStyle: {
type: Object,
default: () => ({})
},
// 是否开启安全区适配
safeAreaInsetTop: {
type: Boolean,
default: false
}
},
methods: {
// 关闭弹窗
close() {
this.$emit('close');
},
// 点击遮罩层
clickMask() {
this.$emit('clickMask');
}
}
}
</script>
<style scoped>
.popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.popup-container {
background-color: #fff;
position: relative;
max-width: 90%;
max-height: 90%;
}
.popup-container.center {
align-self: center;
}
.popup-container.top {
align-self: flex-start;
width: 100%;
}
.popup-container.bottom {
align-self: flex-end;
width: 100%;
}
.popup-container.left {
align-self: center;
height: 100%;
}
.popup-container.right {
align-self: center;
height: 100%;
}
.popup-container.round {
border-radius: 10rpx;
}
.popup-close {
position: absolute;
top: 20rpx;
right: 20rpx;
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.close-icon {
font-size: 36rpx;
font-weight: bold;
color: #999;
}
</style>