149 lines
3.9 KiB
Vue
149 lines
3.9 KiB
Vue
<template>
|
||
<view class="scatter-pick-goods-detail-page">
|
||
<view class="normar_container">
|
||
<page-nav :title="title"></page-nav>
|
||
|
||
<view class="summary-card">
|
||
<view class="summary-row"><text class="label">波次号:</text><text class="value">{{ detailInfo.waveNo || '--' }}</text></view>
|
||
<view class="summary-row"><text class="label">拣货员:</text><text class="value">{{ detailInfo.pickerName || '--' }}</text></view>
|
||
<view class="summary-row"><text class="label">车号:</text><text class="value">{{ detailInfo.cartNo || '--' }}</text></view>
|
||
<view class="summary-row"><text class="label">拣货状态:</text><text class="value">{{ getStatusText(detailInfo.status) }}</text></view>
|
||
<view class="summary-row"><text class="label">未复核:</text><text class="value">{{ detailInfo.unreviewedCount }}</text></view>
|
||
</view>
|
||
|
||
<scroll-view class="goods-scroll" scroll-y>
|
||
<view v-if="goodsList.length === 0" class="empty-state">
|
||
<u-icon name="list" size="86" color="#c0c4cc"></u-icon>
|
||
<text class="empty-text">暂无拣货商品</text>
|
||
</view>
|
||
<view v-else class="goods-list">
|
||
<view v-for="item in goodsList" :key="item.id" class="goods-item">
|
||
<view class="goods-row"><text class="label">商品编码:</text><text class="value">{{ item.skuCode }}</text></view>
|
||
<view class="goods-row"><text class="label">商品名称:</text><text class="value">{{ item.skuName }}</text></view>
|
||
<view class="goods-row"><text class="label">应拣数量:</text><text class="value">{{ item.needQty }}</text></view>
|
||
<view class="goods-row"><text class="label">已拣数量:</text><text class="value">{{ item.pickedQty }}</text></view>
|
||
</view>
|
||
</view>
|
||
<view class="safe-area-bottom"></view>
|
||
</scroll-view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
export default {
|
||
data() {
|
||
return {
|
||
title: '拣货商品详情',
|
||
detailInfo: {
|
||
recordId: '',
|
||
waveNo: '--',
|
||
pickerName: '--',
|
||
cartNo: '--',
|
||
status: 'pending',
|
||
unreviewedCount: 0
|
||
},
|
||
goodsList: []
|
||
};
|
||
},
|
||
onLoad(options) {
|
||
this.detailInfo = {
|
||
recordId: options?.recordId || '',
|
||
waveNo: options?.waveNo || '--',
|
||
pickerName: options?.pickerName || '--',
|
||
cartNo: options?.cartNo || '--',
|
||
status: options?.status || 'pending',
|
||
unreviewedCount: Number(options?.unreviewedCount || 0)
|
||
};
|
||
this.goodsList = this.buildMockGoodsList();
|
||
},
|
||
methods: {
|
||
getStatusText(status) {
|
||
const map = {
|
||
pending: '待拣货',
|
||
picking: '拣货中',
|
||
done: '已完成'
|
||
};
|
||
return map[status] || '待拣货';
|
||
},
|
||
buildMockGoodsList() {
|
||
return Array.from({ length: 5 }).map((_, index) => ({
|
||
id: `${this.detailInfo.recordId || 'record'}-${index + 1}`,
|
||
skuCode: `SKU${String(index + 1).padStart(4, '0')}`,
|
||
skuName: `模拟商品${index + 1}`,
|
||
needQty: (index % 3) + 1,
|
||
pickedQty: 0
|
||
}));
|
||
}
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.scatter-pick-goods-detail-page {
|
||
min-height: 100vh;
|
||
background: #f8f9fa;
|
||
}
|
||
|
||
.summary-card {
|
||
margin: 20rpx 24rpx 12rpx;
|
||
padding: 16rpx;
|
||
background: #fff;
|
||
border-radius: 12rpx;
|
||
}
|
||
|
||
.summary-row,
|
||
.goods-row {
|
||
display: flex;
|
||
font-size: 28rpx;
|
||
line-height: 40rpx;
|
||
}
|
||
|
||
.label {
|
||
width: 150rpx;
|
||
color: #909399;
|
||
}
|
||
|
||
.value {
|
||
flex: 1;
|
||
color: #303133;
|
||
}
|
||
|
||
.goods-scroll {
|
||
height: calc(100vh - 350rpx - env(safe-area-inset-bottom));
|
||
padding: 0 24rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.goods-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12rpx;
|
||
}
|
||
|
||
.goods-item {
|
||
background: #fff;
|
||
border-radius: 12rpx;
|
||
padding: 14rpx 16rpx;
|
||
border: 1rpx solid #ebeef5;
|
||
}
|
||
|
||
.empty-state {
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
.empty-text {
|
||
margin-top: 18rpx;
|
||
font-size: 28rpx;
|
||
color: #909399;
|
||
}
|
||
|
||
.safe-area-bottom {
|
||
height: calc(30rpx + env(safe-area-inset-bottom));
|
||
}
|
||
</style>
|