feat: add scatter picking detail pages
This commit is contained in:
parent
2fb2b089eb
commit
e127694fe4
14
pages.json
14
pages.json
@ -162,6 +162,20 @@
|
|||||||
{
|
{
|
||||||
"titleNView": false
|
"titleNView": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/work/order/scatter-picking-detail",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"titleNView": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/work/order/scatter-pick-goods-detail",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"titleNView": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1149,6 +1149,7 @@
|
|||||||
const isGoodsQuery = menuName === '商品查询' || (menuName.includes('商品') && menuName.includes('查询'));
|
const isGoodsQuery = menuName === '商品查询' || (menuName.includes('商品') && menuName.includes('查询'));
|
||||||
const isOrderPicking = menuName === '订单拣货' || (menuName.includes('订单') && menuName.includes('拣货'));
|
const isOrderPicking = menuName === '订单拣货' || (menuName.includes('订单') && menuName.includes('拣货'));
|
||||||
const isScatterWaveStrategy = menuName === '散单波次策略' || (menuName.includes('散单') && menuName.includes('波次'));
|
const isScatterWaveStrategy = menuName === '散单波次策略' || (menuName.includes('散单') && menuName.includes('波次'));
|
||||||
|
const isScatterPickingDetail = menuName === '散单拣货详情' || (menuName.includes('散单') && menuName.includes('拣货') && menuName.includes('详情'));
|
||||||
const rawPath = item?.component || item?.path || '';
|
const rawPath = item?.component || item?.path || '';
|
||||||
const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : '';
|
const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : '';
|
||||||
const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation';
|
const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation';
|
||||||
@ -1164,7 +1165,9 @@
|
|||||||
? '/pages/work/product/query'
|
? '/pages/work/product/query'
|
||||||
: (isOrderPicking
|
: (isOrderPicking
|
||||||
? '/pages/work/order/picking'
|
? '/pages/work/order/picking'
|
||||||
: (isScatterWaveStrategy ? '/pages/work/order/scatter-wave-strategy' : normalizedPath));
|
: (isScatterWaveStrategy
|
||||||
|
? '/pages/work/order/scatter-wave-strategy'
|
||||||
|
: (isScatterPickingDetail ? '/pages/work/order/scatter-picking-detail' : normalizedPath)));
|
||||||
|
|
||||||
if (!targetPath) {
|
if (!targetPath) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
148
pages/work/order/scatter-pick-goods-detail.vue
Normal file
148
pages/work/order/scatter-pick-goods-detail.vue
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
<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>
|
||||||
233
pages/work/order/scatter-picking-detail.vue
Normal file
233
pages/work/order/scatter-picking-detail.vue
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
<template>
|
||||||
|
<view class="scatter-picking-detail-page">
|
||||||
|
<view class="normar_container">
|
||||||
|
<page-nav :title="title">
|
||||||
|
<template #right>
|
||||||
|
<view class="nav-right-action" :class="{ 'nav-right-action--active': onlyMine }" @click="toggleOnlyMine">{{ onlyMine ? '查看全部' : '只看我的' }}</view>
|
||||||
|
</template>
|
||||||
|
</page-nav>
|
||||||
|
|
||||||
|
<scroll-view class="detail-scroll" scroll-y>
|
||||||
|
<view v-if="displayOrderList.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="record-list">
|
||||||
|
<view v-for="item in displayOrderList" :key="item.id" class="record-item" @click="goPickGoodsDetail(item)">
|
||||||
|
<view class="record-main">
|
||||||
|
<view class="record-left">
|
||||||
|
<view class="record-line"><text class="record-label">波次号:</text><text class="record-value">{{ item.waveNo || '--' }}</text></view>
|
||||||
|
<view class="record-line"><text class="record-label">拣货员:</text><text class="record-value">{{ item.pickerName || '--' }}</text></view>
|
||||||
|
<view class="record-line"><text class="record-label">车号:</text><text class="record-value">{{ item.cartNo || '--' }}</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="record-right">
|
||||||
|
<text class="record-count">未复核 {{ item.unreviewedCount }}</text>
|
||||||
|
<text class="record-status">{{ getStatusText(item.status) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="safe-area-bottom"></view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '拣货详情(未复核)',
|
||||||
|
grabCount: 0,
|
||||||
|
onlyMine: false,
|
||||||
|
currentUserId: '',
|
||||||
|
orderList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
displayOrderList() {
|
||||||
|
if (!this.onlyMine) {
|
||||||
|
return this.orderList;
|
||||||
|
}
|
||||||
|
return this.orderList.filter(item => item.isMine);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.currentUserId = String(this.$store?.getters?.user?.id || this.$store?.getters?.user?.user_id || '');
|
||||||
|
const hasGrabCountParam = options && Object.prototype.hasOwnProperty.call(options, 'grabCount');
|
||||||
|
const parsedGrabCount = Number(options?.grabCount || 0);
|
||||||
|
this.grabCount = hasGrabCountParam
|
||||||
|
? Math.max(0, parsedGrabCount)
|
||||||
|
: 5;
|
||||||
|
this.orderList = this.buildMockOrderList(this.grabCount);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleOnlyMine() {
|
||||||
|
this.onlyMine = !this.onlyMine;
|
||||||
|
},
|
||||||
|
buildMockOrderList(count) {
|
||||||
|
const listCount = Math.max(0, Number(count || 0));
|
||||||
|
return Array.from({ length: listCount }).map((_, index) => {
|
||||||
|
const waveNo = `W${new Date().getFullYear()}${String(index + 1).padStart(4, '0')}`;
|
||||||
|
const orderNo = `SD${Date.now().toString().slice(-6)}${String(index + 1).padStart(2, '0')}`;
|
||||||
|
const assigneeId = this.currentUserId || `mock_user_${(index % 2) + 1}`;
|
||||||
|
const isMine = index % 2 === 0;
|
||||||
|
const pickerName = isMine ? '我' : `拣货员${(index % 3) + 1}`;
|
||||||
|
return {
|
||||||
|
id: `${orderNo}-${index + 1}`,
|
||||||
|
waveNo,
|
||||||
|
unreviewedCount: (index % 4) + 1,
|
||||||
|
pickerName,
|
||||||
|
cartNo: `A${String((index % 12) + 1).padStart(2, '0')}`,
|
||||||
|
orderNo,
|
||||||
|
waybillCode: `WB${String(index + 1).padStart(8, '0')}`,
|
||||||
|
quantity: (index % 5) + 1,
|
||||||
|
status: 'pending',
|
||||||
|
assigneeId,
|
||||||
|
isMine
|
||||||
|
};
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getStatusText(status) {
|
||||||
|
const map = {
|
||||||
|
pending: '待拣货',
|
||||||
|
picking: '拣货中',
|
||||||
|
done: '已完成'
|
||||||
|
};
|
||||||
|
return map[status] || '待拣货';
|
||||||
|
},
|
||||||
|
goPickGoodsDetail(item) {
|
||||||
|
if (!item) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = [
|
||||||
|
`recordId=${encodeURIComponent(String(item.id || ''))}`,
|
||||||
|
`waveNo=${encodeURIComponent(String(item.waveNo || '--'))}`,
|
||||||
|
`pickerName=${encodeURIComponent(String(item.pickerName || '--'))}`,
|
||||||
|
`cartNo=${encodeURIComponent(String(item.cartNo || '--'))}`,
|
||||||
|
`status=${encodeURIComponent(String(item.status || 'pending'))}`,
|
||||||
|
`unreviewedCount=${encodeURIComponent(String(item.unreviewedCount || 0))}`
|
||||||
|
];
|
||||||
|
this.$tools.routerTo(`/pages/work/order/scatter-pick-goods-detail?${params.join('&')}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.scatter-picking-detail-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .nav-title .right {
|
||||||
|
width: auto;
|
||||||
|
min-width: 136rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-right-action {
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 8rpx 18rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
background: #2979ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-right-action--active {
|
||||||
|
color: #ffffff;
|
||||||
|
background: #1f67e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-scroll {
|
||||||
|
height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
|
||||||
|
padding: 20rpx 24rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-item {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 18rpx;
|
||||||
|
border: 1rpx solid #ebeef5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-item:active {
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-main {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-left {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-line {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-label {
|
||||||
|
width: 120rpx;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-value {
|
||||||
|
flex: 1;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-right {
|
||||||
|
min-width: 180rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-count {
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
color: #fa8c16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record-status {
|
||||||
|
margin-top: 8rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 34rpx;
|
||||||
|
color: #2979ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
@ -1,32 +1,71 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="scatter-wave-page">
|
<view class="scatter-wave-page">
|
||||||
<view class="normar_container">
|
<view class="normar_container">
|
||||||
<page-nav :title="title"></page-nav>
|
<page-nav :title="title">
|
||||||
|
<template #right>
|
||||||
|
<view class="nav-right-pending">待处理{{ pendingCount }}</view>
|
||||||
|
</template>
|
||||||
|
</page-nav>
|
||||||
|
|
||||||
<scroll-view class="list-content" scroll-y>
|
<view class="content-layout">
|
||||||
<view v-if="loading" class="empty-wrap">
|
<view v-if="loading" class="empty-wrap">
|
||||||
<text class="empty-text">加载中...</text>
|
<text class="empty-text">加载中...</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else-if="strategyList.length === 0" class="empty-wrap">
|
<view v-else-if="strategyList.length === 0" class="empty-wrap">
|
||||||
<text class="empty-text">暂无策略</text>
|
<text class="empty-text">暂无策略</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="list-wrap">
|
<template v-else>
|
||||||
<view class="content-card" v-for="item in strategyList" :key="item.id">
|
<view class="top-module">
|
||||||
<view class="card-title">{{ item.strategyName }}</view>
|
<view class="content-card content-card--detail">
|
||||||
<view class="card-row"><text class="label">货主:</text><text class="value">{{ item.ownerText }}</text></view>
|
<view class="card-title">{{ currentStrategy.strategyName }}</view>
|
||||||
<view class="card-row"><text class="label">订单小于SKU数:</text><text class="value">{{ item.orderMaxSku }}</text></view>
|
<view class="card-row"><text class="value shentong-e-value">申通E</text></view>
|
||||||
<view class="card-row"><text class="label">订单最小SKU数:</text><text class="value">{{ item.orderMinSku }}</text></view>
|
<view class="card-row"><text class="label">货主:</text><text class="value">{{ currentStrategy.ownerText }}</text></view>
|
||||||
<view class="card-row"><text class="label">订单最大商品数:</text><text class="value">{{ item.orderMaxQty }}</text></view>
|
<view class="card-row"><text class="label">订单小于SKU数:</text><text class="value">{{ currentStrategy.orderMaxSku }}个</text></view>
|
||||||
<view class="card-row"><text class="label">订单最小商品数:</text><text class="value">{{ item.orderMinQty }}</text></view>
|
<view class="card-row"><text class="label">订单最小SKU数:</text><text class="value">{{ currentStrategy.orderMinSku }}个</text></view>
|
||||||
<view class="card-row"><text class="label">订单快递限制:</text><text class="value">{{ item.expressLimitText }}</text></view>
|
<view class="card-row"><text class="label">订单最大商品数:</text><text class="value">{{ currentStrategy.orderMaxQty }}个</text></view>
|
||||||
<view class="card-row"><text class="label">订单平台限制:</text><text class="value">{{ item.platformLimitText }}</text></view>
|
<view class="card-row"><text class="label">订单最小商品数:</text><text class="value">{{ currentStrategy.orderMinQty }}个</text></view>
|
||||||
<view class="card-row"><text class="label">按货主分组:</text><text class="value">{{ item.groupByOwnerText }}</text></view>
|
<view class="card-row"><text class="label">拣货类型:</text><text class="value">{{ currentStrategy.pickTypeText }}</text></view>
|
||||||
<view class="card-row"><text class="label">按快递分组:</text><text class="value">{{ item.groupByExpressText }}</text></view>
|
<view class="card-row card-row--inline-group">
|
||||||
<view class="card-row"><text class="label">拣货类型:</text><text class="value">{{ item.pickTypeText }}</text></view>
|
<view class="group-item"><text class="label">订单快递限制:</text><text class="value">{{ currentStrategy.expressLimitText }}</text></view>
|
||||||
|
<view class="group-item"><text class="label">订单平台限制:</text><text class="value">{{ currentStrategy.platformLimitText }}</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="card-row card-row--inline-group">
|
||||||
|
<view class="group-item"><text class="label">按货主分组:</text><text class="value">{{ currentStrategy.groupByOwnerText }}</text></view>
|
||||||
|
<view class="group-item"><text class="label">按快递分组:</text><text class="value">{{ currentStrategy.groupByExpressText }}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
<view class="safe-area-bottom"></view>
|
<view class="bottom-module">
|
||||||
</scroll-view>
|
<scroll-view class="grid-scroll" scroll-y>
|
||||||
|
<view class="grid-wrap">
|
||||||
|
<view
|
||||||
|
v-for="item in strategyList"
|
||||||
|
:key="item.id"
|
||||||
|
class="pick-card"
|
||||||
|
:class="{ 'pick-card--active': currentStrategyId === item.id }"
|
||||||
|
@click="selectStrategy(item)"
|
||||||
|
>
|
||||||
|
<view class="pick-card__top">
|
||||||
|
<text class="pick-card__tag-left">申通E</text>
|
||||||
|
<text class="pick-card__tag-right">{{ item.ownerText }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="pick-card__main">
|
||||||
|
<text class="pick-card__num">{{ item.orderMaxQty }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="pick-card__bottom">{{ item.pickTypeText }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="safe-area-bottom"></view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="bottom-action-bar">
|
||||||
|
<u-button @click="handleRefresh">刷新</u-button>
|
||||||
|
<u-button type="primary" :customStyle="{ backgroundColor: '#2979ff', borderColor: '#2979ff' }" @click="handleGrabScatter">抓取散单({{ grabCount }})个</u-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -35,11 +74,19 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '散单波次策略',
|
title: '散单待拣货列表',
|
||||||
|
pendingCount: 50,
|
||||||
|
grabCount: 5,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
currentStrategyId: '',
|
||||||
strategyList: []
|
strategyList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
currentStrategy() {
|
||||||
|
return this.strategyList.find(item => String(item.id) === String(this.currentStrategyId)) || this.strategyList[0] || {};
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loadStrategyList();
|
this.loadStrategyList();
|
||||||
},
|
},
|
||||||
@ -103,10 +150,10 @@
|
|||||||
const type = Number(item?.strategy_type || 0);
|
const type = Number(item?.strategy_type || 0);
|
||||||
const mode = Number(item?.batch_mode || 0);
|
const mode = Number(item?.batch_mode || 0);
|
||||||
if (mode === 1) {
|
if (mode === 1) {
|
||||||
return '边拣边分';
|
return 'E型';
|
||||||
}
|
}
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
return '先拣后分';
|
return 'F型';
|
||||||
}
|
}
|
||||||
return '未知';
|
return '未知';
|
||||||
},
|
},
|
||||||
@ -133,13 +180,45 @@
|
|||||||
const list = this.extractWaveStrategyList(payload, response);
|
const list = this.extractWaveStrategyList(payload, response);
|
||||||
return list.map(item => this.normalizeWaveStrategyItem(item));
|
return list.map(item => this.normalizeWaveStrategyItem(item));
|
||||||
},
|
},
|
||||||
|
selectStrategy(item) {
|
||||||
|
if (!item || typeof item !== 'object') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.currentStrategyId = item.id;
|
||||||
|
},
|
||||||
|
handleRefresh() {
|
||||||
|
this.loadStrategyList();
|
||||||
|
},
|
||||||
|
handleGrabScatter() {
|
||||||
|
if (!this.currentStrategy || !this.currentStrategy.id) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先选择策略',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const params = [
|
||||||
|
`strategyId=${encodeURIComponent(String(this.currentStrategy.id || ''))}`,
|
||||||
|
`strategyName=${encodeURIComponent(String(this.currentStrategy.strategyName || '--'))}`,
|
||||||
|
`ownerText=${encodeURIComponent(String(this.currentStrategy.ownerText || '--'))}`,
|
||||||
|
`pickTypeText=${encodeURIComponent(String(this.currentStrategy.pickTypeText || '--'))}`,
|
||||||
|
`grabCount=${encodeURIComponent(String(this.grabCount || 0))}`
|
||||||
|
];
|
||||||
|
this.$tools.routerTo(`/pages/work/order/scatter-picking-detail?${params.join('&')}`);
|
||||||
|
},
|
||||||
async loadStrategyList() {
|
async loadStrategyList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const params = this.buildWaveStrategyListParams();
|
const params = this.buildWaveStrategyListParams();
|
||||||
const response = await this.$http('order.wave.waveStrategyList', params);
|
const response = await this.$http('order.wave.waveStrategyList', params);
|
||||||
|
const payload = this.extractWaveStrategyPayload(response);
|
||||||
|
this.pendingCount = Number(payload?.pending_count ?? payload?.pendingCount ?? 50);
|
||||||
this.strategyList = this.parseWaveStrategyResponse(response);
|
this.strategyList = this.parseWaveStrategyResponse(response);
|
||||||
|
this.currentStrategyId = this.strategyList[0]?.id || '';
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this.pendingCount = 50;
|
||||||
|
this.currentStrategyId = '';
|
||||||
this.strategyList = [];
|
this.strategyList = [];
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: this.getApiErrorMessage(error, '策略加载失败'),
|
title: this.getApiErrorMessage(error, '策略加载失败'),
|
||||||
@ -157,28 +236,85 @@
|
|||||||
.scatter-wave-page {
|
.scatter-wave-page {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: #f8f9fa;
|
background: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.normar_container {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .nav-title .right {
|
||||||
|
width: auto;
|
||||||
|
min-width: 170rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-right-pending {
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 8rpx 18rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
background: #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-content {
|
.list-content {
|
||||||
height: 100rpx;
|
height: 100%;
|
||||||
flex: 1;
|
}
|
||||||
padding-top: 20rpx;
|
|
||||||
|
.content-layout {
|
||||||
|
height: calc(100vh - 170rpx - env(safe-area-inset-bottom));
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 20rpx 24rpx 120rpx;
|
||||||
|
background: #f3f4f6;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-wrap {
|
.top-module,
|
||||||
|
.bottom-module {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-module {
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-module {
|
||||||
|
padding-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-scroll {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
row-gap: 8rpx;
|
||||||
|
column-gap: 16rpx;
|
||||||
|
align-content: flex-start;
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-card {
|
.content-card {
|
||||||
margin: 20rpx 24rpx;
|
margin: 0;
|
||||||
padding: 20rpx;
|
padding: 16rpx;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 14rpx;
|
border-radius: 14rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-card--detail {
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 30rpx;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
margin-bottom: 14rpx;
|
margin-bottom: 14rpx;
|
||||||
@ -187,20 +323,139 @@
|
|||||||
.card-row {
|
.card-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
line-height: 38rpx;
|
line-height: 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-row--inline-group {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-item {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-item + .group-item {
|
||||||
|
margin-left: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-item .label {
|
||||||
|
width: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-right: 6rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: 220rpx;
|
width: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-right: 6rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shentong-e-value {
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 46rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card {
|
||||||
|
width: calc(25% - 12rpx);
|
||||||
|
height: 180rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
border: 2rpx solid transparent;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card--active {
|
||||||
|
border-color: transparent;
|
||||||
|
box-shadow: inset 0 0 0 6rpx #2979ff, 0 10rpx 24rpx rgba(41, 121, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 34rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__tag-left,
|
||||||
|
.pick-card__tag-right {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
padding: 4rpx 14rpx 6rpx;
|
||||||
|
background: #19be6b;
|
||||||
|
color: #fff;
|
||||||
|
max-width: 48%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__tag-left {
|
||||||
|
left: 0;
|
||||||
|
clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__tag-right {
|
||||||
|
right: 0;
|
||||||
|
clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__main {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__num {
|
||||||
|
font-size: 40rpx;
|
||||||
|
line-height: 1;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__unit {
|
||||||
|
margin-left: 4rpx;
|
||||||
|
font-size: 18rpx;
|
||||||
|
line-height: 24rpx;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__sub {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18rpx;
|
||||||
|
line-height: 24rpx;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pick-card__bottom {
|
||||||
|
margin-top: 6rpx;
|
||||||
|
background: #2979ff;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
line-height: 44rpx;
|
||||||
|
padding: 2rpx 6rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.empty-wrap {
|
.empty-wrap {
|
||||||
min-height: 400rpx;
|
min-height: 400rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -216,4 +471,18 @@
|
|||||||
.safe-area-bottom {
|
.safe-area-bottom {
|
||||||
height: calc(20rpx + env(safe-area-inset-bottom));
|
height: calc(20rpx + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bottom-action-bar {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
column-gap: 12rpx;
|
||||||
|
padding: 12rpx 24rpx calc(12rpx + env(safe-area-inset-bottom));
|
||||||
|
background: #fff;
|
||||||
|
border-top: 1rpx solid #f0f0f0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user