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

@@ -2,6 +2,7 @@
<view class="package-card-box">
<view class="package-card-header">
<view class="package-card-title">工单号{{ packageInfo.workoderID }}</view>
<view class="delete-btn" @click="handleDelete">×</view>
</view>
<view class="package-card-body">
<view class="package-card-describe">
@@ -11,8 +12,8 @@
</view>
<view class="package-card-time">
<view class="package-card-quantity">数量{{ packageInfo.quantity }}</view>
<view>生产日期</view>
<view>{{ packageInfo.productionTime }}</view>
<view class="package-card-patch">生产批次</view>
<view class="package-card-patch">{{ packageInfo.productionTime }}</view>
</view>
</view>
</view>
@@ -24,7 +25,8 @@ export default {
name: 'package-card',
props: {
packageInfo: {
default: {
type: Object,
default: () => ({
id:-1,
// 工单号
workoderID:'',
@@ -40,63 +42,85 @@ export default {
quantity: 0,
// 货物内部编号
originalCode:''
}
})
}
},
data() {
return {};
},
methods: {
handleDelete() {
this.$emit('delete', this.packageInfo);
}
}
};
</script>
<style scoped>
.package-card-box {
width: 100%;
height: 260px;
display: flex;
flex-direction: column;
justify-content: center;
margin-top: 10px;
padding-left: 10px;
padding-right: 10px;
border-radius: 10px;
background-color: white;
}
.package-card-header {
font-size: 24px;
font-weight: 700;
width: 100%;
height: 30%;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 1px solid #ebebeb;
}
.package-card-body {
width: 100%;
height: 70%;
display: flex;
flex-direction: row;
align-items: center;
}
.package-card-describe {
font-size: 20px;
font-weight: 600;
width: 70%;
display: flex;
flex-direction: column;
}
.package-card-quantity{
margin-bottom: 10px;
}
.package-card-time {
color: rgba(0, 9, 0, 0.7);
font-size: 18px;
font-weight: 600;
width: 30%;
display: flex;
flex-direction: column;
align-items: center;
}
.package-card-box {
position: relative;
padding: 10rpx;
margin: 5rpx;
background-color: #FFFFFF;
border-radius: 10rpx;
box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.1);
}
.package-card-header {
padding-bottom: 20rpx;
border-bottom: 2rpx solid #f0f0f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.package-card-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.delete-btn {
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 36rpx;
font-weight: bold;
color: #ff4d4f;
border-radius: 50%;
cursor: pointer;
user-select: none;
}
.package-card-body {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
}
.package-card-describe {
flex: 2;
}
.package-card-describe view {
margin-bottom: 10rpx;
font-size: 28rpx;
color: #666666;
}
.package-card-time {
flex: 1;
text-align: right;
}
.package-card-quantity {
font-size: 48rpx;
font-weight: bold;
color: #333333;
}
.package-card-patch {
font-size: 38rpx;
color: #333333;
}
</style>