✨ 进行中配载可编辑、汇票选择与收款方展示优化,并支持业务部门与待确认回单

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-22 15:41:01 +08:00
parent d7969c191a
commit 8d9fe998c0
11 changed files with 783 additions and 98 deletions
+1
View File
@@ -42,6 +42,7 @@ export const waybillStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '待执行', value: 'pending' },
{ label: '进行中', value: 'running' },
{ label: '待确认回单', value: 'pending_return' },
{ label: '已完成', value: 'completed' },
{ label: '已取消', value: 'cancelled' },
];
+17 -3
View File
@@ -478,7 +478,15 @@ export const config = {
formatStatus(row, prop, defaultText) {
if (prop !== 'businessStatus') return defaultText;
const status = String(row.businessStatus || '');
const terminalStatuses = ['draft', 'completed', 'cancelled', 'waiting_dispatch', 'dispatching'];
const terminalStatuses = [
'draft',
'completed',
'cancelled',
'waiting_dispatch',
'dispatching',
'pending_return',
];
if (status === 'pending_return') return '待确认回单';
const needAccept =
row.requireAccept === true ||
row.requireAccept === 1 ||
@@ -497,14 +505,20 @@ export const config = {
getDriverRejectReason,
isDriverRejectedWaybill,
canEdit(row) {
// 进行中的运单不允许编辑
// 进行中、待确认回单不允许编辑
if (isInProgressStatus(row, row.businessStatusName)) {
return false;
}
if (String(row.businessStatus || '') === 'pending_return') {
return false;
}
return !isDriverRejectedWaybill(row);
},
canCancel(row) {
// 进行中的运单不允许取消
// 进行中、待确认回单不允许取消
if (String(row.businessStatus || '') === 'pending_return') {
return false;
}
return !isInProgressStatus(row, row.businessStatusName);
},
deleteStatus: ['draft'],