修改复核列表页面
This commit is contained in:
parent
bdb44a385b
commit
9cf1b2331c
@ -453,6 +453,14 @@ export default {
|
|||||||
isSystemApi: true
|
isSystemApi: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
deliveryOrder: {
|
||||||
|
list: {
|
||||||
|
path: "order.deliveryOrder.list",
|
||||||
|
auth: true,
|
||||||
|
method: "POST",
|
||||||
|
isSystemApi: true
|
||||||
|
}
|
||||||
|
},
|
||||||
detail: {
|
detail: {
|
||||||
path: "order.detail",
|
path: "order.detail",
|
||||||
auth: true,
|
auth: true,
|
||||||
|
|||||||
4
env.js
4
env.js
@ -1,4 +1,4 @@
|
|||||||
// export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
export const BASE_URL = 'http://qimen.wms.gztbyc.com' //生产环境接口地址
|
||||||
export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
// export const BASE_URL = 'http://192.168.11.56:6060' //开发环境接口地址
|
||||||
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
export const API_URL = `${BASE_URL}/system` //后台接口域名
|
||||||
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
export const IMG_URL = 'https://ye4s.file.gzxunren.com' //全局网络图片地址变量,css背景图片地址变量在uni.scss
|
||||||
|
|||||||
@ -85,70 +85,95 @@
|
|||||||
<!-- 散单模式:订单列表 -->
|
<!-- 散单模式:订单列表 -->
|
||||||
<template v-if="isScatterMode">
|
<template v-if="isScatterMode">
|
||||||
<view
|
<view
|
||||||
v-for="item in listData"
|
v-for="(item, index) in listData"
|
||||||
:key="item.order_id"
|
:key="'scatter-' + index"
|
||||||
class="record-item"
|
class="record-item"
|
||||||
>
|
>
|
||||||
<text class="record-simple-text">
|
<template v-if="currentSubTab === 1">
|
||||||
{{ item.delivery_order_code || '--' }}
|
<view class="record-main">
|
||||||
<text
|
<view class="record-index-box">{{ String(index + 1).padStart(2, '0') }}</view>
|
||||||
class="record-simple-status"
|
<view class="record-waybill">
|
||||||
:class="item.pick_status === 'printed' ? 'record-simple-status--done' : 'record-simple-status--pending'"
|
<text class="record-waybill-text">
|
||||||
>({{ getPickStatusText(item.pick_status) }})</text>
|
{{ (item.waybill_codes && item.waybill_codes[0]) || '--' }}
|
||||||
</text>
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="record-wave-box">
|
||||||
|
<text class="record-wave-text">{{ item.wave_no || '--' }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<text class="record-simple-text">
|
||||||
|
{{ item.delivery_order_code || '--' }}
|
||||||
|
<text
|
||||||
|
class="record-simple-status"
|
||||||
|
:class="item.pick_status === 'printed' ? 'record-simple-status--done' : 'record-simple-status--pending'"
|
||||||
|
>({{ getPickStatusText(item.pick_status) }})</text>
|
||||||
|
</text>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<!-- 团购模式:波次汇总列表 -->
|
<!-- 团购模式:波次汇总列表 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view
|
<view
|
||||||
v-for="item in listData"
|
v-for="(item, index) in listData"
|
||||||
:key="item.wave_id"
|
:key="'group-' + index"
|
||||||
class="record-item"
|
class="record-item"
|
||||||
:class="{ 'record-item--reviewed': item.review_assignment_status === 'reviewed' }"
|
:class="{ 'record-item--reviewed': item.review_assignment_status === 'reviewed' }"
|
||||||
>
|
>
|
||||||
<view class="record-main">
|
<template v-if="currentSubTab === 1">
|
||||||
<view class="record-left">
|
<view class="record-main">
|
||||||
<view class="record-line">
|
<view class="record-index-box">{{ String(index + 1).padStart(2, '0') }}</view>
|
||||||
<text class="record-label">波次号:</text>
|
<view class="record-waybill">
|
||||||
<text class="record-value">{{ item.wave_no || '--' }}</text>
|
<text class="record-waybill-text">{{ item.wave_no || '--' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-line">
|
</view>
|
||||||
<text class="record-label">总单数:</text>
|
</template>
|
||||||
<text class="record-value">{{ item.order_count || 0 }}</text>
|
<template v-else>
|
||||||
<text class="record-label" style="margin-left:20rpx">已复核:</text>
|
<view class="record-main">
|
||||||
<text class="record-value">{{ item.reviewed_count || 0 }}</text>
|
<view class="record-left">
|
||||||
</view>
|
<view class="record-line">
|
||||||
<view class="record-line record-line--split">
|
<text class="record-label">波次号:</text>
|
||||||
<view class="record-half">
|
<text class="record-value">{{ item.wave_no || '--' }}</text>
|
||||||
<text class="record-half-label">未复核:</text>
|
|
||||||
<text class="record-half-value">{{ item.unreviewed_count || 0 }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="record-half">
|
<view class="record-line">
|
||||||
<text class="record-half-label">状态:</text>
|
<text class="record-label">总单数:</text>
|
||||||
<text class="record-half-value">{{ reviewStatusText(item.review_assignment_status) }}</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>
|
</view>
|
||||||
|
<view class="record-right">
|
||||||
|
<text
|
||||||
|
class="record-status"
|
||||||
|
:class="getWaveStatusClass(item.review_assignment_status)"
|
||||||
|
>{{ reviewStatusText(item.review_assignment_status) }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="record-right">
|
<view class="record-footer">
|
||||||
<text
|
<text class="record-time">{{ item.create_time || '--' }}</text>
|
||||||
class="record-status"
|
<view v-if="item.review_assignment_status !== 'reviewed'" class="record-actions">
|
||||||
:class="getWaveStatusClass(item.review_assignment_status)"
|
<u-button
|
||||||
>{{ reviewStatusText(item.review_assignment_status) }}</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>
|
</template>
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
@ -250,6 +275,76 @@ export default {
|
|||||||
this.fetchList();
|
this.fetchList();
|
||||||
},
|
},
|
||||||
async 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: '加载中...' });
|
uni.showLoading({ title: '加载中...' });
|
||||||
try {
|
try {
|
||||||
const where = {};
|
const where = {};
|
||||||
@ -261,8 +356,6 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.currentSubTab === 0) {
|
if (this.currentSubTab === 0) {
|
||||||
where.review_assignment_status = ['unreviewed', 'partially_reviewed'];
|
where.review_assignment_status = ['unreviewed', 'partially_reviewed'];
|
||||||
} else {
|
|
||||||
where.review_assignment_status = 'reviewed';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const pagination = {
|
const pagination = {
|
||||||
@ -271,7 +364,7 @@ export default {
|
|||||||
};
|
};
|
||||||
const requestParams = this.currentMode === 'scatter'
|
const requestParams = this.currentMode === 'scatter'
|
||||||
? { where: {}, pagination }
|
? { where: {}, pagination }
|
||||||
: { where, pagination, list_type: 'group' };
|
: { where: {}, pagination, list_type: 'group' };
|
||||||
console.log('[orderReviewList] fetchList params:', JSON.stringify(requestParams));
|
console.log('[orderReviewList] fetchList params:', JSON.stringify(requestParams));
|
||||||
// 散单模式使用散单复核接口,团购模式使用原有接口
|
// 散单模式使用散单复核接口,团购模式使用原有接口
|
||||||
const apiName = this.currentMode === 'scatter'
|
const apiName = this.currentMode === 'scatter'
|
||||||
@ -576,10 +669,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.record-simple-text {
|
.record-simple-text {
|
||||||
font-size: 30rpx;
|
font-size: 34rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
padding: 0 24rpx;
|
padding: 0 16rpx;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-simple-status {
|
.record-simple-status {
|
||||||
@ -598,7 +692,6 @@ export default {
|
|||||||
|
|
||||||
.record-main {
|
.record-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-left {
|
.record-left {
|
||||||
@ -606,6 +699,36 @@ export default {
|
|||||||
min-width: 0;
|
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 {
|
.record-line {
|
||||||
margin-bottom: 12rpx;
|
margin-bottom: 12rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -676,6 +799,23 @@ export default {
|
|||||||
background: #f0f9eb;
|
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 {
|
.record-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user