diff --git a/core/request/apis.js b/core/request/apis.js index 600e3a2..9d8dbb4 100644 --- a/core/request/apis.js +++ b/core/request/apis.js @@ -453,6 +453,14 @@ export default { isSystemApi: true } }, + deliveryOrder: { + list: { + path: "order.deliveryOrder.list", + auth: true, + method: "POST", + isSystemApi: true + } + }, detail: { path: "order.detail", auth: true, diff --git a/env.js b/env.js index c33f58a..b87b72a 100644 --- a/env.js +++ b/env.js @@ -1,4 +1,4 @@ -// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 -export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 +export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址 +// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址 export const API_URL = `${BASE_URL}/system` //后台接口域名 export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss diff --git a/pages/work/order/orderReviewList.vue b/pages/work/order/orderReviewList.vue index 439cbaa..d6de6fb 100644 --- a/pages/work/order/orderReviewList.vue +++ b/pages/work/order/orderReviewList.vue @@ -85,70 +85,95 @@ @@ -250,6 +275,76 @@ export default { this.fetchList(); }, async fetchList() { + // 已复核列表 — 调用 order.deliveryOrder.list 接口 + if (this.currentSubTab === 1) { + uni.showLoading({ title: '加载中...' }); + try { + const today = new Date(); + const yesterday = new Date(today); + yesterday.setDate(yesterday.getDate() - 1); + const fmtDate = (d) => { + const y = d.getFullYear(); + const m = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + return `${y}-${m}-${day}`; + }; + const pagination = { + page: this.currentPage, + pageSize: this.pageSize + }; + const where = { + create_at: { + operator: 'between', + type: 'datetimerange', + value: [ + `${fmtDate(yesterday)} 00:00:00`, + `${fmtDate(today)} 23:59:59` + ] + } + }; + const response = await this.$http('order.deliveryOrder.list', { + pagination, + where, + sort: { + sortField: 'updated_at', + sortOrder: 'DESC' + } + }); + const data = response?.data || response || {}; + let rawList = Array.isArray(data.list) ? data.list : []; + // 根据模式过滤波次前缀 + if (this.currentMode === 'scatter') { + rawList = rawList.filter(item => { + const w = (item.wave_no || '').toUpperCase(); + return w.startsWith('E') || w.startsWith('D'); + }); + } else { + rawList = rawList.filter(item => { + const w = (item.wave_no || '').toUpperCase(); + return w.startsWith('B'); + }); + // 团购模式同波次号去重 + const seen = new Set(); + rawList = rawList.filter(item => { + const key = item.wave_no || ''; + if (seen.has(key)) return false; + seen.add(key); + return true; + }); + } + this.listData = rawList; + const pag = data.pagination || {}; + this.paginationTotal = pag.total || 0; + } catch (error) { + console.error('[orderReviewList] fetch reviewed list error:', error); + this.listData = []; + this.paginationTotal = 0; + } finally { + uni.hideLoading(); + } + return; + } + // 待复核列表 uni.showLoading({ title: '加载中...' }); try { const where = {}; @@ -261,8 +356,6 @@ export default { } if (this.currentSubTab === 0) { where.review_assignment_status = ['unreviewed', 'partially_reviewed']; - } else { - where.review_assignment_status = 'reviewed'; } } const pagination = { @@ -271,7 +364,7 @@ export default { }; const requestParams = this.currentMode === 'scatter' ? { where: {}, pagination } - : { where, pagination, list_type: 'group' }; + : { where: {}, pagination, list_type: 'group' }; console.log('[orderReviewList] fetchList params:', JSON.stringify(requestParams)); // 散单模式使用散单复核接口,团购模式使用原有接口 const apiName = this.currentMode === 'scatter' @@ -576,10 +669,11 @@ export default { } .record-simple-text { - font-size: 30rpx; + font-size: 34rpx; color: #000000; font-weight: 500; - padding: 0 24rpx; + padding: 0 16rpx; + word-break: break-all; } .record-simple-status { @@ -598,7 +692,6 @@ export default { .record-main { display: flex; - justify-content: space-between; } .record-left { @@ -606,6 +699,36 @@ export default { min-width: 0; } +.record-index-box { + font-size: 34rpx; + color: #fff; + font-weight: 500; + width: 2em; + text-align: center; + flex-shrink: 0; + background: #2979ff; + display: flex; + align-items: center; + justify-content: center; + margin: -20rpx 0; + padding: 20rpx 0; +} + +.record-waybill { + flex: 1; + min-width: 0; + display: flex; + align-items: center; + padding: 0 16rpx; +} + +.record-waybill-text { + font-size: 34rpx; + color: #000000; + font-weight: 500; + word-break: break-all; +} + .record-line { margin-bottom: 12rpx; display: flex; @@ -676,6 +799,23 @@ export default { background: #f0f9eb; } +.record-wave-box { + background: #e74c3c; + margin: -20rpx 0; + padding: 20rpx 0; + flex-shrink: 0; + display: flex; + align-items: center; + justify-content: center; + width: 320rpx; +} + +.record-wave-text { + font-size: 34rpx; + color: #fff; + word-break: break-all; +} + .record-footer { display: flex; justify-content: space-between;