diff --git a/pages/work/order/orderReviewList.vue b/pages/work/order/orderReviewList.vue index d339b30..e687dbe 100644 --- a/pages/work/order/orderReviewList.vue +++ b/pages/work/order/orderReviewList.vue @@ -82,54 +82,110 @@ {{ currentSubTab === 0 ? '暂无待复核订单' : '暂无已复核订单' }} - - - - - 订单号: - {{ item.orderNo || '--' }} - - - 快递单号: - {{ item.waybillNo || '--' }} - - - - 商品数: - {{ item.goodsCount || 0 }} + + + + @@ -168,6 +224,14 @@ export default { paginationTotal: 0 }; }, + computed: { + isScatterMode() { + return this.currentMode === 'scatter'; + }, + isGroupMode() { + return this.currentMode === 'group'; + } + }, created() { this.fetchList(); }, @@ -220,25 +284,77 @@ export default { this.currentPage = 1; this.fetchList(); }, - fetchList() { - const params = { - mode: this.currentMode, - status: this.currentSubTab === 0 ? 'pending' : 'reviewed', - keyword: this.keyword, - page: this.currentPage, - pageSize: this.pageSize - }; - console.log('[orderReviewList] fetchList params:', params); - // TODO: 对接实际API接口,更新 listData 和 paginationTotal + async fetchList() { + uni.showLoading({ title: '加载中...' }); + try { + const listType = this.currentMode === 'group' ? 'group' : 'single'; + const where = {}; + if (this.keyword) { + where.keyword = this.keyword; + } + // 待复核/已复核筛选 + 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) { this.currentPage = page; 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) { - uni.navigateTo({ - url: `/pages/work/order/order-review?orderId=${item.id}&mode=${this.currentMode}` - }); + if (this.currentMode === 'scatter') { + 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; } +.record-status--partial { + color: #2979ff; + background: #ecf5ff; +} + .record-status--done { color: #67c23a; background: #f0f9eb;