修改复核列表页面
This commit is contained in:
parent
788ee2e1e4
commit
f063287083
@ -82,54 +82,110 @@
|
|||||||
<text class="empty-text">{{ currentSubTab === 0 ? '暂无待复核订单' : '暂无已复核订单' }}</text>
|
<text class="empty-text">{{ currentSubTab === 0 ? '暂无待复核订单' : '暂无已复核订单' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="record-list">
|
<view v-else class="record-list">
|
||||||
<view
|
<!-- 散单模式:订单列表 -->
|
||||||
v-for="item in listData"
|
<template v-if="isScatterMode">
|
||||||
:key="item.id"
|
<view
|
||||||
class="record-item"
|
v-for="item in listData"
|
||||||
:class="{ 'record-item--reviewed': currentSubTab === 1 }"
|
:key="item.order_id"
|
||||||
>
|
class="record-item"
|
||||||
<view class="record-main">
|
:class="{ 'record-item--reviewed': item.recheck_status === 'fin' }"
|
||||||
<view class="record-left">
|
>
|
||||||
<view class="record-line">
|
<view class="record-main">
|
||||||
<text class="record-label">订单号:</text>
|
<view class="record-left">
|
||||||
<text class="record-value">{{ item.orderNo || '--' }}</text>
|
<view class="record-line">
|
||||||
</view>
|
<text class="record-label">订单号:</text>
|
||||||
<view class="record-line">
|
<text class="record-value">{{ item.delivery_order_code || '--' }}</text>
|
||||||
<text class="record-label">快递单号:</text>
|
|
||||||
<text class="record-value">{{ item.waybillNo || '--' }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="record-line record-line--split">
|
|
||||||
<view class="record-half">
|
|
||||||
<text class="record-half-label">商品数:</text>
|
|
||||||
<text class="record-half-value">{{ item.goodsCount || 0 }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="record-half">
|
<view class="record-line">
|
||||||
<text class="record-half-label">数量:</text>
|
<text class="record-label">{{ item.logistics_name || '--' }}</text>
|
||||||
<text class="record-half-value">{{ item.totalQty || 0 }}</text>
|
<text v-if="item.shop_nick" class="record-shop">[{{ item.shop_nick }}]</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-line record-line--split">
|
||||||
|
<view class="record-half">
|
||||||
|
<text class="record-half-label">商品数:</text>
|
||||||
|
<text class="record-half-value">{{ item.items_count || 0 }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-half">
|
||||||
|
<text class="record-half-label">数量:</text>
|
||||||
|
<text class="record-half-value">{{ item.items_total || 0 }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="record-right">
|
||||||
|
<text
|
||||||
|
class="record-status"
|
||||||
|
:class="item.recheck_status === 'fin' ? 'record-status--done' : 'record-status--pending'"
|
||||||
|
>{{ item.recheck_status === 'fin' ? '已复核' : '待复核' }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-right">
|
<view class="record-footer">
|
||||||
<text
|
<text class="record-time">{{ item.create_at || item.pick_time || '--' }}</text>
|
||||||
class="record-status"
|
<view v-if="item.recheck_status !== 'fin'" class="record-actions">
|
||||||
:class="currentSubTab === 0 ? 'record-status--pending' : 'record-status--done'"
|
<u-button
|
||||||
>{{ currentSubTab === 0 ? '待复核' : '已复核' }}</text>
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
:customStyle="{ backgroundColor: '#e74c3c', borderColor: '#e74c3c', fontSize: '26rpx', height: '60rpx', lineHeight: '60rpx', padding: '0 20rpx' }"
|
||||||
|
@click="handleStartReview(item)"
|
||||||
|
>
|
||||||
|
开始复核
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-footer">
|
</template>
|
||||||
<text class="record-time">{{ item.reviewTime || item.createTime || '--' }}</text>
|
<!-- 团购模式:波次汇总列表 -->
|
||||||
<view v-if="currentSubTab === 0" class="record-actions">
|
<template v-else>
|
||||||
<u-button
|
<view
|
||||||
type="primary"
|
v-for="item in listData"
|
||||||
size="mini"
|
:key="item.wave_id"
|
||||||
:customStyle="{ backgroundColor: '#e74c3c', borderColor: '#e74c3c', fontSize: '26rpx', height: '60rpx', lineHeight: '60rpx', padding: '0 20rpx' }"
|
class="record-item"
|
||||||
@click="handleStartReview(item)"
|
:class="{ 'record-item--reviewed': item.review_assignment_status === 'reviewed' }"
|
||||||
>
|
>
|
||||||
开始复核
|
<view class="record-main">
|
||||||
</u-button>
|
<view class="record-left">
|
||||||
|
<view class="record-line">
|
||||||
|
<text class="record-label">波次号:</text>
|
||||||
|
<text class="record-value">{{ item.wave_no || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-line">
|
||||||
|
<text class="record-label">总单数:</text>
|
||||||
|
<text class="record-value">{{ item.order_count || 0 }}</text>
|
||||||
|
<text class="record-label" style="margin-left:20rpx">已复核:</text>
|
||||||
|
<text class="record-value">{{ item.reviewed_count || 0 }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-line record-line--split">
|
||||||
|
<view class="record-half">
|
||||||
|
<text class="record-half-label">未复核:</text>
|
||||||
|
<text class="record-half-value">{{ item.unreviewed_count || 0 }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-half">
|
||||||
|
<text class="record-half-label">状态:</text>
|
||||||
|
<text class="record-half-value">{{ reviewStatusText(item.review_assignment_status) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="record-right">
|
||||||
|
<text
|
||||||
|
class="record-status"
|
||||||
|
:class="getWaveStatusClass(item.review_assignment_status)"
|
||||||
|
>{{ reviewStatusText(item.review_assignment_status) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="record-footer">
|
||||||
|
<text class="record-time">{{ item.create_time || '--' }}</text>
|
||||||
|
<view v-if="item.review_assignment_status !== 'reviewed'" class="record-actions">
|
||||||
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
:customStyle="{ backgroundColor: '#e74c3c', borderColor: '#e74c3c', fontSize: '26rpx', height: '60rpx', lineHeight: '60rpx', padding: '0 20rpx' }"
|
||||||
|
@click="handleStartReview(item)"
|
||||||
|
>
|
||||||
|
开始复核
|
||||||
|
</u-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="safe-area-bottom"></view>
|
<view class="safe-area-bottom"></view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@ -168,6 +224,14 @@ export default {
|
|||||||
paginationTotal: 0
|
paginationTotal: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
isScatterMode() {
|
||||||
|
return this.currentMode === 'scatter';
|
||||||
|
},
|
||||||
|
isGroupMode() {
|
||||||
|
return this.currentMode === 'group';
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fetchList();
|
this.fetchList();
|
||||||
},
|
},
|
||||||
@ -220,25 +284,77 @@ export default {
|
|||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
this.fetchList();
|
this.fetchList();
|
||||||
},
|
},
|
||||||
fetchList() {
|
async fetchList() {
|
||||||
const params = {
|
uni.showLoading({ title: '加载中...' });
|
||||||
mode: this.currentMode,
|
try {
|
||||||
status: this.currentSubTab === 0 ? 'pending' : 'reviewed',
|
const listType = this.currentMode === 'group' ? 'group' : 'single';
|
||||||
keyword: this.keyword,
|
const where = {};
|
||||||
page: this.currentPage,
|
if (this.keyword) {
|
||||||
pageSize: this.pageSize
|
where.keyword = this.keyword;
|
||||||
};
|
}
|
||||||
console.log('[orderReviewList] fetchList params:', params);
|
// 待复核/已复核筛选
|
||||||
// TODO: 对接实际API接口,更新 listData 和 paginationTotal
|
if (this.currentMode === 'scatter') {
|
||||||
|
if (this.currentSubTab === 0) {
|
||||||
|
where.recheck_status = 'pending';
|
||||||
|
} else {
|
||||||
|
where.recheck_status = 'fin';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.currentSubTab === 0) {
|
||||||
|
where.review_assignment_status = ['unreviewed', 'partially_reviewed'];
|
||||||
|
} else {
|
||||||
|
where.review_assignment_status = 'reviewed';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
list_type: listType,
|
||||||
|
where,
|
||||||
|
pagination: {
|
||||||
|
page: this.currentPage,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
}
|
||||||
|
};
|
||||||
|
console.log('[orderReviewList] fetchList params:', JSON.stringify(params));
|
||||||
|
const response = await this.$http('order.recheckOrder.recheckOrderList', params);
|
||||||
|
const data = response?.data || response || {};
|
||||||
|
this.listData = Array.isArray(data.list) ? data.list : [];
|
||||||
|
const pag = data.pagination || {};
|
||||||
|
this.paginationTotal = pag.total || 0;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[orderReviewList] fetchList error:', error);
|
||||||
|
this.listData = [];
|
||||||
|
this.paginationTotal = 0;
|
||||||
|
} finally {
|
||||||
|
uni.hideLoading();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handlePageChange(page) {
|
handlePageChange(page) {
|
||||||
this.currentPage = page;
|
this.currentPage = page;
|
||||||
this.fetchList();
|
this.fetchList();
|
||||||
},
|
},
|
||||||
|
reviewStatusText(status) {
|
||||||
|
const map = {
|
||||||
|
'unreviewed': '未复核',
|
||||||
|
'partially_reviewed': '部分复核',
|
||||||
|
'reviewed': '已复核'
|
||||||
|
};
|
||||||
|
return map[status] || status || '--';
|
||||||
|
},
|
||||||
|
getWaveStatusClass(status) {
|
||||||
|
if (status === 'reviewed') return 'record-status--done';
|
||||||
|
if (status === 'partially_reviewed') return 'record-status--partial';
|
||||||
|
return 'record-status--pending';
|
||||||
|
},
|
||||||
handleStartReview(item) {
|
handleStartReview(item) {
|
||||||
uni.navigateTo({
|
if (this.currentMode === 'scatter') {
|
||||||
url: `/pages/work/order/order-review?orderId=${item.id}&mode=${this.currentMode}`
|
uni.navigateTo({
|
||||||
});
|
url: `/pages/work/order/order-review?orderId=${item.order_id}`
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/work/order/order-review?waveId=${item.wave_id}&mode=group`
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -552,6 +668,11 @@ export default {
|
|||||||
background: #fdf6ec;
|
background: #fdf6ec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.record-status--partial {
|
||||||
|
color: #2979ff;
|
||||||
|
background: #ecf5ff;
|
||||||
|
}
|
||||||
|
|
||||||
.record-status--done {
|
.record-status--done {
|
||||||
color: #67c23a;
|
color: #67c23a;
|
||||||
background: #f0f9eb;
|
background: #f0f9eb;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user