Files
赵正易 a48ea6f110 feat: 新增物料图标和优化UI组件
fix(入库页面): 修复重复箱检测和批次检查逻辑

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

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

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

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

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

chore: 更新依赖和配置文件
2025-08-22 18:28:25 +08:00

127 lines
2.6 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<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">
<view>批次号{{ packageInfo.patchCode }}</view>
<view>零件号{{ packageInfo.partNumner }}</view>
<view>描述{{ packageInfo.productionDescribe }}</view>
</view>
<view class="package-card-time">
<view class="package-card-quantity">数量{{ packageInfo.quantity }}</view>
<view class="package-card-patch">生产批次</view>
<view class="package-card-patch">{{ packageInfo.productionTime }}</view>
</view>
</view>
</view>
</template>
<script>
// 【零件号(35233201041) 描述(鲨鱼鳍) 箱号+班组(BNW240312023_18B1) 数量 时间(出厂日期,生产日期,工单号/箱号提取) 】
export default {
name: 'package-card',
props: {
packageInfo: {
type: Object,
default: () => ({
id:-1,
// 工单号
workoderID:'',
// 批次号(工单号+箱号+班组)
patchCode: '',
// 零件号
partNumner: '',
// 描述
productionDescribe: '',
// 出厂日期/生产日期
productionTime: '',
// 此箱数量
quantity: 0,
// 货物内部编号
originalCode:''
})
}
},
data() {
return {};
},
methods: {
handleDelete() {
this.$emit('delete', this.packageInfo);
}
}
};
</script>
<style scoped>
.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>